import { inject as Tt, ref as le, provide as kt, readonly as gO, computed as R, Fragment as Ve, isVNode as Qi, Comment as iw, Text as rw, defineComponent as ye, reactive as Dn, getCurrentInstance as ci, onMounted as Pt, onUpdated as Ds, onUnmounted as Lo, watch as Ie, unref as M, shallowRef as Pe, watchEffect as Lt, onBeforeUnmount as At, triggerRef as hO, createVNode as v, h as ro, Transition as Ti, withDirectives as Zi, resolveDirective as vO, cloneVNode as vl, render as Ia, nextTick as Nt, toRef as Ut, withModifiers as No, vShow as mr, onBeforeMount as Xd, Teleport as Qd, createTextVNode as Ee, isRef as aw, toRefs as Sd, toRaw as ii, useAttrs as mO, onBeforeUpdate as Gh, getCurrentScope as lw, onScopeDispose as sw, TransitionGroup as Kh, onActivated as bO, openBlock as ee, createElementBlock as ve, normalizeStyle as xt, normalizeClass as ct, renderSlot as Wr, createCommentVNode as He, renderList as It, createBlock as Ze, mergeProps as yO, withCtx as ce, useSlots as xO, createElementVNode as B, resolveComponent as Vt, toDisplayString as te, resolveDynamicComponent as uw, toValue as wO } from "vue";
import { merge as tb, isEmpty as cw } from "lodash-es";
import { defineStore as Yh } from "pinia";
import dw from "lodash-es/isPlainObject";
import Uh from "lodash-es/isEqual";
import ep from "lodash-es/uniq";
import Xn from "dayjs";
import SO from "dayjs/plugin/weekday";
import CO from "dayjs/plugin/localeData";
import $O from "dayjs/plugin/weekOfYear";
import PO from "dayjs/plugin/weekYear";
import OO from "dayjs/plugin/quarterOfYear";
import IO from "dayjs/plugin/advancedFormat";
import MO from "dayjs/plugin/customParseFormat";
import td from "lodash-es/cloneDeep";
import TO from "lodash-es/find";
import kO from "lodash-es/intersection";
import EO from "lodash-es/debounce";
import _O from "lodash-es/omit";
import fw from "lodash-es/pick";
const AO = {
  "common.auto": "Auto",
  "app.tab.dashboard": "Dashboard",
  "app.tab.scene": "Scene View",
  "app.tab.topology": "Topology",
  "app.tab.logs": "Logs",
  "app.tab.traces": "Traces",
  "app.tab.querybuilder": "Query Builder",
  "app.tab.grafana": "Grafana Data",
  "app.tab.zabbix": "Zabbix",
  "app.theme.toDark": "Switch to Dark",
  "app.theme.toLight": "Switch to Light",
  "time.last1h": "Last 1 hour",
  "time.last3h": "Last 3 hours",
  "time.last6h": "Last 6 hours",
  "time.last24h": "Last 24 hours",
  "time.last7d": "Last 7 days",
  "time.last30d": "Last 30 days",
  "panel.menu.edit": "Edit",
  "panel.menu.clone": "Clone",
  "panel.menu.fullscreen": "Fullscreen",
  "panel.menu.refresh": "Refresh",
  "panel.menu.remove": "Remove",
  "panel.remove.title": 'Remove "{title}"?',
  "panel.remove.content": "This action cannot be undone.",
  "panel.remove.ok": "Remove",
  "dashboard.edit": "Edit",
  "dashboard.save": "Save",
  "dashboard.cancel": "Cancel",
  "dashboard.cancelConfirmTitle": "Discard unsaved changes?",
  "dashboard.cancelConfirmOk": "Discard changes",
  "dashboard.cancelConfirmCancel": "Keep editing",
  "dashboard.addPanel": "Add Panel",
  "dashboard.clearPanels": "Clear Panels",
  "dashboard.clearConfirmTitle": "Clear all panels?",
  "dashboard.clearConfirmOk": "Clear all",
  "dashboard.export": "Export",
  "dashboard.import": "Import",
  "dashboard.exportSuccess": "Dashboard exported",
  "dashboard.importSuccess": "Dashboard imported",
  "dashboard.importError": "Invalid dashboard JSON",
  "config.section.general": "General",
  "config.section.value": "Stat Style",
  "config.section.style": "Style",
  "config.section.tooltip": "Tooltip",
  "config.section.format": "Formatting",
  "config.section.thresholds": "Thresholds ({n})",
  "config.section.axes": "Axes",
  "config.section.links": "Links ({n})",
  "config.section.gaugeStyle": "Gauge Style",
  "config.section.pieStyle": "Pie Style",
  "config.section.histStyle": "Histogram Style",
  "config.section.tableStyle": "Table Style",
  "config.section.overrides": "Field Overrides",
  "config.type.timeseries": "Time Series",
  "config.type.bar": "Bar Chart",
  "config.type.histogram": "Histogram",
  "config.type.stat": "Stat / Value",
  "config.type.gauge": "Gauge",
  "config.type.table": "Table",
  "config.type.pie": "Pie Chart",
  "panel.type.desc.timeseries": "Line/area chart with time axis",
  "panel.type.desc.bar": "Grouped or stacked bars",
  "panel.type.desc.histogram": "Distribution buckets",
  "panel.type.desc.stat": "Single value with sparkline",
  "panel.type.desc.gauge": "Circular gauge meter",
  "panel.type.desc.table": "Sortable data table",
  "panel.type.desc.pie": "Pie or donut chart",
  "config.field.title": "Title",
  "config.field.description": "Description",
  "config.field.panelType": "Panel Type",
  "config.field.colorScheme": "Color Scheme",
  "config.field.lineWidth": "Line Width",
  "config.field.fillOpacity": "Fill Opacity",
  "config.field.drawStyle": "Style",
  "config.field.interpolation": "Interpolation",
  "config.field.lineStyle": "Line Style",
  "config.field.showPoints": "Show Points",
  "config.field.legendPosition": "Legend Position",
  "config.field.unit": "Unit",
  "config.field.decimals": "Decimals",
  "config.field.min": "Min",
  "config.field.max": "Max",
  "config.field.reducer": "Calculation",
  "config.field.tooltipMode": "Tooltip Mode",
  "config.field.softMin": "Soft Min",
  "config.field.softMax": "Soft Max",
  "config.field.logScale": "Log Scale",
  "config.field.axisPlacement": "Placement",
  "config.field.showGridLines": "Grid Lines",
  "config.field.scaleDistribution": "Scale",
  "config.field.centeredZero": "Centered Zero",
  "config.field.stacked": "Stacked",
  "config.interp.linear": "Linear",
  "config.interp.smooth": "Smooth",
  "config.interp.step": "Step",
  "config.linestyle.solid": "Solid",
  "config.linestyle.dashed": "Dashed",
  "config.linestyle.dotted": "Dotted",
  "config.legend.bottom": "Bottom",
  "config.legend.right": "Right",
  "config.legend.hidden": "Hidden",
  "config.unit.none": "None",
  "config.unit.ms": "Milliseconds (ms)",
  "config.unit.percent": "Percent (0-100)",
  "config.unit.reqps": "Requests/sec",
  "config.threshold.label": "Label",
  "config.threshold.base": "Base",
  "config.threshold.add": "Add Threshold",
  "config.threshold.mode": "Threshold Mode",
  "config.threshold.modeAbsolute": "Absolute",
  "config.threshold.modePercentage": "Percentage",
  "dashboard.refresh": "Refresh",
  "variable.modal.placeholder": 'Click "Add Variable" on the left to start',
  "variable.custom.title": "Custom Options",
  "variable.custom.add": "Add Option",
  "variable.custom.allValue": "All Value",
  "config.scheme.grafana-classic": "Grafana Classic",
  "config.scheme.green-yellow-red": "Green-Yellow-Red",
  "config.scheme.red-yellow-green": "Red-Yellow-Green",
  "config.scheme.blue-yellow-red": "Blue-Yellow-Red",
  "config.scheme.blue-purple": "Blue-Purple",
  "config.scheme.yellow-blue": "Yellow-Blue",
  "config.scheme.blues": "Blues",
  "config.scheme.reds": "Reds",
  "config.scheme.GrYlRd": "GrYlRd",
  "config.scheme.purple-orange": "Purple-Orange",
  "variable.modal.title": "Variable Config",
  "variable.modal.save": "Save",
  "variable.modal.cancel": "Cancel",
  "variable.modal.delete": "Delete Variable",
  "variable.modal.add": "Add Variable",
  "variable.modal.empty": 'Click "Add Variable" on the left to start',
  "variable.nav.count": "Variables ({n})",
  "variable.nav.unnamed": "(unnamed)",
  "variable.general.title": "General",
  "variable.general.type": "Type",
  "variable.general.name": "Name",
  "variable.general.label": "Label",
  "variable.general.description": "Description",
  "variable.type.custom": "Custom",
  "variable.type.query": "Query",
  "variable.type.textbox": "Text box",
  "variable.type.datasource": "Data source",
  "variable.type.constant": "Constant",
  "variable.query.title": "Query options",
  "variable.query.multi": "Multi-value",
  "variable.query.includeAll": "Include All option",
  "variable.query.refresh": "Refresh",
  "variable.query.refresh.onLoad": "On dashboard load",
  "variable.query.refresh.onTimeChange": "On time range change",
  "qb.datasource": "Data Source",
  "qb.addQuery": "Add Query",
  "qb.queryOptions": "Query options",
  "qb.pattern": "Pattern",
  "qb.pattern.sine": "Sine wave",
  "qb.pattern.spike": "Spike",
  "qb.pattern.step": "Step",
  "qb.pattern.sawtooth": "Sawtooth",
  "qb.pattern.noise": "Random noise",
  "qb.pattern.trendUp": "Trend up",
  "qb.pattern.trendDown": "Trend down",
  "qb.pattern.plateau": "Plateau",
  "qb.pattern.randomWalk": "Random walk",
  "qb.pattern.live": "Live",
  "qb.seriesCount": "Series Count",
  "qb.liveAmplitude": "Amplitude",
  "qb.functions": "Functions",
  "qb.functions.add": "Add",
  "qb.options": "Options",
  "qb.queryOptions.maxDataPoints": "Max data points",
  "qb.queryOptions.minInterval": "Min interval",
  "qb.queryOptions.minIntervalPlaceholder": "No limit",
  "qb.queryOptions.interval": "Interval",
  "qb.queryOptions.intervalHint": "time range / max data points",
  "qb.queryOptions.relativeTime": "Relative time",
  "qb.queryOptions.timeShift": "Time shift",
  "config.scheme.classic": "Classic",
  "config.scheme.tableau10": "Tableau 10",
  "config.scheme.fixed": "Single Color",
  "config.scheme.thresholds": "From Thresholds",
  "config.trend.up": "Up ↑",
  "config.trend.down": "Down ↓",
  "config.trend.flat": "Flat",
  "config.field.pieType": "Pie Type",
  "config.field.pieSliceSorting": "Slice Sorting",
  "config.pieType.pie": "Pie",
  "config.pieType.donut": "Donut",
  "config.sort.desc": "Descending",
  "config.sort.asc": "Ascending",
  "config.sort.none": "None",
  "config.field.pieLabels": "Slice Labels",
  "config.pieLabel.name": "Name",
  "config.pieLabel.percent": "Percent",
  "config.pieLabel.value": "Value",
  "config.field.pieShow": "Show",
  "config.pieShow.calculate": "Calculate (Reducer)",
  "config.pieShow.all": "All Values",
  "config.field.legendMode": "Legend Mode",
  "config.legendMode.list": "List",
  "config.legendMode.table": "Table",
  "config.field.legendValues": "Legend Values",
  "config.legendValue.min": "Min",
  "config.legendValue.max": "Max",
  "config.legendValue.mean": "Mean",
  "config.legendValue.sum": "Sum",
  "config.legendValue.last": "Last",
  "config.legendValue.first": "First",
  "tooltip.pinned": "Pinned",
  "tooltip.datetimeFormat": "MMM DD HH:mm:ss",
  "config.reducer.lastNotNull": "Last *",
  "config.reducer.last": "Last",
  "config.reducer.firstNotNull": "First *",
  "config.reducer.first": "First",
  "config.reducer.min": "Min",
  "config.reducer.max": "Max",
  "config.reducer.mean": "Mean",
  "config.reducer.sum": "Total",
  "config.reducer.count": "Count",
  "config.reducer.range": "Range",
  "config.reducer.median": "Median",
  "config.reducer.stdDev": "Std Dev",
  "config.reducer.variance": "Variance",
  "config.reducer.delta": "Delta",
  "config.reducer.diff": "Difference",
  "config.reducer.diffperc": "Difference %",
  "config.reducer.step": "Step",
  "config.reducer.logmin": "Min (above zero)",
  "config.reducer.countAll": "Count all",
  "config.reducer.changeCount": "Change Count",
  "config.reducer.distinctCount": "Distinct Count",
  "config.reducer.allIsZero": "All Zeros",
  "config.reducer.allIsNull": "All Nulls",
  "config.drawStyle.lines": "Lines",
  "config.drawStyle.bars": "Bars",
  "config.drawStyle.points": "Points",
  "config.tooltip.single": "Single",
  "config.tooltip.multi": "All",
  "config.tooltip.none": "Hidden",
  "config.tooltip.sortNone": "None",
  "config.tooltip.sortAsc": "Ascending",
  "config.tooltip.sortDesc": "Descending",
  "config.axis.placement.left": "Left",
  "config.axis.placement.right": "Right",
  "config.axis.placement.hidden": "Hidden",
  "config.axis.grid.all": "All",
  "config.axis.grid.hidden": "Hidden",
  "config.axis.scale.linear": "Linear",
  "config.axis.scale.logarithmic": "Logarithmic",
  "config.gauge.fillWidth": "Active Arc Width",
  "config.gauge.trackWidth": "Track Width",
  "config.gauge.trackColor": "Track Color",
  "config.gauge.capRound": "Round Caps",
  "config.gauge.valueVisible": "Show Value",
  "config.gauge.thresholdDisplay": "Show Thresholds",
  "config.gauge.thresholdDisplayNone": "Off",
  "config.gauge.thresholdDisplayMarker": "Threshold Markers",
  "config.gauge.thresholdDisplayTrack": "Track Bands",
  "config.gauge.orientation": "Layout",
  "config.gauge.orientationAuto": "Auto Grid",
  "config.gauge.orientationHorizontal": "Horizontal",
  "config.gauge.orientationVertical": "Vertical",
  "config.gauge.valueOffsetY": "Value Y Offset",
  // Style section - gradient, nulls, points, stacking
  "config.field.gradientMode": "Gradient Mode",
  "config.gradient.none": "None",
  "config.gradient.opacity": "Opacity",
  "config.gradient.hue": "Hue",
  "config.gradient.scheme": "Scheme",
  "config.field.spanNulls": "Connect Null Values",
  "config.field.insertNulls": "Disconnect Values",
  "config.nulls.never": "Never",
  "config.nulls.always": "Always",
  "config.nulls.threshold": "Threshold",
  "config.points.auto": "Auto",
  "config.points.always": "Always",
  "config.points.never": "Never",
  "config.field.stackSeries": "Stack Series",
  "config.stack.none": "None",
  "config.stack.normal": "Normal",
  "config.stack.percent": "100%",
  // General section
  "config.field.colorSingle": "Fixed Color",
  "config.field.colorDistribution": "Color Distribution",
  "config.colorDist.sequential": "Sequential",
  "config.colorDist.distributed": "Distributed",
  "config.link.newTab": "Open in new tab",
  "config.link.add": "Add link",
  // Bar style
  "config.field.barShowValues": "Show Values",
  "config.showValues.auto": "Auto",
  "config.showValues.always": "Always",
  "config.showValues.never": "Never",
  "config.field.barGroupWidth": "Group Width",
  "config.field.barWidth": "Bar Width",
  "config.field.xTickRotation": "Rotate X Labels",
  // Stat style
  "config.field.orientation": "Orientation",
  "config.orientation.vertical": "Auto (Vertical)",
  "config.orientation.horizontal": "Horizontal",
  "config.field.textMode": "Text Mode",
  "config.textMode.valueAndName": "Value and name",
  "config.textMode.value": "Value only",
  "config.textMode.name": "Name only",
  "config.textMode.none": "None",
  "config.field.colorMode": "Color mode",
  "config.colorMode.value": "Value",
  "config.colorMode.backgroundSolid": "Background Solid",
  "config.colorMode.background": "Background Gradient",
  "config.field.percentChange": "Percent Change",
  "config.field.value": "Value",
  "config.field.unitLabel": "Unit Label",
  "config.field.trend": "Trend",
  // Histogram style
  "config.field.histBucketCount": "Bucket Count",
  "config.field.histBucketSize": "Bucket Size",
  "config.field.histBucketOffset": "Bucket Offset",
  "config.field.histCombineSeries": "Combine Series",
  "config.hist.bucketSizePlaceholder": "Auto",
  // Table style
  "config.field.tableFooterEnabled": "Footer Row",
  "config.field.tableFooterReducers": "Footer Calculation",
  "config.field.tableFooterFields": "Fields",
  "config.field.tableFooterFieldsPlaceholder": "All Numeric Fields",
  "config.section.tableColumnOverrides": "Column Overrides",
  // Axes section
  "config.field.axisName": "Name",
  "config.field.axisLabel": "Label",
  "config.field.axisWidth": "Width",
  "config.field.gridColor": "Grid Color",
  "config.field.axisLine": "Tick Labels",
  "config.field.axisLineColor": "Tick Label Color",
  "config.field.axisTickShow": "Tick Marks",
  "config.field.axisBorder": "Border",
  "config.field.axisBorderColor": "Border Color",
  "config.axis.label.placeholder": "Axis label",
  "config.axis.name.placeholder": "Axis name",
  "config.axis.grid.x": "X",
  "config.axis.grid.y": "Y",
  "config.axis.scale.symlog": "Symlog",
  // Tooltip section
  "config.field.tooltipSort": "Tooltip Sort",
  "config.field.tooltipMaxHeight": "List Max Height",
  "config.field.axisPointer": "Axis Pointer",
  // Unit options
  "config.unit.s": "Seconds (s)",
  "config.unit.bytes": "Bytes",
  "config.unit.percentunit": "Percent (0-1)",
  "config.unit.ops": "Ops/sec",
  "config.unit.bps": "Bits/sec",
  "config.unit.Bps": "Bytes/sec",
  // Gauge
  "config.gauge.arcSweep": "Arc Sweep",
  "config.gauge.paddingX": "Horizontal Padding",
  "config.gauge.paddingY": "Vertical Padding",
  "config.gauge.valueColor": "Value Color",
  "config.gauge.valueSize": "Value Size",
  "config.gauge.colorFromScheme": "Color from Scheme",
  "config.gauge.thresholdLabelDisplay": "Threshold Labels",
  "config.gauge.thresholdLabelNone": "Hidden",
  "config.gauge.thresholdLabelLabel": "Label",
  "config.gauge.thresholdLabelValue": "Value",
  "config.gauge.thresholdLabelBoth": "Label + Value",
  // Panel no data
  "panel.noData": "No data",
  // Override editor
  "config.override.addRule": "Add field override",
  "config.override.addProp": "Add override property",
  "config.override.matcher.byName": "Fields with name",
  "config.override.matcher.byType": "Fields with type",
  "config.override.matcher.byRegexp": "Fields matching regex",
  "config.override.matcher.byFrameRefID": "Fields returned by query",
  "config.override.prop.unit": "Unit",
  "config.override.prop.decimals": "Decimals",
  "config.override.prop.displayName": "Display name",
  "config.override.prop.min": "Min",
  "config.override.prop.max": "Max",
  "config.override.prop.noValue": "No value",
  "config.override.prop.filterable": "Filterable",
  "config.override.prop.thresholds": "Thresholds",
  "config.override.prop.displayMode": "Display mode",
  "config.override.prop.width": "Column width",
  "config.override.prop.align": "Alignment",
  "config.override.prop.hidden": "Hide column",
  "config.override.prop.wrapText": "Wrap text",
  "config.override.group.basic": "Standard options",
  "config.override.group.thresholds": "Thresholds",
  "config.override.group.table": "Table",
  "config.override.type.time": "Time",
  "config.override.type.number": "Number",
  "config.override.type.string": "String",
  "config.override.type.boolean": "Boolean",
  // Table column overrides
  "config.field.tableColHidden": "Hide",
  "config.field.tableColLabel": "Label",
  "config.field.tableColWidth": "Width",
  "config.field.tableColAlign": "Alignment",
  "config.field.tableColDisplayMode": "Display Mode",
  "config.field.tableColWrapText": "Wrap text",
  "config.field.tableColAddName": "Column name",
  "config.tableAlign.auto": "Auto",
  "config.tableAlign.left": "Left",
  "config.tableAlign.center": "Center",
  "config.tableAlign.right": "Right",
  "config.tableDisplayMode.auto": "Auto",
  "config.tableDisplayMode.colored-text": "Colored Text",
  "config.tableDisplayMode.colored-background": "Colored Background",
  "config.tableDisplayMode.gauge": "Gauge",
  "config.tableDisplayMode.data-links": "Data Links",
  "config.tableDisplayMode.json-view": "JSON View",
  "config.tableDisplayMode.pill": "Pill",
  // StatsPicker
  "config.reducer.group.standard": "Standard",
  "config.reducer.group.extended": "Extended",
  "config.reducer.group.boolean": "Boolean",
  "config.reducer.group.percentile": "Percentile",
  "config.reducer.choose": "Choose",
  // Pie limit
  "config.field.pieLimit": "Limit",
  // Variable datasource section
  "variable.ds.title": "Data source options",
  "variable.ds.type": "Data source type",
  "variable.ds.type.placeholder": "Select data source type",
  "variable.ds.filterRegex": "Instance filter regex",
  "variable.ds.multi": "Multi-value",
  "variable.ds.includeAll": "Include All option",
  // Editor - VizPicker
  "editor.vizPicker.title": "Visualization",
  // Editor - Overrides
  "editor.overrides.matcherValue": "Match value",
  "editor.overrides.propValue": "Property value",
  "editor.overrides.addProperty": "Add override property",
  "editor.overrides.addOverride": "Add field override",
  // Zabbix QueryEditor — query types
  "qb.queryType": "Query type",
  "qb.queryType.metrics": "Metrics",
  "qb.queryType.text": "Text",
  "qb.queryType.services": "IT Services",
  "qb.queryType.itemid": "Item ID",
  "qb.queryType.triggers": "Triggers",
  "qb.queryType.problems": "Problems",
  "qb.queryType.macros": "Macros",
  "qb.queryType.lld": "LLD",
  // Zabbix QueryEditor — host/group/item fields
  "panel.group": "Host group",
  "panel.group.placeholder": "Select host group",
  "panel.host": "Host",
  "panel.host.placeholder": "Select host",
  "panel.itemTag": "Item tag",
  "panel.itemTag.placeholder": "Filter by tag",
  "panel.items": "Items",
  "panel.items.placeholder": "Select item",
  // Zabbix QueryEditor — query fields
  "qb.textFilter": "Text filter",
  "qb.textFilter.placeholder": "Regex pattern",
  "qb.useCaptureGroups": "Use capture groups",
  "qb.itemIds": "Item IDs",
  "qb.itemIds.placeholder": "Comma-separated IDs",
  "qb.triggerFilter": "Trigger filter",
  "qb.triggerFilter.placeholder": "Trigger name",
  "qb.problemName": "Problem name",
  "qb.problemName.placeholder": "Filter by name",
  "qb.tags": "Tags",
  "qb.tags.placeholder": "tag:value",
  "qb.show": "Show",
  "qb.severity": "Severity",
  "qb.itService": "IT Service",
  "qb.itService.placeholder": "Select IT service",
  "qb.slaProperty": "SLA property",
  "qb.slaInterval": "SLA interval",
  "qb.macroFilter": "Macro filter",
  // Zabbix QueryEditor — LLD
  "qb.lld.rule": "Discovery rule",
  "qb.lld.rule.placeholder": "Select discovery rule",
  "qb.lld.itemKeys": "Item prototype keys",
  "qb.lld.itemKeys.placeholder": "Select prototype keys",
  // Zabbix QueryEditor — options
  "qb.ack.all": "All",
  "qb.ack.unack": "Unacknowledged",
  "qb.ack.ack": "Acknowledged",
  "qb.sort.default": "Default",
  "qb.sort.lastchange": "Last change",
  "qb.sort.severity": "Severity",
  "qb.trends.default": "Default",
  "qb.trends.true": "Use trends",
  "qb.trends.false": "No trends",
  "qb.options.trends": "Trends",
  "qb.options.showDisabled": "Show disabled",
  "qb.options.valueMapping": "Use value mapping",
  "qb.options.disableAlignment": "Disable alignment",
  "qb.options.acknowledged": "Acknowledged",
  "qb.options.sortBy": "Sort by",
  "qb.options.useTimeRange": "Use time range",
  "qb.options.hostsInMaintenance": "Hosts in maintenance",
  "qb.options.hostProxy": "Host proxy",
  "qb.options.limit": "Limit"
}, pw = {
  "panel.noData": "暂无数据",
  "common.auto": "自动",
  "app.tab.dashboard": "仪表盘",
  "app.tab.scene": "场景视图",
  "app.tab.topology": "拓扑",
  "app.tab.logs": "日志",
  "app.tab.traces": "链路追踪",
  "app.tab.querybuilder": "查询构建器",
  "app.tab.grafana": "Grafana 数据",
  "app.tab.zabbix": "Zabbix",
  "app.theme.toDark": "切换深色",
  "app.theme.toLight": "切换浅色",
  "time.last1h": "最近 1 小时",
  "time.last3h": "最近 3 小时",
  "time.last6h": "最近 6 小时",
  "time.last24h": "最近 24 小时",
  "time.last7d": "最近 7 天",
  "time.last30d": "最近 30 天",
  "panel.menu.edit": "编辑",
  "panel.menu.clone": "克隆",
  "panel.menu.fullscreen": "全屏",
  "panel.menu.refresh": "刷新",
  "panel.menu.remove": "删除",
  "panel.remove.title": '删除 "{title}"？',
  "panel.remove.content": "此操作不可撤销。",
  "panel.remove.ok": "删除",
  "dashboard.edit": "编辑",
  "dashboard.save": "保存",
  "dashboard.cancel": "取消",
  "dashboard.cancelConfirmTitle": "放弃未保存的更改？",
  "dashboard.cancelConfirmOk": "放弃更改",
  "dashboard.cancelConfirmCancel": "继续编辑",
  "dashboard.addPanel": "添加面板",
  "dashboard.clearPanels": "清空面板",
  "dashboard.clearConfirmTitle": "清空所有面板？",
  "dashboard.clearConfirmOk": "确认清空",
  "dashboard.export": "导出",
  "dashboard.import": "导入",
  "dashboard.exportSuccess": "仪表盘已导出",
  "dashboard.importSuccess": "仪表盘已导入",
  "dashboard.importError": "无效的仪表盘 JSON",
  "config.section.general": "基本信息",
  "config.section.value": "数据设置",
  "config.section.style": "图形样式",
  "config.section.tooltip": "悬浮提示窗",
  "config.section.format": "格式化",
  "config.section.thresholds": "阈值 ({n})",
  "config.section.axes": "坐标轴",
  "config.section.links": "链接 ({n})",
  "config.section.gaugeStyle": "图形样式",
  "config.section.pieStyle": "饼图样式",
  "config.section.histStyle": "直方图样式",
  "config.section.tableStyle": "表格样式",
  "config.section.overrides": "字段覆盖",
  "config.type.timeseries": "时序图",
  "config.type.bar": "柱状图",
  "config.type.histogram": "直方图",
  "config.type.stat": "统计值",
  "config.type.gauge": "仪表盘",
  "config.type.table": "表格",
  "config.type.pie": "饼图",
  "panel.type.desc.timeseries": "带时间轴的折线/面积图",
  "panel.type.desc.bar": "分组或堆叠柱状图",
  "panel.type.desc.histogram": "数值分布直方图",
  "panel.type.desc.stat": "单值统计 + 迷你图",
  "panel.type.desc.gauge": "圆弧仪表盘",
  "panel.type.desc.table": "可排序数据表格",
  "panel.type.desc.pie": "饼图 / 环形图",
  "config.field.title": "标题",
  "config.field.description": "描述",
  "config.field.panelType": "面板类型",
  "config.field.colorScheme": "配色方案",
  "config.field.lineWidth": "线宽",
  "config.field.fillOpacity": "填充透明度",
  "config.field.drawStyle": "图形样式",
  "config.field.interpolation": "插值方式",
  "config.field.lineStyle": "线条样式",
  "config.field.showPoints": "显示数据点",
  "config.field.legendPosition": "图例位置",
  "config.field.unit": "单位",
  "config.field.decimals": "小数位数",
  "config.field.min": "最小值",
  "config.field.max": "最大值",
  "config.field.reducer": "计算方式",
  "config.field.tooltipMode": "浮窗触发模式",
  "config.field.softMin": "软最小值",
  "config.field.softMax": "软最大值",
  "config.field.logScale": "对数刻度",
  "config.field.axisPlacement": "轴位置",
  "config.field.showGridLines": "网格线",
  "config.field.scaleDistribution": "刻度类型",
  "config.field.centeredZero": "零点居中",
  "config.field.stacked": "堆叠",
  "config.interp.linear": "线性",
  "config.interp.smooth": "平滑",
  "config.interp.step": "阶梯",
  "config.linestyle.solid": "实线",
  "config.linestyle.dashed": "虚线",
  "config.linestyle.dotted": "点线",
  "config.legend.bottom": "底部",
  "config.legend.right": "右侧",
  "config.legend.hidden": "隐藏",
  "config.unit.none": "无",
  "config.unit.ms": "毫秒 (ms)",
  "config.unit.percent": "百分比 (0-100)",
  "config.unit.reqps": "请求/秒",
  "config.threshold.label": "标签",
  "config.threshold.base": "基础色",
  "config.threshold.add": "添加阈值",
  "config.threshold.mode": "阈值模式",
  "config.threshold.modeAbsolute": "绝对值",
  "config.threshold.modePercentage": "百分比",
  "dashboard.refresh": "刷新",
  "variable.modal.placeholder": '点击左侧"新增变量"开始配置',
  "variable.custom.title": "自定义选项",
  "variable.custom.add": "添加选项",
  "variable.custom.allValue": "全部值",
  "config.scheme.grafana-classic": "Grafana 经典",
  "config.scheme.green-yellow-red": "绿黄红",
  "config.scheme.red-yellow-green": "红黄绿",
  "config.scheme.blue-yellow-red": "蓝黄红",
  "config.scheme.blue-purple": "蓝紫",
  "config.scheme.yellow-blue": "黄蓝",
  "config.scheme.blues": "蓝色系",
  "config.scheme.reds": "红色系",
  "config.scheme.GrYlRd": "GrYlRd",
  "config.scheme.purple-orange": "紫橙",
  "variable.modal.title": "变量配置",
  "variable.modal.save": "保存",
  "variable.modal.cancel": "取消",
  "variable.modal.delete": "删除变量",
  "variable.modal.add": "新增变量",
  "variable.modal.empty": '点击左侧"新增变量"开始配置',
  "variable.nav.count": "变量 ({n})",
  "variable.nav.unnamed": "(未命名)",
  "variable.general.title": "基本信息",
  "variable.general.type": "类型",
  "variable.general.name": "名称",
  "variable.general.label": "标签",
  "variable.general.description": "描述",
  "variable.type.custom": "自定义",
  "variable.type.query": "查询",
  "variable.type.textbox": "文本框",
  "variable.type.datasource": "数据源",
  "variable.type.constant": "常量",
  "variable.query.title": "查询选项",
  "variable.query.multi": "多选",
  "variable.query.includeAll": "包含全选项",
  "variable.query.refresh": "刷新时机",
  "variable.query.refresh.onLoad": "仪表盘加载时",
  "variable.query.refresh.onTimeChange": "时间范围变化时",
  "qb.datasource": "数据源",
  "qb.addQuery": "添加查询",
  "qb.queryOptions": "查询选项",
  "qb.pattern": "数据模式",
  "qb.pattern.sine": "正弦波",
  "qb.pattern.spike": "尖峰",
  "qb.pattern.step": "阶梯",
  "qb.pattern.sawtooth": "锯齿波",
  "qb.pattern.noise": "随机噪声",
  "qb.pattern.trendUp": "上升趋势",
  "qb.pattern.trendDown": "下降趋势",
  "qb.pattern.plateau": "平台",
  "qb.pattern.randomWalk": "随机游走",
  "qb.pattern.live": "实时",
  "qb.seriesCount": "序列数量",
  "qb.liveAmplitude": "振幅",
  "qb.functions": "函数",
  "qb.functions.add": "添加",
  "qb.options": "选项",
  "qb.queryOptions.maxDataPoints": "最大数据点数",
  "qb.queryOptions.minInterval": "最小间隔",
  "qb.queryOptions.minIntervalPlaceholder": "不限制",
  "qb.queryOptions.interval": "间隔",
  "qb.queryOptions.intervalHint": "时间范围 / 最大数据点数",
  "qb.queryOptions.relativeTime": "相对时间",
  "qb.queryOptions.timeShift": "时间偏移",
  "config.scheme.classic": "经典配色",
  "config.scheme.tableau10": "Tableau配色",
  "config.scheme.fixed": "单色",
  "config.scheme.thresholds": "来自阈值",
  "config.trend.up": "上升 ↑",
  "config.trend.down": "下降 ↓",
  "config.trend.flat": "持平",
  "config.field.pieType": "饼图类型",
  "config.field.pieSliceSorting": "扇区排序",
  "config.pieType.pie": "实心饼",
  "config.pieType.donut": "环形图",
  "config.sort.desc": "降序",
  "config.sort.asc": "升序",
  "config.sort.none": "不排序",
  "config.field.pieLabels": "扇区标签",
  "config.pieLabel.name": "名称",
  "config.pieLabel.percent": "百分比",
  "config.pieLabel.value": "数值",
  "config.field.pieShow": "数据聚合",
  "config.pieShow.calculate": "聚合（Reducer）",
  "config.pieShow.all": "全部值",
  "config.field.legendMode": "图例模式",
  "config.legendMode.list": "列表",
  "config.legendMode.table": "表格",
  "config.field.legendValues": "图例统计值",
  "config.legendValue.min": "最小值",
  "config.legendValue.max": "最大值",
  "config.legendValue.mean": "平均值",
  "config.legendValue.sum": "求和",
  "config.legendValue.last": "最后值",
  "config.legendValue.first": "第一个值",
  "tooltip.pinned": "已固定",
  "tooltip.datetimeFormat": "YYYY-MM-DD HH:mm:ss",
  "config.reducer.lastNotNull": "最后非空值",
  "config.reducer.last": "最后值",
  "config.reducer.firstNotNull": "第一个非空值",
  "config.reducer.first": "第一个值",
  "config.reducer.min": "最小值",
  "config.reducer.max": "最大值",
  "config.reducer.mean": "平均值",
  "config.reducer.sum": "求和",
  "config.reducer.count": "计数",
  "config.reducer.range": "范围",
  "config.reducer.median": "中位数",
  "config.reducer.stdDev": "标准差",
  "config.reducer.variance": "方差",
  "config.reducer.delta": "增量",
  "config.reducer.diff": "差值",
  "config.reducer.diffperc": "差值 %",
  "config.reducer.step": "步长",
  "config.reducer.logmin": "最小正值",
  "config.reducer.countAll": "总计数",
  "config.reducer.changeCount": "变化次数",
  "config.reducer.distinctCount": "唯一值数",
  "config.reducer.allIsZero": "全为零",
  "config.reducer.allIsNull": "全为空",
  "config.drawStyle.lines": "折线",
  "config.drawStyle.bars": "柱状",
  "config.drawStyle.points": "散点",
  "config.tooltip.single": "单系列",
  "config.tooltip.multi": "全部",
  "config.tooltip.none": "隐藏",
  "config.tooltip.sortNone": "默认",
  "config.tooltip.sortAsc": "升序",
  "config.tooltip.sortDesc": "降序",
  "config.axis.placement.left": "左侧",
  "config.axis.placement.right": "右侧",
  "config.axis.placement.hidden": "隐藏",
  "config.axis.grid.all": "开启",
  "config.axis.grid.hidden": "隐藏",
  "config.axis.scale.linear": "线性",
  "config.axis.scale.logarithmic": "对数",
  "config.gauge.fillWidth": "激活弧宽度",
  "config.gauge.trackWidth": "轨道宽度",
  "config.gauge.trackColor": "轨道背景色",
  "config.gauge.capRound": "圆角",
  "config.gauge.valueVisible": "显示数值",
  "config.gauge.thresholdDisplay": "显示阈值方式",
  "config.gauge.thresholdDisplayNone": "不显示",
  "config.gauge.thresholdDisplayMarker": "阈值标记条",
  "config.gauge.thresholdDisplayTrack": "轨道阈值条",
  "config.gauge.orientation": "排列方式",
  "config.gauge.orientationAuto": "自动网格",
  "config.gauge.orientationHorizontal": "水平排列",
  "config.gauge.orientationVertical": "垂直排列",
  "config.gauge.valueOffsetY": "数值 Y 偏移",
  // Style section - gradient, nulls, points, stacking
  "config.field.gradientMode": "渐变模式",
  "config.gradient.none": "无",
  "config.gradient.opacity": "透明度",
  "config.gradient.hue": "色相",
  "config.gradient.scheme": "配色",
  "config.field.spanNulls": "连接空值",
  "config.field.insertNulls": "断开空值",
  "config.nulls.never": "从不",
  "config.nulls.always": "始终",
  "config.nulls.threshold": "阈值",
  "config.points.auto": "自动",
  "config.points.always": "始终",
  "config.points.never": "从不",
  "config.field.stackSeries": "堆叠序列",
  "config.stack.none": "无",
  "config.stack.normal": "普通",
  "config.stack.percent": "100%",
  // General section
  "config.field.colorSingle": "固定颜色",
  "config.field.colorDistribution": "颜色分布",
  "config.colorDist.sequential": "顺序",
  "config.colorDist.distributed": "分散",
  "config.link.newTab": "新标签页打开",
  "config.link.add": "添加链接",
  // Bar style
  "config.field.barShowValues": "显示数值",
  "config.showValues.auto": "自动",
  "config.showValues.always": "始终",
  "config.showValues.never": "从不",
  "config.field.barGroupWidth": "组宽度",
  "config.field.barWidth": "柱宽",
  "config.field.xTickRotation": "旋转 X 标签",
  // Stat style
  "config.field.orientation": "方向",
  "config.orientation.vertical": "自动（垂直）",
  "config.orientation.horizontal": "水平",
  "config.field.textMode": "文本模式",
  "config.textMode.valueAndName": "数值和名称",
  "config.textMode.value": "仅数值",
  "config.textMode.name": "仅名称",
  "config.textMode.none": "无",
  "config.field.colorMode": "颜色模式",
  "config.colorMode.value": "数值",
  "config.colorMode.backgroundSolid": "纯色背景",
  "config.colorMode.background": "渐变背景",
  "config.field.percentChange": "百分比变化",
  "config.field.value": "数值",
  "config.field.unitLabel": "单位标签",
  "config.field.trend": "趋势",
  // Histogram style
  "config.field.histBucketCount": "分桶数",
  "config.field.histBucketSize": "桶大小",
  "config.field.histBucketOffset": "桶偏移",
  "config.field.histCombineSeries": "合并序列",
  "config.hist.bucketSizePlaceholder": "自动",
  // Table style
  "config.field.tableFooterEnabled": "底栏行",
  "config.field.tableFooterReducers": "底栏计算",
  "config.field.tableFooterFields": "字段",
  "config.field.tableFooterFieldsPlaceholder": "所有数值字段",
  "config.section.tableColumnOverrides": "列覆盖",
  // Axes section
  "config.field.axisName": "名称",
  "config.field.axisLabel": "标签",
  "config.field.axisWidth": "宽度",
  "config.field.gridColor": "网格颜色",
  "config.field.axisLine": "刻度标签",
  "config.field.axisLineColor": "刻度标签颜色",
  "config.field.axisTickShow": "刻度线",
  "config.field.axisBorder": "边框",
  "config.field.axisBorderColor": "边框颜色",
  "config.axis.label.placeholder": "坐标轴标签",
  "config.axis.name.placeholder": "坐标轴名称",
  "config.axis.grid.x": "X",
  "config.axis.grid.y": "Y",
  "config.axis.scale.symlog": "对称对数",
  // Tooltip section
  "config.field.tooltipSort": "浮窗排序",
  "config.field.tooltipMaxHeight": "列表最大高度",
  "config.field.axisPointer": "坐标轴指针",
  // Unit options
  "config.unit.s": "秒 (s)",
  "config.unit.bytes": "字节",
  "config.unit.percentunit": "百分比 (0-1)",
  "config.unit.ops": "操作/秒",
  "config.unit.bps": "比特/秒",
  "config.unit.Bps": "字节/秒",
  // Gauge
  "config.gauge.arcSweep": "弧度",
  "config.gauge.paddingX": "水平内边距",
  "config.gauge.paddingY": "垂直内边距",
  "config.gauge.valueColor": "数值颜色",
  "config.gauge.valueSize": "数值大小",
  "config.gauge.colorFromScheme": "来自配色方案",
  "config.gauge.thresholdLabelDisplay": "阈值标签",
  "config.gauge.thresholdLabelNone": "隐藏",
  "config.gauge.thresholdLabelLabel": "标签",
  "config.gauge.thresholdLabelValue": "数值",
  "config.gauge.thresholdLabelBoth": "标签 + 数值",
  // Override editor
  "config.override.addRule": "添加字段覆盖",
  "config.override.addProp": "添加覆盖属性",
  "config.override.matcher.byName": "按名称匹配字段",
  "config.override.matcher.byType": "按类型匹配字段",
  "config.override.matcher.byRegexp": "按正则匹配字段",
  "config.override.matcher.byFrameRefID": "按查询返回匹配",
  "config.override.prop.unit": "单位",
  "config.override.prop.decimals": "小数位",
  "config.override.prop.displayName": "显示名称",
  "config.override.prop.min": "最小值",
  "config.override.prop.max": "最大值",
  "config.override.prop.noValue": "无数据文本",
  "config.override.prop.filterable": "可筛选",
  "config.override.prop.thresholds": "阈值",
  "config.override.prop.displayMode": "显示模式",
  "config.override.prop.width": "列宽",
  "config.override.prop.align": "对齐",
  "config.override.prop.hidden": "隐藏列",
  "config.override.prop.wrapText": "自动换行",
  "config.override.group.basic": "标准选项",
  "config.override.group.thresholds": "阈值",
  "config.override.group.table": "表格",
  "config.override.type.time": "时间",
  "config.override.type.number": "数值",
  "config.override.type.string": "字符串",
  "config.override.type.boolean": "布尔",
  // Table column overrides
  "config.field.tableColHidden": "隐藏",
  "config.field.tableColLabel": "标签",
  "config.field.tableColWidth": "宽度",
  "config.field.tableColAlign": "对齐",
  "config.field.tableColDisplayMode": "显示模式",
  "config.field.tableColWrapText": "自动换行",
  "config.field.tableColAddName": "列名",
  "config.tableAlign.auto": "自动",
  "config.tableAlign.left": "左对齐",
  "config.tableAlign.center": "居中",
  "config.tableAlign.right": "右对齐",
  "config.tableDisplayMode.auto": "自动",
  "config.tableDisplayMode.colored-text": "彩色文字",
  "config.tableDisplayMode.colored-background": "彩色背景",
  "config.tableDisplayMode.gauge": "仪表盘",
  "config.tableDisplayMode.data-links": "数据链接",
  "config.tableDisplayMode.json-view": "JSON 视图",
  "config.tableDisplayMode.pill": "标签",
  // StatsPicker
  "config.reducer.group.standard": "标准",
  "config.reducer.group.extended": "扩展",
  "config.reducer.group.boolean": "布尔",
  "config.reducer.group.percentile": "百分位",
  "config.reducer.choose": "选择",
  // Pie limit
  "config.field.pieLimit": "数量限制",
  // Variable datasource section
  "variable.ds.title": "数据源选项",
  "variable.ds.type": "数据源类型",
  "variable.ds.type.placeholder": "选择数据源类型",
  "variable.ds.filterRegex": "实例过滤正则",
  "variable.ds.multi": "多选",
  "variable.ds.includeAll": "包含全选项",
  // Editor - VizPicker
  "editor.vizPicker.title": "可视化类型",
  // Editor - Overrides
  "editor.overrides.matcherValue": "匹配值",
  "editor.overrides.propValue": "属性值",
  "editor.overrides.addProperty": "添加属性覆盖",
  "editor.overrides.addOverride": "添加字段覆盖",
  // Zabbix QueryEditor — query types
  "qb.queryType": "查询类型",
  "qb.queryType.metrics": "指标",
  "qb.queryType.text": "文本",
  "qb.queryType.services": "IT服务",
  "qb.queryType.itemid": "监控项ID",
  "qb.queryType.triggers": "触发器",
  "qb.queryType.problems": "告警",
  "qb.queryType.macros": "宏变量",
  "qb.queryType.lld": "自动发现",
  // Zabbix QueryEditor — host/group/item fields
  "panel.group": "主机组",
  "panel.group.placeholder": "选择主机组",
  "panel.host": "主机",
  "panel.host.placeholder": "选择主机",
  "panel.itemTag": "监控项标签",
  "panel.itemTag.placeholder": "按标签过滤",
  "panel.items": "监控项",
  "panel.items.placeholder": "选择监控项",
  // Zabbix QueryEditor — query fields
  "qb.textFilter": "文本过滤",
  "qb.textFilter.placeholder": "正则表达式",
  "qb.useCaptureGroups": "使用捕获分组",
  "qb.itemIds": "监控项 ID",
  "qb.itemIds.placeholder": "多个 ID 用逗号分隔",
  "qb.triggerFilter": "触发器过滤",
  "qb.triggerFilter.placeholder": "触发器名称",
  "qb.problemName": "告警名称",
  "qb.problemName.placeholder": "告警名称过滤",
  "qb.tags": "标签",
  "qb.tags.placeholder": "tag:value",
  "qb.show": "显示",
  "qb.severity": "严重程度",
  "qb.itService": "IT服务",
  "qb.itService.placeholder": "选择IT服务",
  "qb.slaProperty": "SLA属性",
  "qb.slaInterval": "SLA时间间隔",
  "qb.macroFilter": "宏过滤",
  // Zabbix QueryEditor — LLD
  "qb.lld.rule": "发现规则",
  "qb.lld.rule.placeholder": "选择发现规则",
  "qb.lld.itemKeys": "监控项原型键",
  "qb.lld.itemKeys.placeholder": "选择原型键",
  // Zabbix QueryEditor — options
  "qb.ack.all": "所有",
  "qb.ack.unack": "未确认",
  "qb.ack.ack": "已确认",
  "qb.sort.default": "默认",
  "qb.sort.lastchange": "最后变更",
  "qb.sort.severity": "严重程度",
  "qb.trends.default": "默认",
  "qb.trends.true": "使用趋势",
  "qb.trends.false": "不使用趋势",
  "qb.options.trends": "趋势数据",
  "qb.options.showDisabled": "显示禁用项",
  "qb.options.valueMapping": "使用 Zabbix 值映射",
  "qb.options.disableAlignment": "禁用数据对齐",
  "qb.options.acknowledged": "确认状态",
  "qb.options.sortBy": "排序",
  "qb.options.useTimeRange": "使用时间范围",
  "qb.options.hostsInMaintenance": "维护中主机",
  "qb.options.hostProxy": "Host Proxy",
  "qb.options.limit": "数量限制"
}, DO = { zh: pw, en: AO }, gw = Symbol("lang");
function zO(e) {
  kt(gw, e);
}
function jt() {
  const e = Tt(gw, le("zh"));
  function t(n, o) {
    let r = DO[e.value][n] ?? pw[n] ?? n;
    if (o)
      for (const [a, l] of Object.entries(o))
        r = r.replace(`{${a}}`, String(l));
    return r;
  }
  return { t, lang: e };
}
const RO = {
  hideHeader: !1,
  canEdit: !0,
  theme: null,
  lang: null,
  isEditing: null,
  initialEditingPanelId: null,
  datasourceConfig: null
}, hw = Symbol("argusBoardConfig");
function vw(e) {
  return { config: gO(le(e)) };
}
function NO(e) {
  const t = vw(e);
  return kt(hw, t), t;
}
function Uu() {
  const e = Tt(hw);
  return e || vw(RO);
}
async function BO(e) {
  const t = await fetch(`${e.url}/v5/metrics`, {
    method: "GET",
    headers: {
      "Content-Type": "application/json",
      ...e.token ? { Authorization: `Bearer ${e.token}` } : {}
    }
  });
  if (!t.ok)
    throw new Error(`Argus API HTTP error: ${t.status}`);
  return (await t.json()).data?.metrics ?? [];
}
async function LO(e, t) {
  const n = new URLSearchParams({ signal: t.signal });
  t.metricName && n.set("metricName", t.metricName), t.search && n.set("search", t.search);
  const o = await fetch(`${e.url}/v5/attribute_keys?${n.toString()}`, {
    method: "GET",
    headers: {
      "Content-Type": "application/json",
      ...e.token ? { Authorization: `Bearer ${e.token}` } : {}
    }
  });
  if (!o.ok)
    throw new Error(`Argus API HTTP error: ${o.status}`);
  return (await o.json()).data?.attributeKeys ?? [];
}
var bg = /* @__PURE__ */ ((e) => (e.time = "time", e.number = "number", e.string = "string", e.boolean = "boolean", e.trace = "trace", e.geo = "geo", e.enum = "enum", e.other = "other", e.frame = "frame", e.nestedFrames = "nestedFrames", e))(bg || {});
function FO(e) {
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
function Cd(e) {
  "@babel/helpers - typeof";
  return Cd = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
    return typeof t;
  } : function(t) {
    return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
  }, Cd(e);
}
var HO = /^\s+/, VO = /\s+$/;
function gt(e, t) {
  if (e = e || "", t = t || {}, e instanceof gt)
    return e;
  if (!(this instanceof gt))
    return new gt(e, t);
  var n = jO(e);
  this._originalInput = e, this._r = n.r, this._g = n.g, this._b = n.b, this._a = n.a, this._roundA = Math.round(100 * this._a) / 100, this._format = t.format || n.format, this._gradientType = t.gradientType, this._r < 1 && (this._r = Math.round(this._r)), this._g < 1 && (this._g = Math.round(this._g)), this._b < 1 && (this._b = Math.round(this._b)), this._ok = n.ok;
}
gt.prototype = {
  isDark: function() {
    return this.getBrightness() < 128;
  },
  isLight: function() {
    return !this.isDark();
  },
  isValid: function() {
    return this._ok;
  },
  getOriginalInput: function() {
    return this._originalInput;
  },
  getFormat: function() {
    return this._format;
  },
  getAlpha: function() {
    return this._a;
  },
  getBrightness: function() {
    var t = this.toRgb();
    return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3;
  },
  getLuminance: function() {
    var t = this.toRgb(), n, o, i, r, a, l;
    return n = t.r / 255, o = t.g / 255, i = t.b / 255, n <= 0.03928 ? r = n / 12.92 : r = Math.pow((n + 0.055) / 1.055, 2.4), o <= 0.03928 ? a = o / 12.92 : a = Math.pow((o + 0.055) / 1.055, 2.4), i <= 0.03928 ? l = i / 12.92 : l = Math.pow((i + 0.055) / 1.055, 2.4), 0.2126 * r + 0.7152 * a + 0.0722 * l;
  },
  setAlpha: function(t) {
    return this._a = mw(t), this._roundA = Math.round(100 * this._a) / 100, this;
  },
  toHsv: function() {
    var t = ob(this._r, this._g, this._b);
    return {
      h: t.h * 360,
      s: t.s,
      v: t.v,
      a: this._a
    };
  },
  toHsvString: function() {
    var t = ob(this._r, this._g, this._b), n = Math.round(t.h * 360), o = Math.round(t.s * 100), i = Math.round(t.v * 100);
    return this._a == 1 ? "hsv(" + n + ", " + o + "%, " + i + "%)" : "hsva(" + n + ", " + o + "%, " + i + "%, " + this._roundA + ")";
  },
  toHsl: function() {
    var t = nb(this._r, this._g, this._b);
    return {
      h: t.h * 360,
      s: t.s,
      l: t.l,
      a: this._a
    };
  },
  toHslString: function() {
    var t = nb(this._r, this._g, this._b), n = Math.round(t.h * 360), o = Math.round(t.s * 100), i = Math.round(t.l * 100);
    return this._a == 1 ? "hsl(" + n + ", " + o + "%, " + i + "%)" : "hsla(" + n + ", " + o + "%, " + i + "%, " + this._roundA + ")";
  },
  toHex: function(t) {
    return ib(this._r, this._g, this._b, t);
  },
  toHexString: function(t) {
    return "#" + this.toHex(t);
  },
  toHex8: function(t) {
    return KO(this._r, this._g, this._b, this._a, t);
  },
  toHex8String: function(t) {
    return "#" + this.toHex8(t);
  },
  toRgb: function() {
    return {
      r: Math.round(this._r),
      g: Math.round(this._g),
      b: Math.round(this._b),
      a: this._a
    };
  },
  toRgbString: function() {
    return this._a == 1 ? "rgb(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ")" : "rgba(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ", " + this._roundA + ")";
  },
  toPercentageRgb: function() {
    return {
      r: Math.round(Ln(this._r, 255) * 100) + "%",
      g: Math.round(Ln(this._g, 255) * 100) + "%",
      b: Math.round(Ln(this._b, 255) * 100) + "%",
      a: this._a
    };
  },
  toPercentageRgbString: function() {
    return this._a == 1 ? "rgb(" + Math.round(Ln(this._r, 255) * 100) + "%, " + Math.round(Ln(this._g, 255) * 100) + "%, " + Math.round(Ln(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(Ln(this._r, 255) * 100) + "%, " + Math.round(Ln(this._g, 255) * 100) + "%, " + Math.round(Ln(this._b, 255) * 100) + "%, " + this._roundA + ")";
  },
  toName: function() {
    return this._a === 0 ? "transparent" : this._a < 1 ? !1 : rI[ib(this._r, this._g, this._b, !0)] || !1;
  },
  toFilter: function(t) {
    var n = "#" + rb(this._r, this._g, this._b, this._a), o = n, i = this._gradientType ? "GradientType = 1, " : "";
    if (t) {
      var r = gt(t);
      o = "#" + rb(r._r, r._g, r._b, r._a);
    }
    return "progid:DXImageTransform.Microsoft.gradient(" + i + "startColorstr=" + n + ",endColorstr=" + o + ")";
  },
  toString: function(t) {
    var n = !!t;
    t = t || this._format;
    var o = !1, i = this._a < 1 && this._a >= 0, r = !n && i && (t === "hex" || t === "hex6" || t === "hex3" || t === "hex4" || t === "hex8" || t === "name");
    return r ? t === "name" && this._a === 0 ? this.toName() : this.toRgbString() : (t === "rgb" && (o = this.toRgbString()), t === "prgb" && (o = this.toPercentageRgbString()), (t === "hex" || t === "hex6") && (o = this.toHexString()), t === "hex3" && (o = this.toHexString(!0)), t === "hex4" && (o = this.toHex8String(!0)), t === "hex8" && (o = this.toHex8String()), t === "name" && (o = this.toName()), t === "hsl" && (o = this.toHslString()), t === "hsv" && (o = this.toHsvString()), o || this.toHexString());
  },
  clone: function() {
    return gt(this.toString());
  },
  _applyModification: function(t, n) {
    var o = t.apply(null, [this].concat([].slice.call(n)));
    return this._r = o._r, this._g = o._g, this._b = o._b, this.setAlpha(o._a), this;
  },
  lighten: function() {
    return this._applyModification(QO, arguments);
  },
  brighten: function() {
    return this._applyModification(ZO, arguments);
  },
  darken: function() {
    return this._applyModification(JO, arguments);
  },
  desaturate: function() {
    return this._applyModification(YO, arguments);
  },
  saturate: function() {
    return this._applyModification(UO, arguments);
  },
  greyscale: function() {
    return this._applyModification(XO, arguments);
  },
  spin: function() {
    return this._applyModification(eI, arguments);
  },
  _applyCombination: function(t, n) {
    return t.apply(null, [this].concat([].slice.call(n)));
  },
  analogous: function() {
    return this._applyCombination(oI, arguments);
  },
  complement: function() {
    return this._applyCombination(tI, arguments);
  },
  monochromatic: function() {
    return this._applyCombination(iI, arguments);
  },
  splitcomplement: function() {
    return this._applyCombination(nI, arguments);
  },
  // Disabled until https://github.com/bgrins/TinyColor/issues/254
  // polyad: function (number) {
  //   return this._applyCombination(polyad, [number]);
  // },
  triad: function() {
    return this._applyCombination(ab, [3]);
  },
  tetrad: function() {
    return this._applyCombination(ab, [4]);
  }
};
gt.fromRatio = function(e, t) {
  if (Cd(e) == "object") {
    var n = {};
    for (var o in e)
      e.hasOwnProperty(o) && (o === "a" ? n[o] = e[o] : n[o] = du(e[o]));
    e = n;
  }
  return gt(e, t);
};
function jO(e) {
  var t = {
    r: 0,
    g: 0,
    b: 0
  }, n = 1, o = null, i = null, r = null, a = !1, l = !1;
  return typeof e == "string" && (e = uI(e)), Cd(e) == "object" && (_r(e.r) && _r(e.g) && _r(e.b) ? (t = WO(e.r, e.g, e.b), a = !0, l = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : _r(e.h) && _r(e.s) && _r(e.v) ? (o = du(e.s), i = du(e.v), t = GO(e.h, o, i), a = !0, l = "hsv") : _r(e.h) && _r(e.s) && _r(e.l) && (o = du(e.s), r = du(e.l), t = qO(e.h, o, r), a = !0, l = "hsl"), e.hasOwnProperty("a") && (n = e.a)), n = mw(n), {
    ok: a,
    format: e.format || l,
    r: Math.min(255, Math.max(t.r, 0)),
    g: Math.min(255, Math.max(t.g, 0)),
    b: Math.min(255, Math.max(t.b, 0)),
    a: n
  };
}
function WO(e, t, n) {
  return {
    r: Ln(e, 255) * 255,
    g: Ln(t, 255) * 255,
    b: Ln(n, 255) * 255
  };
}
function nb(e, t, n) {
  e = Ln(e, 255), t = Ln(t, 255), n = Ln(n, 255);
  var o = Math.max(e, t, n), i = Math.min(e, t, n), r, a, l = (o + i) / 2;
  if (o == i)
    r = a = 0;
  else {
    var s = o - i;
    switch (a = l > 0.5 ? s / (2 - o - i) : s / (o + i), o) {
      case e:
        r = (t - n) / s + (t < n ? 6 : 0);
        break;
      case t:
        r = (n - e) / s + 2;
        break;
      case n:
        r = (e - t) / s + 4;
        break;
    }
    r /= 6;
  }
  return {
    h: r,
    s: a,
    l
  };
}
function qO(e, t, n) {
  var o, i, r;
  e = Ln(e, 360), t = Ln(t, 100), n = Ln(n, 100);
  function a(u, c, d) {
    return d < 0 && (d += 1), d > 1 && (d -= 1), d < 1 / 6 ? u + (c - u) * 6 * d : d < 1 / 2 ? c : d < 2 / 3 ? u + (c - u) * (2 / 3 - d) * 6 : u;
  }
  if (t === 0)
    o = i = r = n;
  else {
    var l = n < 0.5 ? n * (1 + t) : n + t - n * t, s = 2 * n - l;
    o = a(s, l, e + 1 / 3), i = a(s, l, e), r = a(s, l, e - 1 / 3);
  }
  return {
    r: o * 255,
    g: i * 255,
    b: r * 255
  };
}
function ob(e, t, n) {
  e = Ln(e, 255), t = Ln(t, 255), n = Ln(n, 255);
  var o = Math.max(e, t, n), i = Math.min(e, t, n), r, a, l = o, s = o - i;
  if (a = o === 0 ? 0 : s / o, o == i)
    r = 0;
  else {
    switch (o) {
      case e:
        r = (t - n) / s + (t < n ? 6 : 0);
        break;
      case t:
        r = (n - e) / s + 2;
        break;
      case n:
        r = (e - t) / s + 4;
        break;
    }
    r /= 6;
  }
  return {
    h: r,
    s: a,
    v: l
  };
}
function GO(e, t, n) {
  e = Ln(e, 360) * 6, t = Ln(t, 100), n = Ln(n, 100);
  var o = Math.floor(e), i = e - o, r = n * (1 - t), a = n * (1 - i * t), l = n * (1 - (1 - i) * t), s = o % 6, u = [n, a, r, r, l, n][s], c = [l, n, n, a, r, r][s], d = [r, r, l, n, n, a][s];
  return {
    r: u * 255,
    g: c * 255,
    b: d * 255
  };
}
function ib(e, t, n, o) {
  var i = [qi(Math.round(e).toString(16)), qi(Math.round(t).toString(16)), qi(Math.round(n).toString(16))];
  return o && i[0].charAt(0) == i[0].charAt(1) && i[1].charAt(0) == i[1].charAt(1) && i[2].charAt(0) == i[2].charAt(1) ? i[0].charAt(0) + i[1].charAt(0) + i[2].charAt(0) : i.join("");
}
function KO(e, t, n, o, i) {
  var r = [qi(Math.round(e).toString(16)), qi(Math.round(t).toString(16)), qi(Math.round(n).toString(16)), qi(bw(o))];
  return i && r[0].charAt(0) == r[0].charAt(1) && r[1].charAt(0) == r[1].charAt(1) && r[2].charAt(0) == r[2].charAt(1) && r[3].charAt(0) == r[3].charAt(1) ? r[0].charAt(0) + r[1].charAt(0) + r[2].charAt(0) + r[3].charAt(0) : r.join("");
}
function rb(e, t, n, o) {
  var i = [qi(bw(o)), qi(Math.round(e).toString(16)), qi(Math.round(t).toString(16)), qi(Math.round(n).toString(16))];
  return i.join("");
}
gt.equals = function(e, t) {
  return !e || !t ? !1 : gt(e).toRgbString() == gt(t).toRgbString();
};
gt.random = function() {
  return gt.fromRatio({
    r: Math.random(),
    g: Math.random(),
    b: Math.random()
  });
};
function YO(e, t) {
  t = t === 0 ? 0 : t || 10;
  var n = gt(e).toHsl();
  return n.s -= t / 100, n.s = Zd(n.s), gt(n);
}
function UO(e, t) {
  t = t === 0 ? 0 : t || 10;
  var n = gt(e).toHsl();
  return n.s += t / 100, n.s = Zd(n.s), gt(n);
}
function XO(e) {
  return gt(e).desaturate(100);
}
function QO(e, t) {
  t = t === 0 ? 0 : t || 10;
  var n = gt(e).toHsl();
  return n.l += t / 100, n.l = Zd(n.l), gt(n);
}
function ZO(e, t) {
  t = t === 0 ? 0 : t || 10;
  var n = gt(e).toRgb();
  return n.r = Math.max(0, Math.min(255, n.r - Math.round(255 * -(t / 100)))), n.g = Math.max(0, Math.min(255, n.g - Math.round(255 * -(t / 100)))), n.b = Math.max(0, Math.min(255, n.b - Math.round(255 * -(t / 100)))), gt(n);
}
function JO(e, t) {
  t = t === 0 ? 0 : t || 10;
  var n = gt(e).toHsl();
  return n.l -= t / 100, n.l = Zd(n.l), gt(n);
}
function eI(e, t) {
  var n = gt(e).toHsl(), o = (n.h + t) % 360;
  return n.h = o < 0 ? 360 + o : o, gt(n);
}
function tI(e) {
  var t = gt(e).toHsl();
  return t.h = (t.h + 180) % 360, gt(t);
}
function ab(e, t) {
  if (isNaN(t) || t <= 0)
    throw new Error("Argument to polyad must be a positive number");
  for (var n = gt(e).toHsl(), o = [gt(e)], i = 360 / t, r = 1; r < t; r++)
    o.push(gt({
      h: (n.h + r * i) % 360,
      s: n.s,
      l: n.l
    }));
  return o;
}
function nI(e) {
  var t = gt(e).toHsl(), n = t.h;
  return [gt(e), gt({
    h: (n + 72) % 360,
    s: t.s,
    l: t.l
  }), gt({
    h: (n + 216) % 360,
    s: t.s,
    l: t.l
  })];
}
function oI(e, t, n) {
  t = t || 6, n = n || 30;
  var o = gt(e).toHsl(), i = 360 / n, r = [gt(e)];
  for (o.h = (o.h - (i * t >> 1) + 720) % 360; --t; )
    o.h = (o.h + i) % 360, r.push(gt(o));
  return r;
}
function iI(e, t) {
  t = t || 6;
  for (var n = gt(e).toHsv(), o = n.h, i = n.s, r = n.v, a = [], l = 1 / t; t--; )
    a.push(gt({
      h: o,
      s: i,
      v: r
    })), r = (r + l) % 1;
  return a;
}
gt.mix = function(e, t, n) {
  n = n === 0 ? 0 : n || 50;
  var o = gt(e).toRgb(), i = gt(t).toRgb(), r = n / 100, a = {
    r: (i.r - o.r) * r + o.r,
    g: (i.g - o.g) * r + o.g,
    b: (i.b - o.b) * r + o.b,
    a: (i.a - o.a) * r + o.a
  };
  return gt(a);
};
gt.readability = function(e, t) {
  var n = gt(e), o = gt(t);
  return (Math.max(n.getLuminance(), o.getLuminance()) + 0.05) / (Math.min(n.getLuminance(), o.getLuminance()) + 0.05);
};
gt.isReadable = function(e, t, n) {
  var o = gt.readability(e, t), i, r;
  switch (r = !1, i = cI(n), i.level + i.size) {
    case "AAsmall":
    case "AAAlarge":
      r = o >= 4.5;
      break;
    case "AAlarge":
      r = o >= 3;
      break;
    case "AAAsmall":
      r = o >= 7;
      break;
  }
  return r;
};
gt.mostReadable = function(e, t, n) {
  var o = null, i = 0, r, a, l, s;
  n = n || {}, a = n.includeFallbackColors, l = n.level, s = n.size;
  for (var u = 0; u < t.length; u++)
    r = gt.readability(e, t[u]), r > i && (i = r, o = gt(t[u]));
  return gt.isReadable(e, o, {
    level: l,
    size: s
  }) || !a ? o : (n.includeFallbackColors = !1, gt.mostReadable(e, ["#fff", "#000"], n));
};
var yg = gt.names = {
  aliceblue: "f0f8ff",
  antiquewhite: "faebd7",
  aqua: "0ff",
  aquamarine: "7fffd4",
  azure: "f0ffff",
  beige: "f5f5dc",
  bisque: "ffe4c4",
  black: "000",
  blanchedalmond: "ffebcd",
  blue: "00f",
  blueviolet: "8a2be2",
  brown: "a52a2a",
  burlywood: "deb887",
  burntsienna: "ea7e5d",
  cadetblue: "5f9ea0",
  chartreuse: "7fff00",
  chocolate: "d2691e",
  coral: "ff7f50",
  cornflowerblue: "6495ed",
  cornsilk: "fff8dc",
  crimson: "dc143c",
  cyan: "0ff",
  darkblue: "00008b",
  darkcyan: "008b8b",
  darkgoldenrod: "b8860b",
  darkgray: "a9a9a9",
  darkgreen: "006400",
  darkgrey: "a9a9a9",
  darkkhaki: "bdb76b",
  darkmagenta: "8b008b",
  darkolivegreen: "556b2f",
  darkorange: "ff8c00",
  darkorchid: "9932cc",
  darkred: "8b0000",
  darksalmon: "e9967a",
  darkseagreen: "8fbc8f",
  darkslateblue: "483d8b",
  darkslategray: "2f4f4f",
  darkslategrey: "2f4f4f",
  darkturquoise: "00ced1",
  darkviolet: "9400d3",
  deeppink: "ff1493",
  deepskyblue: "00bfff",
  dimgray: "696969",
  dimgrey: "696969",
  dodgerblue: "1e90ff",
  firebrick: "b22222",
  floralwhite: "fffaf0",
  forestgreen: "228b22",
  fuchsia: "f0f",
  gainsboro: "dcdcdc",
  ghostwhite: "f8f8ff",
  gold: "ffd700",
  goldenrod: "daa520",
  gray: "808080",
  green: "008000",
  greenyellow: "adff2f",
  grey: "808080",
  honeydew: "f0fff0",
  hotpink: "ff69b4",
  indianred: "cd5c5c",
  indigo: "4b0082",
  ivory: "fffff0",
  khaki: "f0e68c",
  lavender: "e6e6fa",
  lavenderblush: "fff0f5",
  lawngreen: "7cfc00",
  lemonchiffon: "fffacd",
  lightblue: "add8e6",
  lightcoral: "f08080",
  lightcyan: "e0ffff",
  lightgoldenrodyellow: "fafad2",
  lightgray: "d3d3d3",
  lightgreen: "90ee90",
  lightgrey: "d3d3d3",
  lightpink: "ffb6c1",
  lightsalmon: "ffa07a",
  lightseagreen: "20b2aa",
  lightskyblue: "87cefa",
  lightslategray: "789",
  lightslategrey: "789",
  lightsteelblue: "b0c4de",
  lightyellow: "ffffe0",
  lime: "0f0",
  limegreen: "32cd32",
  linen: "faf0e6",
  magenta: "f0f",
  maroon: "800000",
  mediumaquamarine: "66cdaa",
  mediumblue: "0000cd",
  mediumorchid: "ba55d3",
  mediumpurple: "9370db",
  mediumseagreen: "3cb371",
  mediumslateblue: "7b68ee",
  mediumspringgreen: "00fa9a",
  mediumturquoise: "48d1cc",
  mediumvioletred: "c71585",
  midnightblue: "191970",
  mintcream: "f5fffa",
  mistyrose: "ffe4e1",
  moccasin: "ffe4b5",
  navajowhite: "ffdead",
  navy: "000080",
  oldlace: "fdf5e6",
  olive: "808000",
  olivedrab: "6b8e23",
  orange: "ffa500",
  orangered: "ff4500",
  orchid: "da70d6",
  palegoldenrod: "eee8aa",
  palegreen: "98fb98",
  paleturquoise: "afeeee",
  palevioletred: "db7093",
  papayawhip: "ffefd5",
  peachpuff: "ffdab9",
  peru: "cd853f",
  pink: "ffc0cb",
  plum: "dda0dd",
  powderblue: "b0e0e6",
  purple: "800080",
  rebeccapurple: "663399",
  red: "f00",
  rosybrown: "bc8f8f",
  royalblue: "4169e1",
  saddlebrown: "8b4513",
  salmon: "fa8072",
  sandybrown: "f4a460",
  seagreen: "2e8b57",
  seashell: "fff5ee",
  sienna: "a0522d",
  silver: "c0c0c0",
  skyblue: "87ceeb",
  slateblue: "6a5acd",
  slategray: "708090",
  slategrey: "708090",
  snow: "fffafa",
  springgreen: "00ff7f",
  steelblue: "4682b4",
  tan: "d2b48c",
  teal: "008080",
  thistle: "d8bfd8",
  tomato: "ff6347",
  turquoise: "40e0d0",
  violet: "ee82ee",
  wheat: "f5deb3",
  white: "fff",
  whitesmoke: "f5f5f5",
  yellow: "ff0",
  yellowgreen: "9acd32"
}, rI = gt.hexNames = aI(yg);
function aI(e) {
  var t = {};
  for (var n in e)
    e.hasOwnProperty(n) && (t[e[n]] = n);
  return t;
}
function mw(e) {
  return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
}
function Ln(e, t) {
  lI(e) && (e = "100%");
  var n = sI(e);
  return e = Math.min(t, Math.max(0, parseFloat(e))), n && (e = parseInt(e * t, 10) / 100), Math.abs(e - t) < 1e-6 ? 1 : e % t / parseFloat(t);
}
function Zd(e) {
  return Math.min(1, Math.max(0, e));
}
function Qo(e) {
  return parseInt(e, 16);
}
function lI(e) {
  return typeof e == "string" && e.indexOf(".") != -1 && parseFloat(e) === 1;
}
function sI(e) {
  return typeof e == "string" && e.indexOf("%") != -1;
}
function qi(e) {
  return e.length == 1 ? "0" + e : "" + e;
}
function du(e) {
  return e <= 1 && (e = e * 100 + "%"), e;
}
function bw(e) {
  return Math.round(parseFloat(e) * 255).toString(16);
}
function lb(e) {
  return Qo(e) / 255;
}
var Bi = (function() {
  var e = "[-\\+]?\\d+%?", t = "[-\\+]?\\d*\\.\\d+%?", n = "(?:" + t + ")|(?:" + e + ")", o = "[\\s|\\(]+(" + n + ")[,|\\s]+(" + n + ")[,|\\s]+(" + n + ")\\s*\\)?", i = "[\\s|\\(]+(" + n + ")[,|\\s]+(" + n + ")[,|\\s]+(" + n + ")[,|\\s]+(" + n + ")\\s*\\)?";
  return {
    CSS_UNIT: new RegExp(n),
    rgb: new RegExp("rgb" + o),
    rgba: new RegExp("rgba" + i),
    hsl: new RegExp("hsl" + o),
    hsla: new RegExp("hsla" + i),
    hsv: new RegExp("hsv" + o),
    hsva: new RegExp("hsva" + i),
    hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
    hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
    hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
    hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
  };
})();
function _r(e) {
  return !!Bi.CSS_UNIT.exec(e);
}
function uI(e) {
  e = e.replace(HO, "").replace(VO, "").toLowerCase();
  var t = !1;
  if (yg[e])
    e = yg[e], t = !0;
  else if (e == "transparent")
    return {
      r: 0,
      g: 0,
      b: 0,
      a: 0,
      format: "name"
    };
  var n;
  return (n = Bi.rgb.exec(e)) ? {
    r: n[1],
    g: n[2],
    b: n[3]
  } : (n = Bi.rgba.exec(e)) ? {
    r: n[1],
    g: n[2],
    b: n[3],
    a: n[4]
  } : (n = Bi.hsl.exec(e)) ? {
    h: n[1],
    s: n[2],
    l: n[3]
  } : (n = Bi.hsla.exec(e)) ? {
    h: n[1],
    s: n[2],
    l: n[3],
    a: n[4]
  } : (n = Bi.hsv.exec(e)) ? {
    h: n[1],
    s: n[2],
    v: n[3]
  } : (n = Bi.hsva.exec(e)) ? {
    h: n[1],
    s: n[2],
    v: n[3],
    a: n[4]
  } : (n = Bi.hex8.exec(e)) ? {
    r: Qo(n[1]),
    g: Qo(n[2]),
    b: Qo(n[3]),
    a: lb(n[4]),
    format: t ? "name" : "hex8"
  } : (n = Bi.hex6.exec(e)) ? {
    r: Qo(n[1]),
    g: Qo(n[2]),
    b: Qo(n[3]),
    format: t ? "name" : "hex"
  } : (n = Bi.hex4.exec(e)) ? {
    r: Qo(n[1] + "" + n[1]),
    g: Qo(n[2] + "" + n[2]),
    b: Qo(n[3] + "" + n[3]),
    a: lb(n[4] + "" + n[4]),
    format: t ? "name" : "hex8"
  } : (n = Bi.hex3.exec(e)) ? {
    r: Qo(n[1] + "" + n[1]),
    g: Qo(n[2] + "" + n[2]),
    b: Qo(n[3] + "" + n[3]),
    format: t ? "name" : "hex"
  } : !1;
}
function cI(e) {
  var t, n;
  return e = e || {
    level: "AA",
    size: "small"
  }, t = (e.level || "AA").toUpperCase(), n = (e.size || "small").toLowerCase(), t !== "AA" && t !== "AAA" && (t = "AA"), n !== "small" && n !== "large" && (n = "small"), {
    level: t,
    size: n
  };
}
function dI(e) {
  return {
    name: e.name ?? "",
    refId: e.refId ?? "",
    fields: e.fields.map((t) => ({
      name: t.name,
      type: t.type,
      values: { toArray: () => t.values },
      config: t.config ?? {},
      state: {}
    }))
  };
}
const yw = /* @__PURE__ */ new Map();
function tp(e) {
  yw.set(e.type, e);
}
function xg(e) {
  return yw.get(e);
}
const sb = [
  "api-gateway",
  "auth-service",
  "payment-service",
  "user-service",
  "notification-service",
  "order-service",
  "inventory-service",
  "search-service"
];
function np(e) {
  let t = e;
  return () => (t = (t * 16807 + 0) % 2147483647, t / 2147483647);
}
function fI(e, t, n, o, i) {
  const r = n ^ Math.floor(Date.now() / 5e3) * 2654435761, a = np(n), l = np(r);
  if (e === "random-walk") {
    const s = np((n + Date.now()) % 2147483647), u = i + o * 0.5, c = i * 0.1, d = i + o * 1.8, f = [u];
    for (let p = 1; p < t; p++) {
      const m = f[p - 1], b = (u - m) * 0.05, y = (s() - 0.5) * o * 0.08 + b;
      f.push(Math.max(c, Math.min(d, m + y)));
    }
    return f;
  }
  return Array.from({ length: t }, (s, u) => {
    const c = u / t;
    let d;
    switch (e) {
      case "sine":
        d = i + Math.sin(c * Math.PI * 4 + n) * o + (a() - 0.5) * o * 0.2;
        break;
      case "spike": {
        const p = [0.2, 0.5, 0.8].reduce(
          (m, b) => m + Math.exp(-((c - b) ** 2) / 1e-3) * o * 2,
          0
        );
        d = i + p + (a() - 0.5) * o * 0.15;
        break;
      }
      case "step":
        d = i + Math.floor(c * 5) % 3 * o * 0.5 + (a() - 0.5) * o * 0.1;
        break;
      case "sawtooth":
        d = i + c * 3 % 1 * o + (a() - 0.5) * o * 0.15;
        break;
      case "noise":
        d = i + a() * o;
        break;
      case "trend-up":
        d = i + c * o * 1.5 + Math.sin(c * 10) * o * 0.2 + (a() - 0.5) * o * 0.1;
        break;
      case "trend-down":
        d = i + (1 - c) * o * 1.5 + Math.sin(c * 8) * o * 0.15 + (a() - 0.5) * o * 0.1;
        break;
      case "plateau": {
        const m = c < 0.3 ? c / 0.3 : c > 0.7 ? (1 - c) / 0.30000000000000004 : 1;
        d = i + m * o + (a() - 0.5) * o * 0.1;
        break;
      }
      case "live": {
        if (c < 0.9)
          d = i + Math.sin(c * Math.PI * 4 + n) * o * 0.6 + (a() - 0.5) * o * 0.1;
        else {
          const p = (c - 0.9) / 0.09999999999999998;
          d = i + Math.sin(0.9 * Math.PI * 4 + n) * o * 0.6 + (l() - 0.5) * o * 0.4 * p * 2;
        }
        break;
      }
      default:
        d = i;
    }
    return Math.max(0, d);
  });
}
function Xl(e, t = 15, n = 3, o = "sine", i) {
  const r = [];
  for (let l = e.from; l <= e.to; l += t)
    r.push(l);
  const a = Array.from({ length: n }, (l, s) => {
    const u = 20 + (s * 37 + 13) % 60, c = 10 + (s * 53 + 7) % 40, d = fI(o, r.length, s * 1e3 + 42, u, c);
    return {
      label: i?.[s] ?? sb[s % sb.length],
      values: d
    };
  });
  return { timestamps: r, series: a };
}
function pI(e, t, n, o) {
  const r = ((n + o) / 2 - e) * 0.05, a = (Math.random() - 0.5) * t * 0.08 + r;
  return Math.max(n, Math.min(o, e + a));
}
class gI {
  type = "mock";
  meta = {
    type: "mock",
    displayName: "Mock",
    icon: "🎲"
  };
  defaultQuery = () => ({
    type: "mock",
    metric: "",
    pattern: "sine",
    seriesCount: 3,
    liveAmplitude: 1
  });
  query(t) {
    const { range: n, targets: o } = t, i = o.filter((r) => r).map((r) => {
      const { timestamps: a, series: l } = Xl(
        { from: n.from / 1e3, to: n.to / 1e3 },
        15,
        r.seriesCount,
        r.pattern,
        r.labels
      ), s = a.map((c) => c * 1e3), u = [
        { name: "Time", type: bg.time, values: s, config: {} },
        ...l.map((c) => ({
          name: c.label,
          type: bg.number,
          values: c.values,
          config: { displayNameFromDS: c.label }
        }))
      ];
      return dI({ name: r.metric, refId: "A", fields: u });
    });
    return Promise.resolve({ data: i, state: "Done" });
  }
}
const $a = [
  "#4096ff",
  "#52c41a",
  "#faad14",
  "#ff4d4f",
  "#722ed1",
  "#13c2c2",
  "#eb2f96",
  "#fa8c16",
  "#a0d911",
  "#1677ff",
  "#2f54eb",
  "#f5222d",
  "#fadb14",
  "#7cb305",
  "#08979c",
  "#531dab",
  "#c41d7f",
  "#d4380d",
  "#d48806",
  "#389e0d"
];
function Ar(e, t) {
  if (e.length < 2 || t < 2)
    return [...e];
  const n = (r) => [
    Number.parseInt(r.slice(1, 3), 16),
    Number.parseInt(r.slice(3, 5), 16),
    Number.parseInt(r.slice(5, 7), 16)
  ], o = (r) => Math.round(Math.max(0, Math.min(255, r))).toString(16).padStart(2, "0"), i = e.length - 1;
  return Array.from({ length: t }, (r, a) => {
    const l = a / (t - 1) * i, s = Math.min(Math.floor(l), i - 1), u = l - s, [c, d, f] = n(e[s]), [p, m, b] = n(e[s + 1]);
    return `#${o(c + (p - c) * u)}${o(d + (m - d) * u)}${o(f + (b - f) * u)}`;
  });
}
const Si = {
  classic: $a,
  tableau10: [
    "#4e79a7",
    "#f28e2b",
    "#e15759",
    "#76b7b2",
    "#59a14f",
    "#edc948",
    "#b07aa1",
    "#ff9da7",
    "#9c755f",
    "#bab0ac"
  ],
  "grafana-classic": [
    "#7EB26D",
    "#EAB839",
    "#6ED0E0",
    "#EF843C",
    "#E24D42",
    "#1F78C1",
    "#BA43A9",
    "#705DA0",
    "#508642",
    "#CCA300",
    "#447EBC",
    "#C15C17",
    "#890F02",
    "#0A437C",
    "#6D1F62",
    "#584477",
    "#B7DBAB",
    "#F4D598",
    "#70DBED",
    "#F9BA8F"
  ],
  blues: Ar(["#cfe2f3", "#9fc5e8", "#3d85c8", "#0b5394", "#041d3a"], 16),
  reds: Ar(["#fce5cd", "#f6b26b", "#e06666", "#cc0000", "#660000"], 16),
  GrYlRd: Ar(
    ["#37872d", "#96d98d", "#fee520", "#ff780a", "#f2495c", "#8f3bb8"],
    16
  ),
  "purple-orange": Ar(
    ["#7b2d8b", "#d45087", "#ff7c43", "#ffa600", "#f0e442", "#b3de69"],
    16
  ),
  "green-yellow-red": Ar(
    ["#1a9850", "#a6d96a", "#fee08b", "#fdae61", "#d73027"],
    16
  ),
  "red-yellow-green": Ar(
    ["#d73027", "#fdae61", "#fee08b", "#a6d96a", "#1a9850"],
    16
  ),
  "blue-yellow-red": Ar(
    ["#2166ac", "#92c5de", "#d1e5f0", "#fddbc7", "#f4a582", "#b2182b"],
    16
  ),
  "blue-purple": Ar(
    ["#045a8d", "#74a9cf", "#ccebc5", "#9ebcda", "#8856a7", "#810f7c"],
    16
  ),
  "yellow-blue": Ar(["#ffffd9", "#c7e9b4", "#41b6c4", "#225ea8", "#0c2c84"], 16)
};
function hI(e) {
  return !e || e === "classic" ? $a : Si[e] ?? $a;
}
function vI(e, t, n = "sequential", o) {
  if (t === 0)
    return [];
  if (e === "fixed") {
    const r = o ?? $a[0];
    return Array.from({ length: t }, () => r);
  }
  if (e === "thresholds")
    return [];
  const i = hI(e);
  return n === "distributed" && t > 1 ? Array.from({ length: t }, (r, a) => {
    const l = Math.round(a * (i.length - 1) / (t - 1));
    return i[l];
  }) : Array.from({ length: t }, (r, a) => i[a % i.length]);
}
const $n = {
  min: 0,
  max: 100,
  capRound: !0,
  trackWidth: 28,
  fillWidth: 30,
  trackColor: "#F4F5F5",
  sweepAngle: 270,
  valueColor: "#e6e6e6",
  valueSize: 28,
  valueVisible: !0,
  paddingX: 12,
  paddingY: 12,
  thresholdDisplay: "track",
  thresholdLabelDisplay: "none",
  orientation: "auto",
  colorFromScheme: !1,
  valueOffsetY: 18
};
let mI = 0;
function wg() {
  return `panel-${Date.now()}-${++mI}`;
}
function Pi(e) {
  return [{ id: "A", enabled: !0, dataSource: e }];
}
const bI = {
  timeseries: {
    queries: Pi({
      type: "mock",
      metric: "http_request_duration_seconds",
      pattern: "sine",
      seriesCount: 3
    }),
    lineWidth: 1.5,
    fillOpacity: 1,
    lineInterpolation: "linear",
    lineStyle: "solid",
    showPoints: !1,
    legendPosition: "bottom",
    tooltipMode: "multi",
    tooltipSort: "none",
    showAxisPointer: !0,
    unit: "",
    decimals: 1
  },
  bar: {
    queries: Pi({
      type: "mock",
      metric: "http_request_duration_seconds",
      pattern: "sine",
      seriesCount: 3,
      labels: ["p50", "p90", "p99"]
    }),
    lineWidth: 1,
    fillOpacity: 80,
    lineInterpolation: "linear",
    lineStyle: "solid",
    showPoints: !1,
    legendPosition: "bottom",
    unit: "ms",
    decimals: 0,
    stacked: !1
  },
  histogram: {
    queries: Pi({ type: "mock", metric: "request_duration_ms", pattern: "sine", seriesCount: 1 }),
    lineWidth: 1,
    fillOpacity: 60,
    lineInterpolation: "linear",
    lineStyle: "solid",
    showPoints: !1,
    legendPosition: "hidden",
    unit: "ms",
    decimals: 0
  },
  stat: {
    queries: Pi({
      type: "mock",
      metric: "http_requests_total",
      pattern: "trend-up",
      seriesCount: 1
    }),
    lineWidth: 1,
    fillOpacity: 0,
    lineInterpolation: "linear",
    lineStyle: "solid",
    showPoints: !1,
    legendPosition: "hidden",
    unit: "",
    decimals: 1,
    statValue: 0,
    statUnit: "",
    statTrend: "flat"
  },
  gauge: {
    queries: Pi({ type: "mock", metric: "system_cpu_usage", pattern: "sine", seriesCount: 1 }),
    lineWidth: 1,
    fillOpacity: 0,
    lineInterpolation: "linear",
    lineStyle: "solid",
    showPoints: !1,
    legendPosition: "hidden",
    unit: "%",
    decimals: 1,
    min: 0,
    max: 100
  },
  table: {
    queries: Pi({ type: "mock", metric: "http_requests", pattern: "noise", seriesCount: 1 }),
    lineWidth: 1,
    fillOpacity: 0,
    lineInterpolation: "linear",
    lineStyle: "solid",
    showPoints: !1,
    legendPosition: "hidden",
    unit: "",
    decimals: 0
  },
  pie: {
    queries: Pi({
      type: "mock",
      metric: "http_requests_by_service",
      pattern: "noise",
      seriesCount: 5
    }),
    lineWidth: 1,
    fillOpacity: 80,
    lineInterpolation: "linear",
    lineStyle: "solid",
    showPoints: !1,
    legendPosition: "bottom",
    unit: "",
    decimals: 1,
    pieType: "pie",
    pieSliceSorting: "desc",
    pieLabels: ["name", "percent"],
    pieShow: "calculate",
    pieCalculation: "lastNotNull"
  }
};
function xw(e, t) {
  const n = t?.id ?? wg();
  return { ...{
    id: n,
    type: e,
    title: `New ${e} panel`,
    description: "",
    queries: [
      {
        id: "A",
        enabled: !0,
        dataSource: { type: "mock", metric: "", pattern: "sine", seriesCount: 3 }
      }
    ],
    drawStyle: "lines",
    lineWidth: 1.5,
    fillOpacity: 1,
    gradientMode: "none",
    lineInterpolation: "linear",
    lineStyle: "solid",
    spanNulls: !1,
    insertNulls: !1,
    showPoints: !1,
    showPointsMode: "auto",
    stackingMode: "none",
    legendPosition: "bottom",
    unit: "",
    decimals: 1,
    thresholds: [],
    thresholdBaseColor: "#73bf69",
    softMin: null,
    softMax: null,
    logScale: !1,
    stacked: !1,
    min: 0,
    max: 100,
    links: [],
    axisPlacement: "left",
    showGridLines: "all",
    gridColor: "#E8E9EA",
    axisLabel: "all",
    axisLabelColor: "#666666",
    axisTick: "hidden",
    axisBorder: "hidden",
    scaleDistribution: "linear",
    centeredZero: !1
  }, ...bI[e], ...t, id: n };
}
function ww() {
  const e = {}, t = [], n = [
    {
      id: "s1",
      type: "stat",
      title: "Requests/sec",
      x: 0,
      y: 0,
      w: 2,
      h: 4,
      extra: { statValue: 1247, statUnit: "req/s", statTrend: "up", unit: "reqps" }
    },
    {
      id: "s2",
      type: "stat",
      title: "Error Rate",
      x: 2,
      y: 0,
      w: 2,
      h: 4,
      extra: {
        statValue: 0.32,
        statUnit: "%",
        statTrend: "down",
        thresholds: [
          { value: 0, color: "#52c41a", label: "OK" },
          { value: 1, color: "#faad14", label: "Warn" },
          { value: 5, color: "#ff4d4f", label: "Crit" }
        ]
      }
    },
    {
      id: "s3",
      type: "stat",
      title: "P99 Latency",
      x: 4,
      y: 0,
      w: 2,
      h: 4,
      extra: {
        statValue: 342,
        statUnit: "ms",
        statTrend: "up",
        thresholds: [
          { value: 0, color: "#52c41a", label: "OK" },
          { value: 200, color: "#faad14", label: "Warn" },
          { value: 500, color: "#ff4d4f", label: "Crit" }
        ]
      }
    },
    {
      id: "s4",
      type: "stat",
      title: "Uptime",
      x: 6,
      y: 0,
      w: 2,
      h: 4,
      extra: { statValue: 99.97, statUnit: "%", statTrend: "flat" }
    },
    { id: "g1", type: "gauge", title: "CPU", x: 8, y: 0, w: 2, h: 4, extra: { statValue: 67.3 } },
    {
      id: "g2",
      type: "gauge",
      title: "Memory",
      x: 10,
      y: 0,
      w: 2,
      h: 4,
      extra: {
        statValue: 82.1,
        thresholds: [
          { value: 0, color: "#52c41a", label: "OK" },
          { value: 70, color: "#faad14", label: "Warn" },
          { value: 90, color: "#ff4d4f", label: "Crit" }
        ]
      }
    },
    {
      id: "ts1",
      type: "timeseries",
      title: "CPU Usage",
      x: 0,
      y: 4,
      w: 6,
      h: 8,
      extra: {
        description: "by service",
        queries: Pi({
          type: "mock",
          metric: "system_cpu_usage",
          pattern: "sine",
          seriesCount: 4,
          labels: ["api-gateway", "auth-service", "payment-service", "user-service"]
        }),
        unit: "percent"
      }
    },
    {
      id: "ts2",
      type: "timeseries",
      title: "Request Latency",
      x: 6,
      y: 4,
      w: 6,
      h: 8,
      extra: {
        description: "percentiles",
        queries: Pi({
          type: "mock",
          metric: "http_request_duration_seconds",
          pattern: "spike",
          seriesCount: 3,
          labels: ["p50", "p90", "p99"]
        }),
        unit: "ms",
        thresholds: [
          { value: 100, color: "#faad14", label: "Warning 100ms" },
          { value: 300, color: "#ff4d4f", label: "Critical 300ms" }
        ]
      }
    },
    {
      id: "ts3",
      type: "timeseries",
      title: "Throughput",
      x: 0,
      y: 12,
      w: 4,
      h: 8,
      extra: {
        description: "req/s",
        queries: Pi({
          type: "mock",
          metric: "http_requests_total",
          pattern: "trend-up",
          seriesCount: 3,
          labels: ["api-gateway", "auth-service", "payment-service"]
        })
      }
    },
    {
      id: "b1",
      type: "bar",
      title: "Latency Percentiles",
      x: 4,
      y: 12,
      w: 4,
      h: 8,
      extra: { description: "by bucket" }
    },
    { id: "h1", type: "histogram", title: "Duration Distribution", x: 8, y: 12, w: 4, h: 8 },
    {
      id: "ts4",
      type: "timeseries",
      title: "Error Rate",
      x: 0,
      y: 20,
      w: 6,
      h: 8,
      extra: {
        description: "5xx vs 4xx",
        queries: Pi({
          type: "mock",
          metric: "http_errors",
          pattern: "noise",
          seriesCount: 2,
          labels: ["5xx", "4xx"]
        }),
        fillOpacity: 3
      }
    },
    {
      id: "ts5",
      type: "timeseries",
      title: "Network I/O",
      x: 6,
      y: 20,
      w: 6,
      h: 8,
      extra: {
        description: "KB/s",
        queries: Pi({
          type: "mock",
          metric: "network_io",
          pattern: "sawtooth",
          seriesCount: 4,
          labels: ["eth0-rx", "eth0-tx", "eth1-rx", "eth1-tx"]
        }),
        unit: "bytes"
      }
    },
    {
      id: "t1",
      type: "table",
      title: "Recent Requests",
      x: 0,
      y: 28,
      w: 12,
      h: 10,
      extra: { description: "last 80 requests" }
    }
  ];
  for (const o of n) {
    const i = xw(o.type, { id: o.id, title: o.title, ...o.extra });
    e[o.id] = i, t.push({
      i: o.id,
      x: o.x,
      y: o.y,
      w: o.w,
      h: o.h,
      minH: o.type === "stat" || o.type === "gauge" ? 3 : 6
    });
  }
  return { panels: e, layouts: t };
}
function yI() {
  return JSON.stringify(ww(), null, 2);
}
const Sw = /* @__PURE__ */ new Map();
function Ga(e) {
  Sw.set(e.meta.type, e);
}
function xI(e) {
  return Sw.get(e);
}
const wI = {
  meta: { type: "bar", displayNameKey: "config.type.bar", icon: "📊" },
  optionCategories: [
    { key: "general", labelKey: "config.section.general", Component: null },
    { key: "bar-style", labelKey: "config.section.style", Component: null },
    { key: "axes", labelKey: "config.section.axes", Component: null },
    { key: "tooltip", labelKey: "config.section.tooltip", Component: null }
  ]
}, SI = {
  meta: { type: "gauge", displayNameKey: "config.type.gauge", icon: "🎯" },
  optionCategories: [
    { key: "general", labelKey: "config.section.general", Component: null },
    { key: "value", labelKey: "config.section.value", Component: null },
    { key: "gauge-style", labelKey: "config.section.gaugeStyle", Component: null }
  ]
}, CI = {
  meta: {
    type: "histogram",
    displayNameKey: "config.type.histogram",
    icon: "📉"
  },
  optionCategories: [
    { key: "general", labelKey: "config.section.general", Component: null },
    { key: "histogram-style", labelKey: "config.section.histStyle", Component: null },
    { key: "tooltip", labelKey: "config.section.tooltip", Component: null }
  ]
}, $I = {
  meta: { type: "pie", displayNameKey: "config.type.pie", icon: "🥧" },
  optionCategories: [
    { key: "general", labelKey: "config.section.general", Component: null },
    { key: "value", labelKey: "config.section.value", Component: null },
    { key: "pie-style", labelKey: "config.section.pieStyle", Component: null },
    { key: "tooltip", labelKey: "config.section.tooltip", Component: null }
  ]
}, PI = {
  meta: { type: "stat", displayNameKey: "config.type.stat", icon: "#" },
  optionCategories: [
    { key: "general", labelKey: "config.section.general", Component: null },
    { key: "value", labelKey: "config.section.value", Component: null },
    { key: "stat-style", labelKey: "config.section.gaugeStyle", Component: null }
  ]
}, OI = {
  meta: { type: "table", displayNameKey: "config.type.table", icon: "📋" },
  optionCategories: [
    { key: "general", labelKey: "config.section.general", Component: null },
    { key: "table-style", labelKey: "config.section.tableStyle", Component: null }
  ]
}, II = {
  meta: { type: "timeseries", displayNameKey: "config.type.timeseries", icon: "📈" },
  optionCategories: [
    { key: "general", labelKey: "config.section.general", Component: null },
    { key: "value", labelKey: "config.section.value", Component: null },
    { key: "style", labelKey: "config.section.style", Component: null },
    { key: "axes", labelKey: "config.section.axes", Component: null },
    { key: "tooltip", labelKey: "config.section.tooltip", Component: null }
  ]
};
function MI() {
  Ga(II), Ga(wI), Ga(CI), Ga(PI), Ga(SI), Ga(OI), Ga($I);
}
function fu(e, t = "lastNotNull", n) {
  const o = e.filter((i) => i !== null);
  switch (t) {
    case "lastNotNull":
      return o.length > 0 ? o[o.length - 1] ?? 0 : 0;
    case "last":
      return e.length > 0 ? e[e.length - 1] ?? 0 : 0;
    case "firstNotNull":
      return o.length > 0 ? o[0] ?? 0 : 0;
    case "first":
      return e.length > 0 ? e[0] ?? 0 : 0;
    case "mean":
      return o.length > 0 ? o.reduce((i, r) => i + r, 0) / o.length : 0;
    case "min":
      return o.length > 0 ? Math.min(...o) : 0;
    case "max":
      return o.length > 0 ? Math.max(...o) : 0;
    case "sum":
      return o.reduce((i, r) => i + r, 0);
    case "count":
      return o.length;
    default:
      return o.length > 0 ? o[o.length - 1] ?? 0 : 0;
  }
}
function xc(e, t) {
  const n = e.filter((i) => i !== null);
  if (n.length < 2)
    return null;
  const o = n[0];
  return o === 0 ? null : (n[n.length - 1] - o) / o;
}
class Jd {
  constructor(t) {
    this.props = t;
  }
}
var Sg = /* @__PURE__ */ ((e) => (e.LOCAL_STORAGE = "LOCAL_STORAGE", e.IN_MEMORY = "IN_MEMORY", e))(Sg || {}), ul = /* @__PURE__ */ ((e) => (e.Linear = "linear", e.Logarithmic = "logarithmic", e.Symlog = "symlog", e))(ul || {}), Nr = /* @__PURE__ */ ((e) => (e.Lines = "lines", e.Bars = "bars", e.Points = "points", e.Histogram = "histogram", e))(Nr || {}), nd = /* @__PURE__ */ ((e) => (e.Linear = "linear", e.Smooth = "smooth", e.StepBefore = "stepBefore", e.StepAfter = "stepAfter", e))(nd || {}), Cg = /* @__PURE__ */ ((e) => (e.Solid = "solid", e.Dashed = "dashed", e.Dotted = "dotted", e))(Cg || {}), od = /* @__PURE__ */ ((e) => (e.None = "none", e.Solid = "solid", e.Gradient = "gradient", e))(od || {}), Cw = /* @__PURE__ */ ((e) => (e[e.Before = -1] = "Before", e[e.Center = 0] = "Center", e[e.After = 1] = "After", e))(Cw || {});
function TI(e, t, n) {
  if (!n || n.length === 0)
    return 0;
  const o = n.reduce((i, r) => r.length > i.length ? r : i, "");
  return o === "" || !t.font?.[0] ? 0 : (e.ctx.font = t.font[0], e.ctx.measureText(o).width / devicePixelRatio);
}
function kI(e) {
  return (t, n, o, i) => {
    const r = t.axes[o];
    if (i > 1) {
      const l = r._size;
      if (l !== void 0)
        return l;
    }
    let a = (r.ticks?.size ?? 0) + e;
    return a += TI(t, r, n), Math.ceil(a);
  };
}
class EI extends Jd {
  buildGridConfig() {
    const { grid: t, isDarkMode: n, isLogScale: o } = this.props, i = n ? "#444" : "#E8E9EA", r = o ? 0.1 : 0.2;
    return t ? {
      stroke: t.stroke ?? i,
      width: t.width ?? r,
      show: t.show ?? !0
    } : { stroke: i, width: r, show: !0 };
  }
  buildTicksConfig() {
    const { ticks: t } = this.props;
    return t || { width: 0.3, show: !0 };
  }
  buildXAxisValuesFormatter() {
    if (this.props.isTimeAxis !== !1)
      return (t, n) => n.map((o) => {
        if (o == null || Number.isNaN(o))
          return "";
        const i = new Date(o * 1e3);
        return `${i.getHours().toString().padStart(2, "0")}:${i.getMinutes().toString().padStart(2, "0")}`;
      });
  }
  buildYAxisValuesFormatter() {
    const { yAxisUnit: t, decimalPrecision: n } = this.props;
    return (o, i) => i.map((r) => {
      if (r == null || Number.isNaN(r))
        return "";
      const a = r.toFixed(n ?? 1);
      return t ? `${a} ${t}` : a;
    });
  }
  buildValuesFormatter() {
    const { values: t, scaleKey: n } = this.props;
    if (t)
      return t;
    if (n === "x")
      return this.buildXAxisValuesFormatter();
    if (n === "y")
      return this.buildYAxisValuesFormatter();
  }
  buildSizeCalculator() {
    const { size: t, scaleKey: n } = this.props;
    if (t)
      return t;
    if (n === "y")
      return kI(this.props.gap ?? 5);
  }
  buildStrokeColor() {
    const { stroke: t, isDarkMode: n } = this.props;
    if (t !== void 0)
      return t;
    if (n !== void 0)
      return n ? "white" : "black";
  }
  getConfig() {
    const {
      scaleKey: t,
      label: n,
      show: o = !0,
      side: i = 2,
      space: r,
      gap: a = 5
    } = this.props, l = this.buildGridConfig(), s = this.buildTicksConfig(), u = this.buildValuesFormatter(), c = this.buildSizeCalculator(), d = this.buildStrokeColor(), f = { scale: t, show: o, side: i };
    n && (f.label = n), d && (f.stroke = d), l && (f.grid = l), s && (f.ticks = s), u && (f.values = u), a !== void 0 && (f.gap = a), r !== void 0 && (f.space = r), c && (f.size = c);
    const { border: p } = this.props;
    return p?.show && (f.border = {
      stroke: p.stroke ?? d ?? "#666666",
      width: p.width ?? 1,
      show: !0
    }), f;
  }
  merge(t) {
    this.props = { ...this.props, ...t };
  }
}
const _I = "#FFFFFF", $w = 30, AI = 1e6, DI = 3, zI = {
  focus: { alpha: 0.3 },
  legend: { show: !1 },
  padding: [16, 16, 8, 8],
  series: [],
  hooks: {}
}, op = {
  drag: { setScale: !0 },
  points: {
    one: !0,
    size: (e, t) => (e.series[t]?.points?.size ?? 0) * 3,
    width: (e, t, n) => n / 4,
    stroke: (e, t) => {
      const n = e.series[t]?.points, o = typeof n?.stroke == "function" ? n.stroke : void 0;
      return `${o !== void 0 ? o(e, t) : typeof n?.stroke == "string" ? n.stroke : ""}90`;
    },
    fill: () => _I
  },
  focus: { prox: AI },
  hover: { prox: $w, bias: 0 }
};
function RI(e, t, n) {
  return e;
}
function NI(e) {
  const t = [10, 5];
  function n(r, a, l) {
    const s = r.ctx;
    s.save(), s.lineWidth = 2, s.setLineDash(t);
    const u = s.canvas.height * 0.9;
    for (const c of l) {
      const d = c.thresholdColor ?? "red", f = RI(
        c.thresholdValue,
        c.thresholdUnit,
        e.yAxisUnit
      ), p = r.valToPos(Number(f), a, !0), m = Math.round(r.bbox.left), b = Math.round(p), y = Math.round(r.bbox.left + r.bbox.width);
      if (s.strokeStyle = d, s.beginPath(), s.moveTo(m, b), s.lineTo(y, b), s.stroke(), c.thresholdLabel) {
        const S = s.measureText(c.thresholdLabel).width, C = y - S - 20, $ = s.canvas.height - b > u ? b + 15 : b - 15;
        s.fillStyle = d, s.fillText(c.thresholdLabel, C, $);
      }
    }
  }
  const { scaleKey: o, thresholds: i } = e;
  return (r) => {
    const a = r.ctx;
    n(r, o, i), a.restore();
  };
}
function ub({
  seriesShow: e,
  seriesLabel: t,
  visibleStoredLabels: n,
  hiddenStoredLabels: o,
  hasActivePreference: i
}) {
  const r = !!n?.has(t), a = !!o?.has(t);
  return r ? !0 : a || i ? !1 : e ?? !0;
}
const Pw = "series_visibility_";
function BI(e) {
  try {
    const t = localStorage.getItem(Pw + e);
    return t ? JSON.parse(t) : null;
  } catch {
    return null;
  }
}
function LI(e, t) {
  try {
    localStorage.setItem(Pw + e, JSON.stringify(t));
  } catch {
  }
}
function Ow({
  uPlotInstance: e,
  stepInterval: t
}) {
  const n = e.scales.x;
  if (n && typeof n.min == "number") {
    const o = n.min, i = o + t, r = e.valToPos(o, "x"), a = e.valToPos(i, "x");
    return Math.abs(a - r);
  }
  return 0;
}
const FI = !0, uo = "u-", HI = "uplot", VI = uo + "hz", jI = uo + "vt", WI = uo + "title", qI = uo + "wrap", GI = uo + "under", KI = uo + "over", YI = uo + "axis", nl = uo + "off", UI = uo + "select", XI = uo + "cursor-x", QI = uo + "cursor-y", ZI = uo + "cursor-pt", JI = uo + "legend", eM = uo + "live", tM = uo + "inline", nM = uo + "series", oM = uo + "marker", cb = uo + "label", iM = uo + "value", pu = "width", gu = "height", eu = "top", db = "bottom", Fl = "left", ip = "right", Xh = "#000", fb = Xh + "0", pb = "mousemove", gb = "mousedown", rp = "mouseup", hb = "mouseenter", vb = "mouseleave", mb = "dblclick", rM = "resize", aM = "scroll", bb = "change", $d = "dppxchange", Qh = "--", zs = typeof window < "u", $g = zs ? document : null, rs = zs ? window : null, lM = zs ? navigator : null;
let cn, wc;
function Pg() {
  let e = devicePixelRatio;
  cn != e && (cn = e, wc && Ig(bb, wc, Pg), wc = matchMedia(`(min-resolution: ${cn - 1e-3}dppx) and (max-resolution: ${cn + 1e-3}dppx)`), cl(bb, wc, Pg), rs.dispatchEvent(new CustomEvent($d)));
}
function Jo(e, t) {
  if (t != null) {
    let n = e.classList;
    !n.contains(t) && n.add(t);
  }
}
function Og(e, t) {
  let n = e.classList;
  n.contains(t) && n.remove(t);
}
function _n(e, t, n) {
  e.style[t] = n + "px";
}
function Li(e, t, n, o) {
  let i = $g.createElement(e);
  return t != null && Jo(i, t), n?.insertBefore(i, o), i;
}
function Ci(e, t) {
  return Li("div", e, t);
}
const yb = /* @__PURE__ */ new WeakMap();
function cr(e, t, n, o, i) {
  let r = "translate(" + t + "px," + n + "px)", a = yb.get(e);
  r != a && (e.style.transform = r, yb.set(e, r), t < 0 || n < 0 || t > o || n > i ? Jo(e, nl) : Og(e, nl));
}
const xb = /* @__PURE__ */ new WeakMap();
function wb(e, t, n) {
  let o = t + n, i = xb.get(e);
  o != i && (xb.set(e, o), e.style.background = t, e.style.borderColor = n);
}
const Sb = /* @__PURE__ */ new WeakMap();
function Cb(e, t, n, o) {
  let i = t + "" + n, r = Sb.get(e);
  i != r && (Sb.set(e, i), e.style.height = n + "px", e.style.width = t + "px", e.style.marginLeft = o ? -t / 2 + "px" : 0, e.style.marginTop = o ? -n / 2 + "px" : 0);
}
const Zh = { passive: !0 }, sM = { ...Zh, capture: !0 };
function cl(e, t, n, o) {
  t.addEventListener(e, n, o ? sM : Zh);
}
function Ig(e, t, n, o) {
  t.removeEventListener(e, n, Zh);
}
zs && Pg();
function Vi(e, t, n, o) {
  let i;
  n = n || 0, o = o || t.length - 1;
  let r = o <= 2147483647;
  for (; o - n > 1; )
    i = r ? n + o >> 1 : ri((n + o) / 2), t[i] < e ? n = i : o = i;
  return e - t[n] <= t[o] - e ? n : o;
}
function hs(e, t, n, o) {
  for (let i = o == 1 ? t : n; i >= t && i <= n; i += o)
    if (e[i] != null)
      return i;
  return -1;
}
function uM(e, t, n, o) {
  let i = qt, r = -qt;
  if (o == 1)
    i = e[t], r = e[n];
  else if (o == -1)
    i = e[n], r = e[t];
  else
    for (let a = t; a <= n; a++) {
      let l = e[a];
      l != null && (l < i && (i = l), l > r && (r = l));
    }
  return [i, r];
}
function cM(e, t, n) {
  let o = qt, i = -qt;
  for (let r = t; r <= n; r++) {
    let a = e[r];
    a != null && a > 0 && (a < o && (o = a), a > i && (i = a));
  }
  return [o, i];
}
function ef(e, t, n, o) {
  let i = Ob(e), r = Ob(t);
  e == t && (i == -1 ? (e *= n, t /= n) : (e /= n, t *= n));
  let a = n == 10 ? Hr : Iw, l = i == 1 ? ri : Oi, s = r == 1 ? Oi : ri, u = l(a(ao(e))), c = s(a(ao(t))), d = vs(n, u), f = vs(n, c);
  return n == 10 && (u < 0 && (d = Pn(d, -u)), c < 0 && (f = Pn(f, -c))), o || n == 2 ? (e = d * i, t = f * r) : (e = kw(e, d), t = tf(t, f)), [e, t];
}
function Jh(e, t, n, o) {
  let i = ef(e, t, n, o);
  return e == 0 && (i[0] = 0), t == 0 && (i[1] = 0), i;
}
const ev = 0.1, $b = {
  mode: 3,
  pad: ev
}, wu = {
  pad: 0,
  soft: null,
  mode: 0
}, dM = {
  min: wu,
  max: wu
};
function Pd(e, t, n, o) {
  return nf(n) ? Pb(e, t, n) : (wu.pad = n, wu.soft = o ? 0 : null, wu.mode = o ? 3 : 0, Pb(e, t, dM));
}
function en(e, t) {
  return e ?? t;
}
function fM(e, t, n) {
  for (t = en(t, 0), n = en(n, e.length - 1); t <= n; ) {
    if (e[t] != null)
      return !0;
    t++;
  }
  return !1;
}
function Pb(e, t, n) {
  let o = n.min, i = n.max, r = en(o.pad, 0), a = en(i.pad, 0), l = en(o.hard, -qt), s = en(i.hard, qt), u = en(o.soft, qt), c = en(i.soft, -qt), d = en(o.mode, 0), f = en(i.mode, 0), p = t - e, m = Hr(p), b = Oo(ao(e), ao(t)), y = Hr(b), S = ao(y - m);
  (p < 1e-24 || S > 10) && (p = 0, (e == 0 || t == 0) && (p = 1e-24, d == 2 && u != qt && (r = 0), f == 2 && c != -qt && (a = 0)));
  let C = p || b || 1e3, O = Hr(C), $ = vs(10, ri(O)), P = C * (p == 0 ? e == 0 ? 0.1 : 1 : r), k = Pn(kw(e - P, $ / 10), 24), x = e >= u && (d == 1 || d == 3 && k <= u || d == 2 && k >= u) ? u : qt, E = Oo(l, k < x && e >= x ? x : Ii(x, k)), z = C * (p == 0 ? t == 0 ? 0.1 : 1 : a), N = Pn(tf(t + z, $ / 10), 24), D = t <= c && (f == 1 || f == 3 && N >= c || f == 2 && N <= c) ? c : -qt, W = Ii(s, N > D && t <= D ? D : Oo(D, N));
  return E == W && E == 0 && (W = 100), [E, W];
}
const pM = new Intl.NumberFormat(zs ? lM.language : "en-US"), tv = (e) => pM.format(e), di = Math, id = di.PI, ao = di.abs, ri = di.floor, io = di.round, Oi = di.ceil, Ii = di.min, Oo = di.max, vs = di.pow, Ob = di.sign, Hr = di.log10, Iw = di.log2, gM = (e, t = 1) => di.sinh(e) * t, ap = (e, t = 1) => di.asinh(e / t), qt = 1 / 0;
function Ib(e) {
  return (Hr((e ^ e >> 31) - (e >> 31)) | 0) + 1;
}
function Mg(e, t, n) {
  return Ii(Oo(e, t), n);
}
function Wt(e) {
  return typeof e == "function" ? e : () => e;
}
const hM = () => {
}, Mw = (e) => e, Tw = (e, t) => t, vM = (e) => null, Mb = (e) => !0, Tb = (e, t) => e == t, mM = /\.\d*?(?=9{6,}|0{6,})/gm, ml = (e) => {
  if (_w(e) || Ma.has(e))
    return e;
  const t = `${e}`, n = t.match(mM);
  if (n == null)
    return e;
  let o = n[0].length - 1;
  if (t.indexOf("e-") != -1) {
    let [i, r] = t.split("e");
    return +`${ml(i)}e${r}`;
  }
  return Pn(e, o);
};
function Ja(e, t) {
  return ml(Pn(ml(e / t)) * t);
}
function tf(e, t) {
  return ml(Oi(ml(e / t)) * t);
}
function kw(e, t) {
  return ml(ri(ml(e / t)) * t);
}
function Pn(e, t = 0) {
  if (_w(e))
    return e;
  let n = 10 ** t, o = e * n * (1 + Number.EPSILON);
  return io(o) / n;
}
const Ma = /* @__PURE__ */ new Map();
function Ew(e) {
  return (("" + e).split(".")[1] || "").length;
}
function zu(e, t, n, o) {
  let i = [], r = o.map(Ew);
  for (let a = t; a < n; a++) {
    let l = ao(a), s = Pn(vs(e, a), l);
    for (let u = 0; u < o.length; u++) {
      let c = e == 10 ? +`${o[u]}e${a}` : o[u] * s, d = (a >= 0 ? 0 : l) + (a >= r[u] ? 0 : r[u]), f = e == 10 ? c : Pn(c, d);
      i.push(f), Ma.set(f, d);
    }
  }
  return i;
}
const Su = {}, nv = [], ms = [null, null], va = Array.isArray, _w = Number.isInteger, bM = (e) => e === void 0;
function kb(e) {
  return typeof e == "string";
}
function nf(e) {
  let t = !1;
  if (e != null) {
    let n = e.constructor;
    t = n == null || n == Object;
  }
  return t;
}
function yM(e) {
  return e != null && typeof e == "object";
}
const xM = Object.getPrototypeOf(Uint8Array), Aw = "__proto__";
function bs(e, t = nf) {
  let n;
  if (va(e)) {
    let o = e.find((i) => i != null);
    if (va(o) || t(o)) {
      n = Array(e.length);
      for (let i = 0; i < e.length; i++)
        n[i] = bs(e[i], t);
    } else
      n = e.slice();
  } else if (e instanceof xM)
    n = e.slice();
  else if (t(e)) {
    n = {};
    for (let o in e)
      o != Aw && (n[o] = bs(e[o], t));
  } else
    n = e;
  return n;
}
function eo(e) {
  let t = arguments;
  for (let n = 1; n < t.length; n++) {
    let o = t[n];
    for (let i in o)
      i != Aw && (nf(e[i]) ? eo(e[i], bs(o[i])) : e[i] = bs(o[i]));
  }
  return e;
}
const wM = 0, SM = 1, CM = 2;
function $M(e, t, n) {
  for (let o = 0, i, r = -1; o < t.length; o++) {
    let a = t[o];
    if (a > r) {
      for (i = a - 1; i >= 0 && e[i] == null; )
        e[i--] = null;
      for (i = a + 1; i < n && e[i] == null; )
        e[r = i++] = null;
    }
  }
}
function PM(e, t) {
  if (MM(e)) {
    let a = e[0].slice();
    for (let l = 1; l < e.length; l++)
      a.push(...e[l].slice(1));
    return TM(a[0]) || (a = IM(a)), a;
  }
  let n = /* @__PURE__ */ new Set();
  for (let a = 0; a < e.length; a++) {
    let s = e[a][0], u = s.length;
    for (let c = 0; c < u; c++)
      n.add(s[c]);
  }
  let o = [Array.from(n).sort((a, l) => a - l)], i = o[0].length, r = /* @__PURE__ */ new Map();
  for (let a = 0; a < i; a++)
    r.set(o[0][a], a);
  for (let a = 0; a < e.length; a++) {
    let l = e[a], s = l[0];
    for (let u = 1; u < l.length; u++) {
      let c = l[u], d = Array(i).fill(void 0), f = t ? t[a][u] : SM, p = [];
      for (let m = 0; m < c.length; m++) {
        let b = c[m], y = r.get(s[m]);
        b === null ? f != wM && (d[y] = b, f == CM && p.push(y)) : d[y] = b;
      }
      $M(d, p, i), o.push(d);
    }
  }
  return o;
}
const OM = typeof queueMicrotask > "u" ? (e) => Promise.resolve().then(e) : queueMicrotask;
function IM(e) {
  let t = e[0], n = t.length, o = Array(n);
  for (let r = 0; r < o.length; r++)
    o[r] = r;
  o.sort((r, a) => t[r] - t[a]);
  let i = [];
  for (let r = 0; r < e.length; r++) {
    let a = e[r], l = Array(n);
    for (let s = 0; s < n; s++)
      l[s] = a[o[s]];
    i.push(l);
  }
  return i;
}
function MM(e) {
  let t = e[0][0], n = t.length;
  for (let o = 1; o < e.length; o++) {
    let i = e[o][0];
    if (i.length != n)
      return !1;
    if (i != t) {
      for (let r = 0; r < n; r++)
        if (i[r] != t[r])
          return !1;
    }
  }
  return !0;
}
function TM(e, t = 100) {
  const n = e.length;
  if (n <= 1)
    return !0;
  let o = 0, i = n - 1;
  for (; o <= i && e[o] == null; )
    o++;
  for (; i >= o && e[i] == null; )
    i--;
  if (i <= o)
    return !0;
  const r = Oo(1, ri((i - o + 1) / t));
  for (let a = e[o], l = o + r; l <= i; l += r) {
    const s = e[l];
    if (s != null) {
      if (s <= a)
        return !1;
      a = s;
    }
  }
  return !0;
}
const Dw = [
  "January",
  "February",
  "March",
  "April",
  "May",
  "June",
  "July",
  "August",
  "September",
  "October",
  "November",
  "December"
], zw = [
  "Sunday",
  "Monday",
  "Tuesday",
  "Wednesday",
  "Thursday",
  "Friday",
  "Saturday"
];
function Rw(e) {
  return e.slice(0, 3);
}
const kM = zw.map(Rw), EM = Dw.map(Rw), _M = {
  MMMM: Dw,
  MMM: EM,
  WWWW: zw,
  WWW: kM
};
function tu(e) {
  return (e < 10 ? "0" : "") + e;
}
function AM(e) {
  return (e < 10 ? "00" : e < 100 ? "0" : "") + e;
}
const DM = {
  // 2019
  YYYY: (e) => e.getFullYear(),
  // 19
  YY: (e) => (e.getFullYear() + "").slice(2),
  // July
  MMMM: (e, t) => t.MMMM[e.getMonth()],
  // Jul
  MMM: (e, t) => t.MMM[e.getMonth()],
  // 07
  MM: (e) => tu(e.getMonth() + 1),
  // 7
  M: (e) => e.getMonth() + 1,
  // 09
  DD: (e) => tu(e.getDate()),
  // 9
  D: (e) => e.getDate(),
  // Monday
  WWWW: (e, t) => t.WWWW[e.getDay()],
  // Mon
  WWW: (e, t) => t.WWW[e.getDay()],
  // 03
  HH: (e) => tu(e.getHours()),
  // 3
  H: (e) => e.getHours(),
  // 9 (12hr, unpadded)
  h: (e) => {
    let t = e.getHours();
    return t == 0 ? 12 : t > 12 ? t - 12 : t;
  },
  // AM
  AA: (e) => e.getHours() >= 12 ? "PM" : "AM",
  // am
  aa: (e) => e.getHours() >= 12 ? "pm" : "am",
  // a
  a: (e) => e.getHours() >= 12 ? "p" : "a",
  // 09
  mm: (e) => tu(e.getMinutes()),
  // 9
  m: (e) => e.getMinutes(),
  // 09
  ss: (e) => tu(e.getSeconds()),
  // 9
  s: (e) => e.getSeconds(),
  // 374
  fff: (e) => AM(e.getMilliseconds())
};
function ov(e, t) {
  t = t || _M;
  let n = [], o = /\{([a-z]+)\}|[^{]+/gi, i;
  for (; i = o.exec(e); )
    n.push(i[0][0] == "{" ? DM[i[1]] : i[0]);
  return (r) => {
    let a = "";
    for (let l = 0; l < n.length; l++)
      a += typeof n[l] == "string" ? n[l] : n[l](r, t);
    return a;
  };
}
const zM = new Intl.DateTimeFormat().resolvedOptions().timeZone;
function RM(e, t) {
  let n;
  return t == "UTC" || t == "Etc/UTC" ? n = new Date(+e + e.getTimezoneOffset() * 6e4) : t == zM ? n = e : (n = new Date(e.toLocaleString("en-US", { timeZone: t })), n.setMilliseconds(e.getMilliseconds())), n;
}
const Nw = (e) => e % 1 == 0, Od = [1, 2, 2.5, 5], NM = zu(10, -32, 0, Od), Bw = zu(10, 0, 32, Od), BM = Bw.filter(Nw), el = NM.concat(Bw), iv = `
`, Lw = "{YYYY}", Eb = iv + Lw, Fw = "{M}/{D}", hu = iv + Fw, Sc = hu + "/{YY}", Hw = "{aa}", LM = "{h}:{mm}", Ql = LM + Hw, _b = iv + Ql, Ab = ":{ss}", fn = null;
function Vw(e) {
  let t = e * 1e3, n = t * 60, o = n * 60, i = o * 24, r = i * 30, a = i * 365, s = (e == 1 ? zu(10, 0, 3, Od).filter(Nw) : zu(10, -3, 0, Od)).concat([
    // minute divisors (# of secs)
    t,
    t * 5,
    t * 10,
    t * 15,
    t * 30,
    // hour divisors (# of mins)
    n,
    n * 5,
    n * 10,
    n * 15,
    n * 30,
    // day divisors (# of hrs)
    o,
    o * 2,
    o * 3,
    o * 4,
    o * 6,
    o * 8,
    o * 12,
    // month divisors TODO: need more?
    i,
    i * 2,
    i * 3,
    i * 4,
    i * 5,
    i * 6,
    i * 7,
    i * 8,
    i * 9,
    i * 10,
    i * 15,
    // year divisors (# months, approx)
    r,
    r * 2,
    r * 3,
    r * 4,
    r * 6,
    // century divisors
    a,
    a * 2,
    a * 5,
    a * 10,
    a * 25,
    a * 50,
    a * 100
  ]);
  const u = [
    //   tick incr    default          year                    month   day                   hour    min       sec   mode
    [a, Lw, fn, fn, fn, fn, fn, fn, 1],
    [i * 28, "{MMM}", Eb, fn, fn, fn, fn, fn, 1],
    [i, Fw, Eb, fn, fn, fn, fn, fn, 1],
    [o, "{h}" + Hw, Sc, fn, hu, fn, fn, fn, 1],
    [n, Ql, Sc, fn, hu, fn, fn, fn, 1],
    [t, Ab, Sc + " " + Ql, fn, hu + " " + Ql, fn, _b, fn, 1],
    [e, Ab + ".{fff}", Sc + " " + Ql, fn, hu + " " + Ql, fn, _b, fn, 1]
  ];
  function c(d) {
    return (f, p, m, b, y, S) => {
      let C = [], O = y >= a, $ = y >= r && y < a, P = d(m), k = Pn(P * e, 3), x = lp(P.getFullYear(), O ? 0 : P.getMonth(), $ || O ? 1 : P.getDate()), E = Pn(x * e, 3);
      if ($ || O) {
        let z = $ ? y / r : 0, N = O ? y / a : 0, D = k == E ? k : Pn(lp(x.getFullYear() + N, x.getMonth() + z, 1) * e, 3), W = new Date(io(D / e)), H = W.getFullYear(), L = W.getMonth();
        for (let A = 0; D <= b; A++) {
          let U = lp(H + N * A, L + z * A, 1), j = U - d(Pn(U * e, 3));
          D = Pn((+U + j) * e, 3), D <= b && C.push(D);
        }
      } else {
        let z = y >= i ? i : y, N = ri(m) - ri(k), D = E + N + tf(k - E, z);
        C.push(D);
        let W = d(D), H = W.getHours() + W.getMinutes() / n + W.getSeconds() / o, L = y / o, A = f.axes[p]._space, U = S / A;
        for (; D = Pn(D + y, e == 1 ? 0 : 3), !(D > b); )
          if (L > 1) {
            let j = ri(Pn(H + L, 6)) % 24, Y = d(D).getHours() - j;
            Y > 1 && (Y = -1), D -= Y * o, H = (H + L) % 24;
            let K = C[C.length - 1];
            Pn((D - K) / y, 3) * U >= 0.7 && C.push(D);
          } else
            C.push(D);
      }
      return C;
    };
  }
  return [
    s,
    u,
    c
  ];
}
const [FM, HM, VM] = Vw(1), [jM, WM, qM] = Vw(1e-3);
zu(2, -53, 53, [1]);
function Db(e, t) {
  return e.map((n) => n.map(
    (o, i) => i == 0 || i == 8 || o == null ? o : t(i == 1 || n[8] == 0 ? o : n[1] + o)
  ));
}
function zb(e, t) {
  return (n, o, i, r, a) => {
    let l = t.find((m) => a >= m[0]) || t[t.length - 1], s, u, c, d, f, p;
    return o.map((m) => {
      let b = e(m), y = b.getFullYear(), S = b.getMonth(), C = b.getDate(), O = b.getHours(), $ = b.getMinutes(), P = b.getSeconds(), k = y != s && l[2] || S != u && l[3] || C != c && l[4] || O != d && l[5] || $ != f && l[6] || P != p && l[7] || l[1];
      return s = y, u = S, c = C, d = O, f = $, p = P, k(b);
    });
  };
}
function GM(e, t) {
  let n = ov(t);
  return (o, i, r, a, l) => i.map((s) => n(e(s)));
}
function lp(e, t, n) {
  return new Date(e, t, n);
}
function Rb(e, t) {
  return t(e);
}
const KM = "{YYYY}-{MM}-{DD} {h}:{mm}{aa}";
function Nb(e, t) {
  return (n, o, i, r) => r == null ? Qh : t(e(o));
}
function YM(e, t) {
  let n = e.series[t];
  return n.width ? n.stroke(e, t) : n.points.width ? n.points.stroke(e, t) : null;
}
function UM(e, t) {
  return e.series[t].fill(e, t);
}
const XM = {
  show: !0,
  live: !0,
  isolate: !1,
  mount: hM,
  markers: {
    show: !0,
    width: 2,
    stroke: YM,
    fill: UM,
    dash: "solid"
  },
  idx: null,
  idxs: null,
  values: []
};
function QM(e, t) {
  let n = e.cursor.points, o = Ci(), i = n.size(e, t);
  _n(o, pu, i), _n(o, gu, i);
  let r = i / -2;
  _n(o, "marginLeft", r), _n(o, "marginTop", r);
  let a = n.width(e, t, i);
  return a && _n(o, "borderWidth", a), o;
}
function ZM(e, t) {
  let n = e.series[t].points;
  return n._fill || n._stroke;
}
function JM(e, t) {
  let n = e.series[t].points;
  return n._stroke || n._fill;
}
function eT(e, t) {
  return e.series[t].points.size;
}
const sp = [0, 0];
function tT(e, t, n) {
  return sp[0] = t, sp[1] = n, sp;
}
function Cc(e, t, n, o = !0) {
  return (i) => {
    i.button == 0 && (!o || i.target == t) && n(i);
  };
}
function up(e, t, n, o = !0) {
  return (i) => {
    (!o || i.target == t) && n(i);
  };
}
const nT = {
  show: !0,
  x: !0,
  y: !0,
  lock: !1,
  move: tT,
  points: {
    one: !1,
    show: QM,
    size: eT,
    width: 0,
    stroke: JM,
    fill: ZM
  },
  bind: {
    mousedown: Cc,
    mouseup: Cc,
    click: Cc,
    // legend clicks, not .u-over clicks
    dblclick: Cc,
    mousemove: up,
    mouseleave: up,
    mouseenter: up
  },
  drag: {
    setScale: !0,
    x: !0,
    y: !1,
    dist: 0,
    uni: null,
    click: (e, t) => {
      t.stopPropagation(), t.stopImmediatePropagation();
    },
    _x: !1,
    _y: !1
  },
  focus: {
    dist: (e, t, n, o, i) => o - i,
    prox: -1,
    bias: 0
  },
  hover: {
    skip: [void 0],
    prox: null,
    bias: 0
  },
  left: -10,
  top: -10,
  idx: null,
  dataIdx: null,
  idxs: null,
  event: null
}, jw = {
  show: !0,
  stroke: "rgba(0,0,0,0.07)",
  width: 2
  //	dash: [],
}, rv = eo({}, jw, {
  filter: Tw
}), Ww = eo({}, rv, {
  size: 10
}), qw = eo({}, jw, {
  show: !1
}), av = '12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"', Gw = "bold " + av, Kw = 1.5, Bb = {
  show: !0,
  scale: "x",
  stroke: Xh,
  space: 50,
  gap: 5,
  size: 50,
  labelGap: 0,
  labelSize: 30,
  labelFont: Gw,
  side: 2,
  //	class: "x-vals",
  //	incrs: timeIncrs,
  //	values: timeVals,
  //	filter: retArg1,
  grid: rv,
  ticks: Ww,
  border: qw,
  font: av,
  lineGap: Kw,
  rotate: 0
}, oT = "Value", iT = "Time", Lb = {
  show: !0,
  scale: "x",
  auto: !1,
  sorted: 1,
  //	label: "Time",
  //	value: v => stamp(new Date(v * 1e3)),
  // internal caches
  min: qt,
  max: -qt,
  idxs: []
};
function rT(e, t, n, o, i) {
  return t.map((r) => r == null ? "" : tv(r));
}
function aT(e, t, n, o, i, r, a) {
  let l = [], s = Ma.get(i) || 0;
  n = a ? n : Pn(tf(n, i), s);
  for (let u = n; u <= o; u = Pn(u + i, s))
    l.push(Object.is(u, -0) ? 0 : u);
  return l;
}
function Tg(e, t, n, o, i, r, a) {
  const l = [], s = e.scales[e.axes[t].scale].log, u = s == 10 ? Hr : Iw, c = ri(u(n));
  i = vs(s, c), s == 10 && (i = el[Vi(i, el)]);
  let d = n, f = i * s;
  s == 10 && (f = el[Vi(f, el)]);
  do
    l.push(d), d = d + i, s == 10 && !Ma.has(d) && (d = Pn(d, Ma.get(i))), d >= f && (i = d, f = i * s, s == 10 && (f = el[Vi(f, el)]));
  while (d <= o);
  return l;
}
function lT(e, t, n, o, i, r, a) {
  let s = e.scales[e.axes[t].scale].asinh, u = o > s ? Tg(e, t, Oo(s, n), o, i) : [s], c = o >= 0 && n <= 0 ? [0] : [];
  return (n < -s ? Tg(e, t, Oo(s, -o), -n, i) : [s]).reverse().map((f) => -f).concat(c, u);
}
const Yw = /./, sT = /[12357]/, uT = /[125]/, Fb = /1/, kg = (e, t, n, o) => e.map((i, r) => t == 4 && i == 0 || r % o == 0 && n.test(i.toExponential()[i < 0 ? 1 : 0]) ? i : null);
function cT(e, t, n, o, i) {
  let r = e.axes[n], a = r.scale, l = e.scales[a], s = e.valToPos, u = r._space, c = s(10, a), d = s(9, a) - c >= u ? Yw : s(7, a) - c >= u ? sT : s(5, a) - c >= u ? uT : Fb;
  if (d == Fb) {
    let f = ao(s(1, a) - c);
    if (f < u)
      return kg(t.slice().reverse(), l.distr, d, Oi(u / f)).reverse();
  }
  return kg(t, l.distr, d, 1);
}
function dT(e, t, n, o, i) {
  let r = e.axes[n], a = r.scale, l = r._space, s = e.valToPos, u = ao(s(1, a) - s(2, a));
  return u < l ? kg(t.slice().reverse(), 3, Yw, Oi(l / u)).reverse() : t;
}
function fT(e, t, n, o) {
  return o == null ? Qh : t == null ? "" : tv(t);
}
const Hb = {
  show: !0,
  scale: "y",
  stroke: Xh,
  space: 30,
  gap: 5,
  size: 50,
  labelGap: 0,
  labelSize: 30,
  labelFont: Gw,
  side: 3,
  //	class: "y-vals",
  //	incrs: numIncrs,
  //	values: (vals, space) => vals,
  //	filter: retArg1,
  grid: rv,
  ticks: Ww,
  border: qw,
  font: av,
  lineGap: Kw,
  rotate: 0
};
function pT(e, t) {
  let n = 3 + (e || 1) * 2;
  return Pn(n * t, 3);
}
function gT(e, t) {
  let { scale: n, idxs: o } = e.series[0], i = e._data[0], r = e.valToPos(i[o[0]], n, !0), a = e.valToPos(i[o[1]], n, !0), l = ao(a - r), s = e.series[t], u = l / (s.points.space * cn);
  return o[1] - o[0] <= u;
}
const Vb = {
  scale: null,
  auto: !0,
  sorted: 0,
  // internal caches
  min: qt,
  max: -qt
}, Uw = (e, t, n, o, i) => i, jb = {
  show: !0,
  auto: !0,
  sorted: 0,
  gaps: Uw,
  alpha: 1,
  facets: [
    eo({}, Vb, { scale: "x" }),
    eo({}, Vb, { scale: "y" })
  ]
}, Wb = {
  scale: "y",
  auto: !0,
  sorted: 0,
  show: !0,
  spanGaps: !1,
  gaps: Uw,
  alpha: 1,
  points: {
    show: gT,
    filter: null
    //  paths:
    //	stroke: "#000",
    //	fill: "#fff",
    //	width: 1,
    //	size: 10,
  },
  //	label: "Value",
  //	value: v => v,
  values: null,
  // internal caches
  min: qt,
  max: -qt,
  idxs: [],
  path: null,
  clip: null
};
function hT(e, t, n, o, i) {
  return n / 10;
}
const Xw = {
  time: FI,
  auto: !0,
  distr: 1,
  log: 10,
  asinh: 1,
  min: null,
  max: null,
  dir: 1,
  ori: 0
}, vT = eo({}, Xw, {
  time: !1,
  ori: 1
}), qb = {};
function Qw(e, t) {
  let n = qb[e];
  return n || (n = {
    key: e,
    plots: [],
    sub(o) {
      n.plots.push(o);
    },
    unsub(o) {
      n.plots = n.plots.filter((i) => i != o);
    },
    pub(o, i, r, a, l, s, u) {
      for (let c = 0; c < n.plots.length; c++)
        n.plots[c] != i && n.plots[c].pub(o, i, r, a, l, s, u);
    }
  }, e != null && (qb[e] = n)), n;
}
const ys = 1, Eg = 2;
function $l(e, t, n) {
  const o = e.mode, i = e.series[t], r = o == 2 ? e._data[t] : e._data, a = e.scales, l = e.bbox;
  let s = r[0], u = o == 2 ? r[1] : r[t], c = o == 2 ? a[i.facets[0].scale] : a[e.series[0].scale], d = o == 2 ? a[i.facets[1].scale] : a[i.scale], f = l.left, p = l.top, m = l.width, b = l.height, y = e.valToPosH, S = e.valToPosV;
  return c.ori == 0 ? n(
    i,
    s,
    u,
    c,
    d,
    y,
    S,
    f,
    p,
    m,
    b,
    rf,
    Rs,
    lf,
    Jw,
    tS
  ) : n(
    i,
    s,
    u,
    c,
    d,
    S,
    y,
    p,
    f,
    b,
    m,
    af,
    Ns,
    uv,
    eS,
    nS
  );
}
function lv(e, t) {
  let n = 0, o = 0, i = en(e.bands, nv);
  for (let r = 0; r < i.length; r++) {
    let a = i[r];
    a.series[0] == t ? n = a.dir : a.series[1] == t && (a.dir == 1 ? o |= 1 : o |= 2);
  }
  return [
    n,
    o == 1 ? -1 : (
      // neg only
      o == 2 ? 1 : (
        // pos only
        o == 3 ? 2 : (
          // both
          0
        )
      )
    )
  ];
}
function mT(e, t, n, o, i) {
  let r = e.mode, a = e.series[t], l = r == 2 ? a.facets[1].scale : a.scale, s = e.scales[l];
  return i == -1 ? s.min : i == 1 ? s.max : s.distr == 3 ? s.dir == 1 ? s.min : s.max : 0;
}
function Vr(e, t, n, o, i, r) {
  return $l(e, t, (a, l, s, u, c, d, f, p, m, b, y) => {
    let S = a.pxRound;
    const C = u.dir * (u.ori == 0 ? 1 : -1), O = u.ori == 0 ? Rs : Ns;
    let $, P;
    C == 1 ? ($ = n, P = o) : ($ = o, P = n);
    let k = S(d(l[$], u, b, p)), x = S(f(s[$], c, y, m)), E = S(d(l[P], u, b, p)), z = S(f(r == 1 ? c.max : c.min, c, y, m)), N = new Path2D(i);
    return O(N, E, z), O(N, k, z), O(N, k, x), N;
  });
}
function of(e, t, n, o, i, r) {
  let a = null;
  if (e.length > 0) {
    a = new Path2D();
    const l = t == 0 ? lf : uv;
    let s = n;
    for (let d = 0; d < e.length; d++) {
      let f = e[d];
      if (f[1] > f[0]) {
        let p = f[0] - s;
        p > 0 && l(a, s, o, p, o + r), s = f[1];
      }
    }
    let u = n + i - s, c = 10;
    u > 0 && l(a, s, o - c / 2, u, o + r + c);
  }
  return a;
}
function bT(e, t, n) {
  let o = e[e.length - 1];
  o && o[0] == t ? o[1] = n : e.push([t, n]);
}
function sv(e, t, n, o, i, r, a) {
  let l = [], s = e.length;
  for (let u = i == 1 ? n : o; u >= n && u <= o; u += i)
    if (t[u] === null) {
      let d = u, f = u;
      if (i == 1)
        for (; ++u <= o && t[u] === null; )
          f = u;
      else
        for (; --u >= n && t[u] === null; )
          f = u;
      let p = r(e[d]), m = f == d ? p : r(e[f]), b = d - i;
      p = a <= 0 && b >= 0 && b < s ? r(e[b]) : p;
      let S = f + i;
      m = a >= 0 && S >= 0 && S < s ? r(e[S]) : m, m >= p && l.push([p, m]);
    }
  return l;
}
function Gb(e) {
  return e == 0 ? Mw : e == 1 ? io : (t) => Ja(t, e);
}
function Zw(e) {
  let t = e == 0 ? rf : af, n = e == 0 ? (i, r, a, l, s, u) => {
    i.arcTo(r, a, l, s, u);
  } : (i, r, a, l, s, u) => {
    i.arcTo(a, r, s, l, u);
  }, o = e == 0 ? (i, r, a, l, s) => {
    i.rect(r, a, l, s);
  } : (i, r, a, l, s) => {
    i.rect(a, r, s, l);
  };
  return (i, r, a, l, s, u = 0, c = 0) => {
    u == 0 && c == 0 ? o(i, r, a, l, s) : (u = Ii(u, l / 2, s / 2), c = Ii(c, l / 2, s / 2), t(i, r + u, a), n(i, r + l, a, r + l, a + s, u), n(i, r + l, a + s, r, a + s, c), n(i, r, a + s, r, a, c), n(i, r, a, r + l, a, u), i.closePath());
  };
}
const rf = (e, t, n) => {
  e.moveTo(t, n);
}, af = (e, t, n) => {
  e.moveTo(n, t);
}, Rs = (e, t, n) => {
  e.lineTo(t, n);
}, Ns = (e, t, n) => {
  e.lineTo(n, t);
}, lf = Zw(0), uv = Zw(1), Jw = (e, t, n, o, i, r) => {
  e.arc(t, n, o, i, r);
}, eS = (e, t, n, o, i, r) => {
  e.arc(n, t, o, i, r);
}, tS = (e, t, n, o, i, r, a) => {
  e.bezierCurveTo(t, n, o, i, r, a);
}, nS = (e, t, n, o, i, r, a) => {
  e.bezierCurveTo(n, t, i, o, a, r);
};
function oS(e) {
  return (t, n, o, i, r) => $l(t, n, (a, l, s, u, c, d, f, p, m, b, y) => {
    let { pxRound: S, points: C } = a, O, $;
    u.ori == 0 ? (O = rf, $ = Jw) : (O = af, $ = eS);
    const P = Pn(C.width * cn, 3);
    let k = (C.size - C.width) / 2 * cn, x = Pn(k * 2, 3), E = new Path2D(), z = new Path2D(), { left: N, top: D, width: W, height: H } = t.bbox;
    lf(
      z,
      N - x,
      D - x,
      W + x * 2,
      H + x * 2
    );
    const L = (A) => {
      if (s[A] != null) {
        let U = S(d(l[A], u, b, p)), j = S(f(s[A], c, y, m));
        O(E, U + k, j), $(E, U, j, k, 0, id * 2);
      }
    };
    if (r)
      r.forEach(L);
    else
      for (let A = o; A <= i; A++)
        L(A);
    return {
      stroke: P > 0 ? E : null,
      fill: E,
      clip: z,
      flags: ys | Eg
    };
  });
}
function iS(e) {
  return (t, n, o, i, r, a) => {
    o != i && (r != o && a != o && e(t, n, o), r != i && a != i && e(t, n, i), e(t, n, a));
  };
}
const yT = iS(Rs), xT = iS(Ns);
function rS(e) {
  const t = en(e?.alignGaps, 0);
  return (n, o, i, r) => $l(n, o, (a, l, s, u, c, d, f, p, m, b, y) => {
    let S = a.pxRound, C = (J) => S(d(J, u, b, p)), O = (J) => S(f(J, c, y, m)), $, P;
    u.ori == 0 ? ($ = Rs, P = yT) : ($ = Ns, P = xT);
    const k = u.dir * (u.ori == 0 ? 1 : -1), x = { stroke: new Path2D(), fill: null, clip: null, band: null, gaps: null, flags: ys }, E = x.stroke;
    let z = qt, N = -qt, D, W, H, L = C(l[k == 1 ? i : r]), A = hs(s, i, r, 1 * k), U = hs(s, i, r, -1 * k), j = C(l[A]), re = C(l[U]), G = !1;
    for (let J = k == 1 ? i : r; J >= i && J <= r; J += k) {
      let be = C(l[J]), xe = s[J];
      be == L ? xe != null ? (W = O(xe), z == qt && ($(E, be, W), D = W), z = Ii(W, z), N = Oo(W, N)) : xe === null && (G = !0) : (z != qt && (P(E, L, z, N, D, W), H = L), xe != null ? (W = O(xe), $(E, be, W), z = N = D = W) : (z = qt, N = -qt, xe === null && (G = !0)), L = be);
    }
    z != qt && z != N && H != L && P(E, L, z, N, D, W);
    let [Y, K] = lv(n, o);
    if (a.fill != null || Y != 0) {
      let J = x.fill = new Path2D(E), be = a.fillTo(n, o, a.min, a.max, Y), xe = O(be);
      $(J, re, xe), $(J, j, xe);
    }
    if (!a.spanGaps) {
      let J = [];
      G && J.push(...sv(l, s, i, r, k, C, t)), x.gaps = J = a.gaps(n, o, i, r, J), x.clip = of(J, u.ori, p, m, b, y);
    }
    return K != 0 && (x.band = K == 2 ? [
      Vr(n, o, i, r, E, -1),
      Vr(n, o, i, r, E, 1)
    ] : Vr(n, o, i, r, E, K)), x;
  });
}
function wT(e) {
  const t = en(e.align, 1), n = en(e.ascDesc, !1), o = en(e.alignGaps, 0), i = en(e.extend, !1);
  return (r, a, l, s) => $l(r, a, (u, c, d, f, p, m, b, y, S, C, O) => {
    let $ = u.pxRound, { left: P, width: k } = r.bbox, x = (Y) => $(m(Y, f, C, y)), E = (Y) => $(b(Y, p, O, S)), z = f.ori == 0 ? Rs : Ns;
    const N = { stroke: new Path2D(), fill: null, clip: null, band: null, gaps: null, flags: ys }, D = N.stroke, W = f.dir * (f.ori == 0 ? 1 : -1);
    l = hs(d, l, s, 1), s = hs(d, l, s, -1);
    let H = E(d[W == 1 ? l : s]), L = x(c[W == 1 ? l : s]), A = L, U = L;
    i && t == -1 && (U = P, z(D, U, H)), z(D, L, H);
    for (let Y = W == 1 ? l : s; Y >= l && Y <= s; Y += W) {
      let K = d[Y];
      if (K == null)
        continue;
      let J = x(c[Y]), be = E(K);
      t == 1 ? z(D, J, H) : z(D, A, be), z(D, J, be), H = be, A = J;
    }
    let j = A;
    i && t == 1 && (j = P + k, z(D, j, H));
    let [re, G] = lv(r, a);
    if (u.fill != null || re != 0) {
      let Y = N.fill = new Path2D(D), K = u.fillTo(r, a, u.min, u.max, re), J = E(K);
      z(Y, j, J), z(Y, U, J);
    }
    if (!u.spanGaps) {
      let Y = [];
      Y.push(...sv(c, d, l, s, W, x, o));
      let K = u.width * cn / 2, J = n || t == 1 ? K : -K, be = n || t == -1 ? -K : K;
      Y.forEach((xe) => {
        xe[0] += J, xe[1] += be;
      }), N.gaps = Y = u.gaps(r, a, l, s, Y), N.clip = of(Y, f.ori, y, S, C, O);
    }
    return G != 0 && (N.band = G == 2 ? [
      Vr(r, a, l, s, D, -1),
      Vr(r, a, l, s, D, 1)
    ] : Vr(r, a, l, s, D, G)), N;
  });
}
function Kb(e, t, n, o, i, r, a = qt) {
  if (e.length > 1) {
    let l = null;
    for (let s = 0, u = 1 / 0; s < e.length; s++)
      if (t[s] !== void 0) {
        if (l != null) {
          let c = ao(e[s] - e[l]);
          c < u && (u = c, a = ao(n(e[s], o, i, r) - n(e[l], o, i, r)));
        }
        l = s;
      }
  }
  return a;
}
function ST(e) {
  e = e || Su;
  const t = en(e.size, [0.6, qt, 1]), n = e.align || 0, o = e.gap || 0;
  let i = e.radius;
  i = // [valueRadius, baselineRadius]
  i == null ? [0, 0] : typeof i == "number" ? [i, 0] : i;
  const r = Wt(i), a = 1 - t[0], l = en(t[1], qt), s = en(t[2], 1), u = en(e.disp, Su), c = en(e.each, (p) => {
  }), { fill: d, stroke: f } = u;
  return (p, m, b, y) => $l(p, m, (S, C, O, $, P, k, x, E, z, N, D) => {
    let W = S.pxRound, H = n, L = o * cn, A = l * cn, U = s * cn, j, re;
    $.ori == 0 ? [j, re] = r(p, m) : [re, j] = r(p, m);
    const G = $.dir * ($.ori == 0 ? 1 : -1);
    let Y = $.ori == 0 ? lf : uv, K = $.ori == 0 ? c : (De, Je, wt, lt, qe, rt, dt) => {
      c(De, Je, wt, qe, lt, dt, rt);
    }, J = en(p.bands, nv).find((De) => De.series[0] == m), be = J != null ? J.dir : 0, xe = S.fillTo(p, m, S.min, S.max, be), ge = W(x(xe, P, D, z)), de, ne, we, ae = N, se = W(S.width * cn), he = !1, Me = null, ke = null, Le = null, Re = null;
    d != null && (se == 0 || f != null) && (he = !0, Me = d.values(p, m, b, y), ke = /* @__PURE__ */ new Map(), new Set(Me).forEach((De) => {
      De != null && ke.set(De, new Path2D());
    }), se > 0 && (Le = f.values(p, m, b, y), Re = /* @__PURE__ */ new Map(), new Set(Le).forEach((De) => {
      De != null && Re.set(De, new Path2D());
    })));
    let { x0: We, size: et } = u;
    if (We != null && et != null) {
      H = 1, C = We.values(p, m, b, y), We.unit == 2 && (C = C.map((wt) => p.posToVal(E + wt * N, $.key, !0)));
      let De = et.values(p, m, b, y);
      et.unit == 2 ? ne = De[0] * N : ne = k(De[0], $, N, E) - k(0, $, N, E), ae = Kb(C, O, k, $, N, E, ae), we = ae - ne + L;
    } else
      ae = Kb(C, O, k, $, N, E, ae), we = ae * a + L, ne = ae - we;
    we < 1 && (we = 0), se >= ne / 2 && (se = 0), we < 5 && (W = Mw);
    let Fe = we > 0, Ne = ae - we - (Fe ? se : 0);
    ne = W(Mg(Ne, U, A)), de = (H == 0 ? ne / 2 : H == G ? 0 : ne) - H * G * ((H == 0 ? L / 2 : 0) + (Fe ? se / 2 : 0));
    const Ge = { stroke: null, fill: null, clip: null, band: null, gaps: null, flags: 0 }, it = he ? null : new Path2D();
    let Ke = null;
    if (J != null)
      Ke = p.data[J.series[1]];
    else {
      let { y0: De, y1: Je } = u;
      De != null && Je != null && (O = Je.values(p, m, b, y), Ke = De.values(p, m, b, y));
    }
    let Oe = j * ne, je = re * ne;
    for (let De = G == 1 ? b : y; De >= b && De <= y; De += G) {
      let Je = O[De];
      if (Je == null)
        continue;
      if (Ke != null) {
        let Xt = Ke[De] ?? 0;
        if (Je - Xt == 0)
          continue;
        ge = x(Xt, P, D, z);
      }
      let wt = $.distr != 2 || u != null ? C[De] : De, lt = k(wt, $, N, E), qe = x(en(Je, xe), P, D, z), rt = W(lt - de), dt = W(Oo(qe, ge)), vt = W(Ii(qe, ge)), Rt = dt - vt;
      if (Je != null) {
        let Xt = Je < 0 ? je : Oe, vn = Je < 0 ? Oe : je;
        he ? (se > 0 && Le[De] != null && Y(Re.get(Le[De]), rt, vt + ri(se / 2), ne, Oo(0, Rt - se), Xt, vn), Me[De] != null && Y(ke.get(Me[De]), rt, vt + ri(se / 2), ne, Oo(0, Rt - se), Xt, vn)) : Y(it, rt, vt + ri(se / 2), ne, Oo(0, Rt - se), Xt, vn), K(
          p,
          m,
          De,
          rt - se / 2,
          vt,
          ne + se,
          Rt
        );
      }
    }
    return se > 0 ? Ge.stroke = he ? Re : it : he || (Ge._fill = S.width == 0 ? S._fill : S._stroke ?? S._fill, Ge.width = 0), Ge.fill = he ? ke : it, Ge;
  });
}
function CT(e, t) {
  const n = en(t?.alignGaps, 0);
  return (o, i, r, a) => $l(o, i, (l, s, u, c, d, f, p, m, b, y, S) => {
    let C = l.pxRound, O = (j) => C(f(j, c, y, m)), $ = (j) => C(p(j, d, S, b)), P, k, x;
    c.ori == 0 ? (P = rf, x = Rs, k = tS) : (P = af, x = Ns, k = nS);
    const E = c.dir * (c.ori == 0 ? 1 : -1);
    r = hs(u, r, a, 1), a = hs(u, r, a, -1);
    let z = O(s[E == 1 ? r : a]), N = z, D = [], W = [];
    for (let j = E == 1 ? r : a; j >= r && j <= a; j += E)
      if (u[j] != null) {
        let G = s[j], Y = O(G);
        D.push(N = Y), W.push($(u[j]));
      }
    const H = { stroke: e(D, W, P, x, k, C), fill: null, clip: null, band: null, gaps: null, flags: ys }, L = H.stroke;
    let [A, U] = lv(o, i);
    if (l.fill != null || A != 0) {
      let j = H.fill = new Path2D(L), re = l.fillTo(o, i, l.min, l.max, A), G = $(re);
      x(j, N, G), x(j, z, G);
    }
    if (!l.spanGaps) {
      let j = [];
      j.push(...sv(s, u, r, a, E, O, n)), H.gaps = j = l.gaps(o, i, r, a, j), H.clip = of(j, c.ori, m, b, y, S);
    }
    return U != 0 && (H.band = U == 2 ? [
      Vr(o, i, r, a, L, -1),
      Vr(o, i, r, a, L, 1)
    ] : Vr(o, i, r, a, L, U)), H;
  });
}
function $T(e) {
  return CT(PT, e);
}
function PT(e, t, n, o, i, r) {
  const a = e.length;
  if (a < 2)
    return null;
  const l = new Path2D();
  if (n(l, e[0], t[0]), a == 2)
    o(l, e[1], t[1]);
  else {
    let s = Array(a), u = Array(a - 1), c = Array(a - 1), d = Array(a - 1);
    for (let f = 0; f < a - 1; f++)
      c[f] = t[f + 1] - t[f], d[f] = e[f + 1] - e[f], u[f] = c[f] / d[f];
    s[0] = u[0];
    for (let f = 1; f < a - 1; f++)
      u[f] === 0 || u[f - 1] === 0 || u[f - 1] > 0 != u[f] > 0 ? s[f] = 0 : (s[f] = 3 * (d[f - 1] + d[f]) / ((2 * d[f] + d[f - 1]) / u[f - 1] + (d[f] + 2 * d[f - 1]) / u[f]), isFinite(s[f]) || (s[f] = 0));
    s[a - 1] = u[a - 2];
    for (let f = 0; f < a - 1; f++)
      i(
        l,
        e[f] + d[f] / 3,
        t[f] + s[f] * d[f] / 3,
        e[f + 1] - d[f] / 3,
        t[f + 1] - s[f + 1] * d[f] / 3,
        e[f + 1],
        t[f + 1]
      );
  }
  return l;
}
const _g = /* @__PURE__ */ new Set();
function Yb() {
  for (let e of _g)
    e.syncRect(!0);
}
zs && (cl(rM, rs, Yb), cl(aM, rs, Yb, !0), cl($d, rs, () => {
  Qn.pxRatio = cn;
}));
const OT = rS(), IT = oS();
function Ub(e, t, n, o) {
  return (o ? [e[0], e[1]].concat(e.slice(2)) : [e[0]].concat(e.slice(1))).map((r, a) => Ag(r, a, t, n));
}
function MT(e, t) {
  return e.map((n, o) => o == 0 ? {} : eo({}, t, n));
}
function Ag(e, t, n, o) {
  return eo({}, t == 0 ? n : o, e);
}
function aS(e, t, n) {
  return t == null ? ms : [t, n];
}
const TT = aS;
function kT(e, t, n) {
  return t == null ? ms : Pd(t, n, ev, !0);
}
function lS(e, t, n, o) {
  return t == null ? ms : ef(t, n, e.scales[o].log, !1);
}
const ET = lS;
function sS(e, t, n, o) {
  return t == null ? ms : Jh(t, n, e.scales[o].log, !1);
}
const _T = sS;
function AT(e, t, n, o, i) {
  let r = Oo(Ib(e), Ib(t)), a = t - e, l = Vi(i / o * a, n);
  do {
    let s = n[l], u = o * s / a;
    if (u >= i && r + (s < 5 ? Ma.get(s) : 0) <= 17)
      return [s, u];
  } while (++l < n.length);
  return [0, 0];
}
function Xb(e) {
  let t, n;
  return e = e.replace(/(\d+)px/, (o, i) => (t = io((n = +i) * cn)) + "px"), [e, t, n];
}
function DT(e) {
  e.show && [e.font, e.labelFont].forEach((t) => {
    let n = Pn(t[2] * cn, 1);
    t[0] = t[0].replace(/[0-9.]+px/, n + "px"), t[1] = n;
  });
}
function Qn(e, t, n) {
  const o = {
    mode: en(e.mode, 1)
  }, i = o.mode;
  function r(V, Q) {
    return ((Q.distr == 3 ? Hr(V > 0 ? V : Q.clamp(o, V, Q.min, Q.max, Q.key)) : Q.distr == 4 ? ap(V, Q.asinh) : Q.distr == 100 ? Q.fwd(V) : V) - Q._min) / (Q._max - Q._min);
  }
  function a(V, Q, fe, pe) {
    let Ce = r(V, Q);
    return pe + fe * (Q.dir == -1 ? 1 - Ce : Ce);
  }
  function l(V, Q, fe, pe) {
    let Ce = r(V, Q);
    return pe + fe * (Q.dir == -1 ? Ce : 1 - Ce);
  }
  function s(V, Q, fe, pe) {
    return Q.ori == 0 ? a(V, Q, fe, pe) : l(V, Q, fe, pe);
  }
  o.valToPosH = a, o.valToPosV = l;
  let u = !1;
  o.status = 0;
  const c = o.root = Ci(HI);
  if (e.id != null && (c.id = e.id), Jo(c, e.class), e.title) {
    let V = Ci(WI, c);
    V.textContent = e.title;
  }
  const d = Li("canvas"), f = o.ctx = d.getContext("2d"), p = Ci(qI, c);
  cl("click", p, (V) => {
    V.target === b && (Sn != Tr || yn != la) && oo.click(o, V);
  }, !0);
  const m = o.under = Ci(GI, p);
  p.appendChild(d);
  const b = o.over = Ci(KI, p);
  e = bs(e);
  const y = +en(e.pxAlign, 1), S = Gb(y);
  (e.plugins || []).forEach((V) => {
    V.opts && (e = V.opts(o, e) || e);
  });
  const C = e.ms || 1e-3, O = o.series = i == 1 ? Ub(e.series || [], Lb, Wb, !1) : MT(e.series || [null], jb), $ = o.axes = Ub(e.axes || [], Bb, Hb, !0), P = o.scales = {}, k = o.bands = e.bands || [];
  k.forEach((V) => {
    V.fill = Wt(V.fill || null), V.dir = en(V.dir, -1);
  });
  const x = i == 2 ? O[1].facets[0].scale : O[0].scale, E = {
    axes: uc,
    series: ea
  }, z = (e.drawOrder || ["axes", "series"]).map((V) => E[V]);
  function N(V) {
    let Q = P[V];
    if (Q == null) {
      let fe = (e.scales || Su)[V] || Su;
      if (fe.from != null)
        N(fe.from), P[V] = eo({}, P[fe.from], fe, { key: V });
      else {
        Q = P[V] = eo({}, V == x ? Xw : vT, fe), Q.key = V;
        let pe = Q.time, Ce = Q.range, g = va(Ce);
        if ((V != x || i == 2 && !pe) && (g && (Ce[0] == null || Ce[1] == null) && (Ce = {
          min: Ce[0] == null ? $b : {
            mode: 1,
            hard: Ce[0],
            soft: Ce[0]
          },
          max: Ce[1] == null ? $b : {
            mode: 1,
            hard: Ce[1],
            soft: Ce[1]
          }
        }, g = !1), !g && nf(Ce))) {
          let h = Ce;
          Ce = (w, T, _) => T == null ? ms : Pd(T, _, h);
        }
        Q.range = Wt(Ce || (pe ? TT : V == x ? Q.distr == 3 ? ET : Q.distr == 4 ? _T : aS : Q.distr == 3 ? lS : Q.distr == 4 ? sS : kT)), Q.auto = Wt(g ? !1 : Q.auto), Q.clamp = Wt(Q.clamp || hT), Q._min = Q._max = null;
      }
    }
  }
  N("x"), N("y"), i == 1 && O.forEach((V) => {
    N(V.scale);
  }), $.forEach((V) => {
    N(V.scale);
  });
  for (let V in e.scales)
    N(V);
  const D = P[x], W = D.distr;
  let H, L;
  D.ori == 0 ? (Jo(c, VI), H = a, L = l) : (Jo(c, jI), H = l, L = a);
  const A = {};
  for (let V in P) {
    let Q = P[V];
    (Q.min != null || Q.max != null) && (A[V] = { min: Q.min, max: Q.max }, Q.min = Q.max = null);
  }
  const U = e.tzDate || ((V) => new Date(io(V / C))), j = e.fmtDate || ov, re = C == 1 ? VM(U) : qM(U), G = zb(U, Db(C == 1 ? HM : WM, j)), Y = Nb(U, Rb(KM, j)), K = [], J = o.legend = eo({}, XM, e.legend), be = J.show, xe = J.markers;
  J.idxs = K, xe.width = Wt(xe.width), xe.dash = Wt(xe.dash), xe.stroke = Wt(xe.stroke), xe.fill = Wt(xe.fill);
  let ge, de, ne, we = [], ae = [], se, he = !1, Me = {};
  if (J.live) {
    const V = O[1] ? O[1].values : null;
    he = V != null, se = he ? V(o, 1, 0) : { _: 0 };
    for (let Q in se)
      Me[Q] = Qh;
  }
  if (be)
    if (ge = Li("table", JI, c), ne = Li("tbody", null, ge), J.mount(o, ge), he) {
      de = Li("thead", null, ge, ne);
      let V = Li("tr", null, de);
      Li("th", null, V);
      for (var ke in se)
        Li("th", cb, V).textContent = ke;
    } else
      Jo(ge, tM), J.live && Jo(ge, eM);
  const Le = { show: !0 }, Re = { show: !1 };
  function We(V, Q) {
    if (Q == 0 && (he || !J.live || i == 2))
      return ms;
    let fe = [], pe = Li("tr", nM, ne, ne.childNodes[Q]);
    Jo(pe, V.class), V.show || Jo(pe, nl);
    let Ce = Li("th", null, pe);
    if (xe.show) {
      let w = Ci(oM, Ce);
      if (Q > 0) {
        let T = xe.width(o, Q);
        T && (w.style.border = T + "px " + xe.dash(o, Q) + " " + xe.stroke(o, Q)), w.style.background = xe.fill(o, Q);
      }
    }
    let g = Ci(cb, Ce);
    g.textContent = V.label, Q > 0 && (xe.show || (g.style.color = V.width > 0 ? xe.stroke(o, Q) : xe.fill(o, Q)), Fe("click", Ce, (w) => {
      if (ut._lock)
        return;
      qn(w);
      let T = O.indexOf(V);
      if ((w.ctrlKey || w.metaKey) != J.isolate) {
        let _ = O.some((F, q) => q > 0 && q != T && F.show);
        O.forEach((F, q) => {
          q > 0 && hi(q, _ ? q == T ? Le : Re : Le, !0, jn.setSeries);
        });
      } else
        hi(T, { show: !V.show }, !0, jn.setSeries);
    }, !1), Fo && Fe(hb, Ce, (w) => {
      ut._lock || (qn(w), hi(O.indexOf(V), ua, !0, jn.setSeries));
    }, !1));
    for (var h in se) {
      let w = Li("td", iM, pe);
      w.textContent = "--", fe.push(w);
    }
    return [pe, fe];
  }
  const et = /* @__PURE__ */ new Map();
  function Fe(V, Q, fe, pe = !0) {
    const Ce = et.get(Q) || {}, g = ut.bind[V](o, Q, fe, pe);
    g && (cl(V, Q, Ce[V] = g), et.set(Q, Ce));
  }
  function Ne(V, Q, fe) {
    const pe = et.get(Q) || {};
    for (let Ce in pe)
      (V == null || Ce == V) && (Ig(Ce, Q, pe[Ce]), delete pe[Ce]);
    V == null && et.delete(Q);
  }
  let Ge = 0, it = 0, Ke = 0, Oe = 0, je = 0, De = 0, Je = je, wt = De, lt = Ke, qe = Oe, rt = 0, dt = 0, vt = 0, Rt = 0;
  o.bbox = {};
  let Xt = !1, vn = !1, Dt = !1, zn = !1, on = !1, Qt = !1;
  function mn(V, Q, fe) {
    (fe || V != o.width || Q != o.height) && Kt(V, Q), ia(!1), Dt = !0, vn = !0, rr();
  }
  function Kt(V, Q) {
    o.width = Ge = Ke = V, o.height = it = Oe = Q, je = De = 0, Hn(), Co();
    let fe = o.bbox;
    rt = fe.left = Ja(je * cn, 0.5), dt = fe.top = Ja(De * cn, 0.5), vt = fe.width = Ja(Ke * cn, 0.5), Rt = fe.height = Ja(Oe * cn, 0.5);
  }
  const Mn = 3;
  function rn() {
    let V = !1, Q = 0;
    for (; !V; ) {
      Q++;
      let fe = _l(Q), pe = Ha(Q);
      V = Q == Mn || fe && pe, V || (Kt(o.width, o.height), vn = !0);
    }
  }
  function gn({ width: V, height: Q }) {
    mn(V, Q);
  }
  o.setSize = gn;
  function Hn() {
    let V = !1, Q = !1, fe = !1, pe = !1;
    $.forEach((Ce, g) => {
      if (Ce.show && Ce._show) {
        let { side: h, _size: w } = Ce, T = h % 2, _ = Ce.label != null ? Ce.labelSize : 0, F = w + _;
        F > 0 && (T ? (Ke -= F, h == 3 ? (je += F, pe = !0) : fe = !0) : (Oe -= F, h == 0 ? (De += F, V = !0) : Q = !0));
      }
    }), Jt[0] = V, Jt[1] = fe, Jt[2] = Q, Jt[3] = pe, Ke -= an[1] + an[3], je += an[3], Oe -= an[2] + an[0], De += an[0];
  }
  function Co() {
    let V = je + Ke, Q = De + Oe, fe = je, pe = De;
    function Ce(g, h) {
      switch (g) {
        case 1:
          return V += h, V - h;
        case 2:
          return Q += h, Q - h;
        case 3:
          return fe -= h, fe + h;
        case 0:
          return pe -= h, pe + h;
      }
    }
    $.forEach((g, h) => {
      if (g.show && g._show) {
        let w = g.side;
        g._pos = Ce(w, g._size), g.label != null && (g._lpos = Ce(w, g.labelSize));
      }
    });
  }
  const ut = o.cursor = eo({}, nT, { drag: { y: i == 2 } }, e.cursor);
  if (ut.dataIdx == null) {
    let V = ut.hover, Q = V.skip = new Set(V.skip ?? []);
    Q.add(void 0);
    let fe = V.prox = Wt(V.prox), pe = V.bias ??= 0;
    ut.dataIdx = (Ce, g, h, w) => {
      if (g == 0)
        return h;
      let T = h, _ = fe(Ce, g, h, w) ?? qt, F = _ >= 0 && _ < qt, q = D.ori == 0 ? Ke : Oe, X = ut.left, oe = t[0], me = t[g];
      if (Q.has(me[h])) {
        T = null;
        let ie = null, Se = null, $e;
        if (pe == 0 || pe == -1)
          for ($e = h; ie == null && $e-- > 0; )
            Q.has(me[$e]) || (ie = $e);
        if (pe == 0 || pe == 1)
          for ($e = h; Se == null && $e++ < me.length; )
            Q.has(me[$e]) || (Se = $e);
        if (ie != null || Se != null)
          if (F) {
            let _e = ie == null ? -1 / 0 : H(oe[ie], D, q, 0), Ae = Se == null ? 1 / 0 : H(oe[Se], D, q, 0), Be = X - _e, Ye = Ae - X;
            Be <= Ye ? Be <= _ && (T = ie) : Ye <= _ && (T = Se);
          } else
            T = Se == null ? ie : ie == null ? Se : h - ie <= Se - h ? ie : Se;
      } else F && ao(X - H(oe[h], D, q, 0)) > _ && (T = null);
      return T;
    };
  }
  const qn = (V) => {
    ut.event = V;
  };
  ut.idxs = K, ut._lock = !1;
  let bn = ut.points;
  bn.show = Wt(bn.show), bn.size = Wt(bn.size), bn.stroke = Wt(bn.stroke), bn.width = Wt(bn.width), bn.fill = Wt(bn.fill);
  const Gn = o.focus = eo({}, e.focus || { alpha: 0.3 }, ut.focus), Fo = Gn.prox >= 0, gi = Fo && bn.one;
  let ze = [], nt = [], tt = [];
  function zt(V, Q) {
    let fe = bn.show(o, Q);
    if (fe)
      return Jo(fe, ZI), Jo(fe, V.class), cr(fe, -10, -10, Ke, Oe), b.insertBefore(fe, ze[Q]), fe;
  }
  function Vn(V, Q) {
    if (i == 1 || Q > 0) {
      let fe = i == 1 && P[V.scale].time, pe = V.value;
      V.value = fe ? kb(pe) ? Nb(U, Rb(pe, j)) : pe || Y : pe || fT, V.label = V.label || (fe ? iT : oT);
    }
    if (gi || Q > 0) {
      V.width = V.width == null ? 1 : V.width, V.paths = V.paths || OT || vM, V.fillTo = Wt(V.fillTo || mT), V.pxAlign = +en(V.pxAlign, y), V.pxRound = Gb(V.pxAlign), V.stroke = Wt(V.stroke || null), V.fill = Wt(V.fill || null), V._stroke = V._fill = V._paths = V._focus = null;
      let fe = pT(Oo(1, V.width), 1), pe = V.points = eo({}, {
        size: fe,
        width: Oo(1, fe * 0.2),
        stroke: V.stroke,
        space: fe * 2,
        paths: IT,
        _stroke: null,
        _fill: null
      }, V.points);
      pe.show = Wt(pe.show), pe.filter = Wt(pe.filter), pe.fill = Wt(pe.fill), pe.stroke = Wt(pe.stroke), pe.paths = Wt(pe.paths), pe.pxAlign = V.pxAlign;
    }
    if (be) {
      let fe = We(V, Q);
      we.splice(Q, 0, fe[0]), ae.splice(Q, 0, fe[1]), J.values.push(null);
    }
    if (ut.show) {
      K.splice(Q, 0, null);
      let fe = null;
      gi ? Q == 0 && (fe = zt(V, Q)) : Q > 0 && (fe = zt(V, Q)), ze.splice(Q, 0, fe), nt.splice(Q, 0, 0), tt.splice(Q, 0, 0);
    }
    Bn("addSeries", Q);
  }
  function Rn(V, Q) {
    Q = Q ?? O.length, V = i == 1 ? Ag(V, Q, Lb, Wb) : Ag(V, Q, {}, jb), O.splice(Q, 0, V), Vn(O[Q], Q);
  }
  o.addSeries = Rn;
  function go(V) {
    if (O.splice(V, 1), be) {
      J.values.splice(V, 1), ae.splice(V, 1);
      let Q = we.splice(V, 1)[0];
      Ne(null, Q.firstChild), Q.remove();
    }
    ut.show && (K.splice(V, 1), ze.splice(V, 1)[0].remove(), nt.splice(V, 1), tt.splice(V, 1)), Bn("delSeries", V);
  }
  o.delSeries = go;
  const Jt = [!1, !1, !1, !1];
  function ht(V, Q) {
    if (V._show = V.show, V.show) {
      let fe = V.side % 2, pe = P[V.scale];
      pe == null && (V.scale = fe ? O[1].scale : x, pe = P[V.scale]);
      let Ce = pe.time;
      V.size = Wt(V.size), V.space = Wt(V.space), V.rotate = Wt(V.rotate), va(V.incrs) && V.incrs.forEach((h) => {
        !Ma.has(h) && Ma.set(h, Ew(h));
      }), V.incrs = Wt(V.incrs || (pe.distr == 2 ? BM : Ce ? C == 1 ? FM : jM : el)), V.splits = Wt(V.splits || (Ce && pe.distr == 1 ? re : pe.distr == 3 ? Tg : pe.distr == 4 ? lT : aT)), V.stroke = Wt(V.stroke), V.grid.stroke = Wt(V.grid.stroke), V.ticks.stroke = Wt(V.ticks.stroke), V.border.stroke = Wt(V.border.stroke);
      let g = V.values;
      V.values = // static array of tick values
      va(g) && !va(g[0]) ? Wt(g) : (
        // temporal
        Ce ? (
          // config array of fmtDate string tpls
          va(g) ? zb(U, Db(g, j)) : (
            // fmtDate string tpl
            kb(g) ? GM(U, g) : g || G
          )
        ) : g || rT
      ), V.filter = Wt(V.filter || (pe.distr >= 3 && pe.log == 10 ? cT : pe.distr == 3 && pe.log == 2 ? dT : Tw)), V.font = Xb(V.font), V.labelFont = Xb(V.labelFont), V._size = V.size(o, null, Q, 0), V._space = V._rotate = V._incrs = V._found = // foundIncrSpace
      V._splits = V._values = null, V._size > 0 && (Jt[Q] = !0, V._el = Ci(YI, p));
    }
  }
  function Jn(V, Q, fe, pe) {
    let [Ce, g, h, w] = fe, T = Q % 2, _ = 0;
    return T == 0 && (w || g) && (_ = Q == 0 && !Ce || Q == 2 && !h ? io(Bb.size / 3) : 0), T == 1 && (Ce || h) && (_ = Q == 1 && !g || Q == 3 && !w ? io(Hb.size / 2) : 0), _;
  }
  const $o = o.padding = (e.padding || [Jn, Jn, Jn, Jn]).map((V) => Wt(en(V, Jn))), an = o._padding = $o.map((V, Q) => V(o, Q, Jt, 0));
  let ln, Ht = null, sn = null;
  const Io = i == 1 ? O[0].idxs : null;
  let kn = null, Ho = !1;
  function ho(V, Q) {
    if (t = V ?? [], o.data = o._data = t, i == 2) {
      ln = 0;
      for (let fe = 1; fe < O.length; fe++)
        ln += t[fe][0].length;
    } else {
      t.length == 0 && (o.data = o._data = t = [[]]), kn = t[0], ln = kn.length;
      let fe = t;
      if (W == 2) {
        fe = t.slice();
        let pe = fe[0] = Array(ln);
        for (let Ce = 0; Ce < ln; Ce++)
          pe[Ce] = Ce;
      }
      o._data = t = fe;
    }
    if (ia(!0), Bn("setData"), W == 2 && (Dt = !0), Q !== !1) {
      let fe = D;
      fe.auto(o, Ho) ? $r() : vo(x, fe.min, fe.max), zn = zn || ut.left >= 0, Qt = !0, rr();
    }
  }
  o.setData = ho;
  function $r() {
    Ho = !0;
    let V, Q;
    i == 1 && (ln > 0 ? (Ht = Io[0] = 0, sn = Io[1] = ln - 1, V = t[0][Ht], Q = t[0][sn], W == 2 ? (V = Ht, Q = sn) : V == Q && (W == 3 ? [V, Q] = ef(V, V, D.log, !1) : W == 4 ? [V, Q] = Jh(V, V, D.log, !1) : D.time ? Q = V + io(86400 / C) : [V, Q] = Pd(V, Q, ev, !0))) : (Ht = Io[0] = V = null, sn = Io[1] = Q = null)), vo(x, V, Q);
  }
  let Pr, _i, tr, Xr, nr, Qr, Ai, or, Na, Mo;
  function El(V, Q, fe, pe, Ce, g) {
    V ??= fb, fe ??= nv, pe ??= "butt", Ce ??= fb, g ??= "round", V != Pr && (f.strokeStyle = Pr = V), Ce != _i && (f.fillStyle = _i = Ce), Q != tr && (f.lineWidth = tr = Q), g != nr && (f.lineJoin = nr = g), pe != Qr && (f.lineCap = Qr = pe), fe != Xr && f.setLineDash(Xr = fe);
  }
  function Ba(V, Q, fe, pe) {
    Q != _i && (f.fillStyle = _i = Q), V != Ai && (f.font = Ai = V), fe != or && (f.textAlign = or = fe), pe != Na && (f.textBaseline = Na = pe);
  }
  function Zr(V, Q, fe, pe, Ce = 0) {
    if (pe.length > 0 && V.auto(o, Ho) && (Q == null || Q.min == null)) {
      let g = en(Ht, 0), h = en(sn, pe.length - 1), w = fe.min == null ? V.distr == 3 ? cM(pe, g, h) : uM(pe, g, h, Ce) : [fe.min, fe.max];
      V.min = Ii(V.min, fe.min = w[0]), V.max = Oo(V.max, fe.max = w[1]);
    }
  }
  const La = { min: null, max: null };
  function Fa() {
    for (let pe in P) {
      let Ce = P[pe];
      A[pe] == null && // scales that have never been set (on init)
      (Ce.min == null || // or auto scales when the x scale was explicitly set
      A[x] != null && Ce.auto(o, Ho)) && (A[pe] = La);
    }
    for (let pe in P) {
      let Ce = P[pe];
      A[pe] == null && Ce.from != null && A[Ce.from] != null && (A[pe] = La);
    }
    A[x] != null && ia(!0);
    let V = {};
    for (let pe in A) {
      let Ce = A[pe];
      if (Ce != null) {
        let g = V[pe] = bs(P[pe], yM);
        if (Ce.min != null)
          eo(g, Ce);
        else if (pe != x || i == 2)
          if (ln == 0 && g.from == null) {
            let h = g.range(o, null, null, pe);
            g.min = h[0], g.max = h[1];
          } else
            g.min = qt, g.max = -qt;
      }
    }
    if (ln > 0) {
      O.forEach((pe, Ce) => {
        if (i == 1) {
          let g = pe.scale, h = A[g];
          if (h == null)
            return;
          let w = V[g];
          if (Ce == 0) {
            let T = w.range(o, w.min, w.max, g);
            w.min = T[0], w.max = T[1], Ht = Vi(w.min, t[0]), sn = Vi(w.max, t[0]), sn - Ht > 1 && (t[0][Ht] < w.min && Ht++, t[0][sn] > w.max && sn--), pe.min = kn[Ht], pe.max = kn[sn];
          } else pe.show && pe.auto && Zr(w, h, pe, t[Ce], pe.sorted);
          pe.idxs[0] = Ht, pe.idxs[1] = sn;
        } else if (Ce > 0 && pe.show && pe.auto) {
          let [g, h] = pe.facets, w = g.scale, T = h.scale, [_, F] = t[Ce], q = V[w], X = V[T];
          q != null && Zr(q, A[w], g, _, g.sorted), X != null && Zr(X, A[T], h, F, h.sorted), pe.min = h.min, pe.max = h.max;
        }
      });
      for (let pe in V) {
        let Ce = V[pe], g = A[pe];
        if (Ce.from == null && (g == null || g.min == null)) {
          let h = Ce.range(
            o,
            Ce.min == qt ? null : Ce.min,
            Ce.max == -qt ? null : Ce.max,
            pe
          );
          Ce.min = h[0], Ce.max = h[1];
        }
      }
    }
    for (let pe in V) {
      let Ce = V[pe];
      if (Ce.from != null) {
        let g = V[Ce.from];
        if (g.min == null)
          Ce.min = Ce.max = null;
        else {
          let h = Ce.range(o, g.min, g.max, pe);
          Ce.min = h[0], Ce.max = h[1];
        }
      }
    }
    let Q = {}, fe = !1;
    for (let pe in V) {
      let Ce = V[pe], g = P[pe];
      if (g.min != Ce.min || g.max != Ce.max) {
        g.min = Ce.min, g.max = Ce.max;
        let h = g.distr;
        g._min = h == 3 ? Hr(g.min) : h == 4 ? ap(g.min, g.asinh) : h == 100 ? g.fwd(g.min) : g.min, g._max = h == 3 ? Hr(g.max) : h == 4 ? ap(g.max, g.asinh) : h == 100 ? g.fwd(g.max) : g.max, Q[pe] = fe = !0;
      }
    }
    if (fe) {
      O.forEach((pe, Ce) => {
        i == 2 ? Ce > 0 && Q.y && (pe._paths = null) : Q[pe.scale] && (pe._paths = null);
      });
      for (let pe in Q)
        Dt = !0, Bn("setScale", pe);
      ut.show && ut.left >= 0 && (zn = Qt = !0);
    }
    for (let pe in A)
      A[pe] = null;
  }
  function Jr(V) {
    let Q = Mg(Ht - 1, 0, ln - 1), fe = Mg(sn + 1, 0, ln - 1);
    for (; V[Q] == null && Q > 0; )
      Q--;
    for (; V[fe] == null && fe < ln - 1; )
      fe++;
    return [Q, fe];
  }
  function ea() {
    ln > 0 && (O.forEach((V, Q) => {
      if (Q > 0 && V.show && (Nn(Q, !1), Nn(Q, !0), V._paths == null)) {
        Mo != V.alpha && (f.globalAlpha = Mo = V.alpha);
        let fe = i == 2 ? [0, t[Q][0].length - 1] : Jr(t[Q]);
        V._paths = V.paths(o, Q, fe[0], fe[1]), Mo != 1 && (f.globalAlpha = Mo = 1);
      }
    }), O.forEach((V, Q) => {
      if (Q > 0 && V.show) {
        Mo != V.alpha && (f.globalAlpha = Mo = V.alpha), V._paths != null && To(Q, !1);
        {
          let fe = V._paths != null ? V._paths.gaps : null, pe = V.points.show(o, Q, Ht, sn, fe), Ce = V.points.filter(o, Q, pe, fe);
          (pe || Ce) && (V.points._paths = V.points.paths(o, Q, Ht, sn, Ce), To(Q, !0));
        }
        Mo != 1 && (f.globalAlpha = Mo = 1), Bn("drawSeries", Q);
      }
    }));
  }
  function Nn(V, Q) {
    let fe = Q ? O[V].points : O[V];
    fe._stroke = fe.stroke(o, V), fe._fill = fe.fill(o, V);
  }
  function To(V, Q) {
    let fe = Q ? O[V].points : O[V], {
      stroke: pe,
      fill: Ce,
      clip: g,
      flags: h,
      _stroke: w = fe._stroke,
      _fill: T = fe._fill,
      _width: _ = fe.width
    } = fe._paths;
    _ = Pn(_ * cn, 3);
    let F = null, q = _ % 2 / 2;
    Q && T == null && (T = _ > 0 ? "#fff" : w);
    let X = fe.pxAlign == 1 && q > 0;
    if (X && f.translate(q, q), !Q) {
      let oe = rt - _ / 2, me = dt - _ / 2, ie = vt + _, Se = Rt + _;
      F = new Path2D(), F.rect(oe, me, ie, Se);
    }
    Q ? co(w, _, fe.dash, fe.cap, T, pe, Ce, h, g) : Or(V, w, _, fe.dash, fe.cap, T, pe, Ce, h, F, g), X && f.translate(-q, -q);
  }
  function Or(V, Q, fe, pe, Ce, g, h, w, T, _, F) {
    let q = !1;
    T != 0 && k.forEach((X, oe) => {
      if (X.series[0] == V) {
        let me = O[X.series[1]], ie = t[X.series[1]], Se = (me._paths || Su).band;
        va(Se) && (Se = X.dir == 1 ? Se[0] : Se[1]);
        let $e, _e = null;
        me.show && Se && fM(ie, Ht, sn) ? (_e = X.fill(o, oe) || g, $e = me._paths.clip) : Se = null, co(Q, fe, pe, Ce, _e, h, w, T, _, F, $e, Se), q = !0;
      }
    }), q || co(Q, fe, pe, Ce, g, h, w, T, _, F);
  }
  const ko = ys | Eg;
  function co(V, Q, fe, pe, Ce, g, h, w, T, _, F, q) {
    El(V, Q, fe, pe, Ce), (T || _ || q) && (f.save(), T && f.clip(T), _ && f.clip(_)), q ? (w & ko) == ko ? (f.clip(q), F && f.clip(F), na(Ce, h), ta(V, g, Q)) : w & Eg ? (na(Ce, h), f.clip(q), ta(V, g, Q)) : w & ys && (f.save(), f.clip(q), F && f.clip(F), na(Ce, h), f.restore(), ta(V, g, Q)) : (na(Ce, h), ta(V, g, Q)), (T || _ || q) && f.restore();
  }
  function ta(V, Q, fe) {
    fe > 0 && (Q instanceof Map ? Q.forEach((pe, Ce) => {
      f.strokeStyle = Pr = Ce, f.stroke(pe);
    }) : Q != null && V && f.stroke(Q));
  }
  function na(V, Q) {
    Q instanceof Map ? Q.forEach((fe, pe) => {
      f.fillStyle = _i = pe, f.fill(fe);
    }) : Q != null && V && f.fill(Q);
  }
  function oa(V, Q, fe, pe) {
    let Ce = $[V], g;
    if (pe <= 0)
      g = [0, 0];
    else {
      let h = Ce._space = Ce.space(o, V, Q, fe, pe), w = Ce._incrs = Ce.incrs(o, V, Q, fe, pe, h);
      g = AT(Q, fe, w, pe, h);
    }
    return Ce._found = g;
  }
  function ir(V, Q, fe, pe, Ce, g, h, w, T, _) {
    let F = h % 2 / 2;
    y == 1 && f.translate(F, F), El(w, h, T, _, w), f.beginPath();
    let q, X, oe, me, ie = Ce + (pe == 0 || pe == 3 ? -g : g);
    fe == 0 ? (X = Ce, me = ie) : (q = Ce, oe = ie);
    for (let Se = 0; Se < V.length; Se++)
      Q[Se] != null && (fe == 0 ? q = oe = V[Se] : X = me = V[Se], f.moveTo(q, X), f.lineTo(oe, me));
    f.stroke(), y == 1 && f.translate(-F, -F);
  }
  function _l(V) {
    let Q = !0;
    return $.forEach((fe, pe) => {
      if (!fe.show)
        return;
      let Ce = P[fe.scale];
      if (Ce.min == null) {
        fe._show && (Q = !1, fe._show = !1, ia(!1));
        return;
      } else
        fe._show || (Q = !1, fe._show = !0, ia(!1));
      let g = fe.side, h = g % 2, { min: w, max: T } = Ce, [_, F] = oa(pe, w, T, h == 0 ? Ke : Oe);
      if (F == 0)
        return;
      let q = Ce.distr == 2, X = fe._splits = fe.splits(o, pe, w, T, _, F, q), oe = Ce.distr == 2 ? X.map(($e) => kn[$e]) : X, me = Ce.distr == 2 ? kn[X[1]] - kn[X[0]] : _, ie = fe._values = fe.values(o, fe.filter(o, oe, pe, F, me), pe, F, me);
      fe._rotate = g == 2 ? fe.rotate(o, ie, pe, F) : 0;
      let Se = fe._size;
      fe._size = Oi(fe.size(o, ie, pe, V)), Se != null && fe._size != Se && (Q = !1);
    }), Q;
  }
  function Ha(V) {
    let Q = !0;
    return $o.forEach((fe, pe) => {
      let Ce = fe(o, pe, Jt, V);
      Ce != an[pe] && (Q = !1), an[pe] = Ce;
    }), Q;
  }
  function uc() {
    for (let V = 0; V < $.length; V++) {
      let Q = $[V];
      if (!Q.show || !Q._show)
        continue;
      let fe = Q.side, pe = fe % 2, Ce, g, h = Q.stroke(o, V), w = fe == 0 || fe == 3 ? -1 : 1;
      if (Q.label) {
        let Cn = Q.labelGap * w, Wn = io((Q._lpos + Cn) * cn);
        Ba(Q.labelFont[0], h, "center", fe == 2 ? eu : db), f.save(), pe == 1 ? (Ce = g = 0, f.translate(
          Wn,
          io(dt + Rt / 2)
        ), f.rotate((fe == 3 ? -id : id) / 2)) : (Ce = io(rt + vt / 2), g = Wn), f.fillText(Q.label, Ce, g), f.restore();
      }
      let [T, _] = Q._found;
      if (_ == 0)
        continue;
      let F = P[Q.scale], q = pe == 0 ? vt : Rt, X = pe == 0 ? rt : dt, oe = io(Q.gap * cn), me = Q._splits, ie = F.distr == 2 ? me.map((Cn) => kn[Cn]) : me, Se = F.distr == 2 ? kn[me[1]] - kn[me[0]] : T, $e = Q.ticks, _e = Q.border, Ae = $e.show ? io($e.size * cn) : 0, Be = Q._rotate * -id / 180, Ye = S(Q._pos * cn), Ue = (Ae + oe) * w, at = Ye + Ue;
      g = pe == 0 ? at : 0, Ce = pe == 1 ? at : 0;
      let mt = Q.font[0], Ot = Q.align == 1 ? Fl : Q.align == 2 ? ip : Be > 0 ? Fl : Be < 0 ? ip : pe == 0 ? "center" : fe == 3 ? ip : Fl, pt = Be || pe == 1 ? "middle" : fe == 2 ? eu : db;
      Ba(mt, h, Ot, pt);
      let St = Q.font[1] * Q.lineGap, un = me.map((Cn) => S(s(Cn, F, q, X))), Yt = Q._values;
      for (let Cn = 0; Cn < Yt.length; Cn++) {
        let Wn = Yt[Cn];
        if (Wn != null) {
          pe == 0 ? Ce = un[Cn] : g = un[Cn], Wn = "" + Wn;
          let Ni = Wn.indexOf(`
`) == -1 ? [Wn] : Wn.split(/\n/gm);
          for (let Vo = 0; Vo < Ni.length; Vo++) {
            let mi = Ni[Vo];
            Be ? (f.save(), f.translate(Ce, g + Vo * St), f.rotate(Be), f.fillText(mi, 0, 0), f.restore()) : f.fillText(mi, Ce, g + Vo * St);
          }
        }
      }
      $e.show && ir(
        un,
        $e.filter(o, ie, V, _, Se),
        pe,
        fe,
        Ye,
        Ae,
        Pn($e.width * cn, 3),
        $e.stroke(o, V),
        $e.dash,
        $e.cap
      );
      let hn = Q.grid;
      hn.show && ir(
        un,
        hn.filter(o, ie, V, _, Se),
        pe,
        pe == 0 ? 2 : 1,
        pe == 0 ? dt : rt,
        pe == 0 ? Rt : vt,
        Pn(hn.width * cn, 3),
        hn.stroke(o, V),
        hn.dash,
        hn.cap
      ), _e.show && ir(
        [Ye],
        [1],
        pe == 0 ? 1 : 0,
        pe == 0 ? 1 : 2,
        pe == 1 ? dt : rt,
        pe == 1 ? Rt : vt,
        Pn(_e.width * cn, 3),
        _e.stroke(o, V),
        _e.dash,
        _e.cap
      );
    }
    Bn("drawAxes");
  }
  function ia(V) {
    O.forEach((Q, fe) => {
      fe > 0 && (Q._paths = null, V && (i == 1 ? (Q.min = null, Q.max = null) : Q.facets.forEach((pe) => {
        pe.min = null, pe.max = null;
      })));
    });
  }
  let Al = !1, Dl = !1, ra = [];
  function jf() {
    Dl = !1;
    for (let V = 0; V < ra.length; V++)
      Bn(...ra[V]);
    ra.length = 0;
  }
  function rr() {
    Al || (OM(Gs), Al = !0);
  }
  function Wf(V, Q = !1) {
    Al = !0, Dl = Q, V(o), Gs(), Q && ra.length > 0 && queueMicrotask(jf);
  }
  o.batch = Wf;
  function Gs() {
    if (Xt && (Fa(), Xt = !1), Dt && (rn(), Dt = !1), vn) {
      if (_n(m, Fl, je), _n(m, eu, De), _n(m, pu, Ke), _n(m, gu, Oe), _n(b, Fl, je), _n(b, eu, De), _n(b, pu, Ke), _n(b, gu, Oe), _n(p, pu, Ge), _n(p, gu, it), d.width = io(Ge * cn), d.height = io(it * cn), $.forEach(({ _el: V, _show: Q, _size: fe, _pos: pe, side: Ce }) => {
        if (V != null)
          if (Q) {
            let g = Ce === 3 || Ce === 0 ? fe : 0, h = Ce % 2 == 1;
            _n(V, h ? "left" : "top", pe - g), _n(V, h ? "width" : "height", fe), _n(V, h ? "top" : "left", h ? De : je), _n(V, h ? "height" : "width", h ? Oe : Ke), Og(V, nl);
          } else
            Jo(V, nl);
      }), Pr = _i = tr = nr = Qr = Ai = or = Na = Xr = null, Mo = 1, fa(!0), je != Je || De != wt || Ke != lt || Oe != qe) {
        ia(!1);
        let V = Ke / lt, Q = Oe / qe;
        if (ut.show && !zn && ut.left >= 0) {
          ut.left *= V, ut.top *= Q, Ir && cr(Ir, io(ut.left), 0, Ke, Oe), Mr && cr(Mr, 0, io(ut.top), Ke, Oe);
          for (let fe = 0; fe < ze.length; fe++) {
            let pe = ze[fe];
            pe != null && (nt[fe] *= V, tt[fe] *= Q, cr(pe, Oi(nt[fe]), Oi(tt[fe]), Ke, Oe));
          }
        }
        if (xn.show && !on && xn.left >= 0 && xn.width > 0) {
          xn.left *= V, xn.width *= V, xn.top *= Q, xn.height *= Q;
          for (let fe in Qs)
            _n(ar, fe, xn[fe]);
        }
        Je = je, wt = De, lt = Ke, qe = Oe;
      }
      Bn("setSize"), vn = !1;
    }
    Ge > 0 && it > 0 && (f.clearRect(0, 0, d.width, d.height), Bn("drawClear"), z.forEach((V) => V()), Bn("draw")), xn.show && on && (zl(xn), on = !1), ut.show && zn && (ur(null, !0, !1), zn = !1), J.show && J.live && Qt && (da(), Qt = !1), u || (u = !0, o.status = 1, Bn("ready")), Ho = !1, Al = !1;
  }
  o.redraw = (V, Q) => {
    Dt = Q || !1, V !== !1 ? vo(x, D.min, D.max) : rr();
  };
  function Ks(V, Q) {
    let fe = P[V];
    if (fe.from == null) {
      if (ln == 0) {
        let pe = fe.range(o, Q.min, Q.max, V);
        Q.min = pe[0], Q.max = pe[1];
      }
      if (Q.min > Q.max) {
        let pe = Q.min;
        Q.min = Q.max, Q.max = pe;
      }
      if (ln > 1 && Q.min != null && Q.max != null && Q.max - Q.min < 1e-16)
        return;
      V == x && fe.distr == 2 && ln > 0 && (Q.min = Vi(Q.min, t[0]), Q.max = Vi(Q.max, t[0]), Q.min == Q.max && Q.max++), A[V] = Q, Xt = !0, rr();
    }
  }
  o.setScale = Ks;
  let aa, Ys, Ir, Mr, cc, Us, Tr, la, sa, Va, Sn, yn, Di = !1;
  const oo = ut.drag;
  let Kn = oo.x, Un = oo.y;
  ut.show && (ut.x && (aa = Ci(XI, b)), ut.y && (Ys = Ci(QI, b)), D.ori == 0 ? (Ir = aa, Mr = Ys) : (Ir = Ys, Mr = aa), Sn = ut.left, yn = ut.top);
  const xn = o.select = eo({
    show: !0,
    over: !0,
    left: 0,
    width: 0,
    top: 0,
    height: 0
  }, e.select), ar = xn.show ? Ci(UI, xn.over ? b : m) : null;
  function zl(V, Q) {
    if (xn.show) {
      for (let fe in V)
        xn[fe] = V[fe], fe in Qs && _n(ar, fe, V[fe]);
      Q !== !1 && Bn("setSelect");
    }
  }
  o.setSelect = zl;
  function qf(V, Q) {
    let fe = O[V], pe = be ? we[V] : null;
    if (fe.show)
      pe && Og(pe, nl);
    else {
      pe && Jo(pe, nl);
      let Ce = gi ? ze[0] : ze[V];
      cr(Ce, -10, -10, Ke, Oe);
    }
  }
  function vo(V, Q, fe) {
    Ks(V, { min: Q, max: fe });
  }
  function hi(V, Q, fe, pe) {
    Q.focus != null && Yf(V), Q.show != null && O.forEach((Ce, g) => {
      g > 0 && (V == g || V == null) && (Ce.show = Q.show, qf(g, Q.show), i == 2 ? (vo(Ce.facets[0].scale, null, null), vo(Ce.facets[1].scale, null, null)) : vo(Ce.scale, null, null), rr());
    }), fe !== !1 && Bn("setSeries", V, Q), pe && qa("setSeries", o, V, Q);
  }
  o.setSeries = hi;
  function Gf(V, Q) {
    eo(k[V], Q);
  }
  function Kf(V, Q) {
    V.fill = Wt(V.fill || null), V.dir = en(V.dir, -1), Q = Q ?? k.length, k.splice(Q, 0, V);
  }
  function dc(V) {
    V == null ? k.length = 0 : k.splice(V, 1);
  }
  o.addBand = Kf, o.setBand = Gf, o.delBand = dc;
  function fc(V, Q) {
    O[V].alpha = Q, ut.show && ze[V] && (ze[V].style.opacity = Q), be && we[V] && (we[V].style.opacity = Q);
  }
  let En, lr, kr;
  const ua = { focus: !0 };
  function Yf(V) {
    if (V != kr) {
      let Q = V == null, fe = Gn.alpha != 1;
      O.forEach((pe, Ce) => {
        if (i == 1 || Ce > 0) {
          let g = Q || Ce == 0 || Ce == V;
          pe._focus = Q ? null : g, fe && fc(Ce, g ? 1 : Gn.alpha);
        }
      }), kr = V, fe && rr();
    }
  }
  be && Fo && Fe(vb, ge, (V) => {
    ut._lock || (qn(V), kr != null && hi(null, ua, !0, jn.setSeries));
  });
  function vi(V, Q, fe) {
    let pe = P[Q];
    fe && (V = V / cn - (pe.ori == 1 ? De : je));
    let Ce = Ke;
    pe.ori == 1 && (Ce = Oe, V = Ce - V), pe.dir == -1 && (V = Ce - V);
    let g = pe._min, h = pe._max, w = V / Ce, T = g + (h - g) * w, _ = pe.distr;
    return _ == 3 ? vs(10, T) : _ == 4 ? gM(T, pe.asinh) : _ == 100 ? pe.bwd(T) : T;
  }
  function Uf(V, Q) {
    let fe = vi(V, x, Q);
    return Vi(fe, t[0], Ht, sn);
  }
  o.valToIdx = (V) => Vi(V, t[0]), o.posToIdx = Uf, o.posToVal = vi, o.valToPos = (V, Q, fe) => P[Q].ori == 0 ? a(
    V,
    P[Q],
    fe ? vt : Ke,
    fe ? rt : 0
  ) : l(
    V,
    P[Q],
    fe ? Rt : Oe,
    fe ? dt : 0
  ), o.setCursor = (V, Q, fe) => {
    Sn = V.left, yn = V.top, ur(null, Q, fe);
  };
  function pc(V, Q) {
    _n(ar, Fl, xn.left = V), _n(ar, pu, xn.width = Q);
  }
  function gc(V, Q) {
    _n(ar, eu, xn.top = V), _n(ar, gu, xn.height = Q);
  }
  let ca = D.ori == 0 ? pc : gc, sr = D.ori == 1 ? pc : gc;
  function Er() {
    if (be && J.live)
      for (let V = i == 2 ? 1 : 0; V < O.length; V++) {
        if (V == 0 && he)
          continue;
        let Q = J.values[V], fe = 0;
        for (let pe in Q)
          ae[V][fe++].firstChild.nodeValue = Q[pe];
      }
  }
  function da(V, Q) {
    if (V != null && (V.idxs ? V.idxs.forEach((fe, pe) => {
      K[pe] = fe;
    }) : bM(V.idx) || K.fill(V.idx), J.idx = K[0]), be && J.live) {
      for (let fe = 0; fe < O.length; fe++)
        (fe > 0 || i == 1 && !he) && Xf(fe, K[fe]);
      Er();
    }
    Qt = !1, Q !== !1 && Bn("setLegend");
  }
  o.setLegend = da;
  function Xf(V, Q) {
    let fe = O[V], pe = V == 0 && W == 2 ? kn : t[V], Ce;
    he ? Ce = fe.values(o, V, Q) ?? Me : (Ce = fe.value(o, Q == null ? null : pe[Q], V, Q), Ce = Ce == null ? Me : { _: Ce }), J.values[V] = Ce;
  }
  function ur(V, Q, fe) {
    sa = Sn, Va = yn, [Sn, yn] = ut.move(o, Sn, yn), ut.left = Sn, ut.top = yn, ut.show && (Ir && cr(Ir, io(Sn), 0, Ke, Oe), Mr && cr(Mr, 0, io(yn), Ke, Oe));
    let pe, Ce = Ht > sn;
    En = qt, lr = null;
    let g = D.ori == 0 ? Ke : Oe, h = D.ori == 1 ? Ke : Oe;
    if (Sn < 0 || ln == 0 || Ce) {
      pe = ut.idx = null;
      for (let w = 0; w < O.length; w++) {
        let T = ze[w];
        T != null && cr(T, -10, -10, Ke, Oe);
      }
      Fo && hi(null, ua, !0, V == null && jn.setSeries), J.live && (K.fill(pe), Qt = !0);
    } else {
      let w, T, _;
      i == 1 && (w = D.ori == 0 ? Sn : yn, T = vi(w, x), pe = ut.idx = Vi(T, t[0], Ht, sn), _ = H(t[0][pe], D, g, 0));
      let F = -10, q = -10, X = 0, oe = 0, me = !0, ie = "", Se = "";
      for (let $e = i == 2 ? 1 : 0; $e < O.length; $e++) {
        let _e = O[$e], Ae = K[$e], Be = Ae == null ? null : i == 1 ? t[$e][Ae] : t[$e][1][Ae], Ye = ut.dataIdx(o, $e, pe, T), Ue = Ye == null ? null : i == 1 ? t[$e][Ye] : t[$e][1][Ye];
        Qt = Qt || Ue != Be || Ye != Ae, K[$e] = Ye;
        let at = Ye == pe ? _ : H(i == 1 ? t[0][Ye] : t[$e][0][Ye], D, g, 0);
        if ($e > 0 && _e.show) {
          let mt = Ue == null ? -10 : L(Ue, i == 1 ? P[_e.scale] : P[_e.facets[1].scale], h, 0);
          if (Fo && Ue != null) {
            let Ot = D.ori == 1 ? Sn : yn, pt = ao(Gn.dist(o, $e, Ye, mt, Ot));
            if (pt < En) {
              let St = Gn.bias;
              if (St != 0) {
                let un = vi(Ot, _e.scale), Yt = Ue >= 0 ? 1 : -1, hn = un >= 0 ? 1 : -1;
                hn == Yt && (hn == 1 ? St == 1 ? Ue >= un : Ue <= un : (
                  // >= 0
                  St == 1 ? Ue <= un : Ue >= un
                )) && (En = pt, lr = $e);
              } else
                En = pt, lr = $e;
            }
          }
          if (Qt || gi) {
            let Ot, pt;
            D.ori == 0 ? (Ot = at, pt = mt) : (Ot = mt, pt = at);
            let St, un, Yt, hn, Cn, Wn, Ni = !0, Vo = bn.bbox;
            if (Vo != null) {
              Ni = !1;
              let mi = Vo(o, $e);
              Yt = mi.left, hn = mi.top, St = mi.width, un = mi.height;
            } else
              Yt = Ot, hn = pt, St = un = bn.size(o, $e);
            if (Wn = bn.fill(o, $e), Cn = bn.stroke(o, $e), gi)
              $e == lr && En <= Gn.prox && (F = Yt, q = hn, X = St, oe = un, me = Ni, ie = Wn, Se = Cn);
            else {
              let mi = ze[$e];
              mi != null && (nt[$e] = Yt, tt[$e] = hn, Cb(mi, St, un, Ni), wb(mi, Wn, Cn), cr(mi, Oi(Yt), Oi(hn), Ke, Oe));
            }
          }
        }
      }
      if (gi) {
        let $e = Gn.prox, _e = kr == null ? En <= $e : En > $e || lr != kr;
        if (Qt || _e) {
          let Ae = ze[0];
          nt[0] = F, tt[0] = q, Cb(Ae, X, oe, me), wb(Ae, ie, Se), cr(Ae, Oi(F), Oi(q), Ke, Oe);
        }
      }
    }
    if (xn.show && Di)
      if (V != null) {
        let [w, T] = jn.scales, [_, F] = jn.match, [q, X] = V.cursor.sync.scales, oe = V.cursor.drag;
        if (Kn = oe._x, Un = oe._y, Kn || Un) {
          let { left: me, top: ie, width: Se, height: $e } = V.select, _e = V.scales[q].ori, Ae = V.posToVal, Be, Ye, Ue, at, mt, Ot = w != null && _(w, q), pt = T != null && F(T, X);
          Ot && Kn ? (_e == 0 ? (Be = me, Ye = Se) : (Be = ie, Ye = $e), Ue = P[w], at = H(Ae(Be, q), Ue, g, 0), mt = H(Ae(Be + Ye, q), Ue, g, 0), ca(Ii(at, mt), ao(mt - at))) : ca(0, g), pt && Un ? (_e == 1 ? (Be = me, Ye = Se) : (Be = ie, Ye = $e), Ue = P[T], at = L(Ae(Be, X), Ue, h, 0), mt = L(Ae(Be + Ye, X), Ue, h, 0), sr(Ii(at, mt), ao(mt - at))) : sr(0, h);
        } else
          Rl();
      } else {
        let w = ao(sa - cc), T = ao(Va - Us);
        if (D.ori == 1) {
          let X = w;
          w = T, T = X;
        }
        Kn = oo.x && w >= oo.dist, Un = oo.y && T >= oo.dist;
        let _ = oo.uni;
        _ != null ? Kn && Un && (Kn = w >= _, Un = T >= _, !Kn && !Un && (T > w ? Un = !0 : Kn = !0)) : oo.x && oo.y && (Kn || Un) && (Kn = Un = !0);
        let F, q;
        Kn && (D.ori == 0 ? (F = Tr, q = Sn) : (F = la, q = yn), ca(Ii(F, q), ao(q - F)), Un || sr(0, h)), Un && (D.ori == 1 ? (F = Tr, q = Sn) : (F = la, q = yn), sr(Ii(F, q), ao(q - F)), Kn || ca(0, g)), !Kn && !Un && (ca(0, 0), sr(0, 0));
      }
    if (oo._x = Kn, oo._y = Un, V == null) {
      if (fe) {
        if (Ll != null) {
          let [w, T] = jn.scales;
          jn.values[0] = w != null ? vi(D.ori == 0 ? Sn : yn, w) : null, jn.values[1] = T != null ? vi(D.ori == 1 ? Sn : yn, T) : null;
        }
        qa(pb, o, Sn, yn, Ke, Oe, pe);
      }
      if (Fo) {
        let w = fe && jn.setSeries, T = Gn.prox;
        kr == null ? En <= T && hi(lr, ua, !0, w) : En > T ? hi(null, ua, !0, w) : lr != kr && hi(lr, ua, !0, w);
      }
    }
    Qt && (J.idx = pe, da()), Q !== !1 && Bn("setCursor");
  }
  let zi = null;
  Object.defineProperty(o, "rect", {
    get() {
      return zi == null && fa(!1), zi;
    }
  });
  function fa(V = !1) {
    V ? zi = null : (zi = b.getBoundingClientRect(), Bn("syncRect", zi));
  }
  function pa(V, Q, fe, pe, Ce, g, h) {
    ut._lock || Di && V != null && V.movementX == 0 && V.movementY == 0 || (Xs(V, Q, fe, pe, Ce, g, h, !1, V != null), V != null ? ur(null, !0, !0) : ur(Q, !0, !1));
  }
  function Xs(V, Q, fe, pe, Ce, g, h, w, T) {
    if (zi == null && fa(!1), qn(V), V != null)
      fe = V.clientX - zi.left, pe = V.clientY - zi.top;
    else {
      if (fe < 0 || pe < 0) {
        Sn = -10, yn = -10;
        return;
      }
      let [_, F] = jn.scales, q = Q.cursor.sync, [X, oe] = q.values, [me, ie] = q.scales, [Se, $e] = jn.match, _e = Q.axes[0].side % 2 == 1, Ae = D.ori == 0 ? Ke : Oe, Be = D.ori == 1 ? Ke : Oe, Ye = _e ? g : Ce, Ue = _e ? Ce : g, at = _e ? pe : fe, mt = _e ? fe : pe;
      if (me != null ? fe = Se(_, me) ? s(X, P[_], Ae, 0) : -10 : fe = Ae * (at / Ye), ie != null ? pe = $e(F, ie) ? s(oe, P[F], Be, 0) : -10 : pe = Be * (mt / Ue), D.ori == 1) {
        let Ot = fe;
        fe = pe, pe = Ot;
      }
    }
    T && ((fe <= 1 || fe >= Ke - 1) && (fe = Ja(fe, Ke)), (pe <= 1 || pe >= Oe - 1) && (pe = Ja(pe, Oe))), w ? (cc = fe, Us = pe, [Tr, la] = ut.move(o, fe, pe)) : (Sn = fe, yn = pe);
  }
  const Qs = {
    width: 0,
    height: 0,
    left: 0,
    top: 0
  };
  function Rl() {
    zl(Qs, !1);
  }
  let hc, vc, mc, Nl;
  function bc(V, Q, fe, pe, Ce, g, h) {
    Di = !0, Kn = Un = oo._x = oo._y = !1, Xs(V, Q, fe, pe, Ce, g, h, !0, !1), V != null && (Fe(rp, $g, ja, !1), qa(gb, o, Tr, la, Ke, Oe, null));
    let { left: w, top: T, width: _, height: F } = xn;
    hc = w, vc = T, mc = _, Nl = F, Rl();
  }
  function ja(V, Q, fe, pe, Ce, g, h) {
    Di = oo._x = oo._y = !1, Xs(V, Q, fe, pe, Ce, g, h, !1, !0);
    let { left: w, top: T, width: _, height: F } = xn, q = _ > 0 || F > 0, X = hc != w || vc != T || mc != _ || Nl != F;
    if (q && X && zl(xn), oo.setScale && q && X) {
      let oe = w, me = _, ie = T, Se = F;
      if (D.ori == 1 && (oe = T, me = F, ie = w, Se = _), Kn && vo(
        x,
        vi(oe, x),
        vi(oe + me, x)
      ), Un)
        for (let $e in P) {
          let _e = P[$e];
          $e != x && _e.from == null && _e.min != qt && vo(
            $e,
            vi(ie + Se, $e),
            vi(ie, $e)
          );
        }
      Rl();
    } else ut.lock && (ut._lock = !ut._lock, ur(null, !0, !1));
    V != null && (Ne(rp, $g), qa(rp, o, Sn, yn, Ke, Oe, null));
  }
  function Qf(V, Q, fe, pe, Ce, g, h) {
    if (ut._lock)
      return;
    qn(V);
    let w = Di;
    if (Di) {
      let T = !0, _ = !0, F = 10, q, X;
      D.ori == 0 ? (q = Kn, X = Un) : (q = Un, X = Kn), q && X && (T = Sn <= F || Sn >= Ke - F, _ = yn <= F || yn >= Oe - F), q && T && (Sn = Sn < Tr ? 0 : Ke), X && _ && (yn = yn < la ? 0 : Oe), ur(null, !0, !0), Di = !1;
    }
    Sn = -10, yn = -10, ur(null, !0, !0), w && (Di = w);
  }
  function Bl(V, Q, fe, pe, Ce, g, h) {
    ut._lock || (qn(V), $r(), Rl(), V != null && qa(mb, o, Sn, yn, Ke, Oe, null));
  }
  function yc() {
    $.forEach(DT), mn(o.width, o.height, !0);
  }
  cl($d, rs, yc);
  const ga = {};
  ga.mousedown = bc, ga.mousemove = pa, ga.mouseup = ja, ga.dblclick = Bl, ga.setSeries = (V, Q, fe, pe) => {
    let Ce = jn.match[2];
    fe = Ce(o, Q, fe), fe != -1 && hi(fe, pe, !0, !1);
  }, ut.show && (Fe(gb, b, bc), Fe(pb, b, pa), Fe(hb, b, (V) => {
    qn(V), fa(!1);
  }), Fe(vb, b, Qf), Fe(mb, b, Bl), _g.add(o), o.syncRect = fa);
  const Wa = o.hooks = e.hooks || {};
  function Bn(V, Q, fe) {
    Dl ? ra.push([V, Q, fe]) : V in Wa && Wa[V].forEach((pe) => {
      pe.call(null, o, Q, fe);
    });
  }
  (e.plugins || []).forEach((V) => {
    for (let Q in V.hooks)
      Wa[Q] = (Wa[Q] || []).concat(V.hooks[Q]);
  });
  const Ri = (V, Q, fe) => fe, jn = eo({
    key: null,
    setSeries: !1,
    filters: {
      pub: Mb,
      sub: Mb
    },
    scales: [x, O[1] ? O[1].scale : null],
    match: [Tb, Tb, Ri],
    values: [null, null]
  }, ut.sync);
  jn.match.length == 2 && jn.match.push(Ri), ut.sync = jn;
  const Ll = jn.key, Zs = Qw(Ll);
  function qa(V, Q, fe, pe, Ce, g, h) {
    jn.filters.pub(V, Q, fe, pe, Ce, g, h) && Zs.pub(V, Q, fe, pe, Ce, g, h);
  }
  Zs.sub(o);
  function Zf(V, Q, fe, pe, Ce, g, h) {
    jn.filters.sub(V, Q, fe, pe, Ce, g, h) && ga[V](null, Q, fe, pe, Ce, g, h);
  }
  o.pub = Zf;
  function Jf() {
    Zs.unsub(o), _g.delete(o), et.clear(), Ig($d, rs, yc), c.remove(), ge?.remove(), Bn("destroy");
  }
  o.destroy = Jf;
  function Js() {
    Bn("init", e, t), ho(t || e.data, !1), A[x] ? Ks(x, A[x]) : $r(), on = xn.show && (xn.width > 0 || xn.height > 0), zn = Qt = !0, mn(e.width, e.height);
  }
  return O.forEach(Vn), $.forEach(ht), n ? n instanceof HTMLElement ? (n.appendChild(c), Js()) : n(o, Js) : Js(), o;
}
Qn.assign = eo;
Qn.fmtNum = tv;
Qn.rangeNum = Pd;
Qn.rangeLog = ef;
Qn.rangeAsinh = Jh;
Qn.orient = $l;
Qn.pxRatio = cn;
Qn.join = PM;
Qn.fmtDate = ov, Qn.tzDate = RM;
Qn.sync = Qw;
{
  Qn.addGap = bT, Qn.clipGaps = of;
  let e = Qn.paths = {
    points: oS
  };
  e.linear = rS, e.stepped = wT, e.bars = ST, e.spline = $T;
}
function zT(e, t) {
  if (!e || e.length === 0)
    return [null, null];
  let n = null, o = null;
  for (const { thresholdValue: i } of e)
    i !== void 0 && ((n === null || i < n) && (n = i), (o === null || i > o) && (o = i));
  return [n, o];
}
function RT({
  distr: e,
  logBase: t,
  limits: n
}) {
  if (e !== ul.Logarithmic)
    return n;
  const o = t === 2 ? Math.log2 : Math.log10;
  return {
    min: $c(n.min, t, o, Math.floor),
    max: $c(n.max, t, o, Math.ceil),
    softMin: $c(n.softMin, t, o, Math.floor),
    softMax: $c(n.softMax, t, o, Math.ceil)
  };
}
function $c(e, t, n, o) {
  return e == null || e <= 0 ? e : t ** o(n(e));
}
function NT({
  time: e,
  distr: t,
  logBase: n
}) {
  if (e)
    return {};
  const o = (n ?? 10) === 2 ? 2 : 10;
  return {
    distr: t === ul.Logarithmic ? 3 : t === ul.Symlog ? 2 : 1,
    log: o
  };
}
function BT(e, t, n, o, i, r) {
  const a = n == null ? 3 : 1, l = o == null ? 3 : 1, s = {
    min: {
      pad: i,
      hard: e ?? -1 / 0,
      soft: n !== null ? n : void 0,
      mode: a
    },
    max: {
      pad: r,
      hard: t ?? 1 / 0,
      soft: o !== null ? o : void 0,
      mode: l
    }
  }, u = n == null && e != null, c = o == null && t != null;
  return { rangeConfig: s, hardMinOnly: u, hardMaxOnly: c, hasFixedRange: u && c };
}
function LT(e, t, n) {
  return !n && e == null && t == null ? null : [e, t];
}
function FT(e, t, n, o) {
  const { rangeConfig: i, hardMinOnly: r, hardMaxOnly: a, min: l, max: s } = t, u = r ? l : n, c = a ? s : o;
  return u == null || c == null ? e : Qn.rangeNum(u, c, i);
}
function HT(e, t, n, o, i) {
  const r = t.min ?? n, a = t.max ?? o;
  return r == null || a == null ? e : Qn.rangeLog(r, a, i ?? 10, !0);
}
function VT(e, t, n) {
  let [o, i] = e;
  return o != null && (o = t ** Math.floor(n(o))), i != null && (i = t ** Math.ceil(n(i)), o === i && (i *= t)), [o, i];
}
function jT(e, t, n) {
  if (n !== 1)
    return e;
  let [o, i] = e;
  return t.hardMinOnly && t.min != null && (o = t.min), t.hardMaxOnly && t.max != null && (i = t.max), [o, i];
}
function WT(e, t) {
  const [n, o] = e;
  return n != null && o != null && n >= o ? [t === 3 ? 1 : 0, 100] : e;
}
function qT(e) {
  return (t, n, o, i) => {
    const r = t.scales[i], a = LT(n, o, e.hasFixedRange);
    if (!a)
      return [n, o];
    let l = a;
    const s = r.log;
    if (r.distr === 1)
      l = FT(l, e, n, o);
    else if (r.distr === 3) {
      l = HT(l, e, n, o, s);
      const u = r.log === 2 ? Math.log2 : Math.log10;
      l = VT(l, s ?? 10, u);
    }
    return l = jT(l, e, r.distr ?? 1), WT(l, r.distr ?? 1);
  };
}
function GT(e, t, n, o) {
  if (!n || n.length === 0)
    return { softMin: e, softMax: t };
  const [i, r] = zT(n);
  if (i === null && r === null)
    return { softMin: e, softMax: t };
  const a = i !== null ? e !== null ? Math.min(e, i) : i : e, l = r !== null ? t !== null ? Math.max(t, r) : r : t;
  return { softMin: a, softMax: l };
}
class KT extends Jd {
  softMin;
  softMax;
  min;
  max;
  constructor(t) {
    super(t);
    const n = t.softMin === 0 && t.softMax === 0;
    this.softMin = n ? null : t.softMin ?? null, this.softMax = n ? null : t.softMax ?? null, this.min = t.min ?? null, this.max = t.max ?? null;
  }
  getConfig() {
    const {
      scaleKey: t,
      time: n,
      range: o,
      thresholds: i,
      logBase: r = 10,
      padMinBy: a = 0,
      padMaxBy: l = 0.05
    } = this.props;
    if (n) {
      if (this.min != null && this.max != null) {
        const E = this.min;
        let z = this.max;
        const N = new Date(z * 1e3);
        return N.setSeconds(0), N.setMilliseconds(0), z = Math.floor(N.getTime() / 1e3) + 60, { [t]: { time: !0, auto: !1, range: [E, z] } };
      }
      return { [t]: { time: !0, auto: !0 } };
    }
    const s = this.props.distribution, u = i?.thresholds, { softMin: c, softMax: d } = GT(
      this.softMin,
      this.softMax,
      u,
      i?.yAxisUnit
    ), { min: f, max: p, softMin: m, softMax: b } = RT({
      distr: s,
      logBase: r,
      limits: {
        min: this.min,
        max: this.max,
        softMin: c,
        softMax: d
      }
    }), y = NT({ time: n, distr: s, logBase: r }), { rangeConfig: S, hardMinOnly: C, hardMaxOnly: O, hasFixedRange: $ } = BT(
      f,
      p,
      m,
      b,
      a,
      l
    ), P = qT({
      rangeConfig: S,
      hardMinOnly: C,
      hardMaxOnly: O,
      hasFixedRange: $,
      min: f,
      max: p
    });
    let k = this.props.auto;
    return k ??= !n && !$, {
      [t]: {
        time: n,
        auto: k,
        range: o ?? P,
        ...y
      }
    };
  }
  merge(t) {
    this.props = { ...this.props, ...t }, t.softMin !== void 0 && (this.softMin = t.softMin ?? null), t.softMax !== void 0 && (this.softMax = t.softMax ?? null), t.min !== void 0 && (this.min = t.min ?? null), t.max !== void 0 && (this.max = t.max ?? null);
  }
}
const cp = {};
let Qb = 0;
const Zb = [
  "#4096ff",
  "#52c41a",
  "#faad14",
  "#ff4d4f",
  "#722ed1",
  "#13c2c2",
  "#eb2f96",
  "#fa8c16",
  "#a0d911",
  "#1677ff"
];
function YT(e) {
  if (cp[e])
    return cp[e];
  const t = Zb[Qb % Zb.length];
  return Qb++, cp[e] = t, t;
}
const Jb = {
  white: "#ffffff",
  black: "#000000"
};
function UT(e, t, n, o = 100) {
  const i = e.ctx.createLinearGradient(0, 0, 0, e.bbox.height), r = Math.round(o / 100 * 112).toString(16).padStart(2, "0"), a = Math.round(o / 100 * 64).toString(16).padStart(2, "0");
  return i.addColorStop(0, `${t}${r}`), i.addColorStop(0.6, `${t}${a}`), i.addColorStop(1, n), i;
}
function XT(e, t) {
  for (let n = 1; n < 100; n++) {
    if (e[t + n] != null)
      return t + n;
    if (e[t - n] != null)
      return t - n;
  }
  return t;
}
function QT(e, t, n) {
  const o = [];
  for (let i = 0; i < e.length; i++) {
    const r = e[i + 1];
    if (r && e[i][1] === r[0]) {
      const a = n.posToIdx(e[i][1], !0);
      o.push(t[a] == null ? XT(t, a) : a);
    }
  }
  return o;
}
function ZT(e, t, n, o) {
  if (n || !o || o.length === 0)
    return null;
  const i = e.series[t].idxs;
  if (!i)
    return null;
  const [r, a] = i, l = e.data[0], s = e.data[t], u = Math.round(e.valToPos(l[r], "x", !0)), c = Math.round(e.valToPos(l[a], "x", !0)), d = [];
  return o[0][0] === u && d.push(r), d.push(...QT(o, s, e)), o[o.length - 1][1] === c && d.push(a), d.length ? d : null;
}
const e0 = 2, JT = 2.5;
let Ao = null;
class ek extends Jd {
  constructor(t) {
    if (super(t), !Ao) {
      const n = Qn.paths, o = n.linear, i = n.spline, r = n.stepped;
      if (!o || !i || !r)
        throw new Error("Required uPlot path builders are not available");
      Ao = {
        linear: o(),
        spline: i(),
        stepBefore: r({ align: -1 }),
        stepAfter: r({ align: 1 })
      };
    }
  }
  getLineColor() {
    const { colorMapping: t, lineColor: n, label: o, isDarkMode: i } = this.props;
    return o ? n ?? t?.[o] ?? YT(o) : n ?? (i ? Jb.white : Jb.black);
  }
  buildLineConfig({ resolvedLineColor: t }) {
    const { lineWidth: n, lineStyle: o, lineCap: i, fillColor: r, fillMode: a, fillOpacity: l } = this.props, s = {
      stroke: t,
      width: n ?? e0
    }, u = l != null && l > 0 ? Math.round(Math.min(l, 100) / 100 * 255).toString(16).padStart(2, "0") : null;
    o === Cg.Dashed && (s.dash = [10, 10]), o === Cg.Dotted && (s.dash = [2, 6]), i && (s.cap = i);
    const c = r ?? t;
    return this.props.drawStyle === Nr.Bars ? s.fill = u ? `${c}${u}` : c : this.props.drawStyle === Nr.Histogram ? s.fill = `${c}${u ?? "40"}` : a && a !== od.None ? a === od.Solid ? s.fill = u ? `${c}${u}` : c : a === od.Gradient && (s.fill = (d) => UT(d, c, "rgba(0, 0, 0, 0)", l ?? 100)) : u && (s.fill = `${c}${u}`), s;
  }
  buildPathConfig() {
    const {
      pathBuilder: t,
      drawStyle: n,
      lineInterpolation: o,
      barAlignment: i,
      barMaxWidth: r,
      barWidthFactor: a,
      stepInterval: l
    } = this.props;
    return t ? { paths: t } : n === Nr.Points ? { paths: () => null } : n != null ? {
      paths: (s, u, c, d) => tk({
        drawStyle: n,
        lineInterpolation: o,
        barAlignment: i,
        barMaxWidth: r,
        barWidthFactor: a,
        stepInterval: l
      })(s, u, c, d)
    } : {};
  }
  resolvePointsShow() {
    const { pointsBuilder: t, drawStyle: n, showPoints: o } = this.props;
    return t || (n === Nr.Points ? !0 : !!o);
  }
  shouldApplyIsolatedPointFilter(t) {
    const { drawStyle: n, pointsFilter: o } = this.props;
    return n === Nr.Lines && !o && !t;
  }
  buildPointsConfig({ resolvedLineColor: t }) {
    const { lineWidth: n, pointSize: o, pointsFilter: i } = this.props, r = o ?? (n ?? e0) * JT, a = {
      stroke: t,
      fill: t,
      size: r,
      filter: i || void 0,
      show: this.resolvePointsShow()
    };
    return this.shouldApplyIsolatedPointFilter(a.show) && (a.filter = ZT), a;
  }
  getConfig() {
    const { scaleKey: t, label: n, spanGaps: o, show: i = !0, metric: r } = this.props, a = this.getLineColor(), l = this.buildLineConfig({ resolvedLineColor: a }), s = this.buildPathConfig(), u = this.buildPointsConfig({ resolvedLineColor: a });
    return {
      scale: t,
      label: n,
      spanGaps: typeof o == "number" ? !1 : o ?? !0,
      value: () => "",
      pxAlign: !0,
      show: i,
      metric: r,
      ...l,
      ...s,
      points: Object.keys(u).length > 0 ? u : void 0
    };
  }
  merge(t) {
    this.props = { ...this.props, ...t };
  }
}
function tk({
  drawStyle: e,
  lineInterpolation: t,
  barAlignment: n = Cw.Center,
  barWidthFactor: o = 0.6,
  barMaxWidth: i = 200,
  stepInterval: r
}) {
  if (!Ao)
    throw new Error("Required uPlot path builders are not available");
  if (e === Nr.Bars || e === Nr.Histogram) {
    const a = Qn.paths;
    return nk({ pathBuilders: a, barAlignment: n, barWidthFactor: o, barMaxWidth: i, stepInterval: r });
  }
  if (e === Nr.Lines) {
    if (t === nd.StepBefore)
      return Ao.stepBefore;
    if (t === nd.StepAfter)
      return Ao.stepAfter;
    if (t === nd.Linear)
      return Ao.linear;
  }
  return Ao.spline;
}
function nk({
  pathBuilders: e,
  barAlignment: t,
  barWidthFactor: n,
  barMaxWidth: o,
  stepInterval: i
}) {
  if (!Ao)
    throw new Error("Required uPlot path builders are not available");
  const r = e.bars;
  if (typeof i == "number" && i > 0 && r)
    return (l, s, u, c) => {
      let d = o;
      const f = Ow({
        uPlotInstance: l,
        stepInterval: i
      });
      f > 0 && (d = Math.min(d, f));
      const p = `bars|${t}|${n}|${d}`;
      return Ao && !Ao[p] && (Ao[p] = r({
        size: [n, d],
        align: t
      })), Ao?.[p]?.(l, s, u, c) ?? null;
    };
  const a = `bars|${t}|${n}|${o}`;
  return !Ao[a] && r && (Ao[a] = r({
    size: [n, o],
    align: t
  })), Ao[a];
}
class ok extends Jd {
  series = [];
  selectionPreferencesSource = Sg.IN_MEMORY;
  shouldSaveSelectionPreference = !1;
  axes = {};
  stepInterval;
  scales = [];
  bands = [];
  cursor;
  hooks = {};
  plugins = [];
  padding;
  legend;
  focus;
  select;
  thresholds = {};
  tzDate;
  id;
  onDragSelect;
  constructor(t) {
    super(t);
    const {
      id: n,
      onDragSelect: o,
      tzDate: i,
      selectionPreferencesSource: r,
      shouldSaveSelectionPreference: a,
      stepInterval: l
    } = t ?? {};
    this.id = n, i && (this.tzDate = i), r && (this.selectionPreferencesSource = r), a && (this.shouldSaveSelectionPreference = a), l && (this.stepInterval = l), this.onDragSelect = () => {
    }, o && (this.onDragSelect = o, this.addHook("setSelect", (s) => {
      const u = s.select;
      if (u && u.width > 0) {
        const c = s.posToVal(u.left, "x"), d = s.posToVal(u.left + u.width, "x");
        this.onDragSelect(c * 1e3, d * 1e3);
      }
    }));
  }
  getShouldSaveSelectionPreference() {
    return this.shouldSaveSelectionPreference;
  }
  getId() {
    return this.id;
  }
  addAxis(t) {
    const { scaleKey: n } = t;
    if (this.axes[n]) {
      this.axes[n].merge?.(t);
      return;
    }
    this.axes[n] = new EI(t);
  }
  addScale(t) {
    const n = this.scales.find((o) => o.props.scaleKey === t.scaleKey);
    if (n) {
      n.merge?.(t);
      return;
    }
    this.scales.push(new KT(t));
  }
  addSeries(t) {
    this.series.push(new ek(t));
  }
  getSeriesSpanGapsOptions() {
    return this.series.map((t) => {
      const { spanGaps: n } = t.props;
      return { spanGaps: n };
    });
  }
  addHook(t, n) {
    return this.hooks[t] || (this.hooks[t] = []), this.hooks[t].push(n), () => {
      const o = this.hooks[t].indexOf(n);
      o !== -1 && this.hooks[t].splice(o, 1);
    };
  }
  addPlugin(t) {
    this.plugins.push(t);
  }
  addThresholds(t) {
    this.thresholds[t.scaleKey] || (this.thresholds[t.scaleKey] = t, this.addHook("draw", NI(t)));
  }
  setBands(t) {
    this.bands = t;
  }
  setCursor(t) {
    this.cursor = tb({}, this.cursor, t);
  }
  setPadding(t) {
    this.padding = t;
  }
  setLegend(t) {
    this.legend = t;
  }
  setFocus(t) {
    this.focus = t;
  }
  setSelect(t) {
    this.select = t;
  }
  setTzDate(t) {
    this.tzDate = t;
  }
  getCursorConfig() {
    const t = {
      ...op,
      hover: {
        ...op.hover,
        prox: this.stepInterval ? (n) => Ow({
          uPlotInstance: n,
          stepInterval: this.stepInterval ?? 0
        }) * DI : $w
      }
    };
    return tb({}, op, t, this.cursor);
  }
  getStoredVisibility() {
    return this.id && this.selectionPreferencesSource === Sg.LOCAL_STORAGE ? BI(this.id) : null;
  }
  getVisibilityResolutionState() {
    const t = this.getStoredVisibility();
    if (!t || t.length === 0)
      return {
        visibleStoredLabels: /* @__PURE__ */ new Set(),
        hiddenStoredLabels: /* @__PURE__ */ new Set(),
        hasActivePreference: !1
      };
    const n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
    let i = !1, r = !1;
    for (const { label: d, show: f } of t)
      f ? (i = !0, n.add(d), o.has(d) && o.delete(d)) : (r = !0, n.has(d) || o.add(d));
    const a = i && r, l = this.series.map(
      (d) => d.getConfig().label ?? ""
    ), s = n.size > 0 && l.some((d) => n.has(d)), u = a && s;
    return !a || u ? { visibleStoredLabels: n, hiddenStoredLabels: o, hasActivePreference: u } : {
      visibleStoredLabels: /* @__PURE__ */ new Set(),
      hiddenStoredLabels: /* @__PURE__ */ new Set(),
      hasActivePreference: u
    };
  }
  getLegendItems() {
    const { visibleStoredLabels: t, hiddenStoredLabels: n, hasActivePreference: o } = this.getVisibilityResolutionState();
    return this.series.reduce(
      (i, r, a) => {
        const l = r.getConfig(), s = l.label ?? "", u = a + 1, c = ub({
          seriesShow: l.show,
          seriesLabel: s,
          visibleStoredLabels: t,
          hiddenStoredLabels: n,
          hasActivePreference: o
        });
        return i[u] = {
          seriesIndex: u,
          color: l.stroke ?? "#ccc",
          label: s,
          show: c,
          yAxis: 1
        }, i;
      },
      {}
    );
  }
  getConfig() {
    const t = { ...zI }, { visibleStoredLabels: n, hiddenStoredLabels: o, hasActivePreference: i } = this.getVisibilityResolutionState();
    return t.series = [
      { value: () => "", label: "Timestamp" },
      ...this.series.map((r) => {
        const a = r.getConfig(), l = ub({
          seriesShow: a.show,
          seriesLabel: a.label ?? "",
          visibleStoredLabels: n,
          hiddenStoredLabels: o,
          hasActivePreference: i
        });
        return { ...a, show: l };
      })
    ], t.axes = Object.values(this.axes).map((r) => r.getConfig()), t.scales = this.scales.reduce(
      (r, a) => ({ ...r, ...a.getConfig() }),
      {}
    ), t.hooks = this.hooks, t.select = this.select, t.cursor = this.getCursorConfig(), t.tzDate = this.tzDate, t.plugins = this.plugins.length > 0 ? this.plugins : void 0, t.bands = this.bands.length > 0 ? this.bands : void 0, Array.isArray(this.padding) && (t.padding = this.padding), this.legend && (t.legend = this.legend), this.focus && (t.focus = this.focus), t;
  }
}
function t0(e, t) {
  return t.some(
    ({ spanGaps: n }) => typeof n == "number" && n > 0 && e > n
  );
}
function ik(e, t) {
  const n = JSON.parse(JSON.stringify(e)), [o, ...i] = n;
  if (!Array.isArray(o) || o.length < 2 || i.length === 0)
    return n;
  const r = o, a = r.length;
  let l = 0;
  for (let f = 0; f < a - 1; f += 1)
    t0(r[f + 1] - r[f], t) && (l += 1);
  if (l === 0)
    return e;
  const s = a + l, u = Array.from({ length: s }), c = i.map(
    () => Array.from({ length: s })
  );
  let d = 0;
  for (let f = 0; f < a; f += 1) {
    u[d] = r[f];
    for (const [p, m] of i.entries())
      c[p][d] = m[f];
    if (d += 1, f < a - 1 && t0(r[f + 1] - r[f], t)) {
      u[d] = r[f] + Math.max(1, Math.floor((r[f + 1] - r[f]) / 2));
      for (let p = 0; p < i.length; p += 1)
        c[p][d] = null;
      d += 1;
    }
  }
  return [u, ...c];
}
function rk(e, t) {
  const n = JSON.parse(JSON.stringify(e)), [o, ...i] = n;
  if (!Array.isArray(o) || i.length === 0)
    return n;
  const a = t.some(({ spanGaps: d }) => typeof d == "number") ? ik(n, t) : n;
  if (!t.some(({ spanGaps: d }) => d === !0))
    return a;
  const [s, ...u] = a, c = u.map((d, f) => {
    const { spanGaps: p } = t[f] ?? {};
    return p !== !0 ? d : d.map(
      (m) => m === null ? void 0 : m
    );
  });
  return [s, ...c];
}
const ak = /\{\{(\w+)(?::(\w+))?\}\}/g;
function lk(e) {
  const t = /* @__PURE__ */ new Set();
  let n;
  const o = new RegExp(ak.source, "g");
  for (; (n = o.exec(e)) !== null; )
    t.add(n[1]);
  return Array.from(t);
}
class sk {
  nodes = /* @__PURE__ */ new Map();
  ensureNode(t) {
    return this.nodes.has(t) || this.nodes.set(t, { name: t, dependsOn: [], dependents: [] }), this.nodes.get(t);
  }
  addVariable(t) {
    const n = t.name, o = this.ensureNode(n);
    for (const i of o.dependsOn) {
      const r = this.nodes.get(i);
      r && (r.dependents = r.dependents.filter((a) => a !== n));
    }
    o.dependsOn = [], t.query && (o.dependsOn = lk(t.query));
    for (const i of o.dependsOn)
      this.ensureNode(i).dependents.push(n);
  }
  removeVariable(t) {
    const n = this.nodes.get(t);
    if (n) {
      for (const o of n.dependsOn) {
        const i = this.nodes.get(o);
        i && (i.dependents = i.dependents.filter((r) => r !== t));
      }
      for (const o of n.dependents) {
        const i = this.nodes.get(o);
        i && (i.dependsOn = i.dependsOn.filter((r) => r !== t));
      }
      this.nodes.delete(t);
    }
  }
  getDependents(t) {
    return this.nodes.get(t)?.dependents ?? [];
  }
  getAllDependents(t) {
    const n = /* @__PURE__ */ new Set(), o = [], i = (r) => {
      if (n.has(r))
        return;
      n.add(r);
      const a = this.getDependents(r);
      for (const l of a)
        o.push(l), i(l);
    };
    return i(t), o;
  }
  detectCycle() {
    const i = /* @__PURE__ */ new Map(), r = [];
    for (const l of this.nodes.keys())
      i.set(l, 0);
    const a = (l) => {
      i.set(l, 1);
      const s = this.nodes.get(l);
      if (s)
        for (const u of s.dependsOn) {
          const c = i.get(u);
          if (c === 1)
            return r.push(u, l), !0;
          if (c === 0 && a(u))
            return r.push(l), !0;
        }
      return i.set(l, 2), !1;
    };
    for (const l of this.nodes.keys())
      if (i.get(l) === 0 && a(l))
        return r.reverse();
    return null;
  }
  topologicalSort() {
    const t = /* @__PURE__ */ new Set(), n = [], o = (i) => {
      if (t.has(i))
        return;
      t.add(i);
      const r = this.nodes.get(i);
      if (r)
        for (const a of r.dependsOn)
          o(a);
      n.push(i);
    };
    for (const i of this.nodes.keys())
      o(i);
    return n;
  }
  clear() {
    this.nodes.clear();
  }
}
let uk = 1;
async function _a(e, t, n) {
  const { url: o, token: i } = n, r = {
    jsonrpc: "2.0",
    method: e,
    params: t,
    auth: i,
    id: uk++
  }, a = await fetch(`${o}?_m=${e}`, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify(r)
  });
  if (!a.ok)
    throw new Error(`Zabbix API HTTP error: ${a.status}`);
  const l = await a.json();
  if (l.error)
    throw new Error(`Zabbix API error [${l.error.code}]: ${l.error.data}`);
  return l.result;
}
function ck(e) {
  return _a(
    "hostgroup.get",
    {
      output: ["groupid", "name"],
      sortfield: "name",
      limit: 200
    },
    e
  );
}
function dk(e, t, n) {
  return _a(
    "host.get",
    {
      output: ["hostid", "host", "name"],
      ...e?.length ? { groupids: e } : {},
      sortfield: "name",
      limit: 200
    },
    n
  );
}
function fk(e, t, n, o, i) {
  return _a(
    "item.get",
    {
      output: ["itemid", "hostid", "name", "key_", "value_type", "units", "valuemapid"],
      selectTags: "extend",
      hostids: e,
      filter: { value_type: ["0", "3"] },
      sortfield: "name",
      limit: 500
    },
    o
  );
}
function pk(e) {
  return e.value ? `${e.tag}: ${e.value}` : e.tag;
}
function gk(e, t, n) {
  return _a(
    "item.get",
    {
      output: ["itemid", "hostid", "name", "key_", "value_type", "units", "valuemapid"],
      hostids: e,
      filter: { value_type: ["1", "2", "4"] },
      sortfield: "name",
      limit: 500
    },
    n
  );
}
function hk(e, t) {
  return _a(
    "usermacro.get",
    {
      output: ["hostmacroid", "macro", "value"],
      ...e?.length ? { hostids: e } : {},
      sortfield: "macro",
      limit: 200
    },
    t
  );
}
function vk(e) {
  return _a(
    "service.get",
    {
      output: ["serviceid", "name"],
      sortfield: "name",
      limit: 200
    },
    e
  );
}
function mk(e, t) {
  return _a(
    "discoveryrule.get",
    {
      output: ["itemid", "hostid", "name", "key_"],
      hostids: e,
      sortfield: "name",
      limit: 200
    },
    t
  );
}
function bk(e, t) {
  return _a(
    "itemprototype.get",
    {
      output: ["itemid", "name", "key_"],
      discoveryids: [e],
      sortfield: "name"
    },
    t
  );
}
const yk = [
  "Transform",
  "Aggregate",
  "Filter",
  "Trends",
  "Time",
  "Alias",
  "Special"
], n0 = [
  // Transform
  { name: "groupBy", category: "Transform", params: [{ name: "interval", type: "string" }, { name: "function", type: "string", options: ["avg", "min", "max", "sum", "count", "median", "first", "last"] }], defaultParams: ["1m", "avg"] },
  { name: "scale", category: "Transform", params: [{ name: "factor", type: "float", options: [100, 0.01, 10, -1] }], defaultParams: [100] },
  { name: "offset", category: "Transform", params: [{ name: "delta", type: "float", options: [-100, 100] }], defaultParams: [100] },
  { name: "delta", category: "Transform", params: [], defaultParams: [] },
  { name: "rate", category: "Transform", params: [], defaultParams: [] },
  { name: "movingAverage", category: "Transform", params: [{ name: "factor", type: "int", options: [6, 10, 60, 100, 600] }], defaultParams: [10] },
  { name: "exponentialMovingAverage", category: "Transform", params: [{ name: "smoothing", type: "float", options: [6, 10, 60, 100, 600] }], defaultParams: [0.2] },
  { name: "percentile", category: "Transform", params: [{ name: "interval", type: "string" }, { name: "percent", type: "float", options: [25, 50, 75, 90, 95, 99, 99.9] }], defaultParams: ["1m", 95] },
  { name: "removeAboveValue", category: "Transform", params: [{ name: "number", type: "float" }], defaultParams: [0] },
  { name: "removeBelowValue", category: "Transform", params: [{ name: "number", type: "float" }], defaultParams: [0] },
  { name: "transformNull", category: "Transform", params: [{ name: "number", type: "float" }], defaultParams: [0] },
  // Aggregate
  { name: "aggregateBy", category: "Aggregate", params: [{ name: "interval", type: "string" }, { name: "function", type: "string", options: ["avg", "min", "max", "sum", "count", "median", "first", "last"] }], defaultParams: ["1m", "avg"] },
  { name: "sumSeries", category: "Aggregate", params: [], defaultParams: [] },
  { name: "percentileAgg", category: "Aggregate", params: [{ name: "interval", type: "string" }, { name: "percent", type: "float", options: [25, 50, 75, 90, 95, 99, 99.9] }], defaultParams: ["1m", 95] },
  // Filter
  { name: "top", category: "Filter", params: [{ name: "number", type: "int" }, { name: "value", type: "string", options: ["avg", "min", "max", "sum", "count", "median", "first", "last"] }], defaultParams: [5, "avg"] },
  { name: "bottom", category: "Filter", params: [{ name: "number", type: "int" }, { name: "value", type: "string", options: ["avg", "min", "max", "sum", "count", "median", "first", "last"] }], defaultParams: [5, "avg"] },
  { name: "sortSeries", category: "Filter", params: [{ name: "direction", type: "string", options: ["asc", "desc"] }], defaultParams: ["asc"] },
  // Trends
  { name: "trendValue", category: "Trends", params: [{ name: "type", type: "string", options: ["avg", "min", "max", "sum", "count"] }], defaultParams: ["avg"] },
  // Time
  { name: "timeShift", category: "Time", params: [{ name: "interval", type: "string", options: ["24h", "7d", "1M", "+24h", "-24h"] }], defaultParams: ["24h"] },
  // Alias
  { name: "setAlias", category: "Alias", params: [{ name: "alias", type: "string" }], defaultParams: [] },
  { name: "setAliasByRegex", category: "Alias", params: [{ name: "aliasByRegex", type: "string" }], defaultParams: [] },
  { name: "replaceAlias", category: "Alias", params: [{ name: "regexp", type: "string" }, { name: "newAlias", type: "string" }], defaultParams: ["/(.*)/", "$1"] },
  // Special
  { name: "consolidateBy", category: "Special", params: [{ name: "type", type: "string", options: ["avg", "min", "max", "sum", "count"] }], defaultParams: ["avg"] }
], Hl = new sk();
function xk(e) {
  return e.split(",").map((t) => t.trim()).filter(Boolean).map((t) => ({ value: t, label: t }));
}
function wk(e, t, n) {
  if (t) {
    const o = e ?? n[0]?.value ?? "";
    return o ? [o] : [];
  }
  return e ?? n[0]?.value ?? "";
}
function Sk(e) {
  return [{ value: "$__all", label: "All" }, ...e];
}
function Ck(e, t, n) {
  switch (e.type) {
    case "custom": {
      const o = e.customValues ?? "";
      return Promise.resolve(xk(o));
    }
    case "query": {
      if (!t || !e.query)
        return Promise.resolve([]);
      const o = $k(e.query, n);
      return t(o);
    }
    case "textbox": {
      const o = e.defaultValue ?? "";
      return Promise.resolve(o ? [{ value: o, label: o }] : []);
    }
    case "constant": {
      const o = e.constantValue ?? "";
      return Promise.resolve(o ? [{ value: o, label: o }] : []);
    }
    default:
      return Promise.resolve([]);
  }
}
function $k(e, t) {
  return e.replace(/\{\{(\w+)(?::(\w+))?\}\}/g, (n, o) => {
    const i = t[o];
    return i == null ? n : Array.isArray(i) ? i.join(",") : String(i);
  });
}
const xs = Yh("variable", () => {
  const e = le({}), t = le(null);
  function n(p) {
    t.value = p;
  }
  function o(p) {
    e.value[p.id] || (Hl.addVariable(p), e.value[p.id] = {
      config: p,
      options: [],
      current: "",
      loading: !1,
      error: null
    });
  }
  function i(p) {
    const m = e.value[p];
    m && (Hl.removeVariable(m.config.name), delete e.value[p]);
  }
  function r(p, m) {
    const b = e.value[p];
    b && (b.config = { ...b.config, ...m }, ("name" in m || "query" in m) && Hl.addVariable(b.config));
  }
  function a(p, m) {
    const b = e.value[p];
    b && (b.current = m);
  }
  async function l(p) {
    const m = e.value[p];
    if (m) {
      m.loading = !0, m.error = null;
      try {
        const b = u(), y = await Ck(m.config, t.value, b);
        m.options = m.config.includeAll ? Sk(y) : y;
        const S = Array.isArray(m.current) ? m.current[0] : m.current;
        (!S || !m.options.some((C) => C.value === S)) && (m.current = wk(m.config.defaultValue, m.config.multi, m.options));
      } catch (b) {
        m.error = b?.message ?? String(b);
      } finally {
        m.loading = !1;
      }
    }
  }
  async function s() {
    const p = Hl.topologicalSort();
    for (const m of p) {
      const b = Object.values(e.value).find((y) => y.config.name === m);
      b && await l(b.config.id);
    }
  }
  function u() {
    const p = {};
    for (const m of Object.values(e.value)) {
      const { name: b } = m.config;
      Array.isArray(m.current) ? p[b] = m.current.length === 1 ? m.current[0] : m.current : p[b] = m.current;
    }
    return p;
  }
  function c(p) {
    return Object.values(e.value).find((m) => m.config.name === p);
  }
  function d(p) {
    return Hl.getAllDependents(p);
  }
  function f() {
    return Hl.detectCycle();
  }
  return {
    variables: e,
    optionsResolver: t,
    setOptionsResolver: n,
    addVariable: o,
    removeVariable: i,
    updateVariable: r,
    setValue: a,
    refreshVariable: l,
    refreshAll: s,
    resolveAll: u,
    getVariable: c,
    getDependents: d,
    detectCycle: f
  };
});
function Pk() {
  const e = Date.now();
  return { from: e - 3600 * 1e3, to: e };
}
const wr = Yh("dashboard", () => {
  const e = ww(), t = le(""), n = le(e.panels), o = le(e.layouts), i = le(!1), r = le(null), a = le(!1), l = le(Pk()), s = le(0), u = le(null), c = le(!1), d = le({});
  function f(L) {
    const A = wg(), U = xw(L, { id: A }), j = o.value.reduce((G, Y) => Math.max(G, Y.y + Y.h), 0), re = {
      i: A,
      x: 0,
      y: j,
      w: L === "stat" || L === "gauge" ? 3 : L === "table" ? 12 : 6,
      h: L === "stat" || L === "gauge" ? 4 : L === "table" ? 10 : 8,
      minH: L === "stat" || L === "gauge" ? 3 : 6
    };
    n.value[A] = U, o.value = [...o.value, re], r.value = A, a.value = !1, c.value = !0;
  }
  function p(L) {
    const { [L]: A, ...U } = n.value;
    n.value = U, o.value = o.value.filter((j) => j.i !== L), r.value === L && (r.value = null), c.value = !0;
  }
  function m(L) {
    const A = n.value[L];
    if (!A)
      return;
    const U = wg(), j = { ...A, id: U, title: `${A.title} (copy)` }, re = o.value.find((Y) => Y.i === L), G = o.value.reduce((Y, K) => Math.max(Y, K.y + K.h), 0);
    n.value[U] = j, o.value = [
      ...o.value,
      {
        i: U,
        x: re?.x ?? 0,
        y: G,
        w: re?.w ?? 6,
        h: re?.h ?? 8,
        minH: re?.minH
      }
    ], c.value = !0;
  }
  function b(L, A) {
    const U = n.value[L];
    U && (n.value[L] = { ...U, ...A }, c.value = !0);
  }
  function y() {
    n.value = {}, o.value = [], r.value = null, c.value = !0;
  }
  function S(L) {
    o.value = L;
  }
  function C() {
    u.value = {
      title: t.value,
      panels: { ...n.value },
      layouts: [...o.value]
    }, i.value = !0, c.value = !1;
  }
  function O(L) {
    L && L(W()), i.value = !1, u.value = null, c.value = !1;
  }
  function $() {
    const L = u.value;
    L && (t.value = L.title, n.value = L.panels, o.value = L.layouts), i.value = !1, u.value = null, c.value = !1;
  }
  function P() {
    i.value ? $() : C();
  }
  function k(L) {
    i.value = L;
  }
  function x(L) {
    r.value = L;
  }
  function E(L) {
    l.value = L;
  }
  function z(L) {
    s.value = L;
  }
  function N() {
    for (const L of Object.keys(n.value))
      d.value[L] = (d.value[L] ?? 0) + 1;
  }
  function D(L) {
    d.value[L] = (d.value[L] ?? 0) + 1;
  }
  function W() {
    const L = xs(), A = Object.values(L.variables).map((j) => j.config), U = {
      title: t.value,
      panels: n.value,
      layouts: o.value,
      variables: A
    };
    return JSON.stringify(U, null, 2);
  }
  function H(L) {
    try {
      const A = JSON.parse(L);
      if (A.panels && A.layouts && (t.value = A.title ?? "", n.value = A.panels, o.value = A.layouts, c.value = !0), A.variables && A.variables.length > 0) {
        const U = xs();
        for (const j of Object.keys(U.variables))
          U.removeVariable(j);
        for (const j of A.variables) {
          const re = {
            ...j,
            hide: j.showOnDashboard === "nothing" || !!j.hideFromVariableList
          };
          U.addVariable(re);
        }
      }
      return !!(A.panels && A.layouts);
    } catch {
      return !1;
    }
  }
  return {
    title: t,
    panels: n,
    layouts: o,
    isEditing: i,
    editingPanelId: r,
    addPanelModalOpen: a,
    timeRange: l,
    autoRefresh: s,
    _editSnapshot: u,
    isDirty: c,
    panelRefreshKeys: d,
    addPanel: f,
    removePanel: p,
    clonePanel: m,
    updatePanel: b,
    clearPanels: y,
    setLayouts: S,
    startEditing: C,
    confirmSave: O,
    discardChanges: $,
    setEditingPanel: x,
    toggleEditing: P,
    setEditing: k,
    setTimeRange: E,
    setAutoRefresh: z,
    refresh: N,
    refreshPanel: D,
    exportJSON: W,
    importJSON: H
  };
}), qr = Yh("theme", () => {
  const e = le(
    (typeof localStorage < "u" ? localStorage.getItem("argus-theme") : null) || "dark"
  ), t = R(() => e.value === "dark");
  function n() {
    e.value = e.value === "dark" ? "light" : "dark", typeof document < "u" && (document.documentElement.dataset.theme = e.value), typeof localStorage < "u" && localStorage.setItem("argus-theme", e.value);
  }
  function o(i) {
    e.value = i, typeof document < "u" && (document.documentElement.dataset.theme = i), typeof localStorage < "u" && localStorage.setItem("argus-theme", i);
  }
  return { theme: e, isDark: t, toggle: n, setTheme: o };
});
function Ru(e) {
  "@babel/helpers - typeof";
  return Ru = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
    return typeof t;
  } : function(t) {
    return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
  }, Ru(e);
}
function Ok(e, t) {
  if (Ru(e) != "object" || !e) return e;
  var n = e[Symbol.toPrimitive];
  if (n !== void 0) {
    var o = n.call(e, t);
    if (Ru(o) != "object") return o;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (t === "string" ? String : Number)(e);
}
function Ik(e) {
  var t = Ok(e, "string");
  return Ru(t) == "symbol" ? t : t + "";
}
function Mk(e, t, n) {
  return (t = Ik(t)) in e ? Object.defineProperty(e, t, {
    value: n,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : e[t] = n, e;
}
function o0(e, t) {
  var n = Object.keys(e);
  if (Object.getOwnPropertySymbols) {
    var o = Object.getOwnPropertySymbols(e);
    t && (o = o.filter(function(i) {
      return Object.getOwnPropertyDescriptor(e, i).enumerable;
    })), n.push.apply(n, o);
  }
  return n;
}
function Z(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? arguments[t] : {};
    t % 2 ? o0(Object(n), !0).forEach(function(o) {
      Mk(e, o, n[o]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : o0(Object(n)).forEach(function(o) {
      Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(n, o));
    });
  }
  return e;
}
function I() {
  return I = Object.assign ? Object.assign.bind() : function(e) {
    for (var t = 1; t < arguments.length; t++) {
      var n = arguments[t];
      for (var o in n) ({}).hasOwnProperty.call(n, o) && (e[o] = n[o]);
    }
    return e;
  }, I.apply(null, arguments);
}
const Tk = (e) => typeof e == "function", kk = Array.isArray, Ek = (e) => typeof e == "string", _k = (e) => e !== null && typeof e == "object", Ak = /^on[^a-z]/, Dk = (e) => Ak.test(e), cv = (e) => {
  const t = /* @__PURE__ */ Object.create(null);
  return (n) => t[n] || (t[n] = e(n));
}, zk = /-(\w)/g, dv = cv((e) => e.replace(zk, (t, n) => n ? n.toUpperCase() : "")), Rk = /\B([A-Z])/g, Nk = cv((e) => e.replace(Rk, "-$1").toLowerCase()), Bk = cv((e) => e.charAt(0).toUpperCase() + e.slice(1)), Lk = Object.prototype.hasOwnProperty, i0 = (e, t) => Lk.call(e, t);
function Fk(e, t, n, o) {
  const i = e[n];
  if (i != null) {
    const r = i0(i, "default");
    if (r && o === void 0) {
      const a = i.default;
      o = i.type !== Function && Tk(a) ? a() : a;
    }
    i.type === Boolean && (!i0(t, n) && !r ? o = !1 : o === "" && (o = !0));
  }
  return o;
}
function Hk(e) {
  return Object.keys(e).reduce((t, n) => ((n.startsWith("data-") || n.startsWith("aria-")) && (t[n] = e[n]), t), {});
}
function nu(e) {
  return typeof e == "number" ? `${e}px` : e;
}
function ns(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 ? arguments[2] : void 0;
  return typeof e == "function" ? e(t) : e ?? n;
}
function Vk(e) {
  let t;
  const n = new Promise((i) => {
    t = e(() => {
      i(!0);
    });
  }), o = () => {
    t?.();
  };
  return o.then = (i, r) => n.then(i, r), o.promise = n, o;
}
function Te() {
  const e = [];
  for (let t = 0; t < arguments.length; t++) {
    const n = t < 0 || arguments.length <= t ? void 0 : arguments[t];
    if (n) {
      if (Ek(n))
        e.push(n);
      else if (kk(n))
        for (let o = 0; o < n.length; o++) {
          const i = Te(n[o]);
          i && e.push(i);
        }
      else if (_k(n))
        for (const o in n)
          n[o] && e.push(o);
    }
  }
  return e.join(" ");
}
var uS = (function() {
  if (typeof Map < "u")
    return Map;
  function e(t, n) {
    var o = -1;
    return t.some(function(i, r) {
      return i[0] === n ? (o = r, !0) : !1;
    }), o;
  }
  return (
    /** @class */
    (function() {
      function t() {
        this.__entries__ = [];
      }
      return Object.defineProperty(t.prototype, "size", {
        /**
         * @returns {boolean}
         */
        get: function() {
          return this.__entries__.length;
        },
        enumerable: !0,
        configurable: !0
      }), t.prototype.get = function(n) {
        var o = e(this.__entries__, n), i = this.__entries__[o];
        return i && i[1];
      }, t.prototype.set = function(n, o) {
        var i = e(this.__entries__, n);
        ~i ? this.__entries__[i][1] = o : this.__entries__.push([n, o]);
      }, t.prototype.delete = function(n) {
        var o = this.__entries__, i = e(o, n);
        ~i && o.splice(i, 1);
      }, t.prototype.has = function(n) {
        return !!~e(this.__entries__, n);
      }, t.prototype.clear = function() {
        this.__entries__.splice(0);
      }, t.prototype.forEach = function(n, o) {
        o === void 0 && (o = null);
        for (var i = 0, r = this.__entries__; i < r.length; i++) {
          var a = r[i];
          n.call(o, a[1], a[0]);
        }
      }, t;
    })()
  );
})(), Dg = typeof window < "u" && typeof document < "u" && window.document === document, Id = (function() {
  return typeof global < "u" && global.Math === Math ? global : typeof self < "u" && self.Math === Math ? self : typeof window < "u" && window.Math === Math ? window : Function("return this")();
})(), jk = (function() {
  return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(Id) : function(e) {
    return setTimeout(function() {
      return e(Date.now());
    }, 1e3 / 60);
  };
})(), Wk = 2;
function qk(e, t) {
  var n = !1, o = !1, i = 0;
  function r() {
    n && (n = !1, e()), o && l();
  }
  function a() {
    jk(r);
  }
  function l() {
    var s = Date.now();
    if (n) {
      if (s - i < Wk)
        return;
      o = !0;
    } else
      n = !0, o = !1, setTimeout(a, t);
    i = s;
  }
  return l;
}
var Gk = 20, Kk = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], Yk = typeof MutationObserver < "u", Uk = (
  /** @class */
  (function() {
    function e() {
      this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = qk(this.refresh.bind(this), Gk);
    }
    return e.prototype.addObserver = function(t) {
      ~this.observers_.indexOf(t) || this.observers_.push(t), this.connected_ || this.connect_();
    }, e.prototype.removeObserver = function(t) {
      var n = this.observers_, o = n.indexOf(t);
      ~o && n.splice(o, 1), !n.length && this.connected_ && this.disconnect_();
    }, e.prototype.refresh = function() {
      var t = this.updateObservers_();
      t && this.refresh();
    }, e.prototype.updateObservers_ = function() {
      var t = this.observers_.filter(function(n) {
        return n.gatherActive(), n.hasActive();
      });
      return t.forEach(function(n) {
        return n.broadcastActive();
      }), t.length > 0;
    }, e.prototype.connect_ = function() {
      !Dg || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), Yk ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
        attributes: !0,
        childList: !0,
        characterData: !0,
        subtree: !0
      })) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
    }, e.prototype.disconnect_ = function() {
      !Dg || !this.connected_ || (document.removeEventListener("transitionend", this.onTransitionEnd_), window.removeEventListener("resize", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener("DOMSubtreeModified", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);
    }, e.prototype.onTransitionEnd_ = function(t) {
      var n = t.propertyName, o = n === void 0 ? "" : n, i = Kk.some(function(r) {
        return !!~o.indexOf(r);
      });
      i && this.refresh();
    }, e.getInstance = function() {
      return this.instance_ || (this.instance_ = new e()), this.instance_;
    }, e.instance_ = null, e;
  })()
), cS = (function(e, t) {
  for (var n = 0, o = Object.keys(t); n < o.length; n++) {
    var i = o[n];
    Object.defineProperty(e, i, {
      value: t[i],
      enumerable: !1,
      writable: !1,
      configurable: !0
    });
  }
  return e;
}), ws = (function(e) {
  var t = e && e.ownerDocument && e.ownerDocument.defaultView;
  return t || Id;
}), dS = sf(0, 0, 0, 0);
function Md(e) {
  return parseFloat(e) || 0;
}
function r0(e) {
  for (var t = [], n = 1; n < arguments.length; n++)
    t[n - 1] = arguments[n];
  return t.reduce(function(o, i) {
    var r = e["border-" + i + "-width"];
    return o + Md(r);
  }, 0);
}
function Xk(e) {
  for (var t = ["top", "right", "bottom", "left"], n = {}, o = 0, i = t; o < i.length; o++) {
    var r = i[o], a = e["padding-" + r];
    n[r] = Md(a);
  }
  return n;
}
function Qk(e) {
  var t = e.getBBox();
  return sf(0, 0, t.width, t.height);
}
function Zk(e) {
  var t = e.clientWidth, n = e.clientHeight;
  if (!t && !n)
    return dS;
  var o = ws(e).getComputedStyle(e), i = Xk(o), r = i.left + i.right, a = i.top + i.bottom, l = Md(o.width), s = Md(o.height);
  if (o.boxSizing === "border-box" && (Math.round(l + r) !== t && (l -= r0(o, "left", "right") + r), Math.round(s + a) !== n && (s -= r0(o, "top", "bottom") + a)), !eE(e)) {
    var u = Math.round(l + r) - t, c = Math.round(s + a) - n;
    Math.abs(u) !== 1 && (l -= u), Math.abs(c) !== 1 && (s -= c);
  }
  return sf(i.left, i.top, l, s);
}
var Jk = /* @__PURE__ */ (function() {
  return typeof SVGGraphicsElement < "u" ? function(e) {
    return e instanceof ws(e).SVGGraphicsElement;
  } : function(e) {
    return e instanceof ws(e).SVGElement && typeof e.getBBox == "function";
  };
})();
function eE(e) {
  return e === ws(e).document.documentElement;
}
function tE(e) {
  return Dg ? Jk(e) ? Qk(e) : Zk(e) : dS;
}
function nE(e) {
  var t = e.x, n = e.y, o = e.width, i = e.height, r = typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object, a = Object.create(r.prototype);
  return cS(a, {
    x: t,
    y: n,
    width: o,
    height: i,
    top: n,
    right: t + o,
    bottom: i + n,
    left: t
  }), a;
}
function sf(e, t, n, o) {
  return { x: e, y: t, width: n, height: o };
}
var oE = (
  /** @class */
  (function() {
    function e(t) {
      this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = sf(0, 0, 0, 0), this.target = t;
    }
    return e.prototype.isActive = function() {
      var t = tE(this.target);
      return this.contentRect_ = t, t.width !== this.broadcastWidth || t.height !== this.broadcastHeight;
    }, e.prototype.broadcastRect = function() {
      var t = this.contentRect_;
      return this.broadcastWidth = t.width, this.broadcastHeight = t.height, t;
    }, e;
  })()
), iE = (
  /** @class */
  /* @__PURE__ */ (function() {
    function e(t, n) {
      var o = nE(n);
      cS(this, { target: t, contentRect: o });
    }
    return e;
  })()
), rE = (
  /** @class */
  (function() {
    function e(t, n, o) {
      if (this.activeObservations_ = [], this.observations_ = new uS(), typeof t != "function")
        throw new TypeError("The callback provided as parameter 1 is not a function.");
      this.callback_ = t, this.controller_ = n, this.callbackCtx_ = o;
    }
    return e.prototype.observe = function(t) {
      if (!arguments.length)
        throw new TypeError("1 argument required, but only 0 present.");
      if (!(typeof Element > "u" || !(Element instanceof Object))) {
        if (!(t instanceof ws(t).Element))
          throw new TypeError('parameter 1 is not of type "Element".');
        var n = this.observations_;
        n.has(t) || (n.set(t, new oE(t)), this.controller_.addObserver(this), this.controller_.refresh());
      }
    }, e.prototype.unobserve = function(t) {
      if (!arguments.length)
        throw new TypeError("1 argument required, but only 0 present.");
      if (!(typeof Element > "u" || !(Element instanceof Object))) {
        if (!(t instanceof ws(t).Element))
          throw new TypeError('parameter 1 is not of type "Element".');
        var n = this.observations_;
        n.has(t) && (n.delete(t), n.size || this.controller_.removeObserver(this));
      }
    }, e.prototype.disconnect = function() {
      this.clearActive(), this.observations_.clear(), this.controller_.removeObserver(this);
    }, e.prototype.gatherActive = function() {
      var t = this;
      this.clearActive(), this.observations_.forEach(function(n) {
        n.isActive() && t.activeObservations_.push(n);
      });
    }, e.prototype.broadcastActive = function() {
      if (this.hasActive()) {
        var t = this.callbackCtx_, n = this.activeObservations_.map(function(o) {
          return new iE(o.target, o.broadcastRect());
        });
        this.callback_.call(t, n, t), this.clearActive();
      }
    }, e.prototype.clearActive = function() {
      this.activeObservations_.splice(0);
    }, e.prototype.hasActive = function() {
      return this.activeObservations_.length > 0;
    }, e;
  })()
), fS = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new uS(), pS = (
  /** @class */
  /* @__PURE__ */ (function() {
    function e(t) {
      if (!(this instanceof e))
        throw new TypeError("Cannot call a class as a function.");
      if (!arguments.length)
        throw new TypeError("1 argument required, but only 0 present.");
      var n = Uk.getInstance(), o = new rE(t, n, this);
      fS.set(this, o);
    }
    return e;
  })()
);
[
  "observe",
  "unobserve",
  "disconnect"
].forEach(function(e) {
  pS.prototype[e] = function() {
    var t;
    return (t = fS.get(this))[e].apply(t, arguments);
  };
});
var gS = (function() {
  return typeof Id.ResizeObserver < "u" ? Id.ResizeObserver : pS;
})();
const zg = (e) => e != null && e !== "", wn = (e, t) => {
  const n = I({}, e);
  return Object.keys(t).forEach((o) => {
    const i = n[o];
    if (i)
      i.type || i.default ? i.default = t[o] : i.def ? i.def(t[o]) : n[o] = {
        type: i,
        default: t[o]
      };
    else
      throw new Error(`not have ${o} prop`);
  }), n;
}, aE = (e) => {
  const t = Object.keys(e), n = {}, o = {}, i = {};
  for (let r = 0, a = t.length; r < a; r++) {
    const l = t[r];
    Dk(l) ? (n[l[2].toLowerCase() + l.slice(3)] = e[l], o[l] = e[l]) : i[l] = e[l];
  }
  return {
    onEvents: o,
    events: n,
    extraAttrs: i
  };
}, lE = function() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  const n = {}, o = /;(?![^(]*\))/g, i = /:(.+)/;
  return typeof e == "object" ? e : (e.split(o).forEach(function(r) {
    if (r) {
      const a = r.split(i);
      if (a.length > 1) {
        const l = t ? dv(a[0].trim()) : a[0].trim();
        n[l] = a[1].trim();
      }
    }
  }), n);
}, Td = (e, t) => e[t] !== void 0, hS = Symbol("skipFlatten"), no = function() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
  const n = Array.isArray(e) ? e : [e], o = [];
  return n.forEach((i) => {
    Array.isArray(i) ? o.push(...no(i, t)) : i && i.type === Ve ? i.key === hS ? o.push(i) : o.push(...no(i.children, t)) : i && Qi(i) ? t && !uf(i) ? o.push(i) : t || o.push(i) : zg(i) && o.push(i);
  }), o;
}, vS = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "default", n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  if (Qi(e))
    return e.type === Ve ? t === "default" ? no(e.children) : [] : e.children && e.children[t] ? no(e.children[t](n)) : [];
  {
    const o = e.$slots[t] && e.$slots[t](n);
    return no(o);
  }
}, Br = (e) => {
  var t;
  let n = ((t = e?.vnode) === null || t === void 0 ? void 0 : t.el) || e && (e.$el || e);
  for (; n && !n.tagName; )
    n = n.nextSibling;
  return n;
}, sE = (e) => {
  const t = {};
  if (e.$ && e.$.vnode) {
    const n = e.$.vnode.props || {};
    Object.keys(e.$props).forEach((o) => {
      const i = e.$props[o], r = Nk(o);
      (i !== void 0 || r in n) && (t[o] = i);
    });
  } else if (Qi(e) && typeof e.type == "object") {
    const n = e.props || {}, o = {};
    Object.keys(n).forEach((r) => {
      o[dv(r)] = n[r];
    });
    const i = e.type.props || {};
    Object.keys(i).forEach((r) => {
      const a = Fk(i, o, r, o[r]);
      (a !== void 0 || r in o) && (t[r] = a);
    });
  }
  return t;
}, uE = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "default", n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e, o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, i;
  if (e.$) {
    const r = e[t];
    if (r !== void 0)
      return typeof r == "function" && o ? r(n) : r;
    i = e.$slots[t], i = o && i ? i(n) : i;
  } else if (Qi(e)) {
    const r = e.props && e.props[t];
    if (r !== void 0 && e.props !== null)
      return typeof r == "function" && o ? r(n) : r;
    e.type === Ve ? i = e.children : e.children && e.children[t] && (i = e.children[t], i = o && i ? i(n) : i);
  }
  return Array.isArray(i) && (i = no(i), i = i.length === 1 ? i[0] : i, i = i.length === 0 ? void 0 : i), i;
};
function a0() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, n = {};
  return e.$ ? n = I(I({}, n), e.$attrs) : n = I(I({}, n), e.props), aE(n)[t ? "onEvents" : "events"];
}
function cE(e, t) {
  let o = ((Qi(e) ? e.props : e.$attrs) || {}).style || {};
  return typeof o == "string" && (o = lE(o, t)), o;
}
function dE(e) {
  return e.length === 1 && e[0].type === Ve;
}
function uf(e) {
  return e && (e.type === iw || e.type === Ve && e.children.length === 0 || e.type === rw && e.children.trim() === "");
}
function Ko() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
  const t = [];
  return e.forEach((n) => {
    Array.isArray(n) ? t.push(...n) : n?.type === Ve ? t.push(...Ko(n.children)) : t.push(n);
  }), t.filter((n) => !uf(n));
}
function ou(e) {
  if (e) {
    const t = Ko(e);
    return t.length ? t : void 0;
  } else
    return e;
}
function Bo(e) {
  return Array.isArray(e) && e.length === 1 && (e = e[0]), e && e.__v_isVNode && typeof e.type != "symbol";
}
function Mi(e, t) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "default";
  var o, i;
  return (o = t[n]) !== null && o !== void 0 ? o : (i = e[n]) === null || i === void 0 ? void 0 : i.call(e);
}
const Ss = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ResizeObserver",
  props: {
    disabled: Boolean,
    onResize: Function
  },
  emits: ["resize"],
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = Dn({
      width: 0,
      height: 0,
      offsetHeight: 0,
      offsetWidth: 0
    });
    let i = null, r = null;
    const a = () => {
      r && (r.disconnect(), r = null);
    }, l = (c) => {
      const {
        onResize: d
      } = e, f = c[0].target, {
        width: p,
        height: m
      } = f.getBoundingClientRect(), {
        offsetWidth: b,
        offsetHeight: y
      } = f, S = Math.floor(p), C = Math.floor(m);
      if (o.width !== S || o.height !== C || o.offsetWidth !== b || o.offsetHeight !== y) {
        const O = {
          width: S,
          height: C,
          offsetWidth: b,
          offsetHeight: y
        };
        I(o, O), d && Promise.resolve().then(() => {
          d(I(I({}, O), {
            offsetWidth: b,
            offsetHeight: y
          }), f);
        });
      }
    }, s = ci(), u = () => {
      const {
        disabled: c
      } = e;
      if (c) {
        a();
        return;
      }
      const d = Br(s);
      d !== i && (a(), i = d), !r && d && (r = new gS(l), r.observe(d));
    };
    return Pt(() => {
      u();
    }), Ds(() => {
      u();
    }), Lo(() => {
      a();
    }), Ie(() => e.disabled, () => {
      u();
    }, {
      flush: "post"
    }), () => {
      var c;
      return (c = n.default) === null || c === void 0 ? void 0 : c.call(n)[0];
    };
  }
});
let mS = (e) => setTimeout(e, 16), bS = (e) => clearTimeout(e);
typeof window < "u" && "requestAnimationFrame" in window && (mS = (e) => window.requestAnimationFrame(e), bS = (e) => window.cancelAnimationFrame(e));
let l0 = 0;
const fv = /* @__PURE__ */ new Map();
function yS(e) {
  fv.delete(e);
}
function Mt(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
  l0 += 1;
  const n = l0;
  function o(i) {
    if (i === 0)
      yS(n), e();
    else {
      const r = mS(() => {
        o(i - 1);
      });
      fv.set(n, r);
    }
  }
  return o(t), n;
}
Mt.cancel = (e) => {
  const t = fv.get(e);
  return yS(t), bS(t);
};
const li = function() {
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
    t[n] = arguments[n];
  return t;
}, er = (e) => {
  const t = e;
  return t.install = function(n) {
    n.component(t.displayName || t.name, e);
  }, e;
};
function Cs() {
  return {
    type: [Function, Array]
  };
}
function Ct(e) {
  return {
    type: Object,
    default: e
  };
}
function st(e) {
  return {
    type: Boolean,
    default: e
  };
}
function Qe(e) {
  return {
    type: Function,
    default: e
  };
}
function ni(e, t) {
  return {
    validator: () => !0,
    default: e
  };
}
function dp() {
  return {
    validator: () => !0
  };
}
function Po(e) {
  return {
    type: Array,
    default: e
  };
}
function dn(e) {
  return {
    type: String,
    default: e
  };
}
function tn(e, t) {
  return e ? {
    type: e,
    default: t
  } : ni(t);
}
let bo = !1;
try {
  const e = Object.defineProperty({}, "passive", {
    get() {
      bo = !0;
    }
  });
  window.addEventListener("testPassive", null, e), window.removeEventListener("testPassive", null, e);
} catch {
}
function Gi(e, t, n, o) {
  if (e && e.addEventListener) {
    let i = o;
    i === void 0 && bo && (t === "touchstart" || t === "touchmove" || t === "wheel") && (i = {
      passive: !1
    }), e.addEventListener(t, n, i);
  }
  return {
    remove: () => {
      e && e.removeEventListener && e.removeEventListener(t, n);
    }
  };
}
const pv = "anticon", xS = Symbol("GlobalFormContextKey"), fE = (e) => {
  kt(xS, e);
}, pE = () => Tt(xS, {
  validateMessages: R(() => {
  })
}), gE = () => ({
  iconPrefixCls: String,
  getTargetContainer: {
    type: Function
  },
  getPopupContainer: {
    type: Function
  },
  prefixCls: String,
  getPrefixCls: {
    type: Function
  },
  renderEmpty: {
    type: Function
  },
  transformCellText: {
    type: Function
  },
  csp: Ct(),
  input: Ct(),
  autoInsertSpaceInButton: {
    type: Boolean,
    default: void 0
  },
  locale: Ct(),
  pageHeader: Ct(),
  componentSize: {
    type: String
  },
  componentDisabled: {
    type: Boolean,
    default: void 0
  },
  direction: {
    type: String,
    default: "ltr"
  },
  space: Ct(),
  virtual: {
    type: Boolean,
    default: void 0
  },
  dropdownMatchSelectWidth: {
    type: [Number, Boolean],
    default: !0
  },
  form: Ct(),
  pagination: Ct(),
  theme: Ct(),
  select: Ct(),
  wave: Ct()
}), gv = Symbol("configProvider"), wS = {
  getPrefixCls: (e, t) => t || (e ? `ant-${e}` : "ant"),
  iconPrefixCls: R(() => pv),
  getPopupContainer: R(() => () => document.body),
  direction: R(() => "ltr")
}, cf = () => Tt(gv, wS), hE = (e) => kt(gv, e), SS = Symbol("DisabledContextKey"), Ji = () => Tt(SS, le(void 0)), CS = (e) => {
  const t = Ji();
  return kt(SS, R(() => {
    var n;
    return (n = e.value) !== null && n !== void 0 ? n : t.value;
  })), e;
}, vE = {
  // Options.jsx
  items_per_page: "/ page",
  jump_to: "Go to",
  jump_to_confirm: "confirm",
  page: "",
  // Pagination.jsx
  prev_page: "Previous Page",
  next_page: "Next Page",
  prev_5: "Previous 5 Pages",
  next_5: "Next 5 Pages",
  prev_3: "Previous 3 Pages",
  next_3: "Next 3 Pages"
}, mE = {
  locale: "en_US",
  today: "Today",
  now: "Now",
  backToToday: "Back to today",
  ok: "Ok",
  clear: "Clear",
  month: "Month",
  year: "Year",
  timeSelect: "select time",
  dateSelect: "select date",
  weekSelect: "Choose a week",
  monthSelect: "Choose a month",
  yearSelect: "Choose a year",
  decadeSelect: "Choose a decade",
  yearFormat: "YYYY",
  dateFormat: "M/D/YYYY",
  dayFormat: "D",
  dateTimeFormat: "M/D/YYYY HH:mm:ss",
  monthBeforeYear: !0,
  previousMonth: "Previous month (PageUp)",
  nextMonth: "Next month (PageDown)",
  previousYear: "Last year (Control + left)",
  nextYear: "Next year (Control + right)",
  previousDecade: "Last decade",
  nextDecade: "Next decade",
  previousCentury: "Last century",
  nextCentury: "Next century"
}, $S = {
  placeholder: "Select time",
  rangePlaceholder: ["Start time", "End time"]
}, kd = {
  lang: I({
    placeholder: "Select date",
    yearPlaceholder: "Select year",
    quarterPlaceholder: "Select quarter",
    monthPlaceholder: "Select month",
    weekPlaceholder: "Select week",
    rangePlaceholder: ["Start date", "End date"],
    rangeYearPlaceholder: ["Start year", "End year"],
    rangeQuarterPlaceholder: ["Start quarter", "End quarter"],
    rangeMonthPlaceholder: ["Start month", "End month"],
    rangeWeekPlaceholder: ["Start week", "End week"]
  }, mE),
  timePickerLocale: I({}, $S)
}, Uo = "${label} is not a valid ${type}", Ta = {
  locale: "en",
  Pagination: vE,
  DatePicker: kd,
  TimePicker: $S,
  Calendar: kd,
  global: {
    placeholder: "Please select"
  },
  Table: {
    filterTitle: "Filter menu",
    filterConfirm: "OK",
    filterReset: "Reset",
    filterEmptyText: "No filters",
    filterCheckall: "Select all items",
    filterSearchPlaceholder: "Search in filters",
    emptyText: "No data",
    selectAll: "Select current page",
    selectInvert: "Invert current page",
    selectNone: "Clear all data",
    selectionAll: "Select all data",
    sortTitle: "Sort",
    expand: "Expand row",
    collapse: "Collapse row",
    triggerDesc: "Click to sort descending",
    triggerAsc: "Click to sort ascending",
    cancelSort: "Click to cancel sorting"
  },
  Tour: {
    Next: "Next",
    Previous: "Previous",
    Finish: "Finish"
  },
  Modal: {
    okText: "OK",
    cancelText: "Cancel",
    justOkText: "OK"
  },
  Popconfirm: {
    okText: "OK",
    cancelText: "Cancel"
  },
  Transfer: {
    titles: ["", ""],
    searchPlaceholder: "Search here",
    itemUnit: "item",
    itemsUnit: "items",
    remove: "Remove",
    selectCurrent: "Select current page",
    removeCurrent: "Remove current page",
    selectAll: "Select all data",
    removeAll: "Remove all data",
    selectInvert: "Invert current page"
  },
  Upload: {
    uploading: "Uploading...",
    removeFile: "Remove file",
    uploadError: "Upload error",
    previewFile: "Preview file",
    downloadFile: "Download file"
  },
  Empty: {
    description: "No data"
  },
  Icon: {
    icon: "icon"
  },
  Text: {
    edit: "Edit",
    copy: "Copy",
    copied: "Copied",
    expand: "Expand"
  },
  PageHeader: {
    back: "Back"
  },
  Form: {
    optional: "(optional)",
    defaultValidateMessages: {
      default: "Field validation error for ${label}",
      required: "Please enter ${label}",
      enum: "${label} must be one of [${enum}]",
      whitespace: "${label} cannot be a blank character",
      date: {
        format: "${label} date format is invalid",
        parse: "${label} cannot be converted to a date",
        invalid: "${label} is an invalid date"
      },
      types: {
        string: Uo,
        method: Uo,
        array: Uo,
        object: Uo,
        number: Uo,
        date: Uo,
        boolean: Uo,
        integer: Uo,
        float: Uo,
        regexp: Uo,
        email: Uo,
        url: Uo,
        hex: Uo
      },
      string: {
        len: "${label} must be ${len} characters",
        min: "${label} must be at least ${min} characters",
        max: "${label} must be up to ${max} characters",
        range: "${label} must be between ${min}-${max} characters"
      },
      number: {
        len: "${label} must be equal to ${len}",
        min: "${label} must be minimum ${min}",
        max: "${label} must be maximum ${max}",
        range: "${label} must be between ${min}-${max}"
      },
      array: {
        len: "Must be ${len} ${label}",
        min: "At least ${min} ${label}",
        max: "At most ${max} ${label}",
        range: "The amount of ${label} must be between ${min}-${max}"
      },
      pattern: {
        mismatch: "${label} does not match the pattern ${pattern}"
      }
    }
  },
  Image: {
    preview: "Preview"
  },
  QRCode: {
    expired: "QR code expired",
    refresh: "Refresh",
    scanned: "Scanned"
  }
}, PS = ye({
  compatConfig: {
    MODE: 3
  },
  name: "LocaleReceiver",
  props: {
    componentName: String,
    defaultLocale: {
      type: [Object, Function]
    },
    children: {
      type: Function
    }
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = Tt("localeData", {}), i = R(() => {
      const {
        componentName: a = "global",
        defaultLocale: l
      } = e, s = l || Ta[a || "global"], {
        antLocale: u
      } = o, c = a && u ? u[a] : {};
      return I(I({}, typeof s == "function" ? s() : s), c || {});
    }), r = R(() => {
      const {
        antLocale: a
      } = o, l = a && a.locale;
      return a && a.exist && !l ? Ta.locale : l;
    });
    return () => {
      const a = e.children || n.default, {
        antLocale: l
      } = o;
      return a?.(i.value, r.value, l);
    };
  }
});
function Bs(e, t, n) {
  const o = Tt("localeData", {});
  return [R(() => {
    const {
      antLocale: r
    } = o, a = M(t) || Ta[e || "global"], l = e && r ? r[e] : {};
    return I(I(I({}, typeof a == "function" ? a() : a), l || {}), M(n) || {});
  })];
}
function hv(e) {
  for (var t = 0, n, o = 0, i = e.length; i >= 4; ++o, i -= 4)
    n = e.charCodeAt(o) & 255 | (e.charCodeAt(++o) & 255) << 8 | (e.charCodeAt(++o) & 255) << 16 | (e.charCodeAt(++o) & 255) << 24, n = /* Math.imul(k, m): */
    (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16), n ^= /* k >>> r: */
    n >>> 24, t = /* Math.imul(k, m): */
    (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
    (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
  switch (i) {
    case 3:
      t ^= (e.charCodeAt(o + 2) & 255) << 16;
    case 2:
      t ^= (e.charCodeAt(o + 1) & 255) << 8;
    case 1:
      t ^= e.charCodeAt(o) & 255, t = /* Math.imul(h, m): */
      (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
  }
  return t ^= t >>> 13, t = /* Math.imul(h, m): */
  (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16), ((t ^ t >>> 15) >>> 0).toString(36);
}
const s0 = "%";
class bE {
  constructor(t) {
    this.cache = /* @__PURE__ */ new Map(), this.instanceId = t;
  }
  get(t) {
    return this.cache.get(Array.isArray(t) ? t.join(s0) : t) || null;
  }
  update(t, n) {
    const o = Array.isArray(t) ? t.join(s0) : t, i = this.cache.get(o), r = n(i);
    r === null ? this.cache.delete(o) : this.cache.set(o, r);
  }
}
const OS = "data-token-hash", dl = "data-css-hash", yE = "data-cache-path", os = "__cssinjs_instance__";
function Nu() {
  const e = Math.random().toString(12).slice(2);
  if (typeof document < "u" && document.head && document.body) {
    const t = document.body.querySelectorAll(`style[${dl}]`) || [], {
      firstChild: n
    } = document.head;
    Array.from(t).forEach((i) => {
      i[os] = i[os] || e, i[os] === e && document.head.insertBefore(i, n);
    });
    const o = {};
    Array.from(document.querySelectorAll(`style[${dl}]`)).forEach((i) => {
      var r;
      const a = i.getAttribute(dl);
      o[a] ? i[os] === e && ((r = i.parentNode) === null || r === void 0 || r.removeChild(i)) : o[a] = !0;
    });
  }
  return new bE(e);
}
const IS = Symbol("StyleContextKey"), xE = () => {
  var e, t, n;
  const o = ci();
  let i;
  if (o && o.appContext) {
    const r = (n = (t = (e = o.appContext) === null || e === void 0 ? void 0 : e.config) === null || t === void 0 ? void 0 : t.globalProperties) === null || n === void 0 ? void 0 : n.__ANTDV_CSSINJS_CACHE__;
    r ? i = r : (i = Nu(), o.appContext.config.globalProperties && (o.appContext.config.globalProperties.__ANTDV_CSSINJS_CACHE__ = i));
  } else
    i = Nu();
  return i;
}, MS = {
  cache: Nu(),
  defaultCache: !0,
  hashPriority: "low"
}, df = () => {
  const e = xE();
  return Tt(IS, Pe(I(I({}, MS), {
    cache: e
  })));
}, wE = (e) => {
  const t = df(), n = Pe(I(I({}, MS), {
    cache: Nu()
  }));
  return Ie([() => M(e), t], () => {
    const o = I({}, t.value), i = M(e);
    Object.keys(i).forEach((a) => {
      const l = i[a];
      i[a] !== void 0 && (o[a] = l);
    });
    const {
      cache: r
    } = i;
    o.cache = o.cache || Nu(), o.defaultCache = !r && t.value.defaultCache, n.value = o;
  }, {
    immediate: !0
  }), kt(IS, n), n;
}, SE = () => ({
  autoClear: st(),
  /** @private Test only. Not work in production. */
  mock: dn(),
  /**
   * Only set when you need ssr to extract style on you own.
   * If not provided, it will auto create <style /> on the end of Provider in server side.
   */
  cache: Ct(),
  /** Tell children that this context is default generated context */
  defaultCache: st(),
  /** Use `:where` selector to reduce hashId css selector priority */
  hashPriority: dn(),
  /** Tell cssinjs where to inject style in */
  container: tn(),
  /** Component wil render inline  `<style />` for fallback in SSR. Not recommend. */
  ssrInline: st(),
  /** Transform css before inject in document. Please note that `transformers` do not support dynamic update */
  transformers: Po(),
  /**
   * Linters to lint css before inject in document.
   * Styles will be linted after transforming.
   * Please note that `linters` do not support dynamic update.
   */
  linters: Po()
});
er(ye({
  name: "AStyleProvider",
  inheritAttrs: !1,
  props: SE(),
  setup(e, t) {
    let {
      slots: n
    } = t;
    return wE(e), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
}));
function CE() {
  return !1;
}
let Rg = !1;
function $E() {
  return Rg;
}
const PE = process.env.NODE_ENV === "production" ? CE : $E;
if (process.env.NODE_ENV !== "production" && typeof module < "u" && module && module.hot && typeof window < "u") {
  const e = window;
  if (typeof e.webpackHotUpdate == "function") {
    const t = e.webpackHotUpdate;
    e.webpackHotUpdate = function() {
      return Rg = !0, setTimeout(() => {
        Rg = !1;
      }, 0), t(...arguments);
    };
  }
}
function TS(e, t, n, o) {
  const i = df(), r = Pe(""), a = Pe();
  Lt(() => {
    r.value = [e, ...t.value].join("%");
  });
  const l = PE(), s = (u) => {
    i.value.cache.update(u, (c) => {
      const [d = 0, f] = c || [];
      return d - 1 === 0 ? (o?.(f, !1), null) : [d - 1, f];
    });
  };
  return Ie(r, (u, c) => {
    c && s(c), i.value.cache.update(u, (d) => {
      const [f = 0, p] = d || [];
      let m = p;
      process.env.NODE_ENV !== "production" && p && l && (o?.(m, l), m = null);
      const b = m || n();
      return [f + 1, b];
    }), a.value = i.value.cache.get(r.value)[1];
  }, {
    immediate: !0
  }), At(() => {
    s(r.value);
  }), a;
}
function ki() {
  return !!(typeof window < "u" && window.document && window.document.createElement);
}
function ma(e, t) {
  return e && e.contains ? e.contains(t) : !1;
}
const u0 = "data-vc-order", OE = "vc-util-key", Ng = /* @__PURE__ */ new Map();
function kS() {
  let {
    mark: e
  } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
  return e ? e.startsWith("data-") ? e : `data-${e}` : OE;
}
function ff(e) {
  return e.attachTo ? e.attachTo : document.querySelector("head") || document.body;
}
function IE(e) {
  return e === "queue" ? "prependQueue" : e ? "prepend" : "append";
}
function ES(e) {
  return Array.from((Ng.get(e) || e).children).filter((t) => t.tagName === "STYLE");
}
function _S(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  if (!ki())
    return null;
  const {
    csp: n,
    prepend: o
  } = t, i = document.createElement("style");
  i.setAttribute(u0, IE(o)), n?.nonce && (i.nonce = n?.nonce), i.innerHTML = e;
  const r = ff(t), {
    firstChild: a
  } = r;
  if (o) {
    if (o === "queue") {
      const l = ES(r).filter((s) => ["prepend", "prependQueue"].includes(s.getAttribute(u0)));
      if (l.length)
        return r.insertBefore(i, l[l.length - 1].nextSibling), i;
    }
    r.insertBefore(i, a);
  } else
    r.appendChild(i);
  return i;
}
function AS(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  const n = ff(t);
  return ES(n).find((o) => o.getAttribute(kS(t)) === e);
}
function Ed(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  const n = AS(e, t);
  n && ff(t).removeChild(n);
}
function ME(e, t) {
  const n = Ng.get(e);
  if (!n || !ma(document, n)) {
    const o = _S("", t), {
      parentNode: i
    } = o;
    Ng.set(e, i), e.removeChild(o);
  }
}
function Bu(e, t) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  var o, i, r;
  const a = ff(n);
  ME(a, n);
  const l = AS(t, n);
  if (l)
    return !((o = n.csp) === null || o === void 0) && o.nonce && l.nonce !== ((i = n.csp) === null || i === void 0 ? void 0 : i.nonce) && (l.nonce = (r = n.csp) === null || r === void 0 ? void 0 : r.nonce), l.innerHTML !== e && (l.innerHTML = e), l;
  const s = _S(e, n);
  return s.setAttribute(kS(n), t), s;
}
function TE(e, t) {
  if (e.length !== t.length)
    return !1;
  for (let n = 0; n < e.length; n++)
    if (e[n] !== t[n])
      return !1;
  return !0;
}
class $s {
  constructor() {
    this.cache = /* @__PURE__ */ new Map(), this.keys = [], this.cacheCallTimes = 0;
  }
  size() {
    return this.keys.length;
  }
  internalGet(t) {
    let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, o = {
      map: this.cache
    };
    return t.forEach((i) => {
      var r;
      o ? o = (r = o?.map) === null || r === void 0 ? void 0 : r.get(i) : o = void 0;
    }), o?.value && n && (o.value[1] = this.cacheCallTimes++), o?.value;
  }
  get(t) {
    var n;
    return (n = this.internalGet(t, !0)) === null || n === void 0 ? void 0 : n[0];
  }
  has(t) {
    return !!this.internalGet(t);
  }
  set(t, n) {
    if (!this.has(t)) {
      if (this.size() + 1 > $s.MAX_CACHE_SIZE + $s.MAX_CACHE_OFFSET) {
        const [i] = this.keys.reduce((r, a) => {
          const [, l] = r;
          return this.internalGet(a)[1] < l ? [a, this.internalGet(a)[1]] : r;
        }, [this.keys[0], this.cacheCallTimes]);
        this.delete(i);
      }
      this.keys.push(t);
    }
    let o = this.cache;
    t.forEach((i, r) => {
      if (r === t.length - 1)
        o.set(i, {
          value: [n, this.cacheCallTimes++]
        });
      else {
        const a = o.get(i);
        a ? a.map || (a.map = /* @__PURE__ */ new Map()) : o.set(i, {
          map: /* @__PURE__ */ new Map()
        }), o = o.get(i).map;
      }
    });
  }
  deleteByPath(t, n) {
    var o;
    const i = t.get(n[0]);
    if (n.length === 1)
      return i.map ? t.set(n[0], {
        map: i.map
      }) : t.delete(n[0]), (o = i.value) === null || o === void 0 ? void 0 : o[0];
    const r = this.deleteByPath(i.map, n.slice(1));
    return (!i.map || i.map.size === 0) && !i.value && t.delete(n[0]), r;
  }
  delete(t) {
    if (this.has(t))
      return this.keys = this.keys.filter((n) => !TE(n, t)), this.deleteByPath(this.cache, t);
  }
}
$s.MAX_CACHE_SIZE = 20;
$s.MAX_CACHE_OFFSET = 5;
let Bg = {};
function yo(e, t) {
  process.env.NODE_ENV !== "production" && !e && console !== void 0 && console.error(`Warning: ${t}`);
}
function kE(e, t) {
  process.env.NODE_ENV !== "production" && !e && console !== void 0 && console.warn(`Note: ${t}`);
}
function EE() {
  Bg = {};
}
function DS(e, t, n) {
  !t && !Bg[n] && (e(!1, n), Bg[n] = !0);
}
function ei(e, t) {
  DS(yo, e, t);
}
function Lg(e, t) {
  DS(kE, e, t);
}
function _E() {
}
let Zn = _E;
process.env.NODE_ENV !== "production" && (Zn = (e, t, n) => {
  ei(e, `[ant-design-vue: ${t}] ${n}`), process.env.NODE_ENV === "test" && EE();
});
let c0 = 0;
class zS {
  constructor(t) {
    this.derivatives = Array.isArray(t) ? t : [t], this.id = c0, t.length === 0 && Zn(t.length > 0, "[Ant Design Vue CSS-in-JS] Theme should have at least one derivative function."), c0 += 1;
  }
  getDerivativeToken(t) {
    return this.derivatives.reduce((n, o) => o(t, n), void 0);
  }
}
const fp = new $s();
function RS(e) {
  const t = Array.isArray(e) ? e : [e];
  return fp.has(t) || fp.set(t, new zS(t)), fp.get(t);
}
const d0 = /* @__PURE__ */ new WeakMap();
function _d(e) {
  let t = d0.get(e) || "";
  return t || (Object.keys(e).forEach((n) => {
    const o = e[n];
    t += n, o instanceof zS ? t += o.id : o && typeof o == "object" ? t += _d(o) : t += o;
  }), d0.set(e, t)), t;
}
function AE(e, t) {
  return hv(`${t}_${_d(e)}`);
}
const Cu = `random-${Date.now()}-${Math.random()}`.replace(/\./g, ""), NS = "_bAmBoO_";
function DE(e, t, n) {
  var o, i;
  if (ki()) {
    Bu(e, Cu);
    const r = document.createElement("div");
    r.style.position = "fixed", r.style.left = "0", r.style.top = "0", t?.(r), document.body.appendChild(r), process.env.NODE_ENV !== "production" && (r.innerHTML = "Test", r.style.zIndex = "9999999");
    const a = n ? n(r) : (o = getComputedStyle(r).content) === null || o === void 0 ? void 0 : o.includes(NS);
    return (i = r.parentNode) === null || i === void 0 || i.removeChild(r), Ed(Cu), a;
  }
  return !1;
}
let pp;
function zE() {
  return pp === void 0 && (pp = DE(`@layer ${Cu} { .${Cu} { content: "${NS}"!important; } }`, (e) => {
    e.className = Cu;
  })), pp;
}
const f0 = {}, RE = process.env.NODE_ENV === "production", NE = process.env.NODE_ENV === "prerender", BE = !RE && !NE ? "css-dev-only-do-not-override" : "css", ol = /* @__PURE__ */ new Map();
function LE(e) {
  ol.set(e, (ol.get(e) || 0) + 1);
}
function FE(e, t) {
  typeof document < "u" && document.querySelectorAll(`style[${OS}="${e}"]`).forEach((o) => {
    var i;
    o[os] === t && ((i = o.parentNode) === null || i === void 0 || i.removeChild(o));
  });
}
const HE = 0;
function VE(e, t) {
  ol.set(e, (ol.get(e) || 0) - 1);
  const n = Array.from(ol.keys()), o = n.filter((i) => (ol.get(i) || 0) <= 0);
  n.length - o.length > HE && o.forEach((i) => {
    FE(i, t), ol.delete(i);
  });
}
const jE = (e, t, n, o) => {
  const i = n.getDerivativeToken(e);
  let r = I(I({}, i), t);
  return o && (r = o(r)), r;
};
function WE(e, t) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : le({});
  const o = df(), i = R(() => I({}, ...t.value)), r = R(() => _d(i.value)), a = R(() => _d(n.value.override || f0));
  return TS("token", R(() => [n.value.salt || "", e.value.id, r.value, a.value]), () => {
    const {
      salt: s = "",
      override: u = f0,
      formatToken: c,
      getComputedToken: d
    } = n.value, f = d ? d(i.value, u, e.value) : jE(i.value, u, e.value, c), p = AE(f, s);
    f._tokenKey = p, LE(p);
    const m = `${BE}-${hv(p)}`;
    return f._hashId = m, [f, m];
  }, (s) => {
    var u;
    VE(s[0]._tokenKey, (u = o.value) === null || u === void 0 ? void 0 : u.cache.instanceId);
  });
}
var qE = {
  animationIterationCount: 1,
  aspectRatio: 1,
  borderImageOutset: 1,
  borderImageSlice: 1,
  borderImageWidth: 1,
  boxFlex: 1,
  boxFlexGroup: 1,
  boxOrdinalGroup: 1,
  columnCount: 1,
  columns: 1,
  flex: 1,
  flexGrow: 1,
  flexPositive: 1,
  flexShrink: 1,
  flexNegative: 1,
  flexOrder: 1,
  gridRow: 1,
  gridRowEnd: 1,
  gridRowSpan: 1,
  gridRowStart: 1,
  gridColumn: 1,
  gridColumnEnd: 1,
  gridColumnSpan: 1,
  gridColumnStart: 1,
  msGridRow: 1,
  msGridRowSpan: 1,
  msGridColumn: 1,
  msGridColumnSpan: 1,
  fontWeight: 1,
  lineHeight: 1,
  opacity: 1,
  order: 1,
  orphans: 1,
  tabSize: 1,
  widows: 1,
  zIndex: 1,
  zoom: 1,
  WebkitLineClamp: 1,
  // SVG-related properties
  fillOpacity: 1,
  floodOpacity: 1,
  stopOpacity: 1,
  strokeDasharray: 1,
  strokeDashoffset: 1,
  strokeMiterlimit: 1,
  strokeOpacity: 1,
  strokeWidth: 1
}, BS = "comm", LS = "rule", FS = "decl", GE = "@import", KE = "@namespace", YE = "@keyframes", UE = "@layer", XE = Math.abs, $u = String.fromCharCode;
function HS(e) {
  return e.trim();
}
function Fg(e, t, n) {
  return e.replace(t, n);
}
function as(e, t) {
  return e.charCodeAt(t) | 0;
}
function Ps(e, t, n) {
  return e.slice(t, n);
}
function gr(e) {
  return e.length;
}
function QE(e) {
  return e.length;
}
function Pc(e, t) {
  return t.push(e), e;
}
var pf = 1, Os = 1, VS = 0, Ei = 0, to = 0, Ls = "";
function vv(e, t, n, o, i, r, a, l) {
  return { value: e, root: t, parent: n, type: o, props: i, children: r, line: pf, column: Os, length: a, return: "", siblings: l };
}
function ZE() {
  return to;
}
function JE() {
  return to = Ei > 0 ? as(Ls, --Ei) : 0, Os--, to === 10 && (Os = 1, pf--), to;
}
function Ki() {
  return to = Ei < VS ? as(Ls, Ei++) : 0, Os++, to === 10 && (Os = 1, pf++), to;
}
function xa() {
  return as(Ls, Ei);
}
function rd() {
  return Ei;
}
function gf(e, t) {
  return Ps(Ls, e, t);
}
function Lu(e) {
  switch (e) {
    // \0 \t \n \r \s whitespace token
    case 0:
    case 9:
    case 10:
    case 13:
    case 32:
      return 5;
    // ! + , / > @ ~ isolate token
    case 33:
    case 43:
    case 44:
    case 47:
    case 62:
    case 64:
    case 126:
    // ; { } breakpoint token
    case 59:
    case 123:
    case 125:
      return 4;
    // : accompanied token
    case 58:
      return 3;
    // " ' ( [ opening delimit token
    case 34:
    case 39:
    case 40:
    case 91:
      return 2;
    // ) ] closing delimit token
    case 41:
    case 93:
      return 1;
  }
  return 0;
}
function e_(e) {
  return pf = Os = 1, VS = gr(Ls = e), Ei = 0, [];
}
function t_(e) {
  return Ls = "", e;
}
function gp(e) {
  return HS(gf(Ei - 1, Hg(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
}
function n_(e) {
  for (; (to = xa()) && to < 33; )
    Ki();
  return Lu(e) > 2 || Lu(to) > 3 ? "" : " ";
}
function o_(e, t) {
  for (; --t && Ki() && !(to < 48 || to > 102 || to > 57 && to < 65 || to > 70 && to < 97); )
    ;
  return gf(e, rd() + (t < 6 && xa() == 32 && Ki() == 32));
}
function Hg(e) {
  for (; Ki(); )
    switch (to) {
      // ] ) " '
      case e:
        return Ei;
      // " '
      case 34:
      case 39:
        e !== 34 && e !== 39 && Hg(to);
        break;
      // (
      case 40:
        e === 41 && Hg(e);
        break;
      // \
      case 92:
        Ki();
        break;
    }
  return Ei;
}
function i_(e, t) {
  for (; Ki() && e + to !== 57; )
    if (e + to === 84 && xa() === 47)
      break;
  return "/*" + gf(t, Ei - 1) + "*" + $u(e === 47 ? e : Ki());
}
function r_(e) {
  for (; !Lu(xa()); )
    Ki();
  return gf(e, Ei);
}
function a_(e) {
  return t_(ad("", null, null, null, [""], e = e_(e), 0, [0], e));
}
function ad(e, t, n, o, i, r, a, l, s) {
  for (var u = 0, c = 0, d = a, f = 0, p = 0, m = 0, b = 1, y = 1, S = 1, C = 0, O = 0, $ = "", P = i, k = r, x = o, E = $; y; )
    switch (m = O, O = Ki()) {
      // (
      case 40:
        m != 108 && as(E, d - 1) == 58 ? (C++, E += "(") : E += gp(O);
        break;
      // )
      case 41:
        C--, E += ")";
        break;
      // " ' [
      case 34:
      case 39:
      case 91:
        E += gp(O);
        break;
      // \t \n \r \s
      case 9:
      case 10:
      case 13:
      case 32:
        if (C > 0) {
          E += $u(O);
          break;
        }
        E += n_(m);
        break;
      // \
      case 92:
        E += o_(rd() - 1, 7);
        continue;
      // /
      case 47:
        switch (xa()) {
          case 42:
          case 47:
            Pc(l_(i_(Ki(), rd()), t, n, s), s), (Lu(m || 1) == 5 || Lu(xa() || 1) == 5) && gr(E) && Ps(E, -1, void 0) !== " " && (E += " ");
            break;
          default:
            E += "/";
        }
        break;
      // {
      case 123 * b:
        l[u++] = gr(E) * S;
      // } ; \0
      case 125 * b:
      case 59:
      case 0:
        if (C > 0 && O) {
          E += $u(O);
          break;
        }
        switch (O) {
          // \0 }
          case 0:
          case 125:
            y = 0;
          // ;
          case 59 + c:
            S == -1 && (E = Fg(E, /\f/g, "")), p > 0 && (gr(E) - d || b === 0) && Pc(p > 32 ? g0(E + ";", o, n, d - 1, s) : g0(Fg(E, " ", "") + ";", o, n, d - 2, s), s);
            break;
          // @ ;
          case 59:
            E += ";";
          // { rule/at-rule
          default:
            if (Pc(x = p0(E, t, n, u, c, i, l, $, P = [], k = [], d, r), r), O === 123)
              if (c === 0)
                ad(E, t, x, x, P, r, d, l, k);
              else {
                switch (f) {
                  // c(ontainer)
                  case 99:
                    if (as(E, 3) === 110) break;
                  // l(ayer)
                  case 108:
                    if (as(E, 2) === 97) break;
                  default:
                    c = 0;
                  // d(ocument) m(edia) s(upports)
                  case 100:
                  case 109:
                  case 115:
                }
                c ? ad(e, x, x, o && Pc(p0(e, x, x, 0, 0, i, l, $, i, P = [], d, k), k), i, k, d, l, o ? P : k) : ad(E, x, x, x, [""], k, 0, l, k);
              }
        }
        u = c = p = 0, b = S = 1, $ = E = "", d = a;
        break;
      // :
      case 58:
        d = 1 + gr(E), p = m;
      default:
        if (b < 1) {
          if (O == 123)
            --b;
          else if (O == 125 && b++ == 0 && JE() == 125)
            continue;
        }
        switch (E += $u(O), O * b) {
          // &
          case 38:
            S = c > 0 ? 1 : (E += "\f", -1);
            break;
          // ,
          case 44:
            if (C > 0) break;
            l[u++] = (gr(E) - 1) * S, S = 1;
            break;
          // @
          case 64:
            xa() === 45 && (E += gp(Ki())), f = xa(), c = d = gr($ = E += r_(rd())), O++;
            break;
          // -
          case 45:
            m === 45 && gr(E) == 2 && (b = 0);
        }
    }
  return r;
}
function p0(e, t, n, o, i, r, a, l, s, u, c, d) {
  for (var f = i - 1, p = i === 0 ? r : [""], m = QE(p), b = 0, y = 0, S = 0; b < o; ++b)
    for (var C = 0, O = Ps(e, f + 1, f = XE(y = a[b])), $ = e; C < m; ++C)
      ($ = HS(y > 0 ? p[C] + " " + O : Fg(O, /&\f/g, p[C]))) && (s[S++] = $);
  return vv(e, t, n, i === 0 ? LS : l, s, u, c, d);
}
function l_(e, t, n, o) {
  return vv(e, t, n, BS, $u(ZE()), Ps(e, 2, -2), 0, o);
}
function g0(e, t, n, o, i) {
  return vv(e, t, n, FS, Ps(e, 0, o), Ps(e, o + 1, -1), o, i);
}
function Vg(e, t) {
  for (var n = "", o = 0; o < e.length; o++)
    n += t(e[o], o, e, t) || "";
  return n;
}
function s_(e, t, n, o) {
  switch (e.type) {
    case UE:
      if (e.children.length) break;
    case GE:
    case KE:
    case FS:
      return e.return = e.return || e.value;
    case BS:
      return "";
    case YE:
      return e.return = e.value + "{" + Vg(e.children, o) + "}";
    case LS:
      if (!gr(e.value = e.props.join(","))) return "";
  }
  return gr(n = Vg(e.children, o)) ? e.return = e.value + "{" + n + "}" : "";
}
function jS(e, t) {
  const {
    path: n,
    parentSelectors: o
  } = t;
  ei(!1, `[Ant Design Vue CSS-in-JS] ${n ? `Error in '${n}': ` : ""}${e}${o.length ? ` Selector info: ${o.join(" -> ")}` : ""}`);
}
const u_ = (e, t, n) => {
  if (e === "content") {
    const o = /(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;
    (typeof t != "string" || ["normal", "none", "initial", "inherit", "unset"].indexOf(t) === -1 && !o.test(t) && (t.charAt(0) !== t.charAt(t.length - 1) || t.charAt(0) !== '"' && t.charAt(0) !== "'")) && jS(`You seem to be using a value for 'content' without quotes, try replacing it with \`content: '"${t}"'\`.`, n);
  }
}, c_ = (e, t, n) => {
  e === "animation" && n.hashId && t !== "none" && jS(`You seem to be using hashed animation '${t}', in which case 'animationName' with Keyframe as value is recommended.`, n);
}, h0 = "data-ant-cssinjs-cache-path", d_ = "_FILE_STYLE__";
let fl, WS = !0;
function f_() {
  var e;
  if (!fl && (fl = {}, ki())) {
    const t = document.createElement("div");
    t.className = h0, t.style.position = "fixed", t.style.visibility = "hidden", t.style.top = "-9999px", document.body.appendChild(t);
    let n = getComputedStyle(t).content || "";
    n = n.replace(/^"/, "").replace(/"$/, ""), n.split(";").forEach((i) => {
      const [r, a] = i.split(":");
      fl[r] = a;
    });
    const o = document.querySelector(`style[${h0}]`);
    o && (WS = !1, (e = o.parentNode) === null || e === void 0 || e.removeChild(o)), document.body.removeChild(t);
  }
}
function p_(e) {
  return f_(), !!fl[e];
}
function g_(e) {
  const t = fl[e];
  let n = null;
  if (t && ki())
    if (WS)
      n = d_;
    else {
      const o = document.querySelector(`style[${dl}="${fl[e]}"]`);
      o ? n = o.innerHTML : delete fl[e];
    }
  return [n, t];
}
const v0 = ki(), qS = "_skip_check_", GS = "_multi_value_";
function m0(e) {
  return Vg(a_(e), s_).replace(/\{%%%\:[^;];}/g, ";");
}
function h_(e) {
  return typeof e == "object" && e && (qS in e || GS in e);
}
function v_(e, t, n) {
  if (!t)
    return e;
  const o = `.${t}`, i = n === "low" ? `:where(${o})` : o;
  return e.split(",").map((a) => {
    var l;
    const s = a.trim().split(/\s+/);
    let u = s[0] || "";
    const c = ((l = u.match(/^\w+/)) === null || l === void 0 ? void 0 : l[0]) || "";
    return u = `${c}${i}${u.slice(c.length)}`, [u, ...s.slice(1)].join(" ");
  }).join(",");
}
const jg = /* @__PURE__ */ new Set();
process.env.NODE_ENV;
const Wg = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, {
    root: n,
    injectHash: o,
    parentSelectors: i
  } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
    root: !0,
    parentSelectors: []
  };
  const {
    hashId: r,
    layer: a,
    path: l,
    hashPriority: s,
    transformers: u = [],
    linters: c = []
  } = t;
  let d = "", f = {};
  function p(y) {
    const S = y.getName(r);
    if (!f[S]) {
      const [C] = Wg(y.style, t, {
        root: !1,
        parentSelectors: i
      });
      f[S] = `@keyframes ${y.getName(r)}${C}`;
    }
  }
  function m(y) {
    let S = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
    return y.forEach((C) => {
      Array.isArray(C) ? m(C, S) : C && S.push(C);
    }), S;
  }
  if (m(Array.isArray(e) ? e : [e]).forEach((y) => {
    const S = typeof y == "string" && !n ? {} : y;
    if (typeof S == "string")
      d += `${S}
`;
    else if (S._keyframe)
      p(S);
    else {
      const C = u.reduce((O, $) => {
        var P;
        return ((P = $?.visit) === null || P === void 0 ? void 0 : P.call($, O)) || O;
      }, S);
      Object.keys(C).forEach((O) => {
        var $;
        const P = C[O];
        if (typeof P == "object" && P && (O !== "animationName" || !P._keyframe) && !h_(P)) {
          let k = !1, x = O.trim(), E = !1;
          (n || o) && r ? x.startsWith("@") ? k = !0 : x = v_(O, r, s) : n && !r && (x === "&" || x === "") && (x = "", E = !0);
          const [z, N] = Wg(P, t, {
            root: E,
            injectHash: k,
            parentSelectors: [...i, x]
          });
          f = I(I({}, f), N), d += `${x}${z}`;
        } else {
          let k = function(E, z) {
            process.env.NODE_ENV !== "production" && (typeof P != "object" || !P?.[qS]) && [u_, c_, ...c].forEach((W) => W(E, z, {
              path: l,
              hashId: r,
              parentSelectors: i
            }));
            const N = E.replace(/[A-Z]/g, (W) => `-${W.toLowerCase()}`);
            let D = z;
            !qE[E] && typeof D == "number" && D !== 0 && (D = `${D}px`), E === "animationName" && z?._keyframe && (p(z), D = z.getName(r)), d += `${N}:${D};`;
          };
          const x = ($ = P?.value) !== null && $ !== void 0 ? $ : P;
          typeof P == "object" && P?.[GS] && Array.isArray(x) ? x.forEach((E) => {
            k(O, E);
          }) : k(O, x);
        }
      });
    }
  }), !n)
    d = `{${d}}`;
  else if (a && zE()) {
    const y = a.split(",");
    d = `@layer ${y[y.length - 1].trim()} {${d}}`, y.length > 1 && (d = `@layer ${a}{%%%:%}${d}`);
  }
  return [d, f];
};
function m_(e, t) {
  return hv(`${e.join("%")}${t}`);
}
function qg(e, t) {
  const n = df(), o = R(() => e.value.token._tokenKey), i = R(() => [o.value, ...e.value.path]);
  let r = v0;
  return process.env.NODE_ENV !== "production" && n.value.mock !== void 0 && (r = n.value.mock === "client"), TS(
    "style",
    i,
    // Create cache if needed
    () => {
      const {
        path: a,
        hashId: l,
        layer: s,
        nonce: u,
        clientOnly: c,
        order: d = 0
      } = e.value, f = i.value.join("|");
      if (p_(f)) {
        const [x, E] = g_(f);
        if (x)
          return [x, o.value, E, {}, c, d];
      }
      const p = t(), {
        hashPriority: m,
        container: b,
        transformers: y,
        linters: S,
        cache: C
      } = n.value, [O, $] = Wg(p, {
        hashId: l,
        hashPriority: m,
        layer: s,
        path: a.join("-"),
        transformers: y,
        linters: S
      }), P = m0(O), k = m_(i.value, P);
      if (r) {
        const x = {
          mark: dl,
          prepend: "queue",
          attachTo: b,
          priority: d
        }, E = typeof u == "function" ? u() : u;
        E && (x.csp = {
          nonce: E
        });
        const z = Bu(P, k, x);
        z[os] = C.instanceId, z.setAttribute(OS, o.value), process.env.NODE_ENV !== "production" && z.setAttribute(yE, i.value.join("|")), Object.keys($).forEach((N) => {
          jg.has(N) || (jg.add(N), Bu(m0($[N]), `_effect-${N}`, {
            mark: dl,
            prepend: "queue",
            attachTo: b
          }));
        });
      }
      return [P, o.value, k, $, c, d];
    },
    // Remove cache if no need
    (a, l) => {
      let [, , s] = a;
      (l || n.value.autoClear) && v0 && Ed(s, {
        mark: dl
      });
    }
  ), (a) => a;
}
class Bt {
  constructor(t, n) {
    this._keyframe = !0, this.name = t, this.style = n;
  }
  getName() {
    let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
    return t ? `${t}-${this.name}` : this.name;
  }
}
const b_ = "4.2.6", Fu = ["blue", "purple", "cyan", "green", "magenta", "pink", "red", "orange", "yellow", "volcano", "geekblue", "lime", "gold"];
function So(e, t) {
  y_(e) && (e = "100%");
  var n = x_(e);
  return e = t === 360 ? e : Math.min(t, Math.max(0, parseFloat(e))), n && (e = parseInt(String(e * t), 10) / 100), Math.abs(e - t) < 1e-6 ? 1 : (t === 360 ? e = (e < 0 ? e % t + t : e % t) / parseFloat(String(t)) : e = e % t / parseFloat(String(t)), e);
}
function Oc(e) {
  return Math.min(1, Math.max(0, e));
}
function y_(e) {
  return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1;
}
function x_(e) {
  return typeof e == "string" && e.indexOf("%") !== -1;
}
function KS(e) {
  return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
}
function Ic(e) {
  return e <= 1 ? "".concat(Number(e) * 100, "%") : e;
}
function al(e) {
  return e.length === 1 ? "0" + e : String(e);
}
function w_(e, t, n) {
  return {
    r: So(e, 255) * 255,
    g: So(t, 255) * 255,
    b: So(n, 255) * 255
  };
}
function b0(e, t, n) {
  e = So(e, 255), t = So(t, 255), n = So(n, 255);
  var o = Math.max(e, t, n), i = Math.min(e, t, n), r = 0, a = 0, l = (o + i) / 2;
  if (o === i)
    a = 0, r = 0;
  else {
    var s = o - i;
    switch (a = l > 0.5 ? s / (2 - o - i) : s / (o + i), o) {
      case e:
        r = (t - n) / s + (t < n ? 6 : 0);
        break;
      case t:
        r = (n - e) / s + 2;
        break;
      case n:
        r = (e - t) / s + 4;
        break;
    }
    r /= 6;
  }
  return { h: r, s: a, l };
}
function hp(e, t, n) {
  return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * (6 * n) : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
}
function S_(e, t, n) {
  var o, i, r;
  if (e = So(e, 360), t = So(t, 100), n = So(n, 100), t === 0)
    i = n, r = n, o = n;
  else {
    var a = n < 0.5 ? n * (1 + t) : n + t - n * t, l = 2 * n - a;
    o = hp(l, a, e + 1 / 3), i = hp(l, a, e), r = hp(l, a, e - 1 / 3);
  }
  return { r: o * 255, g: i * 255, b: r * 255 };
}
function Gg(e, t, n) {
  e = So(e, 255), t = So(t, 255), n = So(n, 255);
  var o = Math.max(e, t, n), i = Math.min(e, t, n), r = 0, a = o, l = o - i, s = o === 0 ? 0 : l / o;
  if (o === i)
    r = 0;
  else {
    switch (o) {
      case e:
        r = (t - n) / l + (t < n ? 6 : 0);
        break;
      case t:
        r = (n - e) / l + 2;
        break;
      case n:
        r = (e - t) / l + 4;
        break;
    }
    r /= 6;
  }
  return { h: r, s, v: a };
}
function C_(e, t, n) {
  e = So(e, 360) * 6, t = So(t, 100), n = So(n, 100);
  var o = Math.floor(e), i = e - o, r = n * (1 - t), a = n * (1 - i * t), l = n * (1 - (1 - i) * t), s = o % 6, u = [n, a, r, r, l, n][s], c = [l, n, n, a, r, r][s], d = [r, r, l, n, n, a][s];
  return { r: u * 255, g: c * 255, b: d * 255 };
}
function Kg(e, t, n, o) {
  var i = [
    al(Math.round(e).toString(16)),
    al(Math.round(t).toString(16)),
    al(Math.round(n).toString(16))
  ];
  return o && i[0].startsWith(i[0].charAt(1)) && i[1].startsWith(i[1].charAt(1)) && i[2].startsWith(i[2].charAt(1)) ? i[0].charAt(0) + i[1].charAt(0) + i[2].charAt(0) : i.join("");
}
function $_(e, t, n, o, i) {
  var r = [
    al(Math.round(e).toString(16)),
    al(Math.round(t).toString(16)),
    al(Math.round(n).toString(16)),
    al(P_(o))
  ];
  return i && r[0].startsWith(r[0].charAt(1)) && r[1].startsWith(r[1].charAt(1)) && r[2].startsWith(r[2].charAt(1)) && r[3].startsWith(r[3].charAt(1)) ? r[0].charAt(0) + r[1].charAt(0) + r[2].charAt(0) + r[3].charAt(0) : r.join("");
}
function P_(e) {
  return Math.round(parseFloat(e) * 255).toString(16);
}
function y0(e) {
  return Zo(e) / 255;
}
function Zo(e) {
  return parseInt(e, 16);
}
function O_(e) {
  return {
    r: e >> 16,
    g: (e & 65280) >> 8,
    b: e & 255
  };
}
var Yg = {
  aliceblue: "#f0f8ff",
  antiquewhite: "#faebd7",
  aqua: "#00ffff",
  aquamarine: "#7fffd4",
  azure: "#f0ffff",
  beige: "#f5f5dc",
  bisque: "#ffe4c4",
  black: "#000000",
  blanchedalmond: "#ffebcd",
  blue: "#0000ff",
  blueviolet: "#8a2be2",
  brown: "#a52a2a",
  burlywood: "#deb887",
  cadetblue: "#5f9ea0",
  chartreuse: "#7fff00",
  chocolate: "#d2691e",
  coral: "#ff7f50",
  cornflowerblue: "#6495ed",
  cornsilk: "#fff8dc",
  crimson: "#dc143c",
  cyan: "#00ffff",
  darkblue: "#00008b",
  darkcyan: "#008b8b",
  darkgoldenrod: "#b8860b",
  darkgray: "#a9a9a9",
  darkgreen: "#006400",
  darkgrey: "#a9a9a9",
  darkkhaki: "#bdb76b",
  darkmagenta: "#8b008b",
  darkolivegreen: "#556b2f",
  darkorange: "#ff8c00",
  darkorchid: "#9932cc",
  darkred: "#8b0000",
  darksalmon: "#e9967a",
  darkseagreen: "#8fbc8f",
  darkslateblue: "#483d8b",
  darkslategray: "#2f4f4f",
  darkslategrey: "#2f4f4f",
  darkturquoise: "#00ced1",
  darkviolet: "#9400d3",
  deeppink: "#ff1493",
  deepskyblue: "#00bfff",
  dimgray: "#696969",
  dimgrey: "#696969",
  dodgerblue: "#1e90ff",
  firebrick: "#b22222",
  floralwhite: "#fffaf0",
  forestgreen: "#228b22",
  fuchsia: "#ff00ff",
  gainsboro: "#dcdcdc",
  ghostwhite: "#f8f8ff",
  goldenrod: "#daa520",
  gold: "#ffd700",
  gray: "#808080",
  green: "#008000",
  greenyellow: "#adff2f",
  grey: "#808080",
  honeydew: "#f0fff0",
  hotpink: "#ff69b4",
  indianred: "#cd5c5c",
  indigo: "#4b0082",
  ivory: "#fffff0",
  khaki: "#f0e68c",
  lavenderblush: "#fff0f5",
  lavender: "#e6e6fa",
  lawngreen: "#7cfc00",
  lemonchiffon: "#fffacd",
  lightblue: "#add8e6",
  lightcoral: "#f08080",
  lightcyan: "#e0ffff",
  lightgoldenrodyellow: "#fafad2",
  lightgray: "#d3d3d3",
  lightgreen: "#90ee90",
  lightgrey: "#d3d3d3",
  lightpink: "#ffb6c1",
  lightsalmon: "#ffa07a",
  lightseagreen: "#20b2aa",
  lightskyblue: "#87cefa",
  lightslategray: "#778899",
  lightslategrey: "#778899",
  lightsteelblue: "#b0c4de",
  lightyellow: "#ffffe0",
  lime: "#00ff00",
  limegreen: "#32cd32",
  linen: "#faf0e6",
  magenta: "#ff00ff",
  maroon: "#800000",
  mediumaquamarine: "#66cdaa",
  mediumblue: "#0000cd",
  mediumorchid: "#ba55d3",
  mediumpurple: "#9370db",
  mediumseagreen: "#3cb371",
  mediumslateblue: "#7b68ee",
  mediumspringgreen: "#00fa9a",
  mediumturquoise: "#48d1cc",
  mediumvioletred: "#c71585",
  midnightblue: "#191970",
  mintcream: "#f5fffa",
  mistyrose: "#ffe4e1",
  moccasin: "#ffe4b5",
  navajowhite: "#ffdead",
  navy: "#000080",
  oldlace: "#fdf5e6",
  olive: "#808000",
  olivedrab: "#6b8e23",
  orange: "#ffa500",
  orangered: "#ff4500",
  orchid: "#da70d6",
  palegoldenrod: "#eee8aa",
  palegreen: "#98fb98",
  paleturquoise: "#afeeee",
  palevioletred: "#db7093",
  papayawhip: "#ffefd5",
  peachpuff: "#ffdab9",
  peru: "#cd853f",
  pink: "#ffc0cb",
  plum: "#dda0dd",
  powderblue: "#b0e0e6",
  purple: "#800080",
  rebeccapurple: "#663399",
  red: "#ff0000",
  rosybrown: "#bc8f8f",
  royalblue: "#4169e1",
  saddlebrown: "#8b4513",
  salmon: "#fa8072",
  sandybrown: "#f4a460",
  seagreen: "#2e8b57",
  seashell: "#fff5ee",
  sienna: "#a0522d",
  silver: "#c0c0c0",
  skyblue: "#87ceeb",
  slateblue: "#6a5acd",
  slategray: "#708090",
  slategrey: "#708090",
  snow: "#fffafa",
  springgreen: "#00ff7f",
  steelblue: "#4682b4",
  tan: "#d2b48c",
  teal: "#008080",
  thistle: "#d8bfd8",
  tomato: "#ff6347",
  turquoise: "#40e0d0",
  violet: "#ee82ee",
  wheat: "#f5deb3",
  white: "#ffffff",
  whitesmoke: "#f5f5f5",
  yellow: "#ffff00",
  yellowgreen: "#9acd32"
};
function Zl(e) {
  var t = { r: 0, g: 0, b: 0 }, n = 1, o = null, i = null, r = null, a = !1, l = !1;
  return typeof e == "string" && (e = T_(e)), typeof e == "object" && (Dr(e.r) && Dr(e.g) && Dr(e.b) ? (t = w_(e.r, e.g, e.b), a = !0, l = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : Dr(e.h) && Dr(e.s) && Dr(e.v) ? (o = Ic(e.s), i = Ic(e.v), t = C_(e.h, o, i), a = !0, l = "hsv") : Dr(e.h) && Dr(e.s) && Dr(e.l) && (o = Ic(e.s), r = Ic(e.l), t = S_(e.h, o, r), a = !0, l = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = KS(n), {
    ok: a,
    format: e.format || l,
    r: Math.min(255, Math.max(t.r, 0)),
    g: Math.min(255, Math.max(t.g, 0)),
    b: Math.min(255, Math.max(t.b, 0)),
    a: n
  };
}
var I_ = "[-\\+]?\\d+%?", M_ = "[-\\+]?\\d*\\.\\d+%?", wa = "(?:".concat(M_, ")|(?:").concat(I_, ")"), vp = "[\\s|\\(]+(".concat(wa, ")[,|\\s]+(").concat(wa, ")[,|\\s]+(").concat(wa, ")\\s*\\)?"), mp = "[\\s|\\(]+(".concat(wa, ")[,|\\s]+(").concat(wa, ")[,|\\s]+(").concat(wa, ")[,|\\s]+(").concat(wa, ")\\s*\\)?"), Fi = {
  CSS_UNIT: new RegExp(wa),
  rgb: new RegExp("rgb" + vp),
  rgba: new RegExp("rgba" + mp),
  hsl: new RegExp("hsl" + vp),
  hsla: new RegExp("hsla" + mp),
  hsv: new RegExp("hsv" + vp),
  hsva: new RegExp("hsva" + mp),
  hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
  hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
};
function T_(e) {
  if (e = e.trim().toLowerCase(), e.length === 0)
    return !1;
  var t = !1;
  if (Yg[e])
    e = Yg[e], t = !0;
  else if (e === "transparent")
    return { r: 0, g: 0, b: 0, a: 0, format: "name" };
  var n = Fi.rgb.exec(e);
  return n ? { r: n[1], g: n[2], b: n[3] } : (n = Fi.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = Fi.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = Fi.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = Fi.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = Fi.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = Fi.hex8.exec(e), n ? {
    r: Zo(n[1]),
    g: Zo(n[2]),
    b: Zo(n[3]),
    a: y0(n[4]),
    format: t ? "name" : "hex8"
  } : (n = Fi.hex6.exec(e), n ? {
    r: Zo(n[1]),
    g: Zo(n[2]),
    b: Zo(n[3]),
    format: t ? "name" : "hex"
  } : (n = Fi.hex4.exec(e), n ? {
    r: Zo(n[1] + n[1]),
    g: Zo(n[2] + n[2]),
    b: Zo(n[3] + n[3]),
    a: y0(n[4] + n[4]),
    format: t ? "name" : "hex8"
  } : (n = Fi.hex3.exec(e), n ? {
    r: Zo(n[1] + n[1]),
    g: Zo(n[2] + n[2]),
    b: Zo(n[3] + n[3]),
    format: t ? "name" : "hex"
  } : !1)))))))));
}
function Dr(e) {
  return !!Fi.CSS_UNIT.exec(String(e));
}
var In = (
  /** @class */
  (function() {
    function e(t, n) {
      t === void 0 && (t = ""), n === void 0 && (n = {});
      var o;
      if (t instanceof e)
        return t;
      typeof t == "number" && (t = O_(t)), this.originalInput = t;
      var i = Zl(t);
      this.originalInput = t, this.r = i.r, this.g = i.g, this.b = i.b, this.a = i.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (o = n.format) !== null && o !== void 0 ? o : i.format, this.gradientType = n.gradientType, this.r < 1 && (this.r = Math.round(this.r)), this.g < 1 && (this.g = Math.round(this.g)), this.b < 1 && (this.b = Math.round(this.b)), this.isValid = i.ok;
    }
    return e.prototype.isDark = function() {
      return this.getBrightness() < 128;
    }, e.prototype.isLight = function() {
      return !this.isDark();
    }, e.prototype.getBrightness = function() {
      var t = this.toRgb();
      return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3;
    }, e.prototype.getLuminance = function() {
      var t = this.toRgb(), n, o, i, r = t.r / 255, a = t.g / 255, l = t.b / 255;
      return r <= 0.03928 ? n = r / 12.92 : n = Math.pow((r + 0.055) / 1.055, 2.4), a <= 0.03928 ? o = a / 12.92 : o = Math.pow((a + 0.055) / 1.055, 2.4), l <= 0.03928 ? i = l / 12.92 : i = Math.pow((l + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * o + 0.0722 * i;
    }, e.prototype.getAlpha = function() {
      return this.a;
    }, e.prototype.setAlpha = function(t) {
      return this.a = KS(t), this.roundA = Math.round(100 * this.a) / 100, this;
    }, e.prototype.isMonochrome = function() {
      var t = this.toHsl().s;
      return t === 0;
    }, e.prototype.toHsv = function() {
      var t = Gg(this.r, this.g, this.b);
      return { h: t.h * 360, s: t.s, v: t.v, a: this.a };
    }, e.prototype.toHsvString = function() {
      var t = Gg(this.r, this.g, this.b), n = Math.round(t.h * 360), o = Math.round(t.s * 100), i = Math.round(t.v * 100);
      return this.a === 1 ? "hsv(".concat(n, ", ").concat(o, "%, ").concat(i, "%)") : "hsva(".concat(n, ", ").concat(o, "%, ").concat(i, "%, ").concat(this.roundA, ")");
    }, e.prototype.toHsl = function() {
      var t = b0(this.r, this.g, this.b);
      return { h: t.h * 360, s: t.s, l: t.l, a: this.a };
    }, e.prototype.toHslString = function() {
      var t = b0(this.r, this.g, this.b), n = Math.round(t.h * 360), o = Math.round(t.s * 100), i = Math.round(t.l * 100);
      return this.a === 1 ? "hsl(".concat(n, ", ").concat(o, "%, ").concat(i, "%)") : "hsla(".concat(n, ", ").concat(o, "%, ").concat(i, "%, ").concat(this.roundA, ")");
    }, e.prototype.toHex = function(t) {
      return t === void 0 && (t = !1), Kg(this.r, this.g, this.b, t);
    }, e.prototype.toHexString = function(t) {
      return t === void 0 && (t = !1), "#" + this.toHex(t);
    }, e.prototype.toHex8 = function(t) {
      return t === void 0 && (t = !1), $_(this.r, this.g, this.b, this.a, t);
    }, e.prototype.toHex8String = function(t) {
      return t === void 0 && (t = !1), "#" + this.toHex8(t);
    }, e.prototype.toHexShortString = function(t) {
      return t === void 0 && (t = !1), this.a === 1 ? this.toHexString(t) : this.toHex8String(t);
    }, e.prototype.toRgb = function() {
      return {
        r: Math.round(this.r),
        g: Math.round(this.g),
        b: Math.round(this.b),
        a: this.a
      };
    }, e.prototype.toRgbString = function() {
      var t = Math.round(this.r), n = Math.round(this.g), o = Math.round(this.b);
      return this.a === 1 ? "rgb(".concat(t, ", ").concat(n, ", ").concat(o, ")") : "rgba(".concat(t, ", ").concat(n, ", ").concat(o, ", ").concat(this.roundA, ")");
    }, e.prototype.toPercentageRgb = function() {
      var t = function(n) {
        return "".concat(Math.round(So(n, 255) * 100), "%");
      };
      return {
        r: t(this.r),
        g: t(this.g),
        b: t(this.b),
        a: this.a
      };
    }, e.prototype.toPercentageRgbString = function() {
      var t = function(n) {
        return Math.round(So(n, 255) * 100);
      };
      return this.a === 1 ? "rgb(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%)") : "rgba(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%, ").concat(this.roundA, ")");
    }, e.prototype.toName = function() {
      if (this.a === 0)
        return "transparent";
      if (this.a < 1)
        return !1;
      for (var t = "#" + Kg(this.r, this.g, this.b, !1), n = 0, o = Object.entries(Yg); n < o.length; n++) {
        var i = o[n], r = i[0], a = i[1];
        if (t === a)
          return r;
      }
      return !1;
    }, e.prototype.toString = function(t) {
      var n = !!t;
      t = t ?? this.format;
      var o = !1, i = this.a < 1 && this.a >= 0, r = !n && i && (t.startsWith("hex") || t === "name");
      return r ? t === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (t === "rgb" && (o = this.toRgbString()), t === "prgb" && (o = this.toPercentageRgbString()), (t === "hex" || t === "hex6") && (o = this.toHexString()), t === "hex3" && (o = this.toHexString(!0)), t === "hex4" && (o = this.toHex8String(!0)), t === "hex8" && (o = this.toHex8String()), t === "name" && (o = this.toName()), t === "hsl" && (o = this.toHslString()), t === "hsv" && (o = this.toHsvString()), o || this.toHexString());
    }, e.prototype.toNumber = function() {
      return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
    }, e.prototype.clone = function() {
      return new e(this.toString());
    }, e.prototype.lighten = function(t) {
      t === void 0 && (t = 10);
      var n = this.toHsl();
      return n.l += t / 100, n.l = Oc(n.l), new e(n);
    }, e.prototype.brighten = function(t) {
      t === void 0 && (t = 10);
      var n = this.toRgb();
      return n.r = Math.max(0, Math.min(255, n.r - Math.round(255 * -(t / 100)))), n.g = Math.max(0, Math.min(255, n.g - Math.round(255 * -(t / 100)))), n.b = Math.max(0, Math.min(255, n.b - Math.round(255 * -(t / 100)))), new e(n);
    }, e.prototype.darken = function(t) {
      t === void 0 && (t = 10);
      var n = this.toHsl();
      return n.l -= t / 100, n.l = Oc(n.l), new e(n);
    }, e.prototype.tint = function(t) {
      return t === void 0 && (t = 10), this.mix("white", t);
    }, e.prototype.shade = function(t) {
      return t === void 0 && (t = 10), this.mix("black", t);
    }, e.prototype.desaturate = function(t) {
      t === void 0 && (t = 10);
      var n = this.toHsl();
      return n.s -= t / 100, n.s = Oc(n.s), new e(n);
    }, e.prototype.saturate = function(t) {
      t === void 0 && (t = 10);
      var n = this.toHsl();
      return n.s += t / 100, n.s = Oc(n.s), new e(n);
    }, e.prototype.greyscale = function() {
      return this.desaturate(100);
    }, e.prototype.spin = function(t) {
      var n = this.toHsl(), o = (n.h + t) % 360;
      return n.h = o < 0 ? 360 + o : o, new e(n);
    }, e.prototype.mix = function(t, n) {
      n === void 0 && (n = 50);
      var o = this.toRgb(), i = new e(t).toRgb(), r = n / 100, a = {
        r: (i.r - o.r) * r + o.r,
        g: (i.g - o.g) * r + o.g,
        b: (i.b - o.b) * r + o.b,
        a: (i.a - o.a) * r + o.a
      };
      return new e(a);
    }, e.prototype.analogous = function(t, n) {
      t === void 0 && (t = 6), n === void 0 && (n = 30);
      var o = this.toHsl(), i = 360 / n, r = [this];
      for (o.h = (o.h - (i * t >> 1) + 720) % 360; --t; )
        o.h = (o.h + i) % 360, r.push(new e(o));
      return r;
    }, e.prototype.complement = function() {
      var t = this.toHsl();
      return t.h = (t.h + 180) % 360, new e(t);
    }, e.prototype.monochromatic = function(t) {
      t === void 0 && (t = 6);
      for (var n = this.toHsv(), o = n.h, i = n.s, r = n.v, a = [], l = 1 / t; t--; )
        a.push(new e({ h: o, s: i, v: r })), r = (r + l) % 1;
      return a;
    }, e.prototype.splitcomplement = function() {
      var t = this.toHsl(), n = t.h;
      return [
        this,
        new e({ h: (n + 72) % 360, s: t.s, l: t.l }),
        new e({ h: (n + 216) % 360, s: t.s, l: t.l })
      ];
    }, e.prototype.onBackground = function(t) {
      var n = this.toRgb(), o = new e(t).toRgb(), i = n.a + o.a * (1 - n.a);
      return new e({
        r: (n.r * n.a + o.r * o.a * (1 - n.a)) / i,
        g: (n.g * n.a + o.g * o.a * (1 - n.a)) / i,
        b: (n.b * n.a + o.b * o.a * (1 - n.a)) / i,
        a: i
      });
    }, e.prototype.triad = function() {
      return this.polyad(3);
    }, e.prototype.tetrad = function() {
      return this.polyad(4);
    }, e.prototype.polyad = function(t) {
      for (var n = this.toHsl(), o = n.h, i = [this], r = 360 / t, a = 1; a < t; a++)
        i.push(new e({ h: (o + a * r) % 360, s: n.s, l: n.l }));
      return i;
    }, e.prototype.equals = function(t) {
      return this.toRgbString() === new e(t).toRgbString();
    }, e;
  })()
), Mc = 2, x0 = 0.16, k_ = 0.05, E_ = 0.05, __ = 0.15, YS = 5, US = 4, A_ = [{
  index: 7,
  opacity: 0.15
}, {
  index: 6,
  opacity: 0.25
}, {
  index: 5,
  opacity: 0.3
}, {
  index: 5,
  opacity: 0.45
}, {
  index: 5,
  opacity: 0.65
}, {
  index: 5,
  opacity: 0.85
}, {
  index: 4,
  opacity: 0.9
}, {
  index: 3,
  opacity: 0.95
}, {
  index: 2,
  opacity: 0.97
}, {
  index: 1,
  opacity: 0.98
}];
function w0(e) {
  var t = e.r, n = e.g, o = e.b, i = Gg(t, n, o);
  return {
    h: i.h * 360,
    s: i.s,
    v: i.v
  };
}
function Tc(e) {
  var t = e.r, n = e.g, o = e.b;
  return "#".concat(Kg(t, n, o, !1));
}
function D_(e, t, n) {
  var o = n / 100, i = {
    r: (t.r - e.r) * o + e.r,
    g: (t.g - e.g) * o + e.g,
    b: (t.b - e.b) * o + e.b
  };
  return i;
}
function S0(e, t, n) {
  var o;
  return Math.round(e.h) >= 60 && Math.round(e.h) <= 240 ? o = n ? Math.round(e.h) - Mc * t : Math.round(e.h) + Mc * t : o = n ? Math.round(e.h) + Mc * t : Math.round(e.h) - Mc * t, o < 0 ? o += 360 : o >= 360 && (o -= 360), o;
}
function C0(e, t, n) {
  if (e.h === 0 && e.s === 0)
    return e.s;
  var o;
  return n ? o = e.s - x0 * t : t === US ? o = e.s + x0 : o = e.s + k_ * t, o > 1 && (o = 1), n && t === YS && o > 0.1 && (o = 0.1), o < 0.06 && (o = 0.06), Number(o.toFixed(2));
}
function $0(e, t, n) {
  var o;
  return n ? o = e.v + E_ * t : o = e.v - __ * t, o > 1 && (o = 1), Number(o.toFixed(2));
}
function Gr(e) {
  for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = [], o = Zl(e), i = YS; i > 0; i -= 1) {
    var r = w0(o), a = Tc(Zl({
      h: S0(r, i, !0),
      s: C0(r, i, !0),
      v: $0(r, i, !0)
    }));
    n.push(a);
  }
  n.push(Tc(o));
  for (var l = 1; l <= US; l += 1) {
    var s = w0(o), u = Tc(Zl({
      h: S0(s, l),
      s: C0(s, l),
      v: $0(s, l)
    }));
    n.push(u);
  }
  return t.theme === "dark" ? A_.map(function(c) {
    var d = c.index, f = c.opacity, p = Tc(D_(Zl(t.backgroundColor || "#141414"), Zl(n[d]), f * 100));
    return p;
  }) : n;
}
var bp = {
  red: "#F5222D",
  volcano: "#FA541C",
  orange: "#FA8C16",
  gold: "#FAAD14",
  yellow: "#FADB14",
  lime: "#A0D911",
  green: "#52C41A",
  cyan: "#13C2C2",
  blue: "#1890FF",
  geekblue: "#2F54EB",
  purple: "#722ED1",
  magenta: "#EB2F96",
  grey: "#666666"
}, ld = {}, yp = {};
Object.keys(bp).forEach(function(e) {
  ld[e] = Gr(bp[e]), ld[e].primary = ld[e][5], yp[e] = Gr(bp[e], {
    theme: "dark",
    backgroundColor: "#141414"
  }), yp[e].primary = yp[e][5];
});
var z_ = ld.blue;
const R_ = (e) => {
  const {
    controlHeight: t
  } = e;
  return {
    controlHeightSM: t * 0.75,
    controlHeightXS: t * 0.5,
    controlHeightLG: t * 1.25
  };
};
function N_(e) {
  const {
    sizeUnit: t,
    sizeStep: n
  } = e;
  return {
    sizeXXL: t * (n + 8),
    sizeXL: t * (n + 4),
    sizeLG: t * (n + 2),
    sizeMD: t * (n + 1),
    sizeMS: t * n,
    size: t * n,
    sizeSM: t * (n - 1),
    sizeXS: t * (n - 2),
    sizeXXS: t * (n - 3)
    // 4
  };
}
const mv = {
  blue: "#1677ff",
  purple: "#722ED1",
  cyan: "#13C2C2",
  green: "#52C41A",
  magenta: "#EB2F96",
  pink: "#eb2f96",
  red: "#F5222D",
  orange: "#FA8C16",
  yellow: "#FADB14",
  volcano: "#FA541C",
  geekblue: "#2F54EB",
  gold: "#FAAD14",
  lime: "#A0D911"
}, hf = I(I({}, mv), {
  // Color
  colorPrimary: "#1677ff",
  colorSuccess: "#52c41a",
  colorWarning: "#faad14",
  colorError: "#ff4d4f",
  colorInfo: "#1677ff",
  colorTextBase: "",
  colorBgBase: "",
  // Font
  fontFamily: `-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
'Noto Color Emoji'`,
  fontSize: 14,
  // Line
  lineWidth: 1,
  lineType: "solid",
  // Motion
  motionUnit: 0.1,
  motionBase: 0,
  motionEaseOutCirc: "cubic-bezier(0.08, 0.82, 0.17, 1)",
  motionEaseInOutCirc: "cubic-bezier(0.78, 0.14, 0.15, 0.86)",
  motionEaseOut: "cubic-bezier(0.215, 0.61, 0.355, 1)",
  motionEaseInOut: "cubic-bezier(0.645, 0.045, 0.355, 1)",
  motionEaseOutBack: "cubic-bezier(0.12, 0.4, 0.29, 1.46)",
  motionEaseInBack: "cubic-bezier(0.71, -0.46, 0.88, 0.6)",
  motionEaseInQuint: "cubic-bezier(0.755, 0.05, 0.855, 0.06)",
  motionEaseOutQuint: "cubic-bezier(0.23, 1, 0.32, 1)",
  // Radius
  borderRadius: 6,
  // Size
  sizeUnit: 4,
  sizeStep: 4,
  sizePopupArrow: 16,
  // Control Base
  controlHeight: 32,
  // zIndex
  zIndexBase: 0,
  zIndexPopupBase: 1e3,
  // Image
  opacityImage: 1,
  // Wireframe
  wireframe: !1
});
function XS(e, t) {
  let {
    generateColorPalettes: n,
    generateNeutralColorPalettes: o
  } = t;
  const {
    colorSuccess: i,
    colorWarning: r,
    colorError: a,
    colorInfo: l,
    colorPrimary: s,
    colorBgBase: u,
    colorTextBase: c
  } = e, d = n(s), f = n(i), p = n(r), m = n(a), b = n(l), y = o(u, c);
  return I(I({}, y), {
    colorPrimaryBg: d[1],
    colorPrimaryBgHover: d[2],
    colorPrimaryBorder: d[3],
    colorPrimaryBorderHover: d[4],
    colorPrimaryHover: d[5],
    colorPrimary: d[6],
    colorPrimaryActive: d[7],
    colorPrimaryTextHover: d[8],
    colorPrimaryText: d[9],
    colorPrimaryTextActive: d[10],
    colorSuccessBg: f[1],
    colorSuccessBgHover: f[2],
    colorSuccessBorder: f[3],
    colorSuccessBorderHover: f[4],
    colorSuccessHover: f[4],
    colorSuccess: f[6],
    colorSuccessActive: f[7],
    colorSuccessTextHover: f[8],
    colorSuccessText: f[9],
    colorSuccessTextActive: f[10],
    colorErrorBg: m[1],
    colorErrorBgHover: m[2],
    colorErrorBorder: m[3],
    colorErrorBorderHover: m[4],
    colorErrorHover: m[5],
    colorError: m[6],
    colorErrorActive: m[7],
    colorErrorTextHover: m[8],
    colorErrorText: m[9],
    colorErrorTextActive: m[10],
    colorWarningBg: p[1],
    colorWarningBgHover: p[2],
    colorWarningBorder: p[3],
    colorWarningBorderHover: p[4],
    colorWarningHover: p[4],
    colorWarning: p[6],
    colorWarningActive: p[7],
    colorWarningTextHover: p[8],
    colorWarningText: p[9],
    colorWarningTextActive: p[10],
    colorInfoBg: b[1],
    colorInfoBgHover: b[2],
    colorInfoBorder: b[3],
    colorInfoBorderHover: b[4],
    colorInfoHover: b[4],
    colorInfo: b[6],
    colorInfoActive: b[7],
    colorInfoTextHover: b[8],
    colorInfoText: b[9],
    colorInfoTextActive: b[10],
    colorBgMask: new In("#000").setAlpha(0.45).toRgbString(),
    colorWhite: "#fff"
  });
}
const B_ = (e) => {
  let t = e, n = e, o = e, i = e;
  return e < 6 && e >= 5 ? t = e + 1 : e < 16 && e >= 6 ? t = e + 2 : e >= 16 && (t = 16), e < 7 && e >= 5 ? n = 4 : e < 8 && e >= 7 ? n = 5 : e < 14 && e >= 8 ? n = 6 : e < 16 && e >= 14 ? n = 7 : e >= 16 && (n = 8), e < 6 && e >= 2 ? o = 1 : e >= 6 && (o = 2), e > 4 && e < 8 ? i = 4 : e >= 8 && (i = 6), {
    borderRadius: e > 16 ? 16 : e,
    borderRadiusXS: o,
    borderRadiusSM: n,
    borderRadiusLG: t,
    borderRadiusOuter: i
  };
};
function L_(e) {
  const {
    motionUnit: t,
    motionBase: n,
    borderRadius: o,
    lineWidth: i
  } = e;
  return I({
    // motion
    motionDurationFast: `${(n + t).toFixed(1)}s`,
    motionDurationMid: `${(n + t * 2).toFixed(1)}s`,
    motionDurationSlow: `${(n + t * 3).toFixed(1)}s`,
    // line
    lineWidthBold: i + 1
  }, B_(o));
}
const zr = (e, t) => new In(e).setAlpha(t).toRgbString(), iu = (e, t) => new In(e).darken(t).toHexString(), F_ = (e) => {
  const t = Gr(e);
  return {
    1: t[0],
    2: t[1],
    3: t[2],
    4: t[3],
    5: t[4],
    6: t[5],
    7: t[6],
    8: t[4],
    9: t[5],
    10: t[6]
    // 8: colors[7],
    // 9: colors[8],
    // 10: colors[9],
  };
}, H_ = (e, t) => {
  const n = e || "#fff", o = t || "#000";
  return {
    colorBgBase: n,
    colorTextBase: o,
    colorText: zr(o, 0.88),
    colorTextSecondary: zr(o, 0.65),
    colorTextTertiary: zr(o, 0.45),
    colorTextQuaternary: zr(o, 0.25),
    colorFill: zr(o, 0.15),
    colorFillSecondary: zr(o, 0.06),
    colorFillTertiary: zr(o, 0.04),
    colorFillQuaternary: zr(o, 0.02),
    colorBgLayout: iu(n, 4),
    colorBgContainer: iu(n, 0),
    colorBgElevated: iu(n, 0),
    colorBgSpotlight: zr(o, 0.85),
    colorBorder: iu(n, 15),
    colorBorderSecondary: iu(n, 6)
  };
};
function V_(e) {
  const t = new Array(10).fill(null).map((n, o) => {
    const i = o - 1, r = e * Math.pow(2.71828, i / 5), a = o > 1 ? Math.floor(r) : Math.ceil(r);
    return Math.floor(a / 2) * 2;
  });
  return t[1] = e, t.map((n) => {
    const o = n + 8;
    return {
      size: n,
      lineHeight: o / n
    };
  });
}
const j_ = (e) => {
  const t = V_(e), n = t.map((i) => i.size), o = t.map((i) => i.lineHeight);
  return {
    fontSizeSM: n[0],
    fontSize: n[1],
    fontSizeLG: n[2],
    fontSizeXL: n[3],
    fontSizeHeading1: n[6],
    fontSizeHeading2: n[5],
    fontSizeHeading3: n[4],
    fontSizeHeading4: n[3],
    fontSizeHeading5: n[2],
    lineHeight: o[1],
    lineHeightLG: o[2],
    lineHeightSM: o[0],
    lineHeightHeading1: o[6],
    lineHeightHeading2: o[5],
    lineHeightHeading3: o[4],
    lineHeightHeading4: o[3],
    lineHeightHeading5: o[2]
  };
};
function bv(e) {
  const t = Object.keys(mv).map((n) => {
    const o = Gr(e[n]);
    return new Array(10).fill(1).reduce((i, r, a) => (i[`${n}-${a + 1}`] = o[a], i), {});
  }).reduce((n, o) => (n = I(I({}, n), o), n), {});
  return I(I(I(I(I(I(I({}, e), t), XS(e, {
    generateColorPalettes: F_,
    generateNeutralColorPalettes: H_
  })), j_(e.fontSize)), N_(e)), R_(e)), L_(e));
}
function xp(e) {
  return e >= 0 && e <= 255;
}
function kc(e, t) {
  const {
    r: n,
    g: o,
    b: i,
    a: r
  } = new In(e).toRgb();
  if (r < 1)
    return e;
  const {
    r: a,
    g: l,
    b: s
  } = new In(t).toRgb();
  for (let u = 0.01; u <= 1; u += 0.01) {
    const c = Math.round((n - a * (1 - u)) / u), d = Math.round((o - l * (1 - u)) / u), f = Math.round((i - s * (1 - u)) / u);
    if (xp(c) && xp(d) && xp(f))
      return new In({
        r: c,
        g: d,
        b: f,
        a: Math.round(u * 100) / 100
      }).toRgbString();
  }
  return new In({
    r: n,
    g: o,
    b: i,
    a: 1
  }).toRgbString();
}
var W_ = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
function q_(e) {
  const {
    override: t
  } = e, n = W_(e, ["override"]), o = I({}, t);
  Object.keys(hf).forEach((p) => {
    delete o[p];
  });
  const i = I(I({}, n), o), r = 480, a = 576, l = 768, s = 992, u = 1200, c = 1600, d = 2e3;
  return I(I(I({}, i), {
    colorLink: i.colorInfoText,
    colorLinkHover: i.colorInfoHover,
    colorLinkActive: i.colorInfoActive,
    // ============== Background ============== //
    colorFillContent: i.colorFillSecondary,
    colorFillContentHover: i.colorFill,
    colorFillAlter: i.colorFillQuaternary,
    colorBgContainerDisabled: i.colorFillTertiary,
    // ============== Split ============== //
    colorBorderBg: i.colorBgContainer,
    colorSplit: kc(i.colorBorderSecondary, i.colorBgContainer),
    // ============== Text ============== //
    colorTextPlaceholder: i.colorTextQuaternary,
    colorTextDisabled: i.colorTextQuaternary,
    colorTextHeading: i.colorText,
    colorTextLabel: i.colorTextSecondary,
    colorTextDescription: i.colorTextTertiary,
    colorTextLightSolid: i.colorWhite,
    colorHighlight: i.colorError,
    colorBgTextHover: i.colorFillSecondary,
    colorBgTextActive: i.colorFill,
    colorIcon: i.colorTextTertiary,
    colorIconHover: i.colorText,
    colorErrorOutline: kc(i.colorErrorBg, i.colorBgContainer),
    colorWarningOutline: kc(i.colorWarningBg, i.colorBgContainer),
    // Font
    fontSizeIcon: i.fontSizeSM,
    // Control
    lineWidth: i.lineWidth,
    controlOutlineWidth: i.lineWidth * 2,
    // Checkbox size and expand icon size
    controlInteractiveSize: i.controlHeight / 2,
    controlItemBgHover: i.colorFillTertiary,
    controlItemBgActive: i.colorPrimaryBg,
    controlItemBgActiveHover: i.colorPrimaryBgHover,
    controlItemBgActiveDisabled: i.colorFill,
    controlTmpOutline: i.colorFillQuaternary,
    controlOutline: kc(i.colorPrimaryBg, i.colorBgContainer),
    lineType: i.lineType,
    borderRadius: i.borderRadius,
    borderRadiusXS: i.borderRadiusXS,
    borderRadiusSM: i.borderRadiusSM,
    borderRadiusLG: i.borderRadiusLG,
    fontWeightStrong: 600,
    opacityLoading: 0.65,
    linkDecoration: "none",
    linkHoverDecoration: "none",
    linkFocusDecoration: "none",
    controlPaddingHorizontal: 12,
    controlPaddingHorizontalSM: 8,
    paddingXXS: i.sizeXXS,
    paddingXS: i.sizeXS,
    paddingSM: i.sizeSM,
    padding: i.size,
    paddingMD: i.sizeMD,
    paddingLG: i.sizeLG,
    paddingXL: i.sizeXL,
    paddingContentHorizontalLG: i.sizeLG,
    paddingContentVerticalLG: i.sizeMS,
    paddingContentHorizontal: i.sizeMS,
    paddingContentVertical: i.sizeSM,
    paddingContentHorizontalSM: i.size,
    paddingContentVerticalSM: i.sizeXS,
    marginXXS: i.sizeXXS,
    marginXS: i.sizeXS,
    marginSM: i.sizeSM,
    margin: i.size,
    marginMD: i.sizeMD,
    marginLG: i.sizeLG,
    marginXL: i.sizeXL,
    marginXXL: i.sizeXXL,
    boxShadow: `
      0 1px 2px 0 rgba(0, 0, 0, 0.03),
      0 1px 6px -1px rgba(0, 0, 0, 0.02),
      0 2px 4px 0 rgba(0, 0, 0, 0.02)
    `,
    boxShadowSecondary: `
      0 6px 16px 0 rgba(0, 0, 0, 0.08),
      0 3px 6px -4px rgba(0, 0, 0, 0.12),
      0 9px 28px 8px rgba(0, 0, 0, 0.05)
    `,
    boxShadowTertiary: `
      0 1px 2px 0 rgba(0, 0, 0, 0.03),
      0 1px 6px -1px rgba(0, 0, 0, 0.02),
      0 2px 4px 0 rgba(0, 0, 0, 0.02)
    `,
    screenXS: r,
    screenXSMin: r,
    screenXSMax: a - 1,
    screenSM: a,
    screenSMMin: a,
    screenSMMax: l - 1,
    screenMD: l,
    screenMDMin: l,
    screenMDMax: s - 1,
    screenLG: s,
    screenLGMin: s,
    screenLGMax: u - 1,
    screenXL: u,
    screenXLMin: u,
    screenXLMax: c - 1,
    screenXXL: c,
    screenXXLMin: c,
    screenXXLMax: d - 1,
    screenXXXL: d,
    screenXXXLMin: d,
    // FIXME: component box-shadow, should be removed
    boxShadowPopoverArrow: "3px 3px 7px rgba(0, 0, 0, 0.1)",
    boxShadowCard: `
      0 1px 2px -2px ${new In("rgba(0, 0, 0, 0.16)").toRgbString()},
      0 3px 6px 0 ${new In("rgba(0, 0, 0, 0.12)").toRgbString()},
      0 5px 12px 4px ${new In("rgba(0, 0, 0, 0.09)").toRgbString()}
    `,
    boxShadowDrawerRight: `
      -6px 0 16px 0 rgba(0, 0, 0, 0.08),
      -3px 0 6px -4px rgba(0, 0, 0, 0.12),
      -9px 0 28px 8px rgba(0, 0, 0, 0.05)
    `,
    boxShadowDrawerLeft: `
      6px 0 16px 0 rgba(0, 0, 0, 0.08),
      3px 0 6px -4px rgba(0, 0, 0, 0.12),
      9px 0 28px 8px rgba(0, 0, 0, 0.05)
    `,
    boxShadowDrawerUp: `
      0 6px 16px 0 rgba(0, 0, 0, 0.08),
      0 3px 6px -4px rgba(0, 0, 0, 0.12),
      0 9px 28px 8px rgba(0, 0, 0, 0.05)
    `,
    boxShadowDrawerDown: `
      0 -6px 16px 0 rgba(0, 0, 0, 0.08),
      0 -3px 6px -4px rgba(0, 0, 0, 0.12),
      0 -9px 28px 8px rgba(0, 0, 0, 0.05)
    `,
    boxShadowTabsOverflowLeft: "inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",
    boxShadowTabsOverflowRight: "inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",
    boxShadowTabsOverflowTop: "inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",
    boxShadowTabsOverflowBottom: "inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"
  }), o);
}
const yv = (e, t, n, o, i) => {
  const r = e / 2, a = 0, l = r, s = n * 1 / Math.sqrt(2), u = r - n * (1 - 1 / Math.sqrt(2)), c = r - t * (1 / Math.sqrt(2)), d = n * (Math.sqrt(2) - 1) + t * (1 / Math.sqrt(2)), f = 2 * r - c, p = d, m = 2 * r - s, b = u, y = 2 * r - a, S = l, C = r * Math.sqrt(2) + n * (Math.sqrt(2) - 2), O = n * (Math.sqrt(2) - 1);
  return {
    pointerEvents: "none",
    width: e,
    height: e,
    overflow: "hidden",
    "&::after": {
      content: '""',
      position: "absolute",
      width: C,
      height: C,
      bottom: 0,
      insetInline: 0,
      margin: "auto",
      borderRadius: {
        _skip_check_: !0,
        value: `0 0 ${t}px 0`
      },
      transform: "translateY(50%) rotate(-135deg)",
      boxShadow: i,
      zIndex: 0,
      background: "transparent"
    },
    "&::before": {
      position: "absolute",
      bottom: 0,
      insetInlineStart: 0,
      width: e,
      height: e / 2,
      background: o,
      clipPath: {
        _multi_value_: !0,
        value: [`polygon(${O}px 100%, 50% ${O}px, ${2 * r - O}px 100%, ${O}px 100%)`, `path('M ${a} ${l} A ${n} ${n} 0 0 0 ${s} ${u} L ${c} ${d} A ${t} ${t} 0 0 1 ${f} ${p} L ${m} ${b} A ${n} ${n} 0 0 0 ${y} ${S} Z')`]
      },
      content: '""'
    }
  };
};
function QS(e, t) {
  return Fu.reduce((n, o) => {
    const i = e[`${o}-1`], r = e[`${o}-3`], a = e[`${o}-6`], l = e[`${o}-7`];
    return I(I({}, n), t(o, {
      lightColor: i,
      lightBorderColor: r,
      darkColor: a,
      textColor: l
    }));
  }, {});
}
const ka = {
  overflow: "hidden",
  whiteSpace: "nowrap",
  textOverflow: "ellipsis"
}, Zt = (e) => ({
  boxSizing: "border-box",
  margin: 0,
  padding: 0,
  color: e.colorText,
  fontSize: e.fontSize,
  // font-variant: @font-variant-base;
  lineHeight: e.lineHeight,
  listStyle: "none",
  // font-feature-settings: @font-feature-settings-base;
  fontFamily: e.fontFamily
}), Fs = () => ({
  display: "inline-flex",
  alignItems: "center",
  color: "inherit",
  fontStyle: "normal",
  lineHeight: 0,
  textAlign: "center",
  textTransform: "none",
  // for SVG icon, see https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4
  verticalAlign: "-0.125em",
  textRendering: "optimizeLegibility",
  "-webkit-font-smoothing": "antialiased",
  "-moz-osx-font-smoothing": "grayscale",
  "> *": {
    lineHeight: 1
  },
  svg: {
    display: "inline-block"
  }
}), Ea = () => ({
  // https://github.com/ant-design/ant-design/issues/21301#issuecomment-583955229
  "&::before": {
    display: "table",
    content: '""'
  },
  "&::after": {
    // https://github.com/ant-design/ant-design/issues/21864
    display: "table",
    clear: "both",
    content: '""'
  }
}), G_ = (e) => ({
  a: {
    color: e.colorLink,
    textDecoration: e.linkDecoration,
    backgroundColor: "transparent",
    outline: "none",
    cursor: "pointer",
    transition: `color ${e.motionDurationSlow}`,
    "-webkit-text-decoration-skip": "objects",
    "&:hover": {
      color: e.colorLinkHover
    },
    "&:active": {
      color: e.colorLinkActive
    },
    "&:active,\n  &:hover": {
      textDecoration: e.linkHoverDecoration,
      outline: 0
    },
    // https://github.com/ant-design/ant-design/issues/22503
    "&:focus": {
      textDecoration: e.linkFocusDecoration,
      outline: 0
    },
    "&[disabled]": {
      color: e.colorTextDisabled,
      cursor: "not-allowed"
    }
  }
}), K_ = (e, t) => {
  const {
    fontFamily: n,
    fontSize: o
  } = e, i = `[class^="${t}"], [class*=" ${t}"]`;
  return {
    [i]: {
      fontFamily: n,
      fontSize: o,
      boxSizing: "border-box",
      "&::before, &::after": {
        boxSizing: "border-box"
      },
      [i]: {
        boxSizing: "border-box",
        "&::before, &::after": {
          boxSizing: "border-box"
        }
      }
    }
  };
}, Xu = (e) => ({
  outline: `${e.lineWidthBold}px solid ${e.colorPrimaryBorder}`,
  outlineOffset: 1,
  transition: "outline-offset 0s, outline 0s"
}), bl = (e) => ({
  "&:focus-visible": I({}, Xu(e))
});
function nn(e, t, n) {
  return (o) => {
    const i = R(() => o?.value), [r, a, l] = Hs(), {
      getPrefixCls: s,
      iconPrefixCls: u
    } = cf(), c = R(() => s()), d = R(() => ({
      theme: r.value,
      token: a.value,
      hashId: l.value,
      path: ["Shared", c.value]
    }));
    qg(d, () => [{
      // Link
      "&": G_(a.value)
    }]);
    const f = R(() => ({
      theme: r.value,
      token: a.value,
      hashId: l.value,
      path: [e, i.value, u.value]
    }));
    return [qg(f, () => {
      const {
        token: p,
        flush: m
      } = U_(a.value), b = typeof n == "function" ? n(p) : n, y = I(I({}, b), a.value[e]), S = `.${i.value}`, C = _t(p, {
        componentCls: S,
        prefixCls: i.value,
        iconCls: `.${u.value}`,
        antCls: `.${c.value}`
      }, y), O = t(C, {
        hashId: l.value,
        prefixCls: i.value,
        rootPrefixCls: c.value,
        iconPrefixCls: u.value,
        overrideComponentToken: a.value[e]
      });
      return m(e, y), [K_(a.value, i.value), O];
    }), l];
  };
}
const ZS = process.env.NODE_ENV !== "production" || typeof CSSINJS_STATISTIC < "u";
let Ug = !0;
function _t() {
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
    t[n] = arguments[n];
  if (!ZS)
    return I({}, ...t);
  Ug = !1;
  const o = {};
  return t.forEach((i) => {
    Object.keys(i).forEach((a) => {
      Object.defineProperty(o, a, {
        configurable: !0,
        enumerable: !0,
        get: () => i[a]
      });
    });
  }), Ug = !0, o;
}
function Y_() {
}
function U_(e) {
  let t, n = e, o = Y_;
  return ZS && (t = /* @__PURE__ */ new Set(), n = new Proxy(e, {
    get(i, r) {
      return Ug && t.add(r), i[r];
    }
  }), o = (i, r) => {
    Array.from(t);
  }), {
    token: n,
    keys: t,
    flush: o
  };
}
const X_ = RS(bv), xv = {
  token: hf,
  hashed: !0
}, JS = Symbol("DesignTokenContext"), Xg = Pe(), Q_ = (e) => {
  kt(JS, e), Ie(e, () => {
    Xg.value = M(e), hO(Xg);
  }, {
    immediate: !0,
    deep: !0
  });
}, Z_ = ye({
  props: {
    value: Ct()
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    return Q_(R(() => e.value)), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
});
function Hs() {
  const e = Tt(JS, R(() => Xg.value || xv)), t = R(() => `${b_}-${e.value.hashed || ""}`), n = R(() => e.value.theme || X_), o = WE(n, R(() => [hf, e.value.token]), R(() => ({
    salt: t.value,
    override: I({
      override: e.value.token
    }, e.value.components),
    formatToken: q_
  })));
  return [n, R(() => o.value[0]), R(() => e.value.hashed ? o.value[1] : "")];
}
const wv = ye({
  compatConfig: {
    MODE: 3
  },
  setup() {
    const [, e] = Hs(), t = R(() => new In(e.value.colorBgBase).toHsl().l < 0.5 ? {
      opacity: 0.65
    } : {});
    return () => v("svg", {
      style: t.value,
      width: "184",
      height: "152",
      viewBox: "0 0 184 152",
      xmlns: "http://www.w3.org/2000/svg"
    }, [v("g", {
      fill: "none",
      "fill-rule": "evenodd"
    }, [v("g", {
      transform: "translate(24 31.67)"
    }, [v("ellipse", {
      "fill-opacity": ".8",
      fill: "#F5F5F7",
      cx: "67.797",
      cy: "106.89",
      rx: "67.797",
      ry: "12.668"
    }, null), v("path", {
      d: "M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",
      fill: "#AEB8C2"
    }, null), v("path", {
      d: "M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",
      fill: "url(#linearGradient-1)",
      transform: "translate(13.56)"
    }, null), v("path", {
      d: "M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",
      fill: "#F5F5F7"
    }, null), v("path", {
      d: "M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",
      fill: "#DCE0E6"
    }, null)]), v("path", {
      d: "M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",
      fill: "#DCE0E6"
    }, null), v("g", {
      transform: "translate(149.65 15.383)",
      fill: "#FFF"
    }, [v("ellipse", {
      cx: "20.654",
      cy: "3.167",
      rx: "2.849",
      ry: "2.815"
    }, null), v("path", {
      d: "M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"
    }, null)])])]);
  }
});
wv.PRESENTED_IMAGE_DEFAULT = !0;
const eC = ye({
  compatConfig: {
    MODE: 3
  },
  setup() {
    const [, e] = Hs(), t = R(() => {
      const {
        colorFill: n,
        colorFillTertiary: o,
        colorFillQuaternary: i,
        colorBgContainer: r
      } = e.value;
      return {
        borderColor: new In(n).onBackground(r).toHexString(),
        shadowColor: new In(o).onBackground(r).toHexString(),
        contentColor: new In(i).onBackground(r).toHexString()
      };
    });
    return () => v("svg", {
      width: "64",
      height: "41",
      viewBox: "0 0 64 41",
      xmlns: "http://www.w3.org/2000/svg"
    }, [v("g", {
      transform: "translate(0 1)",
      fill: "none",
      "fill-rule": "evenodd"
    }, [v("ellipse", {
      fill: t.value.shadowColor,
      cx: "32",
      cy: "33",
      rx: "32",
      ry: "7"
    }, null), v("g", {
      "fill-rule": "nonzero",
      stroke: t.value.borderColor
    }, [v("path", {
      d: "M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
    }, null), v("path", {
      d: "M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",
      fill: t.value.contentColor
    }, null)])])]);
  }
});
eC.PRESENTED_IMAGE_SIMPLE = !0;
const J_ = (e) => {
  const {
    componentCls: t,
    margin: n,
    marginXS: o,
    marginXL: i,
    fontSize: r,
    lineHeight: a
  } = e;
  return {
    [t]: {
      marginInline: o,
      fontSize: r,
      lineHeight: a,
      textAlign: "center",
      // 原来 &-image 没有父子结构，现在为了外层承担我们的hashId，改成父子结果
      [`${t}-image`]: {
        height: e.emptyImgHeight,
        marginBottom: o,
        opacity: e.opacityImage,
        img: {
          height: "100%"
        },
        svg: {
          height: "100%",
          margin: "auto"
        }
      },
      // 原来 &-footer 没有父子结构，现在为了外层承担我们的hashId，改成父子结果
      [`${t}-footer`]: {
        marginTop: n
      },
      "&-normal": {
        marginBlock: i,
        color: e.colorTextDisabled,
        [`${t}-image`]: {
          height: e.emptyImgHeightMD
        }
      },
      "&-small": {
        marginBlock: o,
        color: e.colorTextDisabled,
        [`${t}-image`]: {
          height: e.emptyImgHeightSM
        }
      }
    }
  };
}, eA = nn("Empty", (e) => {
  const {
    componentCls: t,
    controlHeightLG: n
  } = e, o = _t(e, {
    emptyImgCls: `${t}-img`,
    emptyImgHeight: n * 2.5,
    emptyImgHeightMD: n,
    emptyImgHeightSM: n * 0.875
  });
  return [J_(o)];
});
var tA = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const nA = () => ({
  prefixCls: String,
  imageStyle: Ct(),
  image: ni(),
  description: ni()
}), Sv = ye({
  name: "AEmpty",
  compatConfig: {
    MODE: 3
  },
  inheritAttrs: !1,
  props: nA(),
  setup(e, t) {
    let {
      slots: n = {},
      attrs: o
    } = t;
    const {
      direction: i,
      prefixCls: r
    } = yt("empty", e), [a, l] = eA(r);
    return () => {
      var s, u;
      const c = r.value, d = I(I({}, e), o), {
        image: f = ((s = n.image) === null || s === void 0 ? void 0 : s.call(n)) || ro(wv),
        description: p = ((u = n.description) === null || u === void 0 ? void 0 : u.call(n)) || void 0,
        imageStyle: m,
        class: b = ""
      } = d, y = tA(d, ["image", "description", "imageStyle", "class"]), S = typeof f == "function" ? f() : f, C = typeof S == "object" && "type" in S && S.type.PRESENTED_IMAGE_SIMPLE;
      return a(v(PS, {
        componentName: "Empty",
        children: (O) => {
          const $ = typeof p < "u" ? p : O.description, P = typeof $ == "string" ? $ : "empty";
          let k = null;
          return typeof S == "string" ? k = v("img", {
            alt: P,
            src: S
          }, null) : k = S, v("div", Z({
            class: Te(c, b, l.value, {
              [`${c}-normal`]: C,
              [`${c}-rtl`]: i.value === "rtl"
            })
          }, y), [v("div", {
            class: `${c}-image`,
            style: m
          }, [k]), $ && v("p", {
            class: `${c}-description`
          }, [$]), n.default && v("div", {
            class: `${c}-footer`
          }, [Ko(n.default())])]);
        }
      }, null));
    };
  }
});
Sv.PRESENTED_IMAGE_DEFAULT = () => ro(wv);
Sv.PRESENTED_IMAGE_SIMPLE = () => ro(eC);
const ru = er(Sv), Cv = (e) => {
  const {
    prefixCls: t
  } = yt("empty", e);
  return ((o) => {
    switch (o) {
      case "Table":
      case "List":
        return v(ru, {
          image: ru.PRESENTED_IMAGE_SIMPLE
        }, null);
      case "Select":
      case "TreeSelect":
      case "Cascader":
      case "Transfer":
      case "Mentions":
        return v(ru, {
          image: ru.PRESENTED_IMAGE_SIMPLE,
          class: `${t.value}-small`
        }, null);
      default:
        return v(ru, null, null);
    }
  })(e.componentName);
};
function oA(e) {
  return v(Cv, {
    componentName: e
  }, null);
}
const tC = Symbol("SizeContextKey"), nC = () => Tt(tC, le(void 0)), oC = (e) => {
  const t = nC();
  return kt(tC, R(() => e.value || t.value)), e;
}, yt = ((e, t) => {
  const n = nC(), o = Ji(), i = Tt(gv, I(I({}, wS), {
    renderEmpty: (x) => ro(Cv, {
      componentName: x
    })
  })), r = R(() => i.getPrefixCls(e, t.prefixCls)), a = R(() => {
    var x, E;
    return (x = t.direction) !== null && x !== void 0 ? x : (E = i.direction) === null || E === void 0 ? void 0 : E.value;
  }), l = R(() => {
    var x;
    return (x = t.iconPrefixCls) !== null && x !== void 0 ? x : i.iconPrefixCls.value;
  }), s = R(() => i.getPrefixCls()), u = R(() => {
    var x;
    return (x = i.autoInsertSpaceInButton) === null || x === void 0 ? void 0 : x.value;
  }), c = i.renderEmpty, d = i.space, f = i.pageHeader, p = i.form, m = R(() => {
    var x, E;
    return (x = t.getTargetContainer) !== null && x !== void 0 ? x : (E = i.getTargetContainer) === null || E === void 0 ? void 0 : E.value;
  }), b = R(() => {
    var x, E, z;
    return (E = (x = t.getContainer) !== null && x !== void 0 ? x : t.getPopupContainer) !== null && E !== void 0 ? E : (z = i.getPopupContainer) === null || z === void 0 ? void 0 : z.value;
  }), y = R(() => {
    var x, E;
    return (x = t.dropdownMatchSelectWidth) !== null && x !== void 0 ? x : (E = i.dropdownMatchSelectWidth) === null || E === void 0 ? void 0 : E.value;
  }), S = R(() => {
    var x;
    return (t.virtual === void 0 ? ((x = i.virtual) === null || x === void 0 ? void 0 : x.value) !== !1 : t.virtual !== !1) && y.value !== !1;
  }), C = R(() => t.size || n.value), O = R(() => {
    var x, E, z;
    return (x = t.autocomplete) !== null && x !== void 0 ? x : (z = (E = i.input) === null || E === void 0 ? void 0 : E.value) === null || z === void 0 ? void 0 : z.autocomplete;
  }), $ = R(() => {
    var x;
    return (x = t.disabled) !== null && x !== void 0 ? x : o.value;
  }), P = R(() => {
    var x;
    return (x = t.csp) !== null && x !== void 0 ? x : i.csp;
  }), k = R(() => {
    var x, E;
    return (x = t.wave) !== null && x !== void 0 ? x : (E = i.wave) === null || E === void 0 ? void 0 : E.value;
  });
  return {
    configProvider: i,
    prefixCls: r,
    direction: a,
    size: C,
    getTargetContainer: m,
    getPopupContainer: b,
    space: d,
    pageHeader: f,
    form: p,
    autoInsertSpaceInButton: u,
    renderEmpty: c,
    virtual: S,
    dropdownMatchSelectWidth: y,
    rootPrefixCls: s,
    getPrefixCls: i.getPrefixCls,
    autocomplete: O,
    csp: P,
    iconPrefixCls: l,
    disabled: $,
    select: i.select,
    wave: k
  };
});
function Tn(e, t) {
  const n = I({}, e);
  for (let o = 0; o < t.length; o += 1) {
    const i = t[o];
    delete n[i];
  }
  return n;
}
function P0(e) {
  return typeof e == "object" && e != null && e.nodeType === 1;
}
function O0(e, t) {
  return (!t || e !== "hidden") && e !== "visible" && e !== "clip";
}
function wp(e, t) {
  if (e.clientHeight < e.scrollHeight || e.clientWidth < e.scrollWidth) {
    var n = getComputedStyle(e, null);
    return O0(n.overflowY, t) || O0(n.overflowX, t) || (function(o) {
      var i = (function(r) {
        if (!r.ownerDocument || !r.ownerDocument.defaultView) return null;
        try {
          return r.ownerDocument.defaultView.frameElement;
        } catch {
          return null;
        }
      })(o);
      return !!i && (i.clientHeight < o.scrollHeight || i.clientWidth < o.scrollWidth);
    })(e);
  }
  return !1;
}
function Ec(e, t, n, o, i, r, a, l) {
  return r < e && a > t || r > e && a < t ? 0 : r <= e && l <= n || a >= t && l >= n ? r - e - o : a > t && l < n || r < e && l > n ? a - t + i : 0;
}
var I0 = function(e, t) {
  var n = window, o = t.scrollMode, i = t.block, r = t.inline, a = t.boundary, l = t.skipOverflowHiddenElements, s = typeof a == "function" ? a : function(Le) {
    return Le !== a;
  };
  if (!P0(e)) throw new TypeError("Invalid target");
  for (var u, c, d = document.scrollingElement || document.documentElement, f = [], p = e; P0(p) && s(p); ) {
    if ((p = (c = (u = p).parentElement) == null ? u.getRootNode().host || null : c) === d) {
      f.push(p);
      break;
    }
    p != null && p === document.body && wp(p) && !wp(document.documentElement) || p != null && wp(p, l) && f.push(p);
  }
  for (var m = n.visualViewport ? n.visualViewport.width : innerWidth, b = n.visualViewport ? n.visualViewport.height : innerHeight, y = window.scrollX || pageXOffset, S = window.scrollY || pageYOffset, C = e.getBoundingClientRect(), O = C.height, $ = C.width, P = C.top, k = C.right, x = C.bottom, E = C.left, z = i === "start" || i === "nearest" ? P : i === "end" ? x : P + O / 2, N = r === "center" ? E + $ / 2 : r === "end" ? k : E, D = [], W = 0; W < f.length; W++) {
    var H = f[W], L = H.getBoundingClientRect(), A = L.height, U = L.width, j = L.top, re = L.right, G = L.bottom, Y = L.left;
    if (o === "if-needed" && P >= 0 && E >= 0 && x <= b && k <= m && P >= j && x <= G && E >= Y && k <= re) return D;
    var K = getComputedStyle(H), J = parseInt(K.borderLeftWidth, 10), be = parseInt(K.borderTopWidth, 10), xe = parseInt(K.borderRightWidth, 10), ge = parseInt(K.borderBottomWidth, 10), de = 0, ne = 0, we = "offsetWidth" in H ? H.offsetWidth - H.clientWidth - J - xe : 0, ae = "offsetHeight" in H ? H.offsetHeight - H.clientHeight - be - ge : 0, se = "offsetWidth" in H ? H.offsetWidth === 0 ? 0 : U / H.offsetWidth : 0, he = "offsetHeight" in H ? H.offsetHeight === 0 ? 0 : A / H.offsetHeight : 0;
    if (d === H) de = i === "start" ? z : i === "end" ? z - b : i === "nearest" ? Ec(S, S + b, b, be, ge, S + z, S + z + O, O) : z - b / 2, ne = r === "start" ? N : r === "center" ? N - m / 2 : r === "end" ? N - m : Ec(y, y + m, m, J, xe, y + N, y + N + $, $), de = Math.max(0, de + S), ne = Math.max(0, ne + y);
    else {
      de = i === "start" ? z - j - be : i === "end" ? z - G + ge + ae : i === "nearest" ? Ec(j, G, A, be, ge + ae, z, z + O, O) : z - (j + A / 2) + ae / 2, ne = r === "start" ? N - Y - J : r === "center" ? N - (Y + U / 2) + we / 2 : r === "end" ? N - re + xe + we : Ec(Y, re, U, J, xe + we, N, N + $, $);
      var Me = H.scrollLeft, ke = H.scrollTop;
      z += ke - (de = Math.max(0, Math.min(ke + de / he, H.scrollHeight - A / he + ae))), N += Me - (ne = Math.max(0, Math.min(Me + ne / se, H.scrollWidth - U / se + we)));
    }
    D.push({ el: H, top: de, left: ne });
  }
  return D;
};
function iC(e) {
  return e === Object(e) && Object.keys(e).length !== 0;
}
function iA(e, t) {
  t === void 0 && (t = "auto");
  var n = "scrollBehavior" in document.body.style;
  e.forEach(function(o) {
    var i = o.el, r = o.top, a = o.left;
    i.scroll && n ? i.scroll({
      top: r,
      left: a,
      behavior: t
    }) : (i.scrollTop = r, i.scrollLeft = a);
  });
}
function rA(e) {
  return e === !1 ? {
    block: "end",
    inline: "nearest"
  } : iC(e) ? e : {
    block: "start",
    inline: "nearest"
  };
}
function aA(e, t) {
  var n = e.isConnected || e.ownerDocument.documentElement.contains(e);
  if (iC(t) && typeof t.behavior == "function")
    return t.behavior(n ? I0(e, t) : []);
  if (n) {
    var o = rA(t);
    return iA(I0(e, o), o.behavior);
  }
}
function lA(e, t) {
  for (var n = 0; n < t.length; n++) {
    var o = t[n];
    o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);
  }
}
function rC(e, t, n) {
  return n && lA(e, n), e;
}
function sd() {
  return (sd = Object.assign || function(e) {
    for (var t = 1; t < arguments.length; t++) {
      var n = arguments[t];
      for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (e[o] = n[o]);
    }
    return e;
  }).apply(this, arguments);
}
function aC(e, t) {
  e.prototype = Object.create(t.prototype), e.prototype.constructor = e, e.__proto__ = t;
}
function lC(e, t) {
  if (e == null) return {};
  var n, o, i = {}, r = Object.keys(e);
  for (o = 0; o < r.length; o++) t.indexOf(n = r[o]) >= 0 || (i[n] = e[n]);
  return i;
}
function M0(e) {
  return ((t = e) != null && typeof t == "object" && Array.isArray(t) === !1) == 1 && Object.prototype.toString.call(e) === "[object Object]";
  var t;
}
var sC = Object.prototype, uC = sC.toString, sA = sC.hasOwnProperty, cC = /^\s*function (\w+)/;
function T0(e) {
  var t, n = (t = e?.type) !== null && t !== void 0 ? t : e;
  if (n) {
    var o = n.toString().match(cC);
    return o ? o[1] : "";
  }
  return "";
}
var yl = function(e) {
  var t, n;
  return M0(e) !== !1 && typeof (t = e.constructor) == "function" && M0(n = t.prototype) !== !1 && n.hasOwnProperty("isPrototypeOf") !== !1;
}, dC = function(e) {
  return e;
}, Go = dC;
if (process.env.NODE_ENV !== "production") {
  var uA = typeof console < "u";
  Go = uA ? function(e) {
    console.warn("[VueTypes warn]: " + e);
  } : dC;
}
var Hu = function(e, t) {
  return sA.call(e, t);
}, cA = Number.isInteger || function(e) {
  return typeof e == "number" && isFinite(e) && Math.floor(e) === e;
}, Is = Array.isArray || function(e) {
  return uC.call(e) === "[object Array]";
}, Ms = function(e) {
  return uC.call(e) === "[object Function]";
}, Ad = function(e) {
  return yl(e) && Hu(e, "_vueTypes_name");
}, fC = function(e) {
  return yl(e) && (Hu(e, "type") || ["_vueTypes_name", "validator", "default", "required"].some(function(t) {
    return Hu(e, t);
  }));
};
function $v(e, t) {
  return Object.defineProperty(e.bind(t), "__original", { value: e });
}
function Pl(e, t, n) {
  var o, i = !0, r = "";
  o = yl(e) ? e : { type: e };
  var a = Ad(o) ? o._vueTypes_name + " - " : "";
  if (fC(o) && o.type !== null) {
    if (o.type === void 0 || o.type === !0 || !o.required && t === void 0) return i;
    Is(o.type) ? (i = o.type.some(function(d) {
      return Pl(d, t) === !0;
    }), r = o.type.map(function(d) {
      return T0(d);
    }).join(" or ")) : i = (r = T0(o)) === "Array" ? Is(t) : r === "Object" ? yl(t) : r === "String" || r === "Number" || r === "Boolean" || r === "Function" ? (function(d) {
      if (d == null) return "";
      var f = d.constructor.toString().match(cC);
      return f ? f[1] : "";
    })(t) === r : t instanceof o.type;
  }
  if (!i) {
    var l = a + 'value "' + t + '" should be of type "' + r + '"';
    return l;
  }
  if (Hu(o, "validator") && Ms(o.validator)) {
    var s = Go, u = [];
    if (Go = function(d) {
      u.push(d);
    }, i = o.validator(t), Go = s, !i) {
      var c = (u.length > 1 ? "* " : "") + u.join(`
* `);
      return u.length = 0, c;
    }
  }
  return i;
}
function si(e, t) {
  var n = Object.defineProperties(t, { _vueTypes_name: { value: e, writable: !0 }, isRequired: { get: function() {
    return this.required = !0, this;
  } }, def: { value: function(i) {
    return i !== void 0 || this.default ? Ms(i) || Pl(this, i) === !0 ? (this.default = Is(i) ? function() {
      return [].concat(i);
    } : yl(i) ? function() {
      return Object.assign({}, i);
    } : i, this) : (Go(this._vueTypes_name + ' - invalid default value: "' + i + '"'), this) : this;
  } } }), o = n.validator;
  return Ms(o) && (n.validator = $v(o, n)), n;
}
function br(e, t) {
  var n = si(e, t);
  return Object.defineProperty(n, "validate", { value: function(o) {
    return Ms(this.validator) && Go(this._vueTypes_name + ` - calling .validate() will overwrite the current custom validator function. Validator info:
` + JSON.stringify(this)), this.validator = $v(o, this), this;
  } });
}
function k0(e, t, n) {
  var o, i, r = (o = t, i = {}, Object.getOwnPropertyNames(o).forEach(function(d) {
    i[d] = Object.getOwnPropertyDescriptor(o, d);
  }), Object.defineProperties({}, i));
  if (r._vueTypes_name = e, !yl(n)) return r;
  var a, l, s = n.validator, u = lC(n, ["validator"]);
  if (Ms(s)) {
    var c = r.validator;
    c && (c = (l = (a = c).__original) !== null && l !== void 0 ? l : a), r.validator = $v(c ? function(d) {
      return c.call(this, d) && s.call(this, d);
    } : s, r);
  }
  return Object.assign(r, u);
}
function vf(e) {
  return e.replace(/^(?!\s*$)/gm, "  ");
}
var dA = function() {
  return br("any", {});
}, fA = function() {
  return br("function", { type: Function });
}, pA = function() {
  return br("boolean", { type: Boolean });
}, gA = function() {
  return br("string", { type: String });
}, hA = function() {
  return br("number", { type: Number });
}, vA = function() {
  return br("array", { type: Array });
}, mA = function() {
  return br("object", { type: Object });
}, bA = function() {
  return si("integer", { type: Number, validator: function(e) {
    return cA(e);
  } });
}, yA = function() {
  return si("symbol", { validator: function(e) {
    return typeof e == "symbol";
  } });
};
function xA(e, t) {
  if (t === void 0 && (t = "custom validation failed"), typeof e != "function") throw new TypeError("[VueTypes error]: You must provide a function as argument");
  return si(e.name || "<<anonymous function>>", { validator: function(n) {
    var o = e(n);
    return o || Go(this._vueTypes_name + " - " + t), o;
  } });
}
function wA(e) {
  if (!Is(e)) throw new TypeError("[VueTypes error]: You must provide an array as argument.");
  var t = 'oneOf - value should be one of "' + e.join('", "') + '".', n = e.reduce(function(o, i) {
    if (i != null) {
      var r = i.constructor;
      o.indexOf(r) === -1 && o.push(r);
    }
    return o;
  }, []);
  return si("oneOf", { type: n.length > 0 ? n : void 0, validator: function(o) {
    var i = e.indexOf(o) !== -1;
    return i || Go(t), i;
  } });
}
function SA(e) {
  if (!Is(e)) throw new TypeError("[VueTypes error]: You must provide an array as argument");
  for (var t = !1, n = [], o = 0; o < e.length; o += 1) {
    var i = e[o];
    if (fC(i)) {
      if (Ad(i) && i._vueTypes_name === "oneOf") {
        n = n.concat(i.type);
        continue;
      }
      if (Ms(i.validator) && (t = !0), i.type !== !0 && i.type) {
        n = n.concat(i.type);
        continue;
      }
    }
    n.push(i);
  }
  return n = n.filter(function(r, a) {
    return n.indexOf(r) === a;
  }), si("oneOfType", t ? { type: n, validator: function(r) {
    var a = [], l = e.some(function(s) {
      var u = Pl(Ad(s) && s._vueTypes_name === "oneOf" ? s.type || null : s, r);
      return typeof u == "string" && a.push(u), u === !0;
    });
    return l || Go("oneOfType - provided value does not match any of the " + a.length + ` passed-in validators:
` + vf(a.join(`
`))), l;
  } } : { type: n });
}
function CA(e) {
  return si("arrayOf", { type: Array, validator: function(t) {
    var n, o = t.every(function(i) {
      return (n = Pl(e, i)) === !0;
    });
    return o || Go(`arrayOf - value validation error:
` + vf(n)), o;
  } });
}
function $A(e) {
  return si("instanceOf", { type: e });
}
function PA(e) {
  return si("objectOf", { type: Object, validator: function(t) {
    var n, o = Object.keys(t).every(function(i) {
      return (n = Pl(e, t[i])) === !0;
    });
    return o || Go(`objectOf - value validation error:
` + vf(n)), o;
  } });
}
function OA(e) {
  var t = Object.keys(e), n = t.filter(function(i) {
    var r;
    return !!(!((r = e[i]) === null || r === void 0) && r.required);
  }), o = si("shape", { type: Object, validator: function(i) {
    var r = this;
    if (!yl(i)) return !1;
    var a = Object.keys(i);
    if (n.length > 0 && n.some(function(s) {
      return a.indexOf(s) === -1;
    })) {
      var l = n.filter(function(s) {
        return a.indexOf(s) === -1;
      });
      return Go(l.length === 1 ? 'shape - required property "' + l[0] + '" is not defined.' : 'shape - required properties "' + l.join('", "') + '" are not defined.'), !1;
    }
    return a.every(function(s) {
      if (t.indexOf(s) === -1) return r._vueTypes_isLoose === !0 || (Go('shape - shape definition does not include a "' + s + '" property. Allowed keys: "' + t.join('", "') + '".'), !1);
      var u = Pl(e[s], i[s]);
      return typeof u == "string" && Go('shape - "' + s + `" property validation error:
 ` + vf(u)), u === !0;
    });
  } });
  return Object.defineProperty(o, "_vueTypes_isLoose", { writable: !0, value: !1 }), Object.defineProperty(o, "loose", { get: function() {
    return this._vueTypes_isLoose = !0, this;
  } }), o;
}
var fr = (function() {
  function e() {
  }
  return e.extend = function(t) {
    var n = this;
    if (Is(t)) return t.forEach(function(d) {
      return n.extend(d);
    }), this;
    var o = t.name, i = t.validate, r = i !== void 0 && i, a = t.getter, l = a !== void 0 && a, s = lC(t, ["name", "validate", "getter"]);
    if (Hu(this, o)) throw new TypeError('[VueTypes error]: Type "' + o + '" already defined');
    var u, c = s.type;
    return Ad(c) ? (delete s.type, Object.defineProperty(this, o, l ? { get: function() {
      return k0(o, c, s);
    } } : { value: function() {
      var d, f = k0(o, c, s);
      return f.validator && (f.validator = (d = f.validator).bind.apply(d, [f].concat([].slice.call(arguments)))), f;
    } })) : (u = l ? { get: function() {
      var d = Object.assign({}, s);
      return r ? br(o, d) : si(o, d);
    }, enumerable: !0 } : { value: function() {
      var d, f, p = Object.assign({}, s);
      return d = r ? br(o, p) : si(o, p), p.validator && (d.validator = (f = p.validator).bind.apply(f, [d].concat([].slice.call(arguments)))), d;
    }, enumerable: !0 }, Object.defineProperty(this, o, u));
  }, rC(e, null, [{ key: "any", get: function() {
    return dA();
  } }, { key: "func", get: function() {
    return fA().def(this.defaults.func);
  } }, { key: "bool", get: function() {
    return pA().def(this.defaults.bool);
  } }, { key: "string", get: function() {
    return gA().def(this.defaults.string);
  } }, { key: "number", get: function() {
    return hA().def(this.defaults.number);
  } }, { key: "array", get: function() {
    return vA().def(this.defaults.array);
  } }, { key: "object", get: function() {
    return mA().def(this.defaults.object);
  } }, { key: "integer", get: function() {
    return bA().def(this.defaults.integer);
  } }, { key: "symbol", get: function() {
    return yA();
  } }]), e;
})();
function pC(e) {
  var t;
  return e === void 0 && (e = { func: function() {
  }, bool: !0, string: "", number: 0, array: function() {
    return [];
  }, object: function() {
    return {};
  }, integer: 0 }), (t = (function(n) {
    function o() {
      return n.apply(this, arguments) || this;
    }
    return aC(o, n), rC(o, null, [{ key: "sensibleDefaults", get: function() {
      return sd({}, this.defaults);
    }, set: function(i) {
      this.defaults = i !== !1 ? sd({}, i !== !0 ? i : e) : {};
    } }]), o;
  })(fr)).defaults = sd({}, e), t;
}
fr.defaults = {}, fr.custom = xA, fr.oneOf = wA, fr.instanceOf = $A, fr.oneOfType = SA, fr.arrayOf = CA, fr.objectOf = PA, fr.shape = OA, fr.utils = { validate: function(e, t) {
  return Pl(t, e) === !0;
}, toType: function(e, t, n) {
  return n === void 0 && (n = !1), n ? br(e, t) : si(e, t);
} };
(function(e) {
  function t() {
    return e.apply(this, arguments) || this;
  }
  return aC(t, e), t;
})(pC());
const ue = pC({
  func: void 0,
  bool: void 0,
  string: void 0,
  number: void 0,
  array: void 0,
  object: void 0,
  integer: void 0
});
ue.extend([{
  name: "looseBool",
  getter: !0,
  type: Boolean,
  default: void 0
}, {
  name: "style",
  getter: !0,
  type: [String, Object],
  default: void 0
}, {
  name: "VueNode",
  getter: !0,
  type: null
}]);
function IA(e) {
  return e.default = void 0, e;
}
const Fn = ((e, t, n) => {
  ei(e, `[ant-design-vue: ${t}] ${n}`);
});
function E0(e, t) {
  const {
    key: n
  } = e;
  let o;
  return "value" in e && ({
    value: o
  } = e), n ?? (o !== void 0 ? o : `rc-index-key-${t}`);
}
function gC(e, t) {
  const {
    label: n,
    value: o,
    options: i
  } = e || {};
  return {
    label: n || (t ? "children" : "label"),
    value: o || "value",
    options: i || "options"
  };
}
function MA(e) {
  let {
    fieldNames: t,
    childrenAsData: n
  } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  const o = [], {
    label: i,
    value: r,
    options: a
  } = gC(t, !1);
  function l(s, u) {
    s.forEach((c) => {
      const d = c[i];
      if (u || !(a in c)) {
        const f = c[r];
        o.push({
          key: E0(c, o.length),
          groupOption: u,
          data: c,
          label: d,
          value: f
        });
      } else {
        let f = d;
        f === void 0 && n && (f = c.label), o.push({
          key: E0(c, o.length),
          group: !0,
          data: c,
          label: f
        }), l(c[a], !0);
      }
    });
  }
  return l(e, !1), o;
}
function Qg(e) {
  const t = I({}, e);
  return "props" in t || Object.defineProperty(t, "props", {
    get() {
      return yo(!1, "Return type is option instead of Option instance. Please read value directly instead of reading from `props`."), t;
    }
  }), t;
}
function TA(e, t) {
  if (!t || !t.length)
    return null;
  let n = !1;
  function o(r, a) {
    let [l, ...s] = a;
    if (!l)
      return [r];
    const u = r.split(l);
    return n = n || u.length > 1, u.reduce((c, d) => [...c, ...o(d, s)], []).filter((c) => c);
  }
  const i = o(e, t);
  return n ? i : null;
}
function kA() {
  return "";
}
function EA(e) {
  return e ? e.ownerDocument : window.document;
}
function hC() {
}
const _A = () => ({
  action: ue.oneOfType([ue.string, ue.arrayOf(ue.string)]).def([]),
  showAction: ue.any.def([]),
  hideAction: ue.any.def([]),
  getPopupClassNameFromAlign: ue.any.def(kA),
  onPopupVisibleChange: Function,
  afterPopupVisibleChange: ue.func.def(hC),
  popup: ue.any,
  arrow: ue.bool.def(!0),
  popupStyle: {
    type: Object,
    default: void 0
  },
  prefixCls: ue.string.def("rc-trigger-popup"),
  popupClassName: ue.string.def(""),
  popupPlacement: String,
  builtinPlacements: ue.object,
  popupTransitionName: String,
  popupAnimation: ue.any,
  mouseEnterDelay: ue.number.def(0),
  mouseLeaveDelay: ue.number.def(0.1),
  zIndex: Number,
  focusDelay: ue.number.def(0),
  blurDelay: ue.number.def(0.15),
  getPopupContainer: Function,
  getDocument: ue.func.def(EA),
  forceRender: {
    type: Boolean,
    default: void 0
  },
  destroyPopupOnHide: {
    type: Boolean,
    default: !1
  },
  mask: {
    type: Boolean,
    default: !1
  },
  maskClosable: {
    type: Boolean,
    default: !0
  },
  // onPopupAlign: PropTypes.func.def(noop),
  popupAlign: ue.object.def(() => ({})),
  popupVisible: {
    type: Boolean,
    default: void 0
  },
  defaultPopupVisible: {
    type: Boolean,
    default: !1
  },
  maskTransitionName: String,
  maskAnimation: String,
  stretch: String,
  alignPoint: {
    type: Boolean,
    default: void 0
  },
  autoDestroy: {
    type: Boolean,
    default: !1
  },
  mobile: Object,
  getTriggerDOMNode: Function
}), Pv = {
  visible: Boolean,
  prefixCls: String,
  zIndex: Number,
  destroyPopupOnHide: Boolean,
  forceRender: Boolean,
  arrow: {
    type: Boolean,
    default: !0
  },
  // Legacy Motion
  animation: [String, Object],
  transitionName: String,
  // Measure
  stretch: {
    type: String
  },
  // Align
  align: {
    type: Object
  },
  point: {
    type: Object
  },
  getRootDomNode: {
    type: Function
  },
  getClassNameFromAlign: {
    type: Function
  },
  onAlign: {
    type: Function
  },
  onMouseenter: {
    type: Function
  },
  onMouseleave: {
    type: Function
  },
  onMousedown: {
    type: Function
  },
  onTouchstart: {
    type: Function
  }
}, AA = I(I({}, Pv), {
  mobile: {
    type: Object
  }
}), DA = I(I({}, Pv), {
  mask: Boolean,
  mobile: {
    type: Object
  },
  maskAnimation: String,
  maskTransitionName: String
});
function Ov(e) {
  let {
    prefixCls: t,
    animation: n,
    transitionName: o
  } = e;
  return n ? {
    name: `${t}-${n}`
  } : o ? {
    name: o
  } : {};
}
function vC(e) {
  const {
    prefixCls: t,
    visible: n,
    zIndex: o,
    mask: i,
    maskAnimation: r,
    maskTransitionName: a
  } = e;
  if (!i)
    return null;
  let l = {};
  return (a || r) && (l = Ov({
    prefixCls: t,
    transitionName: a,
    animation: r
  })), v(Ti, Z({
    appear: !0
  }, l), {
    default: () => [Zi(v("div", {
      style: {
        zIndex: o
      },
      class: `${t}-mask`
    }, null), [[vO("if"), n]])]
  });
}
vC.displayName = "Mask";
const zA = ye({
  compatConfig: {
    MODE: 3
  },
  name: "MobilePopupInner",
  inheritAttrs: !1,
  props: AA,
  emits: ["mouseenter", "mouseleave", "mousedown", "touchstart", "align"],
  setup(e, t) {
    let {
      expose: n,
      slots: o
    } = t;
    const i = le();
    return n({
      forceAlign: () => {
      },
      getElement: () => i.value
    }), () => {
      var r;
      const {
        zIndex: a,
        visible: l,
        prefixCls: s,
        mobile: {
          popupClassName: u,
          popupStyle: c,
          popupMotion: d = {},
          popupRender: f
        } = {}
      } = e, p = I({
        zIndex: a
      }, c);
      let m = no((r = o.default) === null || r === void 0 ? void 0 : r.call(o));
      m.length > 1 && (m = v("div", {
        class: `${s}-content`
      }, [m])), f && (m = f(m));
      const b = Te(s, u);
      return v(Ti, Z({
        ref: i
      }, d), {
        default: () => [l ? v("div", {
          class: b,
          style: p
        }, [m]) : null]
      });
    };
  }
});
var RA = function(e, t, n, o) {
  function i(r) {
    return r instanceof n ? r : new n(function(a) {
      a(r);
    });
  }
  return new (n || (n = Promise))(function(r, a) {
    function l(c) {
      try {
        u(o.next(c));
      } catch (d) {
        a(d);
      }
    }
    function s(c) {
      try {
        u(o.throw(c));
      } catch (d) {
        a(d);
      }
    }
    function u(c) {
      c.done ? r(c.value) : i(c.value).then(l, s);
    }
    u((o = o.apply(e, t || [])).next());
  });
};
const _0 = ["measure", "align", null, "motion"], NA = ((e, t) => {
  const n = Pe(null), o = Pe(), i = Pe(!1);
  function r(s) {
    i.value || (n.value = s);
  }
  function a() {
    Mt.cancel(o.value);
  }
  function l(s) {
    a(), o.value = Mt(() => {
      let u = n.value;
      switch (n.value) {
        case "align":
          u = "motion";
          break;
        case "motion":
          u = "stable";
          break;
      }
      r(u), s?.();
    });
  }
  return Ie(e, () => {
    r("measure");
  }, {
    immediate: !0,
    flush: "post"
  }), Pt(() => {
    Ie(n, () => {
      switch (n.value) {
        case "measure":
          t();
          break;
      }
      n.value && (o.value = Mt(() => RA(void 0, void 0, void 0, function* () {
        const s = _0.indexOf(n.value), u = _0[s + 1];
        u && s !== -1 && r(u);
      })));
    }, {
      immediate: !0,
      flush: "post"
    });
  }), At(() => {
    i.value = !0, a();
  }), [n, l];
}), BA = ((e) => {
  const t = Pe({
    width: 0,
    height: 0
  });
  function n(i) {
    t.value = {
      width: i.offsetWidth,
      height: i.offsetHeight
    };
  }
  return [R(() => {
    const i = {};
    if (e.value) {
      const {
        width: r,
        height: a
      } = t.value;
      e.value.indexOf("height") !== -1 && a ? i.height = `${a}px` : e.value.indexOf("minHeight") !== -1 && a && (i.minHeight = `${a}px`), e.value.indexOf("width") !== -1 && r ? i.width = `${r}px` : e.value.indexOf("minWidth") !== -1 && r && (i.minWidth = `${r}px`);
    }
    return i;
  }), n];
});
function A0(e, t) {
  var n = Object.keys(e);
  if (Object.getOwnPropertySymbols) {
    var o = Object.getOwnPropertySymbols(e);
    t && (o = o.filter(function(i) {
      return Object.getOwnPropertyDescriptor(e, i).enumerable;
    })), n.push.apply(n, o);
  }
  return n;
}
function D0(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? arguments[t] : {};
    t % 2 ? A0(Object(n), !0).forEach(function(o) {
      LA(e, o, n[o]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : A0(Object(n)).forEach(function(o) {
      Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(n, o));
    });
  }
  return e;
}
function Zg(e) {
  "@babel/helpers - typeof";
  return Zg = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
    return typeof t;
  } : function(t) {
    return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
  }, Zg(e);
}
function LA(e, t, n) {
  return t in e ? Object.defineProperty(e, t, {
    value: n,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : e[t] = n, e;
}
var au, FA = {
  Webkit: "-webkit-",
  Moz: "-moz-",
  // IE did it wrong again ...
  ms: "-ms-",
  O: "-o-"
};
function Dd() {
  if (au !== void 0)
    return au;
  au = "";
  var e = document.createElement("p").style, t = "Transform";
  for (var n in FA)
    n + t in e && (au = n);
  return au;
}
function mC() {
  return Dd() ? "".concat(Dd(), "TransitionProperty") : "transitionProperty";
}
function mf() {
  return Dd() ? "".concat(Dd(), "Transform") : "transform";
}
function z0(e, t) {
  var n = mC();
  n && (e.style[n] = t, n !== "transitionProperty" && (e.style.transitionProperty = t));
}
function Sp(e, t) {
  var n = mf();
  n && (e.style[n] = t, n !== "transform" && (e.style.transform = t));
}
function HA(e) {
  return e.style.transitionProperty || e.style[mC()];
}
function VA(e) {
  var t = window.getComputedStyle(e, null), n = t.getPropertyValue("transform") || t.getPropertyValue(mf());
  if (n && n !== "none") {
    var o = n.replace(/[^0-9\-.,]/g, "").split(",");
    return {
      x: parseFloat(o[12] || o[4], 0),
      y: parseFloat(o[13] || o[5], 0)
    };
  }
  return {
    x: 0,
    y: 0
  };
}
var jA = /matrix\((.*)\)/, WA = /matrix3d\((.*)\)/;
function qA(e, t) {
  var n = window.getComputedStyle(e, null), o = n.getPropertyValue("transform") || n.getPropertyValue(mf());
  if (o && o !== "none") {
    var i, r = o.match(jA);
    if (r)
      r = r[1], i = r.split(",").map(function(l) {
        return parseFloat(l, 10);
      }), i[4] = t.x, i[5] = t.y, Sp(e, "matrix(".concat(i.join(","), ")"));
    else {
      var a = o.match(WA)[1];
      i = a.split(",").map(function(l) {
        return parseFloat(l, 10);
      }), i[12] = t.x, i[13] = t.y, Sp(e, "matrix3d(".concat(i.join(","), ")"));
    }
  } else
    Sp(e, "translateX(".concat(t.x, "px) translateY(").concat(t.y, "px) translateZ(0)"));
}
var GA = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source, Qu;
function R0(e) {
  var t = e.style.display;
  e.style.display = "none", e.offsetHeight, e.style.display = t;
}
function ls(e, t, n) {
  var o = n;
  if (Zg(t) === "object") {
    for (var i in t)
      t.hasOwnProperty(i) && ls(e, i, t[i]);
    return;
  }
  if (typeof o < "u") {
    typeof o == "number" && (o = "".concat(o, "px")), e.style[t] = o;
    return;
  }
  return Qu(e, t);
}
function KA(e) {
  var t, n, o, i = e.ownerDocument, r = i.body, a = i && i.documentElement;
  return t = e.getBoundingClientRect(), n = Math.floor(t.left), o = Math.floor(t.top), n -= a.clientLeft || r.clientLeft || 0, o -= a.clientTop || r.clientTop || 0, {
    left: n,
    top: o
  };
}
function bC(e, t) {
  var n = e["page".concat(t ? "Y" : "X", "Offset")], o = "scroll".concat(t ? "Top" : "Left");
  if (typeof n != "number") {
    var i = e.document;
    n = i.documentElement[o], typeof n != "number" && (n = i.body[o]);
  }
  return n;
}
function yC(e) {
  return bC(e);
}
function xC(e) {
  return bC(e, !0);
}
function Vu(e) {
  var t = KA(e), n = e.ownerDocument, o = n.defaultView || n.parentWindow;
  return t.left += yC(o), t.top += xC(o), t;
}
function Iv(e) {
  return e != null && e == e.window;
}
function wC(e) {
  return Iv(e) ? e.document : e.nodeType === 9 ? e : e.ownerDocument;
}
function YA(e, t, n) {
  var o = n, i = "", r = wC(e);
  return o = o || r.defaultView.getComputedStyle(e, null), o && (i = o.getPropertyValue(t) || o[t]), i;
}
var UA = new RegExp("^(".concat(GA, ")(?!px)[a-z%]+$"), "i"), XA = /^(top|right|bottom|left)$/, Cp = "currentStyle", $p = "runtimeStyle", Ka = "left", QA = "px";
function ZA(e, t) {
  var n = e[Cp] && e[Cp][t];
  if (UA.test(n) && !XA.test(t)) {
    var o = e.style, i = o[Ka], r = e[$p][Ka];
    e[$p][Ka] = e[Cp][Ka], o[Ka] = t === "fontSize" ? "1em" : n || 0, n = o.pixelLeft + QA, o[Ka] = i, e[$p][Ka] = r;
  }
  return n === "" ? "auto" : n;
}
typeof window < "u" && (Qu = window.getComputedStyle ? YA : ZA);
function _c(e, t) {
  return e === "left" ? t.useCssRight ? "right" : e : t.useCssBottom ? "bottom" : e;
}
function N0(e) {
  if (e === "left")
    return "right";
  if (e === "right")
    return "left";
  if (e === "top")
    return "bottom";
  if (e === "bottom")
    return "top";
}
function B0(e, t, n) {
  ls(e, "position") === "static" && (e.style.position = "relative");
  var o = -999, i = -999, r = _c("left", n), a = _c("top", n), l = N0(r), s = N0(a);
  r !== "left" && (o = 999), a !== "top" && (i = 999);
  var u = "", c = Vu(e);
  ("left" in t || "top" in t) && (u = HA(e) || "", z0(e, "none")), "left" in t && (e.style[l] = "", e.style[r] = "".concat(o, "px")), "top" in t && (e.style[s] = "", e.style[a] = "".concat(i, "px")), R0(e);
  var d = Vu(e), f = {};
  for (var p in t)
    if (t.hasOwnProperty(p)) {
      var m = _c(p, n), b = p === "left" ? o : i, y = c[p] - d[p];
      m === p ? f[m] = b + y : f[m] = b - y;
    }
  ls(e, f), R0(e), ("left" in t || "top" in t) && z0(e, u);
  var S = {};
  for (var C in t)
    if (t.hasOwnProperty(C)) {
      var O = _c(C, n), $ = t[C] - c[C];
      C === O ? S[O] = f[O] + $ : S[O] = f[O] - $;
    }
  ls(e, S);
}
function JA(e, t) {
  var n = Vu(e), o = VA(e), i = {
    x: o.x,
    y: o.y
  };
  "left" in t && (i.x = o.x + t.left - n.left), "top" in t && (i.y = o.y + t.top - n.top), qA(e, i);
}
function eD(e, t, n) {
  if (n.ignoreShake) {
    var o = Vu(e), i = o.left.toFixed(0), r = o.top.toFixed(0), a = t.left.toFixed(0), l = t.top.toFixed(0);
    if (i === a && r === l)
      return;
  }
  n.useCssRight || n.useCssBottom ? B0(e, t, n) : n.useCssTransform && mf() in document.body.style ? JA(e, t) : B0(e, t, n);
}
function Mv(e, t) {
  for (var n = 0; n < e.length; n++)
    t(e[n]);
}
function SC(e) {
  return Qu(e, "boxSizing") === "border-box";
}
var tD = ["margin", "border", "padding"], Jg = -1, nD = 2, eh = 1, oD = 0;
function iD(e, t, n) {
  var o = {}, i = e.style, r;
  for (r in t)
    t.hasOwnProperty(r) && (o[r] = i[r], i[r] = t[r]);
  n.call(e);
  for (r in t)
    t.hasOwnProperty(r) && (i[r] = o[r]);
}
function vu(e, t, n) {
  var o = 0, i, r, a;
  for (r = 0; r < t.length; r++)
    if (i = t[r], i)
      for (a = 0; a < n.length; a++) {
        var l = void 0;
        i === "border" ? l = "".concat(i).concat(n[a], "Width") : l = i + n[a], o += parseFloat(Qu(e, l)) || 0;
      }
  return o;
}
var hr = {
  getParent: function(t) {
    var n = t;
    do
      n.nodeType === 11 && n.host ? n = n.host : n = n.parentNode;
    while (n && n.nodeType !== 1 && n.nodeType !== 9);
    return n;
  }
};
Mv(["Width", "Height"], function(e) {
  hr["doc".concat(e)] = function(t) {
    var n = t.document;
    return Math.max(
      // firefox chrome documentElement.scrollHeight< body.scrollHeight
      // ie standard mode : documentElement.scrollHeight> body.scrollHeight
      n.documentElement["scroll".concat(e)],
      // quirks : documentElement.scrollHeight 最大等于可视窗口多一点？
      n.body["scroll".concat(e)],
      hr["viewport".concat(e)](n)
    );
  }, hr["viewport".concat(e)] = function(t) {
    var n = "client".concat(e), o = t.document, i = o.body, r = o.documentElement, a = r[n];
    return o.compatMode === "CSS1Compat" && a || i && i[n] || a;
  };
});
function L0(e, t, n) {
  var o = n;
  if (Iv(e))
    return t === "width" ? hr.viewportWidth(e) : hr.viewportHeight(e);
  if (e.nodeType === 9)
    return t === "width" ? hr.docWidth(e) : hr.docHeight(e);
  var i = t === "width" ? ["Left", "Right"] : ["Top", "Bottom"], r = Math.floor(t === "width" ? e.getBoundingClientRect().width : e.getBoundingClientRect().height), a = SC(e), l = 0;
  (r == null || r <= 0) && (r = void 0, l = Qu(e, t), (l == null || Number(l) < 0) && (l = e.style[t] || 0), l = Math.floor(parseFloat(l)) || 0), o === void 0 && (o = a ? eh : Jg);
  var s = r !== void 0 || a, u = r || l;
  return o === Jg ? s ? u - vu(e, ["border", "padding"], i) : l : s ? o === eh ? u : u + (o === nD ? -vu(e, ["border"], i) : vu(e, ["margin"], i)) : l + vu(e, tD.slice(o), i);
}
var rD = {
  position: "absolute",
  visibility: "hidden",
  display: "block"
};
function F0() {
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
    t[n] = arguments[n];
  var o, i = t[0];
  return i.offsetWidth !== 0 ? o = L0.apply(void 0, t) : iD(i, rD, function() {
    o = L0.apply(void 0, t);
  }), o;
}
Mv(["width", "height"], function(e) {
  var t = e.charAt(0).toUpperCase() + e.slice(1);
  hr["outer".concat(t)] = function(o, i) {
    return o && F0(o, e, i ? oD : eh);
  };
  var n = e === "width" ? ["Left", "Right"] : ["Top", "Bottom"];
  hr[e] = function(o, i) {
    var r = i;
    if (r !== void 0) {
      if (o) {
        var a = SC(o);
        return a && (r += vu(o, ["padding", "border"], n)), ls(o, e, r);
      }
      return;
    }
    return o && F0(o, e, Jg);
  };
});
function CC(e, t) {
  for (var n in t)
    t.hasOwnProperty(n) && (e[n] = t[n]);
  return e;
}
var Et = {
  getWindow: function(t) {
    if (t && t.document && t.setTimeout)
      return t;
    var n = t.ownerDocument || t;
    return n.defaultView || n.parentWindow;
  },
  getDocument: wC,
  offset: function(t, n, o) {
    if (typeof n < "u")
      eD(t, n, o || {});
    else
      return Vu(t);
  },
  isWindow: Iv,
  each: Mv,
  css: ls,
  clone: function(t) {
    var n, o = {};
    for (n in t)
      t.hasOwnProperty(n) && (o[n] = t[n]);
    var i = t.overflow;
    if (i)
      for (n in t)
        t.hasOwnProperty(n) && (o.overflow[n] = t.overflow[n]);
    return o;
  },
  mix: CC,
  getWindowScrollLeft: function(t) {
    return yC(t);
  },
  getWindowScrollTop: function(t) {
    return xC(t);
  },
  merge: function() {
    for (var t = {}, n = 0; n < arguments.length; n++)
      Et.mix(t, n < 0 || arguments.length <= n ? void 0 : arguments[n]);
    return t;
  },
  viewportWidth: 0,
  viewportHeight: 0
};
CC(Et, hr);
var Pp = Et.getParent;
function th(e) {
  if (Et.isWindow(e) || e.nodeType === 9)
    return null;
  var t = Et.getDocument(e), n = t.body, o, i = Et.css(e, "position"), r = i === "fixed" || i === "absolute";
  if (!r)
    return e.nodeName.toLowerCase() === "html" ? null : Pp(e);
  for (o = Pp(e); o && o !== n && o.nodeType !== 9; o = Pp(o))
    if (i = Et.css(o, "position"), i !== "static")
      return o;
  return null;
}
var H0 = Et.getParent;
function aD(e) {
  if (Et.isWindow(e) || e.nodeType === 9)
    return !1;
  var t = Et.getDocument(e), n = t.body, o = null;
  for (
    o = H0(e);
    // 修复元素位于 document.documentElement 下导致崩溃问题
    o && o !== n && o !== t;
    o = H0(o)
  ) {
    var i = Et.css(o, "position");
    if (i === "fixed")
      return !0;
  }
  return !1;
}
function Tv(e, t) {
  for (var n = {
    left: 0,
    right: 1 / 0,
    top: 0,
    bottom: 1 / 0
  }, o = th(e), i = Et.getDocument(e), r = i.defaultView || i.parentWindow, a = i.body, l = i.documentElement; o; ) {
    if ((navigator.userAgent.indexOf("MSIE") === -1 || o.clientWidth !== 0) && // body may have overflow set on it, yet we still get the entire
    // viewport. In some browsers, el.offsetParent may be
    // document.documentElement, so check for that too.
    o !== a && o !== l && Et.css(o, "overflow") !== "visible") {
      var s = Et.offset(o);
      s.left += o.clientLeft, s.top += o.clientTop, n.top = Math.max(n.top, s.top), n.right = Math.min(
        n.right,
        // consider area without scrollBar
        s.left + o.clientWidth
      ), n.bottom = Math.min(n.bottom, s.top + o.clientHeight), n.left = Math.max(n.left, s.left);
    } else if (o === a || o === l)
      break;
    o = th(o);
  }
  var u = null;
  if (!Et.isWindow(e) && e.nodeType !== 9) {
    u = e.style.position;
    var c = Et.css(e, "position");
    c === "absolute" && (e.style.position = "fixed");
  }
  var d = Et.getWindowScrollLeft(r), f = Et.getWindowScrollTop(r), p = Et.viewportWidth(r), m = Et.viewportHeight(r), b = l.scrollWidth, y = l.scrollHeight, S = window.getComputedStyle(a);
  if (S.overflowX === "hidden" && (b = r.innerWidth), S.overflowY === "hidden" && (y = r.innerHeight), e.style && (e.style.position = u), t || aD(e))
    n.left = Math.max(n.left, d), n.top = Math.max(n.top, f), n.right = Math.min(n.right, d + p), n.bottom = Math.min(n.bottom, f + m);
  else {
    var C = Math.max(b, d + p);
    n.right = Math.min(n.right, C);
    var O = Math.max(y, f + m);
    n.bottom = Math.min(n.bottom, O);
  }
  return n.top >= 0 && n.left >= 0 && n.bottom > n.top && n.right > n.left ? n : null;
}
function lD(e, t, n, o) {
  var i = Et.clone(e), r = {
    width: t.width,
    height: t.height
  };
  return o.adjustX && i.left < n.left && (i.left = n.left), o.resizeWidth && i.left >= n.left && i.left + r.width > n.right && (r.width -= i.left + r.width - n.right), o.adjustX && i.left + r.width > n.right && (i.left = Math.max(n.right - r.width, n.left)), o.adjustY && i.top < n.top && (i.top = n.top), o.resizeHeight && i.top >= n.top && i.top + r.height > n.bottom && (r.height -= i.top + r.height - n.bottom), o.adjustY && i.top + r.height > n.bottom && (i.top = Math.max(n.bottom - r.height, n.top)), Et.mix(i, r);
}
function kv(e) {
  var t, n, o;
  if (!Et.isWindow(e) && e.nodeType !== 9)
    t = Et.offset(e), n = Et.outerWidth(e), o = Et.outerHeight(e);
  else {
    var i = Et.getWindow(e);
    t = {
      left: Et.getWindowScrollLeft(i),
      top: Et.getWindowScrollTop(i)
    }, n = Et.viewportWidth(i), o = Et.viewportHeight(i);
  }
  return t.width = n, t.height = o, t;
}
function V0(e, t) {
  var n = t.charAt(0), o = t.charAt(1), i = e.width, r = e.height, a = e.left, l = e.top;
  return n === "c" ? l += r / 2 : n === "b" && (l += r), o === "c" ? a += i / 2 : o === "r" && (a += i), {
    left: a,
    top: l
  };
}
function Ac(e, t, n, o, i) {
  var r = V0(t, n[1]), a = V0(e, n[0]), l = [a.left - r.left, a.top - r.top];
  return {
    left: Math.round(e.left - l[0] + o[0] - i[0]),
    top: Math.round(e.top - l[1] + o[1] - i[1])
  };
}
function j0(e, t, n) {
  return e.left < n.left || e.left + t.width > n.right;
}
function W0(e, t, n) {
  return e.top < n.top || e.top + t.height > n.bottom;
}
function sD(e, t, n) {
  return e.left > n.right || e.left + t.width < n.left;
}
function uD(e, t, n) {
  return e.top > n.bottom || e.top + t.height < n.top;
}
function Dc(e, t, n) {
  var o = [];
  return Et.each(e, function(i) {
    o.push(i.replace(t, function(r) {
      return n[r];
    }));
  }), o;
}
function zc(e, t) {
  return e[t] = -e[t], e;
}
function q0(e, t) {
  var n;
  return /%$/.test(e) ? n = parseInt(e.substring(0, e.length - 1), 10) / 100 * t : n = parseInt(e, 10), n || 0;
}
function G0(e, t) {
  e[0] = q0(e[0], t.width), e[1] = q0(e[1], t.height);
}
function $C(e, t, n, o) {
  var i = n.points, r = n.offset || [0, 0], a = n.targetOffset || [0, 0], l = n.overflow, s = n.source || e;
  r = [].concat(r), a = [].concat(a), l = l || {};
  var u = {}, c = 0, d = !!(l && l.alwaysByViewport), f = Tv(s, d), p = kv(s);
  G0(r, p), G0(a, t);
  var m = Ac(p, t, i, r, a), b = Et.merge(p, m);
  if (f && (l.adjustX || l.adjustY) && o) {
    if (l.adjustX && j0(m, p, f)) {
      var y = Dc(i, /[lr]/gi, {
        l: "r",
        r: "l"
      }), S = zc(r, 0), C = zc(a, 0), O = Ac(p, t, y, S, C);
      sD(O, p, f) || (c = 1, i = y, r = S, a = C);
    }
    if (l.adjustY && W0(m, p, f)) {
      var $ = Dc(i, /[tb]/gi, {
        t: "b",
        b: "t"
      }), P = zc(r, 1), k = zc(a, 1), x = Ac(p, t, $, P, k);
      uD(x, p, f) || (c = 1, i = $, r = P, a = k);
    }
    c && (m = Ac(p, t, i, r, a), Et.mix(b, m));
    var E = j0(m, p, f), z = W0(m, p, f);
    if (E || z) {
      var N = i;
      E && (N = Dc(i, /[lr]/gi, {
        l: "r",
        r: "l"
      })), z && (N = Dc(i, /[tb]/gi, {
        t: "b",
        b: "t"
      })), i = N, r = n.offset || [0, 0], a = n.targetOffset || [0, 0];
    }
    u.adjustX = l.adjustX && E, u.adjustY = l.adjustY && z, (u.adjustX || u.adjustY) && (b = lD(m, p, f, u));
  }
  return b.width !== p.width && Et.css(s, "width", Et.width(s) + b.width - p.width), b.height !== p.height && Et.css(s, "height", Et.height(s) + b.height - p.height), Et.offset(s, {
    left: b.left,
    top: b.top
  }, {
    useCssRight: n.useCssRight,
    useCssBottom: n.useCssBottom,
    useCssTransform: n.useCssTransform,
    ignoreShake: n.ignoreShake
  }), {
    points: i,
    offset: r,
    targetOffset: a,
    overflow: u
  };
}
function cD(e, t) {
  var n = Tv(e, t), o = kv(e);
  return !n || o.left + o.width <= n.left || o.top + o.height <= n.top || o.left >= n.right || o.top >= n.bottom;
}
function Ev(e, t, n) {
  var o = n.target || t, i = kv(o), r = !cD(o, n.overflow && n.overflow.alwaysByViewport);
  return $C(e, i, n, r);
}
Ev.__getOffsetParent = th;
Ev.__getVisibleRectForElement = Tv;
function dD(e, t, n) {
  var o, i, r = Et.getDocument(e), a = r.defaultView || r.parentWindow, l = Et.getWindowScrollLeft(a), s = Et.getWindowScrollTop(a), u = Et.viewportWidth(a), c = Et.viewportHeight(a);
  "pageX" in t ? o = t.pageX : o = l + t.clientX, "pageY" in t ? i = t.pageY : i = s + t.clientY;
  var d = {
    left: o,
    top: i,
    width: 0,
    height: 0
  }, f = o >= 0 && o <= l + u && i >= 0 && i <= s + c, p = [n.points[0], "cc"];
  return $C(e, d, D0(D0({}, n), {}, {
    points: p
  }), f);
}
function An(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1, i = e;
  if (Array.isArray(e) && (i = Ko(e)[0]), !i)
    return null;
  const r = vl(i, t, o);
  return r.props = n ? I(I({}, r.props), t) : r.props, Zn(typeof r.props.class != "object", "class must be string"), r;
}
function fD(e, t, n) {
  Ia(vl(e, I({}, t)), n);
}
const PC = (e) => (e || []).some((t) => Qi(t) ? !(t.type === iw || t.type === Ve && !PC(t.children)) : !0) ? e : null;
function pD(e, t, n, o) {
  var i;
  const r = (i = e[t]) === null || i === void 0 ? void 0 : i.call(e, n);
  return PC(r) ? r : o?.();
}
const _v = ((e) => {
  if (!e)
    return !1;
  if (e.offsetParent)
    return !0;
  if (e.getBBox) {
    const t = e.getBBox();
    if (t.width || t.height)
      return !0;
  }
  if (e.getBoundingClientRect) {
    const t = e.getBoundingClientRect();
    if (t.width || t.height)
      return !0;
  }
  return !1;
});
function gD(e, t) {
  return e === t ? !0 : !e || !t ? !1 : "pageX" in t && "pageY" in t ? e.pageX === t.pageX && e.pageY === t.pageY : "clientX" in t && "clientY" in t ? e.clientX === t.clientX && e.clientY === t.clientY : !1;
}
function hD(e, t) {
  e !== document.activeElement && ma(t, e) && typeof e.focus == "function" && e.focus();
}
function K0(e, t) {
  let n = null, o = null;
  function i(a) {
    let [{
      target: l
    }] = a;
    if (!document.documentElement.contains(l)) return;
    const {
      width: s,
      height: u
    } = l.getBoundingClientRect(), c = Math.floor(s), d = Math.floor(u);
    (n !== c || o !== d) && Promise.resolve().then(() => {
      t({
        width: c,
        height: d
      });
    }), n = c, o = d;
  }
  const r = new gS(i);
  return e && r.observe(e), () => {
    r.disconnect();
  };
}
const vD = ((e, t) => {
  let n = !1, o = null;
  function i() {
    clearTimeout(o);
  }
  function r(a) {
    if (!n || a === !0) {
      if (e() === !1)
        return;
      n = !0, i(), o = setTimeout(() => {
        n = !1;
      }, t.value);
    } else
      i(), o = setTimeout(() => {
        n = !1, r();
      }, t.value);
  }
  return [r, () => {
    n = !1, i();
  }];
}), mD = {
  align: Object,
  target: [Object, Function],
  onAlign: Function,
  monitorBufferTime: Number,
  monitorWindowResize: Boolean,
  disabled: Boolean
};
function Y0(e) {
  return typeof e != "function" ? null : e();
}
function U0(e) {
  return typeof e != "object" || !e ? null : e;
}
const bD = ye({
  compatConfig: {
    MODE: 3
  },
  name: "Align",
  props: mD,
  emits: ["align"],
  setup(e, t) {
    let {
      expose: n,
      slots: o
    } = t;
    const i = le({}), r = le(), [a, l] = vD(() => {
      const {
        disabled: f,
        target: p,
        align: m,
        onAlign: b
      } = e;
      if (!f && p && r.value) {
        const y = r.value;
        let S;
        const C = Y0(p), O = U0(p);
        i.value.element = C, i.value.point = O, i.value.align = m;
        const {
          activeElement: $
        } = document;
        return C && _v(C) ? S = Ev(y, C, m) : O && (S = dD(y, O, m)), hD($, y), b && S && b(y, S), !0;
      }
      return !1;
    }, R(() => e.monitorBufferTime)), s = le({
      cancel: () => {
      }
    }), u = le({
      cancel: () => {
      }
    }), c = () => {
      const f = e.target, p = Y0(f), m = U0(f);
      r.value !== u.value.element && (u.value.cancel(), u.value.element = r.value, u.value.cancel = K0(r.value, a)), (i.value.element !== p || !gD(i.value.point, m) || !Uh(i.value.align, e.align)) && (a(), s.value.element !== p && (s.value.cancel(), s.value.element = p, s.value.cancel = K0(p, a)));
    };
    Pt(() => {
      Nt(() => {
        c();
      });
    }), Ds(() => {
      Nt(() => {
        c();
      });
    }), Ie(() => e.disabled, (f) => {
      f ? l() : a();
    }, {
      immediate: !0,
      flush: "post"
    });
    const d = le(null);
    return Ie(() => e.monitorWindowResize, (f) => {
      f ? d.value || (d.value = Gi(window, "resize", a)) : d.value && (d.value.remove(), d.value = null);
    }, {
      flush: "post"
    }), Lo(() => {
      s.value.cancel(), u.value.cancel(), d.value && d.value.remove(), l();
    }), n({
      forceAlign: () => a(!0)
    }), () => {
      const f = o?.default();
      return f ? An(f[0], {
        ref: r
      }, !0, !0) : null;
    };
  }
});
li("bottomLeft", "bottomRight", "topLeft", "topRight");
const yD = (e) => e !== void 0 && (e === "topLeft" || e === "topRight") ? "slide-down" : "slide-up", xl = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  return I(e ? {
    name: e,
    appear: !0,
    // type: 'animation',
    // appearFromClass: `${transitionName}-appear ${transitionName}-appear-prepare`,
    // appearActiveClass: `antdv-base-transtion`,
    // appearToClass: `${transitionName}-appear ${transitionName}-appear-active`,
    enterFromClass: `${e}-enter ${e}-enter-prepare ${e}-enter-start`,
    enterActiveClass: `${e}-enter ${e}-enter-prepare`,
    enterToClass: `${e}-enter ${e}-enter-active`,
    leaveFromClass: ` ${e}-leave`,
    leaveActiveClass: `${e}-leave ${e}-leave-active`,
    leaveToClass: `${e}-leave ${e}-leave-active`
  } : {
    css: !1
  }, t);
}, Av = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  return I(e ? {
    name: e,
    appear: !0,
    // appearFromClass: `${transitionName}-appear ${transitionName}-appear-prepare`,
    appearActiveClass: `${e}`,
    appearToClass: `${e}-appear ${e}-appear-active`,
    enterFromClass: `${e}-appear ${e}-enter ${e}-appear-prepare ${e}-enter-prepare`,
    enterActiveClass: `${e}`,
    enterToClass: `${e}-enter ${e}-appear ${e}-appear-active ${e}-enter-active`,
    leaveActiveClass: `${e} ${e}-leave`,
    leaveToClass: `${e}-leave-active`
  } : {
    css: !1
  }, t);
}, Kr = (e, t, n) => n !== void 0 ? n : `${e}-${t}`, xD = ye({
  compatConfig: {
    MODE: 3
  },
  name: "PopupInner",
  inheritAttrs: !1,
  props: Pv,
  emits: ["mouseenter", "mouseleave", "mousedown", "touchstart", "align"],
  setup(e, t) {
    let {
      expose: n,
      attrs: o,
      slots: i
    } = t;
    const r = Pe(), a = Pe(), l = Pe(), [s, u] = BA(Ut(e, "stretch")), c = () => {
      e.stretch && u(e.getRootDomNode());
    }, d = Pe(!1);
    let f;
    Ie(() => e.visible, (k) => {
      clearTimeout(f), k ? f = setTimeout(() => {
        d.value = e.visible;
      }) : d.value = !1;
    }, {
      immediate: !0
    });
    const [p, m] = NA(d, c), b = Pe(), y = () => e.point ? e.point : e.getRootDomNode, S = () => {
      var k;
      (k = r.value) === null || k === void 0 || k.forceAlign();
    }, C = (k, x) => {
      var E;
      const z = e.getClassNameFromAlign(x), N = l.value;
      l.value !== z && (l.value = z), p.value === "align" && (N !== z ? Promise.resolve().then(() => {
        S();
      }) : m(() => {
        var D;
        (D = b.value) === null || D === void 0 || D.call(b);
      }), (E = e.onAlign) === null || E === void 0 || E.call(e, k, x));
    }, O = R(() => {
      const k = typeof e.animation == "object" ? e.animation : Ov(e);
      return ["onAfterEnter", "onAfterLeave"].forEach((x) => {
        const E = k[x];
        k[x] = (z) => {
          m(), p.value = "stable", E?.(z);
        };
      }), k;
    }), $ = () => new Promise((k) => {
      b.value = k;
    });
    Ie([O, p], () => {
      !O.value && p.value === "motion" && m();
    }, {
      immediate: !0
    }), n({
      forceAlign: S,
      getElement: () => a.value.$el || a.value
    });
    const P = R(() => {
      var k;
      return !(!((k = e.align) === null || k === void 0) && k.points && (p.value === "align" || p.value === "stable"));
    });
    return () => {
      var k;
      const {
        zIndex: x,
        align: E,
        prefixCls: z,
        destroyPopupOnHide: N,
        onMouseenter: D,
        onMouseleave: W,
        onTouchstart: H = () => {
        },
        onMousedown: L
      } = e, A = p.value, U = [I(I({}, s.value), {
        zIndex: x,
        opacity: A === "motion" || A === "stable" || !d.value ? null : 0,
        // pointerEvents: statusValue === 'stable' ? null : 'none',
        pointerEvents: !d.value && A !== "stable" ? "none" : null
      }), o.style];
      let j = no((k = i.default) === null || k === void 0 ? void 0 : k.call(i, {
        visible: e.visible
      }));
      j.length > 1 && (j = v("div", {
        class: `${z}-content`
      }, [j]));
      const re = Te(z, o.class, l.value, !e.arrow && `${z}-arrow-hidden`), Y = d.value || !e.visible ? xl(O.value.name, O.value) : {};
      return v(Ti, Z(Z({
        ref: a
      }, Y), {}, {
        onBeforeEnter: $
      }), {
        default: () => !N || e.visible ? Zi(v(bD, {
          target: y(),
          key: "popup",
          ref: r,
          monitorWindowResize: !0,
          disabled: P.value,
          align: E,
          onAlign: C
        }, {
          default: () => v("div", {
            class: re,
            onMouseenter: D,
            onMouseleave: W,
            onMousedown: No(L, ["capture"]),
            [bo ? "onTouchstartPassive" : "onTouchstart"]: No(H, ["capture"]),
            style: U
          }, [j])
        }), [[mr, d.value]]) : null
      });
    };
  }
}), wD = ye({
  compatConfig: {
    MODE: 3
  },
  name: "Popup",
  inheritAttrs: !1,
  props: DA,
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      expose: i
    } = t;
    const r = Pe(!1), a = Pe(!1), l = Pe(), s = Pe();
    return Ie([() => e.visible, () => e.mobile], () => {
      r.value = e.visible, e.visible && e.mobile && (a.value = !0);
    }, {
      immediate: !0,
      flush: "post"
    }), i({
      forceAlign: () => {
        var u;
        (u = l.value) === null || u === void 0 || u.forceAlign();
      },
      getElement: () => {
        var u;
        return (u = l.value) === null || u === void 0 ? void 0 : u.getElement();
      }
    }), () => {
      const u = I(I(I({}, e), n), {
        visible: r.value
      }), c = a.value ? v(zA, Z(Z({}, u), {}, {
        mobile: e.mobile,
        ref: l
      }), {
        default: o.default
      }) : v(xD, Z(Z({}, u), {}, {
        ref: l
      }), {
        default: o.default
      });
      return v("div", {
        ref: s
      }, [v(vC, u, null), c]);
    };
  }
});
function SD(e, t, n) {
  return n ? e[0] === t[0] : e[0] === t[0] && e[1] === t[1];
}
function X0(e, t, n) {
  const o = e[t] || {};
  return I(I({}, o), n);
}
function CD(e, t, n, o) {
  const {
    points: i
  } = n, r = Object.keys(e);
  for (let a = 0; a < r.length; a += 1) {
    const l = r[a];
    if (SD(e[l].points, i, o))
      return `${t}-placement-${l}`;
  }
  return "";
}
const bf = {
  methods: {
    setState() {
      let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 ? arguments[1] : void 0, n = typeof e == "function" ? e(this.$data, this.$props) : e;
      if (this.getDerivedStateFromProps) {
        const o = this.getDerivedStateFromProps(sE(this), I(I({}, this.$data), n));
        if (o === null)
          return;
        n = I(I({}, n), o || {});
      }
      I(this.$data, n), this._.isMounted && this.$forceUpdate(), Nt(() => {
        t && t();
      });
    },
    __emit() {
      const e = [].slice.call(arguments, 0);
      let t = e[0];
      t = `on${t[0].toUpperCase()}${t.substring(1)}`;
      const n = this.$props[t] || this.$attrs[t];
      if (e.length && n)
        if (Array.isArray(n))
          for (let o = 0, i = n.length; o < i; o++)
            n[o](...e.slice(1));
        else
          n(...e.slice(1));
    }
  }
}, OC = Symbol("PortalContextKey"), Dv = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
    inTriggerContext: !0
  };
  kt(OC, {
    inTriggerContext: t.inTriggerContext,
    shouldRender: R(() => {
      const {
        sPopupVisible: n,
        popupRef: o,
        forceRender: i,
        autoDestroy: r
      } = e || {};
      let a = !1;
      return (n || o || i) && (a = !0), !n && r && (a = !1), a;
    })
  });
}, $D = () => {
  Dv({}, {
    inTriggerContext: !1
  });
  const e = Tt(OC, {
    shouldRender: R(() => !1),
    inTriggerContext: !1
  });
  return {
    shouldRender: R(() => e.shouldRender.value || e.inTriggerContext === !1)
  };
}, IC = ye({
  compatConfig: {
    MODE: 3
  },
  name: "Portal",
  inheritAttrs: !1,
  props: {
    getContainer: ue.func.isRequired,
    didUpdate: Function
  },
  setup(e, t) {
    let {
      slots: n
    } = t, o = !0, i;
    const {
      shouldRender: r
    } = $D();
    function a() {
      r.value && (i = e.getContainer());
    }
    Xd(() => {
      o = !1, a();
    }), Pt(() => {
      i || a();
    });
    const l = Ie(r, () => {
      r.value && !i && (i = e.getContainer()), i && l();
    });
    return Ds(() => {
      Nt(() => {
        var s;
        r.value && ((s = e.didUpdate) === null || s === void 0 || s.call(e, e));
      });
    }), () => {
      var s;
      return r.value ? o ? (s = n.default) === null || s === void 0 ? void 0 : s.call(n) : i ? v(Qd, {
        to: i
      }, n) : null : null;
    };
  }
});
let Op;
function PD(e) {
  if (typeof document > "u")
    return 0;
  if (Op === void 0) {
    const t = document.createElement("div");
    t.style.width = "100%", t.style.height = "200px";
    const n = document.createElement("div"), o = n.style;
    o.position = "absolute", o.top = "0", o.left = "0", o.pointerEvents = "none", o.visibility = "hidden", o.width = "200px", o.height = "150px", o.overflow = "hidden", n.appendChild(t), document.body.appendChild(n);
    const i = t.offsetWidth;
    n.style.overflow = "scroll";
    let r = t.offsetWidth;
    i === r && (r = n.clientWidth), document.body.removeChild(n), Op = i - r;
  }
  return Op;
}
const OD = `vc-util-locker-${Date.now()}`;
let Q0 = 0;
function ID() {
  return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight) && window.innerWidth > document.body.offsetWidth;
}
function MD(e) {
  const t = R(() => !!e && !!e.value);
  Q0 += 1;
  const n = `${OD}_${Q0}`;
  Lt((o) => {
    if (ki()) {
      if (t.value) {
        const i = PD(), r = ID();
        Bu(`
html body {
  overflow-y: hidden;
  ${r ? `width: calc(100% - ${i}px);` : ""}
}`, n);
      } else
        Ed(n);
      o(() => {
        Ed(n);
      });
    }
  }, {
    flush: "post"
  });
}
let Ya = 0;
const ud = ki(), Z0 = (e) => {
  if (!ud)
    return null;
  if (e) {
    if (typeof e == "string")
      return document.querySelectorAll(e)[0];
    if (typeof e == "function")
      return e();
    if (typeof e == "object" && e instanceof window.HTMLElement)
      return e;
  }
  return document.body;
}, zv = ye({
  compatConfig: {
    MODE: 3
  },
  name: "PortalWrapper",
  inheritAttrs: !1,
  props: {
    wrapperClassName: String,
    forceRender: {
      type: Boolean,
      default: void 0
    },
    getContainer: ue.any,
    visible: {
      type: Boolean,
      default: void 0
    },
    autoLock: st(),
    didUpdate: Function
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = Pe(), i = Pe(), r = Pe(), a = Pe(1), l = ki() && document.createElement("div"), s = () => {
      var p, m;
      o.value === l && ((m = (p = o.value) === null || p === void 0 ? void 0 : p.parentNode) === null || m === void 0 || m.removeChild(o.value)), o.value = null;
    };
    let u = null;
    const c = function() {
      return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1) || o.value && !o.value.parentNode ? (u = Z0(e.getContainer), u ? (u.appendChild(o.value), !0) : !1) : !0;
    }, d = () => ud ? (o.value || (o.value = l, c(!0)), f(), o.value) : null, f = () => {
      const {
        wrapperClassName: p
      } = e;
      o.value && p && p !== o.value.className && (o.value.className = p);
    };
    return Ds(() => {
      f(), c();
    }), MD(R(() => e.autoLock && e.visible && ki() && (o.value === document.body || o.value === l))), Pt(() => {
      let p = !1;
      Ie([() => e.visible, () => e.getContainer], (m, b) => {
        let [y, S] = m, [C, O] = b;
        ud && (u = Z0(e.getContainer), u === document.body && (y && !C ? Ya += 1 : p && (Ya -= 1))), p && (typeof S == "function" && typeof O == "function" ? S.toString() !== O.toString() : S !== O) && s(), p = !0;
      }, {
        immediate: !0,
        flush: "post"
      }), Nt(() => {
        c() || (r.value = Mt(() => {
          a.value += 1;
        }));
      });
    }), At(() => {
      const {
        visible: p
      } = e;
      ud && u === document.body && (Ya = p && Ya ? Ya - 1 : Ya), s(), Mt.cancel(r.value);
    }), () => {
      const {
        forceRender: p,
        visible: m
      } = e;
      let b = null;
      const y = {
        getOpenCount: () => Ya,
        getContainer: d
      };
      return a.value && (p || m || i.value) && (b = v(IC, {
        getContainer: d,
        ref: i,
        didUpdate: e.didUpdate
      }, {
        default: () => {
          var S;
          return (S = n.default) === null || S === void 0 ? void 0 : S.call(n, y);
        }
      })), b;
    };
  }
}), TD = ["onClick", "onMousedown", "onTouchstart", "onMouseenter", "onMouseleave", "onFocus", "onBlur", "onContextmenu"], Zu = ye({
  compatConfig: {
    MODE: 3
  },
  name: "Trigger",
  mixins: [bf],
  inheritAttrs: !1,
  props: _A(),
  setup(e) {
    const t = R(() => {
      const {
        popupPlacement: i,
        popupAlign: r,
        builtinPlacements: a
      } = e;
      return i && a ? X0(a, i, r) : r;
    }), n = Pe(null), o = (i) => {
      n.value = i;
    };
    return {
      vcTriggerContext: Tt("vcTriggerContext", {}),
      popupRef: n,
      setPopupRef: o,
      triggerRef: Pe(null),
      align: t,
      focusTime: null,
      clickOutsideHandler: null,
      contextmenuOutsideHandler1: null,
      contextmenuOutsideHandler2: null,
      touchOutsideHandler: null,
      attachId: null,
      delayTimer: null,
      hasPopupMouseDown: !1,
      preClickTime: null,
      preTouchTime: null,
      mouseDownTimeout: null,
      childOriginEvents: {}
    };
  },
  data() {
    const e = this.$props;
    let t;
    return this.popupVisible !== void 0 ? t = !!e.popupVisible : t = !!e.defaultPopupVisible, TD.forEach((n) => {
      this[`fire${n}`] = (o) => {
        this.fireEvents(n, o);
      };
    }), {
      prevPopupVisible: t,
      sPopupVisible: t,
      point: null
    };
  },
  watch: {
    popupVisible(e) {
      e !== void 0 && (this.prevPopupVisible = this.sPopupVisible, this.sPopupVisible = e);
    }
  },
  created() {
    kt("vcTriggerContext", {
      onPopupMouseDown: this.onPopupMouseDown,
      onPopupMouseenter: this.onPopupMouseenter,
      onPopupMouseleave: this.onPopupMouseleave
    }), Dv(this);
  },
  deactivated() {
    this.setPopupVisible(!1);
  },
  mounted() {
    this.$nextTick(() => {
      this.updatedCal();
    });
  },
  updated() {
    this.$nextTick(() => {
      this.updatedCal();
    });
  },
  beforeUnmount() {
    this.clearDelayTimer(), this.clearOutsideHandler(), clearTimeout(this.mouseDownTimeout), Mt.cancel(this.attachId);
  },
  methods: {
    updatedCal() {
      const e = this.$props;
      if (this.$data.sPopupVisible) {
        let n;
        !this.clickOutsideHandler && (this.isClickToHide() || this.isContextmenuToShow()) && (n = e.getDocument(this.getRootDomNode()), this.clickOutsideHandler = Gi(n, "mousedown", this.onDocumentClick)), this.touchOutsideHandler || (n = n || e.getDocument(this.getRootDomNode()), this.touchOutsideHandler = Gi(n, "touchstart", this.onDocumentClick, bo ? {
          passive: !1
        } : !1)), !this.contextmenuOutsideHandler1 && this.isContextmenuToShow() && (n = n || e.getDocument(this.getRootDomNode()), this.contextmenuOutsideHandler1 = Gi(n, "scroll", this.onContextmenuClose)), !this.contextmenuOutsideHandler2 && this.isContextmenuToShow() && (this.contextmenuOutsideHandler2 = Gi(window, "blur", this.onContextmenuClose));
      } else
        this.clearOutsideHandler();
    },
    onMouseenter(e) {
      const {
        mouseEnterDelay: t
      } = this.$props;
      this.fireEvents("onMouseenter", e), this.delaySetPopupVisible(!0, t, t ? null : e);
    },
    onMouseMove(e) {
      this.fireEvents("onMousemove", e), this.setPoint(e);
    },
    onMouseleave(e) {
      this.fireEvents("onMouseleave", e), this.delaySetPopupVisible(!1, this.$props.mouseLeaveDelay);
    },
    onPopupMouseenter() {
      const {
        vcTriggerContext: e = {}
      } = this;
      e.onPopupMouseenter && e.onPopupMouseenter(), this.clearDelayTimer();
    },
    onPopupMouseleave(e) {
      var t;
      if (e && e.relatedTarget && !e.relatedTarget.setTimeout && ma((t = this.popupRef) === null || t === void 0 ? void 0 : t.getElement(), e.relatedTarget))
        return;
      this.isMouseLeaveToHide() && this.delaySetPopupVisible(!1, this.$props.mouseLeaveDelay);
      const {
        vcTriggerContext: n = {}
      } = this;
      n.onPopupMouseleave && n.onPopupMouseleave(e);
    },
    onFocus(e) {
      this.fireEvents("onFocus", e), this.clearDelayTimer(), this.isFocusToShow() && (this.focusTime = Date.now(), this.delaySetPopupVisible(!0, this.$props.focusDelay));
    },
    onMousedown(e) {
      this.fireEvents("onMousedown", e), this.preClickTime = Date.now();
    },
    onTouchstart(e) {
      this.fireEvents("onTouchstart", e), this.preTouchTime = Date.now();
    },
    onBlur(e) {
      ma(e.target, e.relatedTarget || document.activeElement) || (this.fireEvents("onBlur", e), this.clearDelayTimer(), this.isBlurToHide() && this.delaySetPopupVisible(!1, this.$props.blurDelay));
    },
    onContextmenu(e) {
      e.preventDefault(), this.fireEvents("onContextmenu", e), this.setPopupVisible(!0, e);
    },
    onContextmenuClose() {
      this.isContextmenuToShow() && this.close();
    },
    onClick(e) {
      if (this.fireEvents("onClick", e), this.focusTime) {
        let n;
        if (this.preClickTime && this.preTouchTime ? n = Math.min(this.preClickTime, this.preTouchTime) : this.preClickTime ? n = this.preClickTime : this.preTouchTime && (n = this.preTouchTime), Math.abs(n - this.focusTime) < 20)
          return;
        this.focusTime = 0;
      }
      this.preClickTime = 0, this.preTouchTime = 0, this.isClickToShow() && (this.isClickToHide() || this.isBlurToHide()) && e && e.preventDefault && e.preventDefault(), e && e.domEvent && e.domEvent.preventDefault();
      const t = !this.$data.sPopupVisible;
      (this.isClickToHide() && !t || t && this.isClickToShow()) && this.setPopupVisible(!this.$data.sPopupVisible, e);
    },
    onPopupMouseDown() {
      const {
        vcTriggerContext: e = {}
      } = this;
      this.hasPopupMouseDown = !0, clearTimeout(this.mouseDownTimeout), this.mouseDownTimeout = setTimeout(() => {
        this.hasPopupMouseDown = !1;
      }, 0), e.onPopupMouseDown && e.onPopupMouseDown(...arguments);
    },
    onDocumentClick(e) {
      if (this.$props.mask && !this.$props.maskClosable)
        return;
      const t = e.target, n = this.getRootDomNode(), o = this.getPopupDomNode();
      // mousedown on the target should also close popup when action is contextMenu.
      // https://github.com/ant-design/ant-design/issues/29853
      (!ma(n, t) || this.isContextMenuOnly()) && !ma(o, t) && !this.hasPopupMouseDown && this.delaySetPopupVisible(!1, 0.1);
    },
    getPopupDomNode() {
      var e;
      return ((e = this.popupRef) === null || e === void 0 ? void 0 : e.getElement()) || null;
    },
    getRootDomNode() {
      var e, t, n, o;
      const {
        getTriggerDOMNode: i
      } = this.$props;
      if (i) {
        const r = ((t = (e = this.triggerRef) === null || e === void 0 ? void 0 : e.$el) === null || t === void 0 ? void 0 : t.nodeName) === "#comment" ? null : Br(this.triggerRef);
        return Br(i(r));
      }
      try {
        const r = ((o = (n = this.triggerRef) === null || n === void 0 ? void 0 : n.$el) === null || o === void 0 ? void 0 : o.nodeName) === "#comment" ? null : Br(this.triggerRef);
        if (r)
          return r;
      } catch {
      }
      return Br(this);
    },
    handleGetPopupClassFromAlign(e) {
      const t = [], n = this.$props, {
        popupPlacement: o,
        builtinPlacements: i,
        prefixCls: r,
        alignPoint: a,
        getPopupClassNameFromAlign: l
      } = n;
      return o && i && t.push(CD(i, r, e, a)), l && t.push(l(e)), t.join(" ");
    },
    getPopupAlign() {
      const e = this.$props, {
        popupPlacement: t,
        popupAlign: n,
        builtinPlacements: o
      } = e;
      return t && o ? X0(o, t, n) : n;
    },
    getComponent() {
      const e = {};
      this.isMouseEnterToShow() && (e.onMouseenter = this.onPopupMouseenter), this.isMouseLeaveToHide() && (e.onMouseleave = this.onPopupMouseleave), e.onMousedown = this.onPopupMouseDown, e[bo ? "onTouchstartPassive" : "onTouchstart"] = this.onPopupMouseDown;
      const {
        handleGetPopupClassFromAlign: t,
        getRootDomNode: n,
        $attrs: o
      } = this, {
        prefixCls: i,
        destroyPopupOnHide: r,
        popupClassName: a,
        popupAnimation: l,
        popupTransitionName: s,
        popupStyle: u,
        mask: c,
        maskAnimation: d,
        maskTransitionName: f,
        zIndex: p,
        stretch: m,
        alignPoint: b,
        mobile: y,
        arrow: S,
        forceRender: C
      } = this.$props, {
        sPopupVisible: O,
        point: $
      } = this.$data, P = I(I({
        prefixCls: i,
        arrow: S,
        destroyPopupOnHide: r,
        visible: O,
        point: b ? $ : null,
        align: this.align,
        animation: l,
        getClassNameFromAlign: t,
        stretch: m,
        getRootDomNode: n,
        mask: c,
        zIndex: p,
        transitionName: s,
        maskAnimation: d,
        maskTransitionName: f,
        class: a,
        style: u,
        onAlign: o.onPopupAlign || hC
      }, e), {
        ref: this.setPopupRef,
        mobile: y,
        forceRender: C
      });
      return v(wD, P, {
        default: this.$slots.popup || (() => uE(this, "popup"))
      });
    },
    attachParent(e) {
      Mt.cancel(this.attachId);
      const {
        getPopupContainer: t,
        getDocument: n
      } = this.$props, o = this.getRootDomNode();
      let i;
      t ? (o || t.length === 0) && (i = t(o)) : i = n(this.getRootDomNode()).body, i ? i.appendChild(e) : this.attachId = Mt(() => {
        this.attachParent(e);
      });
    },
    getContainer() {
      const {
        $props: e
      } = this, {
        getDocument: t
      } = e, n = t(this.getRootDomNode()).createElement("div");
      return n.style.position = "absolute", n.style.top = "0", n.style.left = "0", n.style.width = "100%", this.attachParent(n), n;
    },
    setPopupVisible(e, t) {
      const {
        alignPoint: n,
        sPopupVisible: o,
        onPopupVisibleChange: i
      } = this;
      this.clearDelayTimer(), o !== e && (Td(this, "popupVisible") || this.setState({
        sPopupVisible: e,
        prevPopupVisible: o
      }), i && i(e)), n && t && e && this.setPoint(t);
    },
    setPoint(e) {
      const {
        alignPoint: t
      } = this.$props;
      !t || !e || this.setState({
        point: {
          pageX: e.pageX,
          pageY: e.pageY
        }
      });
    },
    handlePortalUpdate() {
      this.prevPopupVisible !== this.sPopupVisible && this.afterPopupVisibleChange(this.sPopupVisible);
    },
    delaySetPopupVisible(e, t, n) {
      const o = t * 1e3;
      if (this.clearDelayTimer(), o) {
        const i = n ? {
          pageX: n.pageX,
          pageY: n.pageY
        } : null;
        this.delayTimer = setTimeout(() => {
          this.setPopupVisible(e, i), this.clearDelayTimer();
        }, o);
      } else
        this.setPopupVisible(e, n);
    },
    clearDelayTimer() {
      this.delayTimer && (clearTimeout(this.delayTimer), this.delayTimer = null);
    },
    clearOutsideHandler() {
      this.clickOutsideHandler && (this.clickOutsideHandler.remove(), this.clickOutsideHandler = null), this.contextmenuOutsideHandler1 && (this.contextmenuOutsideHandler1.remove(), this.contextmenuOutsideHandler1 = null), this.contextmenuOutsideHandler2 && (this.contextmenuOutsideHandler2.remove(), this.contextmenuOutsideHandler2 = null), this.touchOutsideHandler && (this.touchOutsideHandler.remove(), this.touchOutsideHandler = null);
    },
    createTwoChains(e) {
      let t = () => {
      };
      const n = a0(this);
      return this.childOriginEvents[e] && n[e] ? this[`fire${e}`] : (t = this.childOriginEvents[e] || n[e] || t, t);
    },
    isClickToShow() {
      const {
        action: e,
        showAction: t
      } = this.$props;
      return e.indexOf("click") !== -1 || t.indexOf("click") !== -1;
    },
    isContextMenuOnly() {
      const {
        action: e
      } = this.$props;
      return e === "contextmenu" || e.length === 1 && e[0] === "contextmenu";
    },
    isContextmenuToShow() {
      const {
        action: e,
        showAction: t
      } = this.$props;
      return e.indexOf("contextmenu") !== -1 || t.indexOf("contextmenu") !== -1;
    },
    isClickToHide() {
      const {
        action: e,
        hideAction: t
      } = this.$props;
      return e.indexOf("click") !== -1 || t.indexOf("click") !== -1;
    },
    isMouseEnterToShow() {
      const {
        action: e,
        showAction: t
      } = this.$props;
      return e.indexOf("hover") !== -1 || t.indexOf("mouseenter") !== -1;
    },
    isMouseLeaveToHide() {
      const {
        action: e,
        hideAction: t
      } = this.$props;
      return e.indexOf("hover") !== -1 || t.indexOf("mouseleave") !== -1;
    },
    isFocusToShow() {
      const {
        action: e,
        showAction: t
      } = this.$props;
      return e.indexOf("focus") !== -1 || t.indexOf("focus") !== -1;
    },
    isBlurToHide() {
      const {
        action: e,
        hideAction: t
      } = this.$props;
      return e.indexOf("focus") !== -1 || t.indexOf("blur") !== -1;
    },
    forcePopupAlign() {
      var e;
      this.$data.sPopupVisible && ((e = this.popupRef) === null || e === void 0 || e.forceAlign());
    },
    fireEvents(e, t) {
      this.childOriginEvents[e] && this.childOriginEvents[e](t);
      const n = this.$props[e] || this.$attrs[e];
      n && n(t);
    },
    close() {
      this.setPopupVisible(!1);
    }
  },
  render() {
    const {
      $attrs: e
    } = this, t = Ko(vS(this)), {
      alignPoint: n,
      getPopupContainer: o
    } = this.$props, i = t[0];
    this.childOriginEvents = a0(i);
    const r = {
      key: "trigger"
    };
    this.isContextmenuToShow() ? r.onContextmenu = this.onContextmenu : r.onContextmenu = this.createTwoChains("onContextmenu"), this.isClickToHide() || this.isClickToShow() ? (r.onClick = this.onClick, r.onMousedown = this.onMousedown, r[bo ? "onTouchstartPassive" : "onTouchstart"] = this.onTouchstart) : (r.onClick = this.createTwoChains("onClick"), r.onMousedown = this.createTwoChains("onMousedown"), r[bo ? "onTouchstartPassive" : "onTouchstart"] = this.createTwoChains("onTouchstart")), this.isMouseEnterToShow() ? (r.onMouseenter = this.onMouseenter, n && (r.onMousemove = this.onMouseMove)) : r.onMouseenter = this.createTwoChains("onMouseenter"), this.isMouseLeaveToHide() ? r.onMouseleave = this.onMouseleave : r.onMouseleave = this.createTwoChains("onMouseleave"), this.isFocusToShow() || this.isBlurToHide() ? (r.onFocus = this.onFocus, r.onBlur = this.onBlur) : (r.onFocus = this.createTwoChains("onFocus"), r.onBlur = (u) => {
      u && (!u.relatedTarget || !ma(u.target, u.relatedTarget)) && this.createTwoChains("onBlur")(u);
    });
    const a = Te(i && i.props && i.props.class, e.class);
    a && (r.class = a);
    const l = An(i, I(I({}, r), {
      ref: "triggerRef"
    }), !0, !0), s = v(zv, {
      key: "portal",
      getContainer: o && (() => o(this.getRootDomNode())),
      didUpdate: this.handlePortalUpdate,
      visible: this.$data.sPopupVisible
    }, {
      default: this.getComponent
    });
    return v(Ve, null, [l, s]);
  }
});
var kD = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const ED = (e) => {
  const t = e === !0 ? 0 : 1;
  return {
    bottomLeft: {
      points: ["tl", "bl"],
      offset: [0, 4],
      overflow: {
        adjustX: t,
        adjustY: 1
      }
    },
    bottomRight: {
      points: ["tr", "br"],
      offset: [0, 4],
      overflow: {
        adjustX: t,
        adjustY: 1
      }
    },
    topLeft: {
      points: ["bl", "tl"],
      offset: [0, -4],
      overflow: {
        adjustX: t,
        adjustY: 1
      }
    },
    topRight: {
      points: ["br", "tr"],
      offset: [0, -4],
      overflow: {
        adjustX: t,
        adjustY: 1
      }
    }
  };
}, _D = ye({
  name: "SelectTrigger",
  inheritAttrs: !1,
  props: {
    dropdownAlign: Object,
    visible: {
      type: Boolean,
      default: void 0
    },
    disabled: {
      type: Boolean,
      default: void 0
    },
    dropdownClassName: String,
    dropdownStyle: ue.object,
    placement: String,
    empty: {
      type: Boolean,
      default: void 0
    },
    prefixCls: String,
    popupClassName: String,
    animation: String,
    transitionName: String,
    getPopupContainer: Function,
    dropdownRender: Function,
    containerWidth: Number,
    dropdownMatchSelectWidth: ue.oneOfType([Number, Boolean]).def(!0),
    popupElement: ue.any,
    direction: String,
    getTriggerDOMNode: Function,
    onPopupVisibleChange: Function,
    onPopupMouseEnter: Function,
    onPopupFocusin: Function,
    onPopupFocusout: Function
  },
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      expose: i
    } = t;
    const r = R(() => {
      const {
        dropdownMatchSelectWidth: l
      } = e;
      return ED(l);
    }), a = le();
    return i({
      getPopupElement: () => a.value
    }), () => {
      const l = I(I({}, e), o), {
        empty: s = !1
      } = l, u = kD(l, ["empty"]), {
        visible: c,
        dropdownAlign: d,
        prefixCls: f,
        popupElement: p,
        dropdownClassName: m,
        dropdownStyle: b,
        direction: y = "ltr",
        placement: S,
        dropdownMatchSelectWidth: C,
        containerWidth: O,
        dropdownRender: $,
        animation: P,
        transitionName: k,
        getPopupContainer: x,
        getTriggerDOMNode: E,
        onPopupVisibleChange: z,
        onPopupMouseEnter: N,
        onPopupFocusin: D,
        onPopupFocusout: W
      } = u, H = `${f}-dropdown`;
      let L = p;
      $ && (L = $({
        menuNode: p,
        props: e
      }));
      const A = P ? `${H}-${P}` : k, U = I({
        minWidth: `${O}px`
      }, b);
      return typeof C == "number" ? U.width = `${C}px` : C && (U.width = `${O}px`), v(Zu, Z(Z({}, e), {}, {
        showAction: z ? ["click"] : [],
        hideAction: z ? ["click"] : [],
        popupPlacement: S || (y === "rtl" ? "bottomRight" : "bottomLeft"),
        builtinPlacements: r.value,
        prefixCls: H,
        popupTransitionName: A,
        popupAlign: d,
        popupVisible: c,
        getPopupContainer: x,
        popupClassName: Te(m, {
          [`${H}-empty`]: s
        }),
        popupStyle: U,
        getTriggerDOMNode: E,
        onPopupVisibleChange: z
      }), {
        default: n.default,
        popup: () => v("div", {
          ref: a,
          onMouseenter: N,
          onFocusin: D,
          onFocusout: W
        }, [L])
      });
    };
  }
}), Xe = {
  /**
   * BACKSPACE
   */
  BACKSPACE: 8,
  /**
   * TAB
   */
  TAB: 9,
  /**
   * ENTER
   */
  ENTER: 13,
  /**
   * SHIFT
   */
  SHIFT: 16,
  /**
   * CTRL
   */
  CTRL: 17,
  /**
   * ALT
   */
  ALT: 18,
  /**
   * CAPS_LOCK
   */
  CAPS_LOCK: 20,
  /**
   * ESC
   */
  ESC: 27,
  /**
   * SPACE
   */
  SPACE: 32,
  /**
   * PAGE_UP
   */
  PAGE_UP: 33,
  /**
   * PAGE_DOWN
   */
  PAGE_DOWN: 34,
  /**
   * END
   */
  END: 35,
  /**
   * HOME
   */
  HOME: 36,
  /**
   * LEFT
   */
  LEFT: 37,
  /**
   * UP
   */
  UP: 38,
  /**
   * RIGHT
   */
  RIGHT: 39,
  /**
   * DOWN
   */
  DOWN: 40,
  /**
   * N
   */
  N: 78,
  /**
   * P
   */
  P: 80,
  /**
   * META
   */
  META: 91,
  /**
   * WIN_KEY_RIGHT
   */
  WIN_KEY_RIGHT: 92,
  /**
   * CONTEXT_MENU
   */
  CONTEXT_MENU: 93,
  /**
   * F1
   */
  F1: 112,
  /**
   * F2
   */
  F2: 113,
  /**
   * F3
   */
  F3: 114,
  /**
   * F4
   */
  F4: 115,
  /**
   * F5
   */
  F5: 116,
  /**
   * F6
   */
  F6: 117,
  /**
   * F7
   */
  F7: 118,
  /**
   * F8
   */
  F8: 119,
  /**
   * F9
   */
  F9: 120,
  /**
   * F10
   */
  F10: 121,
  /**
   * F11
   */
  F11: 122,
  /**
   * F12
   */
  F12: 123,
  /**
   * SEMICOLON
   */
  SEMICOLON: 186,
  /**
   * EQUALS
   */
  EQUALS: 187,
  /**
   * WIN_KEY
   */
  WIN_KEY: 224
}, wl = (e, t) => {
  let {
    slots: n
  } = t;
  var o;
  const {
    class: i,
    customizeIcon: r,
    customizeIconProps: a,
    onMousedown: l,
    onClick: s
  } = e;
  let u;
  return typeof r == "function" ? u = r(a) : u = Qi(r) ? vl(r) : r, v("span", {
    class: i,
    onMousedown: (c) => {
      c.preventDefault(), l && l(c);
    },
    style: {
      userSelect: "none",
      WebkitUserSelect: "none"
    },
    unselectable: "on",
    onClick: s,
    "aria-hidden": !0
  }, [u !== void 0 ? u : v("span", {
    class: i.split(/\s+/).map((c) => `${c}-icon`)
  }, [(o = n.default) === null || o === void 0 ? void 0 : o.call(n)])]);
};
wl.inheritAttrs = !1;
wl.displayName = "TransBtn";
wl.props = {
  class: String,
  customizeIcon: ue.any,
  customizeIconProps: ue.any,
  onMousedown: Function,
  onClick: Function
};
var AD = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const DD = ye({
  compatConfig: {
    MODE: 3
  },
  // inheritAttrs: false,
  props: {
    disabled: ue.looseBool,
    type: ue.string,
    value: ue.any,
    tag: {
      type: String,
      default: "input"
    },
    size: ue.string,
    onChange: Function,
    onInput: Function,
    onBlur: Function,
    onFocus: Function,
    onKeydown: Function,
    onCompositionstart: Function,
    onCompositionend: Function,
    onKeyup: Function,
    onPaste: Function,
    onMousedown: Function
  },
  emits: ["change", "input", "blur", "keydown", "focus", "compositionstart", "compositionend", "keyup", "paste", "mousedown"],
  setup(e, t) {
    let {
      expose: n
    } = t;
    const o = Pe(null);
    return n({
      focus: () => {
        o.value && o.value.focus();
      },
      blur: () => {
        o.value && o.value.blur();
      },
      input: o,
      setSelectionRange: (s, u, c) => {
        var d;
        (d = o.value) === null || d === void 0 || d.setSelectionRange(s, u, c);
      },
      select: () => {
        var s;
        (s = o.value) === null || s === void 0 || s.select();
      },
      getSelectionStart: () => {
        var s;
        return (s = o.value) === null || s === void 0 ? void 0 : s.selectionStart;
      },
      getSelectionEnd: () => {
        var s;
        return (s = o.value) === null || s === void 0 ? void 0 : s.selectionEnd;
      },
      getScrollTop: () => {
        var s;
        return (s = o.value) === null || s === void 0 ? void 0 : s.scrollTop;
      }
    }), () => {
      const {
        tag: s,
        value: u
      } = e, c = AD(e, ["tag", "value"]);
      return v(s, Z(Z({}, c), {}, {
        ref: o,
        value: u
      }), null);
    };
  }
});
function zD(e) {
  return Object.keys(e).reduce((t, n) => {
    const o = e[n];
    return typeof o > "u" || o === null || (t += `${n}: ${e[n]};`), t;
  }, "");
}
var RD = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const Rv = ye({
  compatConfig: {
    MODE: 3
  },
  inheritAttrs: !1,
  props: {
    disabled: ue.looseBool,
    type: ue.string,
    value: ue.any,
    lazy: ue.bool.def(!0),
    tag: {
      type: String,
      default: "input"
    },
    size: ue.string,
    style: ue.oneOfType([String, Object]),
    class: ue.string
  },
  emits: ["change", "input", "blur", "keydown", "focus", "compositionstart", "compositionend", "keyup", "paste", "mousedown"],
  setup(e, t) {
    let {
      emit: n,
      attrs: o,
      expose: i
    } = t;
    const r = Pe(null), a = le(), l = le(!1);
    Ie([() => e.value, l], () => {
      l.value || (a.value = e.value);
    }, {
      immediate: !0
    });
    const s = (x) => {
      n("change", x);
    }, u = (x) => {
      l.value = !0, x.target.composing = !0, n("compositionstart", x);
    }, c = (x) => {
      l.value = !1, x.target.composing = !1, n("compositionend", x);
      const E = document.createEvent("HTMLEvents");
      E.initEvent("input", !0, !0), x.target.dispatchEvent(E), s(x);
    }, d = (x) => {
      if (l.value && e.lazy) {
        a.value = x.target.value;
        return;
      }
      n("input", x);
    }, f = (x) => {
      n("blur", x);
    }, p = (x) => {
      n("focus", x);
    }, m = () => {
      r.value && r.value.focus();
    }, b = () => {
      r.value && r.value.blur();
    }, y = (x) => {
      n("keydown", x);
    }, S = (x) => {
      n("keyup", x);
    }, C = (x, E, z) => {
      var N;
      (N = r.value) === null || N === void 0 || N.setSelectionRange(x, E, z);
    }, O = () => {
      var x;
      (x = r.value) === null || x === void 0 || x.select();
    };
    i({
      focus: m,
      blur: b,
      input: R(() => {
        var x;
        return (x = r.value) === null || x === void 0 ? void 0 : x.input;
      }),
      setSelectionRange: C,
      select: O,
      getSelectionStart: () => {
        var x;
        return (x = r.value) === null || x === void 0 ? void 0 : x.getSelectionStart();
      },
      getSelectionEnd: () => {
        var x;
        return (x = r.value) === null || x === void 0 ? void 0 : x.getSelectionEnd();
      },
      getScrollTop: () => {
        var x;
        return (x = r.value) === null || x === void 0 ? void 0 : x.getScrollTop();
      }
    });
    const $ = (x) => {
      n("mousedown", x);
    }, P = (x) => {
      n("paste", x);
    }, k = R(() => e.style && typeof e.style != "string" ? zD(e.style) : e.style);
    return () => {
      const {
        style: x,
        lazy: E
      } = e, z = RD(e, ["style", "lazy"]);
      return v(DD, Z(Z(Z({}, z), o), {}, {
        style: k.value,
        onInput: d,
        onChange: s,
        onBlur: f,
        onFocus: p,
        ref: r,
        value: a.value,
        onCompositionstart: u,
        onCompositionend: c,
        onKeyup: S,
        onKeydown: y,
        onPaste: P,
        onMousedown: $
      }), null);
    };
  }
}), ND = {
  inputRef: ue.any,
  prefixCls: String,
  id: String,
  inputElement: ue.VueNode,
  disabled: {
    type: Boolean,
    default: void 0
  },
  autofocus: {
    type: Boolean,
    default: void 0
  },
  autocomplete: String,
  editable: {
    type: Boolean,
    default: void 0
  },
  activeDescendantId: String,
  value: String,
  open: {
    type: Boolean,
    default: void 0
  },
  tabindex: ue.oneOfType([ue.number, ue.string]),
  /** Pass accessibility props to input */
  attrs: ue.object,
  onKeydown: {
    type: Function
  },
  onMousedown: {
    type: Function
  },
  onChange: {
    type: Function
  },
  onPaste: {
    type: Function
  },
  onCompositionstart: {
    type: Function
  },
  onCompositionend: {
    type: Function
  },
  onFocus: {
    type: Function
  },
  onBlur: {
    type: Function
  }
}, MC = ye({
  compatConfig: {
    MODE: 3
  },
  name: "SelectInput",
  inheritAttrs: !1,
  props: ND,
  setup(e) {
    let t = null;
    const n = Tt("VCSelectContainerEvent");
    return () => {
      var o;
      const {
        prefixCls: i,
        id: r,
        inputElement: a,
        disabled: l,
        tabindex: s,
        autofocus: u,
        autocomplete: c,
        editable: d,
        activeDescendantId: f,
        value: p,
        onKeydown: m,
        onMousedown: b,
        onChange: y,
        onPaste: S,
        onCompositionstart: C,
        onCompositionend: O,
        onFocus: $,
        onBlur: P,
        open: k,
        inputRef: x,
        attrs: E
      } = e;
      let z = a || v(Rv, null, null);
      const N = z.props || {}, {
        onKeydown: D,
        onInput: W,
        onFocus: H,
        onBlur: L,
        onMousedown: A,
        onCompositionstart: U,
        onCompositionend: j,
        style: re
      } = N;
      return z = An(z, I(I(I(I(I({
        type: "search"
      }, N), {
        id: r,
        ref: x,
        disabled: l,
        tabindex: s,
        lazy: !1,
        autocomplete: c || "off",
        autofocus: u,
        class: Te(`${i}-selection-search-input`, (o = z?.props) === null || o === void 0 ? void 0 : o.class),
        role: "combobox",
        "aria-expanded": k,
        "aria-haspopup": "listbox",
        "aria-owns": `${r}_list`,
        "aria-autocomplete": "list",
        "aria-controls": `${r}_list`,
        "aria-activedescendant": f
      }), E), {
        value: d ? p : "",
        readonly: !d,
        unselectable: d ? null : "on",
        style: I(I({}, re), {
          opacity: d ? null : 0
        }),
        onKeydown: (G) => {
          m(G), D && D(G);
        },
        onMousedown: (G) => {
          b(G), A && A(G);
        },
        onInput: (G) => {
          y(G), W && W(G);
        },
        onCompositionstart(G) {
          C(G), U && U(G);
        },
        onCompositionend(G) {
          O(G), j && j(G);
        },
        onPaste: S,
        onFocus: function() {
          clearTimeout(t), H && H(arguments.length <= 0 ? void 0 : arguments[0]), $ && $(arguments.length <= 0 ? void 0 : arguments[0]), n?.focus(arguments.length <= 0 ? void 0 : arguments[0]);
        },
        onBlur: function() {
          for (var G = arguments.length, Y = new Array(G), K = 0; K < G; K++)
            Y[K] = arguments[K];
          t = setTimeout(() => {
            L && L(Y[0]), P && P(Y[0]), n?.blur(Y[0]);
          }, 100);
        }
      }), z.type === "textarea" ? {} : {
        type: "search"
      }), !0, !0), z;
    };
  }
}), BD = `accept acceptcharset accesskey action allowfullscreen allowtransparency
alt async autocomplete autofocus autoplay capture cellpadding cellspacing challenge
charset checked classid classname colspan cols content contenteditable contextmenu
controls coords crossorigin data datetime default defer dir disabled download draggable
enctype form formaction formenctype formmethod formnovalidate formtarget frameborder
headers height hidden high href hreflang htmlfor for httpequiv icon id inputmode integrity
is keyparams keytype kind label lang list loop low manifest marginheight marginwidth max maxlength media
mediagroup method min minlength multiple muted name novalidate nonce open
optimum pattern placeholder poster preload radiogroup readonly rel required
reversed role rowspan rows sandbox scope scoped scrolling seamless selected
shape size sizes span spellcheck src srcdoc srclang srcset start step style
summary tabindex target title type usemap value width wmode wrap`, LD = `onCopy onCut onPaste onCompositionend onCompositionstart onCompositionupdate onKeydown
    onKeypress onKeyup onFocus onBlur onChange onInput onSubmit onClick onContextmenu onDoubleclick onDblclick
    onDrag onDragend onDragenter onDragexit onDragleave onDragover onDragstart onDrop onMousedown
    onMouseenter onMouseleave onMousemove onMouseout onMouseover onMouseup onSelect onTouchcancel
    onTouchend onTouchmove onTouchstart onTouchstartPassive onTouchmovePassive onScroll onWheel onAbort onCanplay onCanplaythrough
    onDurationchange onEmptied onEncrypted onEnded onError onLoadeddata onLoadedmetadata
    onLoadstart onPause onPlay onPlaying onProgress onRatechange onSeeked onSeeking onStalled onSuspend onTimeupdate onVolumechange onWaiting onLoad onError`, J0 = `${BD} ${LD}`.split(/[\s\n]+/), FD = "aria-", HD = "data-";
function ey(e, t) {
  return e.indexOf(t) === 0;
}
function yf(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, n;
  t === !1 ? n = {
    aria: !0,
    data: !0,
    attr: !0
  } : t === !0 ? n = {
    aria: !0
  } : n = I({}, t);
  const o = {};
  return Object.keys(e).forEach((i) => {
    // Aria
    (n.aria && (i === "role" || ey(i, FD)) || // Data
    n.data && ey(i, HD) || // Attr
    n.attr && (J0.includes(i) || J0.includes(i.toLowerCase()))) && (o[i] = e[i]);
  }), o;
}
const TC = Symbol("OverflowContextProviderKey"), nh = ye({
  compatConfig: {
    MODE: 3
  },
  name: "OverflowContextProvider",
  inheritAttrs: !1,
  props: {
    value: {
      type: Object
    }
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    return kt(TC, R(() => e.value)), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
}), VD = () => Tt(TC, R(() => null));
var jD = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const Vl = void 0, cd = ye({
  compatConfig: {
    MODE: 3
  },
  name: "Item",
  props: {
    prefixCls: String,
    item: ue.any,
    renderItem: Function,
    responsive: Boolean,
    itemKey: {
      type: [String, Number]
    },
    registerSize: Function,
    display: Boolean,
    order: Number,
    component: ue.any,
    invalidate: Boolean
  },
  setup(e, t) {
    let {
      slots: n,
      expose: o
    } = t;
    const i = R(() => e.responsive && !e.display), r = le();
    o({
      itemNodeRef: r
    });
    function a(l) {
      e.registerSize(e.itemKey, l);
    }
    return Lo(() => {
      a(null);
    }), () => {
      var l;
      const {
        prefixCls: s,
        invalidate: u,
        item: c,
        renderItem: d,
        responsive: f,
        registerSize: p,
        itemKey: m,
        display: b,
        order: y,
        component: S = "div"
      } = e, C = jD(e, ["prefixCls", "invalidate", "item", "renderItem", "responsive", "registerSize", "itemKey", "display", "order", "component"]), O = (l = n.default) === null || l === void 0 ? void 0 : l.call(n), $ = d && c !== Vl ? d(c) : O;
      let P;
      u || (P = {
        opacity: i.value ? 0 : 1,
        height: i.value ? 0 : Vl,
        overflowY: i.value ? "hidden" : Vl,
        order: f ? y : Vl,
        pointerEvents: i.value ? "none" : Vl,
        position: i.value ? "absolute" : Vl
      });
      const k = {};
      return i.value && (k["aria-hidden"] = !0), v(Ss, {
        disabled: !f,
        onResize: (x) => {
          let {
            offsetWidth: E
          } = x;
          a(E);
        }
      }, {
        default: () => v(S, Z(Z(Z({
          class: Te(!u && s),
          style: P
        }, k), C), {}, {
          ref: r
        }), {
          default: () => [$]
        })
      });
    };
  }
});
var Ip = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const WD = ye({
  compatConfig: {
    MODE: 3
  },
  name: "RawItem",
  inheritAttrs: !1,
  props: {
    component: ue.any,
    title: ue.any,
    id: String,
    onMouseenter: {
      type: Function
    },
    onMouseleave: {
      type: Function
    },
    onClick: {
      type: Function
    },
    onKeydown: {
      type: Function
    },
    onFocus: {
      type: Function
    },
    role: String,
    tabindex: Number
  },
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const i = VD();
    return () => {
      var r;
      if (!i.value) {
        const {
          component: d = "div"
        } = e, f = Ip(e, ["component"]);
        return v(d, Z(Z({}, f), o), {
          default: () => [(r = n.default) === null || r === void 0 ? void 0 : r.call(n)]
        });
      }
      const a = i.value, {
        className: l
      } = a, s = Ip(a, ["className"]), {
        class: u
      } = o, c = Ip(o, ["class"]);
      return v(nh, {
        value: null
      }, {
        default: () => [v(cd, Z(Z(Z({
          class: Te(l, u)
        }, s), c), e), n)]
      });
    };
  }
});
var qD = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const kC = "responsive", EC = "invalidate";
function GD(e) {
  return `+ ${e.length} ...`;
}
const KD = () => ({
  id: String,
  prefixCls: String,
  data: Array,
  itemKey: [String, Number, Function],
  /** Used for `responsive`. It will limit render node to avoid perf issue */
  itemWidth: {
    type: Number,
    default: 10
  },
  renderItem: Function,
  /** @private Do not use in your production. Render raw node that need wrap Item by developer self */
  renderRawItem: Function,
  maxCount: [Number, String],
  renderRest: Function,
  /** @private Do not use in your production. Render raw node that need wrap Item by developer self */
  renderRawRest: Function,
  suffix: ue.any,
  component: String,
  itemComponent: ue.any,
  /** @private This API may be refactor since not well design */
  onVisibleChange: Function,
  /** When set to `full`, ssr will render full items by default and remove at client side */
  ssr: String,
  onMousedown: Function,
  role: String
}), jr = ye({
  name: "Overflow",
  inheritAttrs: !1,
  props: KD(),
  emits: ["visibleChange"],
  setup(e, t) {
    let {
      attrs: n,
      emit: o,
      slots: i
    } = t;
    const r = R(() => e.ssr === "full"), a = Pe(null), l = R(() => a.value || 0), s = Pe(/* @__PURE__ */ new Map()), u = Pe(0), c = Pe(0), d = Pe(0), f = Pe(null), p = Pe(null), m = R(() => p.value === null && r.value ? Number.MAX_SAFE_INTEGER : p.value || 0), b = Pe(!1), y = R(() => `${e.prefixCls}-item`), S = R(() => Math.max(u.value, c.value)), C = R(() => !!(e.data.length && e.maxCount === kC)), O = R(() => e.maxCount === EC), $ = R(() => C.value || typeof e.maxCount == "number" && e.data.length > e.maxCount), P = R(() => {
      let A = e.data;
      return C.value ? a.value === null && r.value ? A = e.data : A = e.data.slice(0, Math.min(e.data.length, l.value / e.itemWidth)) : typeof e.maxCount == "number" && (A = e.data.slice(0, e.maxCount)), A;
    }), k = R(() => C.value ? e.data.slice(m.value + 1) : e.data.slice(P.value.length)), x = (A, U) => {
      var j;
      return typeof e.itemKey == "function" ? e.itemKey(A) : (j = e.itemKey && A?.[e.itemKey]) !== null && j !== void 0 ? j : U;
    }, E = R(() => e.renderItem || ((A) => A)), z = (A, U) => {
      p.value = A, U || (b.value = A < e.data.length - 1, o("visibleChange", A));
    }, N = (A, U) => {
      a.value = U.clientWidth;
    }, D = (A, U) => {
      const j = new Map(s.value);
      U === null ? j.delete(A) : j.set(A, U), s.value = j;
    }, W = (A, U) => {
      u.value = c.value, c.value = U;
    }, H = (A, U) => {
      d.value = U;
    }, L = (A) => s.value.get(x(P.value[A], A));
    return Ie([l, s, c, d, () => e.itemKey, P], () => {
      if (l.value && S.value && P.value) {
        let A = d.value;
        const U = P.value.length, j = U - 1;
        if (!U) {
          z(0), f.value = null;
          return;
        }
        for (let re = 0; re < U; re += 1) {
          const G = L(re);
          if (G === void 0) {
            z(re - 1, !0);
            break;
          }
          if (A += G, // Only one means `totalWidth` is the final width
          j === 0 && A <= l.value || // Last two width will be the final width
          re === j - 1 && A + L(j) <= l.value) {
            z(j), f.value = null;
            break;
          } else if (A + S.value > l.value) {
            z(re - 1), f.value = A - G - d.value + c.value;
            break;
          }
        }
        e.suffix && L(0) + d.value > l.value && (f.value = null);
      }
    }), () => {
      const A = b.value && !!k.value.length, {
        itemComponent: U,
        renderRawItem: j,
        renderRawRest: re,
        renderRest: G,
        prefixCls: Y = "rc-overflow",
        suffix: K,
        component: J = "div",
        id: be,
        onMousedown: xe
      } = e, {
        class: ge,
        style: de
      } = n, ne = qD(n, ["class", "style"]);
      let we = {};
      f.value !== null && C.value && (we = {
        position: "absolute",
        left: `${f.value}px`,
        top: 0
      });
      const ae = {
        prefixCls: y.value,
        responsive: C.value,
        component: U,
        invalidate: O.value
      }, se = j ? (Le, Re) => {
        const We = x(Le, Re);
        return v(nh, {
          key: We,
          value: I(I({}, ae), {
            order: Re,
            item: Le,
            itemKey: We,
            registerSize: D,
            display: Re <= m.value
          })
        }, {
          default: () => [j(Le, Re)]
        });
      } : (Le, Re) => {
        const We = x(Le, Re);
        return v(cd, Z(Z({}, ae), {}, {
          order: Re,
          key: We,
          item: Le,
          renderItem: E.value,
          itemKey: We,
          registerSize: D,
          display: Re <= m.value
        }), null);
      };
      let he = () => null;
      const Me = {
        order: A ? m.value : Number.MAX_SAFE_INTEGER,
        className: `${y.value} ${y.value}-rest`,
        registerSize: W,
        display: A
      };
      if (re)
        re && (he = () => v(nh, {
          value: I(I({}, ae), Me)
        }, {
          default: () => [re(k.value)]
        }));
      else {
        const Le = G || GD;
        he = () => v(cd, Z(Z({}, ae), Me), {
          default: () => typeof Le == "function" ? Le(k.value) : Le
        });
      }
      const ke = () => {
        var Le;
        return v(J, Z({
          id: be,
          class: Te(!O.value && Y, ge),
          style: de,
          onMousedown: xe,
          role: e.role
        }, ne), {
          default: () => [P.value.map(se), $.value ? he() : null, K && v(cd, Z(Z({}, ae), {}, {
            order: m.value,
            class: `${y.value}-suffix`,
            registerSize: H,
            display: !0,
            style: we
          }), {
            default: () => K
          }), (Le = i.default) === null || Le === void 0 ? void 0 : Le.call(i)]
        });
      };
      return v(Ss, {
        disabled: !C.value,
        onResize: N
      }, {
        default: ke
      });
    };
  }
});
jr.Item = WD;
jr.RESPONSIVE = kC;
jr.INVALIDATE = EC;
const YD = Symbol("TreeSelectLegacyContextPropsKey");
function Nv() {
  return Tt(YD, {});
}
const UD = {
  id: String,
  prefixCls: String,
  values: ue.array,
  open: {
    type: Boolean,
    default: void 0
  },
  searchValue: String,
  inputRef: ue.any,
  placeholder: ue.any,
  disabled: {
    type: Boolean,
    default: void 0
  },
  mode: String,
  showSearch: {
    type: Boolean,
    default: void 0
  },
  autofocus: {
    type: Boolean,
    default: void 0
  },
  autocomplete: String,
  activeDescendantId: String,
  tabindex: ue.oneOfType([ue.number, ue.string]),
  compositionStatus: Boolean,
  removeIcon: ue.any,
  choiceTransitionName: String,
  maxTagCount: ue.oneOfType([ue.number, ue.string]),
  maxTagTextLength: Number,
  maxTagPlaceholder: ue.any.def(() => (e) => `+ ${e.length} ...`),
  tagRender: Function,
  onToggleOpen: {
    type: Function
  },
  onRemove: Function,
  onInputChange: Function,
  onInputPaste: Function,
  onInputKeyDown: Function,
  onInputMouseDown: Function,
  onInputCompositionStart: Function,
  onInputCompositionEnd: Function
}, ty = (e) => {
  e.preventDefault(), e.stopPropagation();
}, XD = ye({
  name: "MultipleSelectSelector",
  inheritAttrs: !1,
  props: UD,
  setup(e) {
    const t = Pe(), n = Pe(0), o = Pe(!1), i = Nv(), r = R(() => `${e.prefixCls}-selection`), a = R(() => e.open || e.mode === "tags" ? e.searchValue : ""), l = R(() => e.mode === "tags" || e.showSearch && (e.open || o.value)), s = le("");
    Lt(() => {
      s.value = a.value;
    }), Pt(() => {
      Ie(s, () => {
        n.value = t.value.scrollWidth;
      }, {
        flush: "post",
        immediate: !0
      });
    });
    function u(m, b, y, S, C) {
      return v("span", {
        class: Te(`${r.value}-item`, {
          [`${r.value}-item-disabled`]: y
        }),
        title: typeof m == "string" || typeof m == "number" ? m.toString() : void 0
      }, [v("span", {
        class: `${r.value}-item-content`
      }, [b]), S && v(wl, {
        class: `${r.value}-item-remove`,
        onMousedown: ty,
        onClick: C,
        customizeIcon: e.removeIcon
      }, {
        default: () => [Ee("×")]
      })]);
    }
    function c(m, b, y, S, C, O) {
      var $;
      const P = (x) => {
        ty(x), e.onToggleOpen(!open);
      };
      let k = O;
      return i.keyEntities && (k = (($ = i.keyEntities[m]) === null || $ === void 0 ? void 0 : $.node) || {}), v("span", {
        key: m,
        onMousedown: P
      }, [e.tagRender({
        label: b,
        value: m,
        disabled: y,
        closable: S,
        onClose: C,
        option: k
      })]);
    }
    function d(m) {
      const {
        disabled: b,
        label: y,
        value: S,
        option: C
      } = m, O = !e.disabled && !b;
      let $ = y;
      if (typeof e.maxTagTextLength == "number" && (typeof y == "string" || typeof y == "number")) {
        const k = String($);
        k.length > e.maxTagTextLength && ($ = `${k.slice(0, e.maxTagTextLength)}...`);
      }
      const P = (k) => {
        var x;
        k && k.stopPropagation(), (x = e.onRemove) === null || x === void 0 || x.call(e, m);
      };
      return typeof e.tagRender == "function" ? c(S, $, b, O, P, C) : u(y, $, b, O, P);
    }
    function f(m) {
      const {
        maxTagPlaceholder: b = (S) => `+ ${S.length} ...`
      } = e, y = typeof b == "function" ? b(m) : b;
      return u(y, y, !1);
    }
    const p = (m) => {
      const b = m.target.composing;
      s.value = m.target.value, b || e.onInputChange(m);
    };
    return () => {
      const {
        id: m,
        prefixCls: b,
        values: y,
        open: S,
        inputRef: C,
        placeholder: O,
        disabled: $,
        autofocus: P,
        autocomplete: k,
        activeDescendantId: x,
        tabindex: E,
        compositionStatus: z,
        onInputPaste: N,
        onInputKeyDown: D,
        onInputMouseDown: W,
        onInputCompositionStart: H,
        onInputCompositionEnd: L
      } = e, A = v("div", {
        class: `${r.value}-search`,
        style: {
          width: n.value + "px"
        },
        key: "input"
      }, [v(MC, {
        inputRef: C,
        open: S,
        prefixCls: b,
        id: m,
        inputElement: null,
        disabled: $,
        autofocus: P,
        autocomplete: k,
        editable: l.value,
        activeDescendantId: x,
        value: s.value,
        onKeydown: D,
        onMousedown: W,
        onChange: p,
        onPaste: N,
        onCompositionstart: H,
        onCompositionend: L,
        tabindex: E,
        attrs: yf(e, !0),
        onFocus: () => o.value = !0,
        onBlur: () => o.value = !1
      }, null), v("span", {
        ref: t,
        class: `${r.value}-search-mirror`,
        "aria-hidden": !0
      }, [s.value, Ee(" ")])]), U = v(jr, {
        prefixCls: `${r.value}-overflow`,
        data: y,
        renderItem: d,
        renderRest: f,
        suffix: A,
        itemKey: "key",
        maxCount: e.maxTagCount,
        key: "overflow"
      }, null);
      return v(Ve, null, [U, !y.length && !a.value && !z && v("span", {
        class: `${r.value}-placeholder`
      }, [O])]);
    };
  }
}), QD = {
  inputElement: ue.any,
  id: String,
  prefixCls: String,
  values: ue.array,
  open: {
    type: Boolean,
    default: void 0
  },
  searchValue: String,
  inputRef: ue.any,
  placeholder: ue.any,
  compositionStatus: {
    type: Boolean,
    default: void 0
  },
  disabled: {
    type: Boolean,
    default: void 0
  },
  mode: String,
  showSearch: {
    type: Boolean,
    default: void 0
  },
  autofocus: {
    type: Boolean,
    default: void 0
  },
  autocomplete: String,
  activeDescendantId: String,
  tabindex: ue.oneOfType([ue.number, ue.string]),
  activeValue: String,
  backfill: {
    type: Boolean,
    default: void 0
  },
  optionLabelRender: Function,
  onInputChange: Function,
  onInputPaste: Function,
  onInputKeyDown: Function,
  onInputMouseDown: Function,
  onInputCompositionStart: Function,
  onInputCompositionEnd: Function
}, Bv = ye({
  name: "SingleSelector",
  setup(e) {
    const t = Pe(!1), n = R(() => e.mode === "combobox"), o = R(() => n.value || e.showSearch), i = R(() => {
      let c = e.searchValue || "";
      return n.value && e.activeValue && !t.value && (c = e.activeValue), c;
    }), r = Nv();
    Ie([n, () => e.activeValue], () => {
      n.value && (t.value = !1);
    }, {
      immediate: !0
    });
    const a = R(() => e.mode !== "combobox" && !e.open && !e.showSearch ? !1 : !!i.value || e.compositionStatus), l = R(() => {
      const c = e.values[0];
      return c && (typeof c.label == "string" || typeof c.label == "number") ? c.label.toString() : void 0;
    }), s = () => {
      if (e.values[0])
        return null;
      const c = a.value ? {
        visibility: "hidden"
      } : void 0;
      return v("span", {
        class: `${e.prefixCls}-selection-placeholder`,
        style: c
      }, [e.placeholder]);
    }, u = (c) => {
      c.target.composing || (t.value = !0, e.onInputChange(c));
    };
    return () => {
      var c, d, f, p;
      const {
        inputElement: m,
        prefixCls: b,
        id: y,
        values: S,
        inputRef: C,
        disabled: O,
        autofocus: $,
        autocomplete: P,
        activeDescendantId: k,
        open: x,
        tabindex: E,
        optionLabelRender: z,
        onInputKeyDown: N,
        onInputMouseDown: D,
        onInputPaste: W,
        onInputCompositionStart: H,
        onInputCompositionEnd: L
      } = e, A = S[0];
      let U = null;
      if (A && r.customSlots) {
        const j = (c = A.key) !== null && c !== void 0 ? c : A.value, re = ((d = r.keyEntities[j]) === null || d === void 0 ? void 0 : d.node) || {};
        U = r.customSlots[(f = re.slots) === null || f === void 0 ? void 0 : f.title] || r.customSlots.title || A.label, typeof U == "function" && (U = U(re));
      } else
        U = z && A ? z(A.option) : A?.label;
      return v(Ve, null, [v("span", {
        class: `${b}-selection-search`
      }, [v(MC, {
        inputRef: C,
        prefixCls: b,
        id: y,
        open: x,
        inputElement: m,
        disabled: O,
        autofocus: $,
        autocomplete: P,
        editable: o.value,
        activeDescendantId: k,
        value: i.value,
        onKeydown: N,
        onMousedown: D,
        onChange: u,
        onPaste: W,
        onCompositionstart: H,
        onCompositionend: L,
        tabindex: E,
        attrs: yf(e, !0)
      }, null)]), !n.value && A && !a.value && v("span", {
        class: `${b}-selection-item`,
        title: l.value
      }, [v(Ve, {
        key: (p = A.key) !== null && p !== void 0 ? p : A.value
      }, [U])]), s()]);
    };
  }
});
Bv.props = QD;
Bv.inheritAttrs = !1;
function ZD(e) {
  return ![
    // System function button
    Xe.ESC,
    Xe.SHIFT,
    Xe.BACKSPACE,
    Xe.TAB,
    Xe.WIN_KEY,
    Xe.ALT,
    Xe.META,
    Xe.WIN_KEY_RIGHT,
    Xe.CTRL,
    Xe.SEMICOLON,
    Xe.EQUALS,
    Xe.CAPS_LOCK,
    Xe.CONTEXT_MENU,
    // F1-F12
    Xe.F1,
    Xe.F2,
    Xe.F3,
    Xe.F4,
    Xe.F5,
    Xe.F6,
    Xe.F7,
    Xe.F8,
    Xe.F9,
    Xe.F10,
    Xe.F11,
    Xe.F12
  ].includes(e);
}
function _C() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 250, t = null, n;
  At(() => {
    clearTimeout(n);
  });
  function o(i) {
    (i || t === null) && (t = i), clearTimeout(n), n = setTimeout(() => {
      t = null;
    }, e);
  }
  return [() => t, o];
}
function ju() {
  const e = (t) => {
    e.current = t;
  };
  return e;
}
const JD = ye({
  name: "Selector",
  inheritAttrs: !1,
  props: {
    id: String,
    prefixCls: String,
    showSearch: {
      type: Boolean,
      default: void 0
    },
    open: {
      type: Boolean,
      default: void 0
    },
    /** Display in the Selector value, it's not same as `value` prop */
    values: ue.array,
    multiple: {
      type: Boolean,
      default: void 0
    },
    mode: String,
    searchValue: String,
    activeValue: String,
    inputElement: ue.any,
    autofocus: {
      type: Boolean,
      default: void 0
    },
    activeDescendantId: String,
    tabindex: ue.oneOfType([ue.number, ue.string]),
    disabled: {
      type: Boolean,
      default: void 0
    },
    placeholder: ue.any,
    removeIcon: ue.any,
    // Tags
    maxTagCount: ue.oneOfType([ue.number, ue.string]),
    maxTagTextLength: Number,
    maxTagPlaceholder: ue.any,
    tagRender: Function,
    optionLabelRender: Function,
    /** Check if `tokenSeparators` contains `\n` or `\r\n` */
    tokenWithEnter: {
      type: Boolean,
      default: void 0
    },
    // Motion
    choiceTransitionName: String,
    onToggleOpen: {
      type: Function
    },
    /** `onSearch` returns go next step boolean to check if need do toggle open */
    onSearch: Function,
    onSearchSubmit: Function,
    onRemove: Function,
    onInputKeyDown: {
      type: Function
    },
    /**
     * @private get real dom for trigger align.
     * This may be removed after React provides replacement of `findDOMNode`
     */
    domRef: Function
  },
  setup(e, t) {
    let {
      expose: n
    } = t;
    const o = ju(), i = le(!1), [r, a] = _C(0), l = (S) => {
      const {
        which: C
      } = S;
      (C === Xe.UP || C === Xe.DOWN) && S.preventDefault(), e.onInputKeyDown && e.onInputKeyDown(S), C === Xe.ENTER && e.mode === "tags" && !i.value && !e.open && e.onSearchSubmit(S.target.value), ZD(C) && e.onToggleOpen(!0);
    }, s = () => {
      a(!0);
    };
    let u = null;
    const c = (S) => {
      e.onSearch(S, !0, i.value) !== !1 && e.onToggleOpen(!0);
    }, d = () => {
      i.value = !0;
    }, f = (S) => {
      i.value = !1, e.mode !== "combobox" && c(S.target.value);
    }, p = (S) => {
      let {
        target: {
          value: C
        }
      } = S;
      if (e.tokenWithEnter && u && /[\r\n]/.test(u)) {
        const O = u.replace(/[\r\n]+$/, "").replace(/\r\n/g, " ").replace(/[\r\n]/g, " ");
        C = C.replace(O, u);
      }
      u = null, c(C);
    }, m = (S) => {
      const {
        clipboardData: C
      } = S;
      u = C.getData("text");
    }, b = (S) => {
      let {
        target: C
      } = S;
      C !== o.current && (document.body.style.msTouchAction !== void 0 ? setTimeout(() => {
        o.current.focus();
      }) : o.current.focus());
    }, y = (S) => {
      const C = r();
      S.target !== o.current && !C && S.preventDefault(), (e.mode !== "combobox" && (!e.showSearch || !C) || !e.open) && (e.open && e.onSearch("", !0, !1), e.onToggleOpen());
    };
    return n({
      focus: () => {
        o.current.focus();
      },
      blur: () => {
        o.current.blur();
      }
    }), () => {
      const {
        prefixCls: S,
        domRef: C,
        mode: O
      } = e, $ = {
        inputRef: o,
        onInputKeyDown: l,
        onInputMouseDown: s,
        onInputChange: p,
        onInputPaste: m,
        compositionStatus: i.value,
        onInputCompositionStart: d,
        onInputCompositionEnd: f
      }, P = O === "multiple" || O === "tags" ? v(XD, Z(Z({}, e), $), null) : v(Bv, Z(Z({}, e), $), null);
      return v("div", {
        ref: C,
        class: `${S}-selector`,
        onClick: b,
        onMousedown: y
      }, [P]);
    };
  }
});
function ez(e, t, n) {
  function o(i) {
    var r, a, l;
    let s = i.target;
    s.shadowRoot && i.composed && (s = i.composedPath()[0] || s);
    const u = [(r = e[0]) === null || r === void 0 ? void 0 : r.value, (l = (a = e[1]) === null || a === void 0 ? void 0 : a.value) === null || l === void 0 ? void 0 : l.getPopupElement()];
    t.value && u.every((c) => c && !c.contains(s) && c !== s) && n(!1);
  }
  Pt(() => {
    window.addEventListener("mousedown", o);
  }), At(() => {
    window.removeEventListener("mousedown", o);
  });
}
function tz() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 10;
  const t = Pe(!1);
  let n;
  const o = () => {
    clearTimeout(n);
  };
  return Pt(() => {
    o();
  }), [t, (r, a) => {
    o(), n = setTimeout(() => {
      t.value = r, a && a();
    }, e);
  }, o];
}
const AC = Symbol("BaseSelectContextKey");
function nz(e) {
  return kt(AC, e);
}
function oz() {
  return Tt(AC, {});
}
const Lv = (() => {
  if (typeof navigator > "u" || typeof window > "u")
    return !1;
  const e = navigator.userAgent || navigator.vendor || window.opera;
  return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e?.substring(0, 4));
});
function DC(e) {
  if (!aw(e)) return Dn(e);
  const t = new Proxy({}, {
    get(n, o, i) {
      return Reflect.get(e.value, o, i);
    },
    set(n, o, i) {
      return e.value[o] = i, !0;
    },
    deleteProperty(n, o) {
      return Reflect.deleteProperty(e.value, o);
    },
    has(n, o) {
      return Reflect.has(e.value, o);
    },
    ownKeys() {
      return Object.keys(e.value);
    },
    getOwnPropertyDescriptor() {
      return {
        enumerable: !0,
        configurable: !0
      };
    }
  });
  return Dn(t);
}
var iz = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const rz = ["value", "onChange", "removeIcon", "placeholder", "autofocus", "maxTagCount", "maxTagTextLength", "maxTagPlaceholder", "choiceTransitionName", "onInputKeyDown", "onPopupScroll", "tabindex", "OptionList", "notFoundContent"], az = () => ({
  prefixCls: String,
  id: String,
  omitDomProps: Array,
  // >>> Value
  displayValues: Array,
  onDisplayValuesChange: Function,
  // >>> Active
  /** Current dropdown list active item string value */
  activeValue: String,
  /** Link search input with target element */
  activeDescendantId: String,
  onActiveValueChange: Function,
  // >>> Search
  searchValue: String,
  /** Trigger onSearch, return false to prevent trigger open event */
  onSearch: Function,
  /** Trigger when search text match the `tokenSeparators`. Will provide split content */
  onSearchSplit: Function,
  maxLength: Number,
  OptionList: ue.any,
  /** Tell if provided `options` is empty */
  emptyOptions: Boolean
}), zC = () => ({
  showSearch: {
    type: Boolean,
    default: void 0
  },
  tagRender: {
    type: Function
  },
  optionLabelRender: {
    type: Function
  },
  direction: {
    type: String
  },
  // MISC
  tabindex: Number,
  autofocus: Boolean,
  notFoundContent: ue.any,
  placeholder: ue.any,
  onClear: Function,
  choiceTransitionName: String,
  // >>> Mode
  mode: String,
  // >>> Status
  disabled: {
    type: Boolean,
    default: void 0
  },
  loading: {
    type: Boolean,
    default: void 0
  },
  // >>> Open
  open: {
    type: Boolean,
    default: void 0
  },
  defaultOpen: {
    type: Boolean,
    default: void 0
  },
  onDropdownVisibleChange: {
    type: Function
  },
  // >>> Customize Input
  /** @private Internal usage. Do not use in your production. */
  getInputElement: {
    type: Function
  },
  /** @private Internal usage. Do not use in your production. */
  getRawInputElement: {
    type: Function
  },
  // >>> Selector
  maxTagTextLength: Number,
  maxTagCount: {
    type: [String, Number]
  },
  maxTagPlaceholder: ue.any,
  // >>> Search
  tokenSeparators: {
    type: Array
  },
  // >>> Icons
  allowClear: {
    type: Boolean,
    default: void 0
  },
  showArrow: {
    type: Boolean,
    default: void 0
  },
  inputIcon: ue.any,
  /** Clear all icon */
  clearIcon: ue.any,
  /** Selector remove icon */
  removeIcon: ue.any,
  // >>> Dropdown
  animation: String,
  transitionName: String,
  dropdownStyle: {
    type: Object
  },
  dropdownClassName: String,
  dropdownMatchSelectWidth: {
    type: [Boolean, Number],
    default: void 0
  },
  dropdownRender: {
    type: Function
  },
  dropdownAlign: Object,
  placement: {
    type: String
  },
  getPopupContainer: {
    type: Function
  },
  // >>> Focus
  showAction: {
    type: Array
  },
  onBlur: {
    type: Function
  },
  onFocus: {
    type: Function
  },
  // >>> Rest Events
  onKeyup: Function,
  onKeydown: Function,
  onMousedown: Function,
  onPopupScroll: Function,
  onInputKeyDown: Function,
  onMouseenter: Function,
  onMouseleave: Function,
  onClick: Function
}), lz = () => I(I({}, az()), zC());
function Fv(e) {
  return e === "tags" || e === "multiple";
}
const sz = ye({
  compatConfig: {
    MODE: 3
  },
  name: "BaseSelect",
  inheritAttrs: !1,
  props: wn(lz(), {
    showAction: [],
    notFoundContent: "Not Found"
  }),
  setup(e, t) {
    let {
      attrs: n,
      expose: o,
      slots: i
    } = t;
    const r = R(() => Fv(e.mode)), a = R(() => e.showSearch !== void 0 ? e.showSearch : r.value || e.mode === "combobox"), l = Pe(!1);
    Pt(() => {
      l.value = Lv();
    });
    const s = Nv(), u = Pe(null), c = ju(), d = Pe(null), f = Pe(null), p = Pe(null), m = le(!1), [b, y, S] = tz();
    o({
      focus: () => {
        var se;
        (se = f.value) === null || se === void 0 || se.focus();
      },
      blur: () => {
        var se;
        (se = f.value) === null || se === void 0 || se.blur();
      },
      scrollTo: (se) => {
        var he;
        return (he = p.value) === null || he === void 0 ? void 0 : he.scrollTo(se);
      }
    });
    const $ = R(() => {
      var se;
      if (e.mode !== "combobox")
        return e.searchValue;
      const he = (se = e.displayValues[0]) === null || se === void 0 ? void 0 : se.value;
      return typeof he == "string" || typeof he == "number" ? String(he) : "";
    }), P = e.open !== void 0 ? e.open : e.defaultOpen, k = Pe(P), x = Pe(P), E = (se) => {
      k.value = e.open !== void 0 ? e.open : se, x.value = k.value;
    };
    Ie(() => e.open, () => {
      E(e.open);
    });
    const z = R(() => !e.notFoundContent && e.emptyOptions);
    Lt(() => {
      x.value = k.value, (e.disabled || z.value && x.value && e.mode === "combobox") && (x.value = !1);
    });
    const N = R(() => z.value ? !1 : x.value), D = (se) => {
      const he = se !== void 0 ? se : !x.value;
      x.value !== he && !e.disabled && (E(he), e.onDropdownVisibleChange && e.onDropdownVisibleChange(he), !he && J.value && (J.value = !1, y(!1, () => {
        Y.value = !1, m.value = !1;
      })));
    }, W = R(() => (e.tokenSeparators || []).some((se) => [`
`, `\r
`].includes(se))), H = (se, he, Me) => {
      var ke, Le;
      let Re = !0, We = se;
      (ke = e.onActiveValueChange) === null || ke === void 0 || ke.call(e, null);
      const et = Me ? null : TA(se, e.tokenSeparators);
      return e.mode !== "combobox" && et && (We = "", (Le = e.onSearchSplit) === null || Le === void 0 || Le.call(e, et), D(!1), Re = !1), e.onSearch && $.value !== We && e.onSearch(We, {
        source: he ? "typing" : "effect"
      }), Re;
    }, L = (se) => {
      var he;
      !se || !se.trim() || (he = e.onSearch) === null || he === void 0 || he.call(e, se, {
        source: "submit"
      });
    };
    Ie(x, () => {
      !x.value && !r.value && e.mode !== "combobox" && H("", !1, !1);
    }, {
      immediate: !0,
      flush: "post"
    }), Ie(() => e.disabled, () => {
      k.value && e.disabled && E(!1), e.disabled && !m.value && y(!1);
    }, {
      immediate: !0
    });
    const [A, U] = _C(), j = function(se) {
      var he;
      const Me = A(), {
        which: ke
      } = se;
      if (ke === Xe.ENTER && (e.mode !== "combobox" && se.preventDefault(), x.value || D(!0)), U(!!$.value), ke === Xe.BACKSPACE && !Me && r.value && !$.value && e.displayValues.length) {
        const et = [...e.displayValues];
        let Fe = null;
        for (let Ne = et.length - 1; Ne >= 0; Ne -= 1) {
          const Ge = et[Ne];
          if (!Ge.disabled) {
            et.splice(Ne, 1), Fe = Ge;
            break;
          }
        }
        Fe && e.onDisplayValuesChange(et, {
          type: "remove",
          values: [Fe]
        });
      }
      for (var Le = arguments.length, Re = new Array(Le > 1 ? Le - 1 : 0), We = 1; We < Le; We++)
        Re[We - 1] = arguments[We];
      x.value && p.value && p.value.onKeydown(se, ...Re), (he = e.onKeydown) === null || he === void 0 || he.call(e, se, ...Re);
    }, re = function(se) {
      for (var he = arguments.length, Me = new Array(he > 1 ? he - 1 : 0), ke = 1; ke < he; ke++)
        Me[ke - 1] = arguments[ke];
      x.value && p.value && p.value.onKeyup(se, ...Me), e.onKeyup && e.onKeyup(se, ...Me);
    }, G = (se) => {
      const he = e.displayValues.filter((Me) => Me !== se);
      e.onDisplayValuesChange(he, {
        type: "remove",
        values: [se]
      });
    }, Y = Pe(!1), K = function() {
      y(!0), e.disabled || (e.onFocus && !Y.value && e.onFocus(...arguments), e.showAction && e.showAction.includes("focus") && D(!0)), Y.value = !0;
    }, J = le(!1), be = function() {
      if (J.value || (m.value = !0, y(!1, () => {
        Y.value = !1, m.value = !1, D(!1);
      }), e.disabled))
        return;
      const se = $.value;
      se && (e.mode === "tags" ? e.onSearch(se, {
        source: "submit"
      }) : e.mode === "multiple" && e.onSearch("", {
        source: "blur"
      })), e.onBlur && e.onBlur(...arguments);
    }, xe = () => {
      J.value = !0;
    }, ge = () => {
      J.value = !1;
    };
    kt("VCSelectContainerEvent", {
      focus: K,
      blur: be
    });
    const de = [];
    Pt(() => {
      de.forEach((se) => clearTimeout(se)), de.splice(0, de.length);
    }), At(() => {
      de.forEach((se) => clearTimeout(se)), de.splice(0, de.length);
    });
    const ne = function(se) {
      var he, Me;
      const {
        target: ke
      } = se, Le = (he = d.value) === null || he === void 0 ? void 0 : he.getPopupElement();
      if (Le && Le.contains(ke)) {
        const Fe = setTimeout(() => {
          var Ne;
          const Ge = de.indexOf(Fe);
          Ge !== -1 && de.splice(Ge, 1), S(), !l.value && !Le.contains(document.activeElement) && ((Ne = f.value) === null || Ne === void 0 || Ne.focus());
        });
        de.push(Fe);
      }
      for (var Re = arguments.length, We = new Array(Re > 1 ? Re - 1 : 0), et = 1; et < Re; et++)
        We[et - 1] = arguments[et];
      (Me = e.onMousedown) === null || Me === void 0 || Me.call(e, se, ...We);
    }, we = Pe(null), ae = () => {
    };
    return Pt(() => {
      Ie(N, () => {
        var se;
        if (N.value) {
          const he = Math.ceil((se = u.value) === null || se === void 0 ? void 0 : se.offsetWidth);
          we.value !== he && !Number.isNaN(he) && (we.value = he);
        }
      }, {
        immediate: !0,
        flush: "post"
      });
    }), ez([u, d], N, D), nz(DC(I(I({}, Sd(e)), {
      open: x,
      triggerOpen: N,
      showSearch: a,
      multiple: r,
      toggleOpen: D
    }))), () => {
      const se = I(I({}, e), n), {
        prefixCls: he,
        id: Me,
        open: ke,
        defaultOpen: Le,
        mode: Re,
        // Search related
        showSearch: We,
        searchValue: et,
        onSearch: Fe,
        // Icons
        allowClear: Ne,
        clearIcon: Ge,
        showArrow: it,
        inputIcon: Ke,
        // Others
        disabled: Oe,
        loading: je,
        getInputElement: De,
        getPopupContainer: Je,
        placement: wt,
        // Dropdown
        animation: lt,
        transitionName: qe,
        dropdownStyle: rt,
        dropdownClassName: dt,
        dropdownMatchSelectWidth: vt,
        dropdownRender: Rt,
        dropdownAlign: Xt,
        showAction: vn,
        direction: Dt,
        // Tags
        tokenSeparators: zn,
        tagRender: on,
        optionLabelRender: Qt,
        // Events
        onPopupScroll: mn,
        onDropdownVisibleChange: Kt,
        onFocus: Mn,
        onBlur: rn,
        onKeyup: gn,
        onKeydown: Hn,
        onMousedown: Co,
        onClear: ut,
        omitDomProps: qn,
        getRawInputElement: bn,
        displayValues: Gn,
        onDisplayValuesChange: Fo,
        emptyOptions: gi,
        activeDescendantId: ze,
        activeValue: nt,
        OptionList: tt
      } = se, zt = iz(se, ["prefixCls", "id", "open", "defaultOpen", "mode", "showSearch", "searchValue", "onSearch", "allowClear", "clearIcon", "showArrow", "inputIcon", "disabled", "loading", "getInputElement", "getPopupContainer", "placement", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "showAction", "direction", "tokenSeparators", "tagRender", "optionLabelRender", "onPopupScroll", "onDropdownVisibleChange", "onFocus", "onBlur", "onKeyup", "onKeydown", "onMousedown", "onClear", "omitDomProps", "getRawInputElement", "displayValues", "onDisplayValuesChange", "emptyOptions", "activeDescendantId", "activeValue", "OptionList"]), Vn = Re === "combobox" && De && De() || null, Rn = typeof bn == "function" && bn(), go = I({}, zt);
      let Jt;
      Rn && (Jt = (kn) => {
        D(kn);
      }), rz.forEach((kn) => {
        delete go[kn];
      }), qn?.forEach((kn) => {
        delete go[kn];
      });
      const ht = it !== void 0 ? it : je || !r.value && Re !== "combobox";
      let Jn;
      ht && (Jn = v(wl, {
        class: Te(`${he}-arrow`, {
          [`${he}-arrow-loading`]: je
        }),
        customizeIcon: Ke,
        customizeIconProps: {
          loading: je,
          searchValue: $.value,
          open: x.value,
          focused: b.value,
          showSearch: a.value
        }
      }, null));
      let $o;
      const an = () => {
        ut?.(), Fo([], {
          type: "clear",
          values: Gn
        }), H("", !1, !1);
      };
      !Oe && Ne && (Gn.length || $.value) && ($o = v(wl, {
        class: `${he}-clear`,
        onMousedown: an,
        customizeIcon: Ge
      }, {
        default: () => [Ee("×")]
      }));
      const ln = v(tt, {
        ref: p
      }, I(I({}, s.customSlots), {
        option: i.option
      })), Ht = Te(he, n.class, {
        [`${he}-focused`]: b.value,
        [`${he}-multiple`]: r.value,
        [`${he}-single`]: !r.value,
        [`${he}-allow-clear`]: Ne,
        [`${he}-show-arrow`]: ht,
        [`${he}-disabled`]: Oe,
        [`${he}-loading`]: je,
        [`${he}-open`]: x.value,
        [`${he}-customize-input`]: Vn,
        [`${he}-show-search`]: a.value
      }), sn = v(_D, {
        ref: d,
        disabled: Oe,
        prefixCls: he,
        visible: N.value,
        popupElement: ln,
        containerWidth: we.value,
        animation: lt,
        transitionName: qe,
        dropdownStyle: rt,
        dropdownClassName: dt,
        direction: Dt,
        dropdownMatchSelectWidth: vt,
        dropdownRender: Rt,
        dropdownAlign: Xt,
        placement: wt,
        getPopupContainer: Je,
        empty: gi,
        getTriggerDOMNode: () => c.current,
        onPopupVisibleChange: Jt,
        onPopupMouseEnter: ae,
        onPopupFocusin: xe,
        onPopupFocusout: ge
      }, {
        default: () => Rn ? Bo(Rn) && An(Rn, {
          ref: c
        }, !1, !0) : v(JD, Z(Z({}, e), {}, {
          domRef: c,
          prefixCls: he,
          inputElement: Vn,
          ref: f,
          id: Me,
          showSearch: a.value,
          mode: Re,
          activeDescendantId: ze,
          tagRender: on,
          optionLabelRender: Qt,
          values: Gn,
          open: x.value,
          onToggleOpen: D,
          activeValue: nt,
          searchValue: $.value,
          onSearch: H,
          onSearchSubmit: L,
          onRemove: G,
          tokenWithEnter: W.value
        }), null)
      });
      let Io;
      return Rn ? Io = sn : Io = v("div", Z(Z({}, go), {}, {
        class: Ht,
        ref: u,
        onMousedown: ne,
        onKeydown: j,
        onKeyup: re
      }), [b.value && !x.value && v("span", {
        style: {
          width: 0,
          height: 0,
          position: "absolute",
          overflow: "hidden",
          opacity: 0
        },
        "aria-live": "polite"
      }, [`${Gn.map((kn) => {
        let {
          label: Ho,
          value: ho
        } = kn;
        return ["number", "string"].includes(typeof Ho) ? Ho : ho;
      }).join(", ")}`]), sn, Jn, $o]), Io;
    };
  }
}), xf = (e, t) => {
  let {
    height: n,
    offset: o,
    prefixCls: i,
    onInnerResize: r
  } = e, {
    slots: a
  } = t;
  var l;
  let s = {}, u = {
    display: "flex",
    flexDirection: "column"
  };
  return o !== void 0 && (s = {
    height: `${n}px`,
    position: "relative",
    overflow: "hidden"
  }, u = I(I({}, u), {
    transform: `translateY(${o}px)`,
    position: "absolute",
    left: 0,
    right: 0,
    top: 0
  })), v("div", {
    style: s
  }, [v(Ss, {
    onResize: (c) => {
      let {
        offsetHeight: d
      } = c;
      d && r && r();
    }
  }, {
    default: () => [v("div", {
      style: u,
      class: Te({
        [`${i}-holder-inner`]: i
      })
    }, [(l = a.default) === null || l === void 0 ? void 0 : l.call(a)])]
  })]);
};
xf.displayName = "Filter";
xf.inheritAttrs = !1;
xf.props = {
  prefixCls: String,
  /** Virtual filler height. Should be `count * itemMinHeight` */
  height: Number,
  /** Set offset of visible items. Should be the top of start item position */
  offset: Number,
  onInnerResize: Function
};
const RC = (e, t) => {
  let {
    setRef: n
  } = e, {
    slots: o
  } = t;
  var i;
  const r = no((i = o.default) === null || i === void 0 ? void 0 : i.call(o));
  return r && r.length ? vl(r[0], {
    ref: n
  }) : r;
};
RC.props = {
  setRef: {
    type: Function,
    default: () => {
    }
  }
};
const uz = 20;
function ny(e) {
  return "touches" in e ? e.touches[0].pageY : e.pageY;
}
const cz = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ScrollBar",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    scrollTop: Number,
    scrollHeight: Number,
    height: Number,
    count: Number,
    onScroll: {
      type: Function
    },
    onStartMove: {
      type: Function
    },
    onStopMove: {
      type: Function
    }
  },
  setup() {
    return {
      moveRaf: null,
      scrollbarRef: ju(),
      thumbRef: ju(),
      visibleTimeout: null,
      state: Dn({
        dragging: !1,
        pageY: null,
        startTop: null,
        visible: !1
      })
    };
  },
  watch: {
    scrollTop: {
      handler() {
        this.delayHidden();
      },
      flush: "post"
    }
  },
  mounted() {
    var e, t;
    (e = this.scrollbarRef.current) === null || e === void 0 || e.addEventListener("touchstart", this.onScrollbarTouchStart, bo ? {
      passive: !1
    } : !1), (t = this.thumbRef.current) === null || t === void 0 || t.addEventListener("touchstart", this.onMouseDown, bo ? {
      passive: !1
    } : !1);
  },
  beforeUnmount() {
    this.removeEvents(), clearTimeout(this.visibleTimeout);
  },
  methods: {
    delayHidden() {
      clearTimeout(this.visibleTimeout), this.state.visible = !0, this.visibleTimeout = setTimeout(() => {
        this.state.visible = !1;
      }, 2e3);
    },
    onScrollbarTouchStart(e) {
      e.preventDefault();
    },
    onContainerMouseDown(e) {
      e.stopPropagation(), e.preventDefault();
    },
    // ======================= Clean =======================
    patchEvents() {
      window.addEventListener("mousemove", this.onMouseMove), window.addEventListener("mouseup", this.onMouseUp), this.thumbRef.current.addEventListener("touchmove", this.onMouseMove, bo ? {
        passive: !1
      } : !1), this.thumbRef.current.addEventListener("touchend", this.onMouseUp);
    },
    removeEvents() {
      window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("mouseup", this.onMouseUp), this.scrollbarRef.current.removeEventListener("touchstart", this.onScrollbarTouchStart, bo ? {
        passive: !1
      } : !1), this.thumbRef.current && (this.thumbRef.current.removeEventListener("touchstart", this.onMouseDown, bo ? {
        passive: !1
      } : !1), this.thumbRef.current.removeEventListener("touchmove", this.onMouseMove, bo ? {
        passive: !1
      } : !1), this.thumbRef.current.removeEventListener("touchend", this.onMouseUp)), Mt.cancel(this.moveRaf);
    },
    // ======================= Thumb =======================
    onMouseDown(e) {
      const {
        onStartMove: t
      } = this.$props;
      I(this.state, {
        dragging: !0,
        pageY: ny(e),
        startTop: this.getTop()
      }), t(), this.patchEvents(), e.stopPropagation(), e.preventDefault();
    },
    onMouseMove(e) {
      const {
        dragging: t,
        pageY: n,
        startTop: o
      } = this.state, {
        onScroll: i
      } = this.$props;
      if (Mt.cancel(this.moveRaf), t) {
        const r = ny(e) - n, a = o + r, l = this.getEnableScrollRange(), s = this.getEnableHeightRange(), u = s ? a / s : 0, c = Math.ceil(u * l);
        this.moveRaf = Mt(() => {
          i(c);
        });
      }
    },
    onMouseUp() {
      const {
        onStopMove: e
      } = this.$props;
      this.state.dragging = !1, e(), this.removeEvents();
    },
    // ===================== Calculate =====================
    getSpinHeight() {
      const {
        height: e,
        scrollHeight: t
      } = this.$props;
      let n = e / t * 100;
      return n = Math.max(n, uz), n = Math.min(n, e / 2), Math.floor(n);
    },
    getEnableScrollRange() {
      const {
        scrollHeight: e,
        height: t
      } = this.$props;
      return e - t || 0;
    },
    getEnableHeightRange() {
      const {
        height: e
      } = this.$props, t = this.getSpinHeight();
      return e - t || 0;
    },
    getTop() {
      const {
        scrollTop: e
      } = this.$props, t = this.getEnableScrollRange(), n = this.getEnableHeightRange();
      return e === 0 || t === 0 ? 0 : e / t * n;
    },
    // Not show scrollbar when height is large than scrollHeight
    showScroll() {
      const {
        height: e,
        scrollHeight: t
      } = this.$props;
      return t > e;
    }
  },
  render() {
    const {
      dragging: e,
      visible: t
    } = this.state, {
      prefixCls: n
    } = this.$props, o = this.getSpinHeight() + "px", i = this.getTop() + "px", r = this.showScroll(), a = r && t;
    return v("div", {
      ref: this.scrollbarRef,
      class: Te(`${n}-scrollbar`, {
        [`${n}-scrollbar-show`]: r
      }),
      style: {
        width: "8px",
        top: 0,
        bottom: 0,
        right: 0,
        position: "absolute",
        display: a ? void 0 : "none"
      },
      onMousedown: this.onContainerMouseDown,
      onMousemove: this.delayHidden
    }, [v("div", {
      ref: this.thumbRef,
      class: Te(`${n}-scrollbar-thumb`, {
        [`${n}-scrollbar-thumb-moving`]: e
      }),
      style: {
        width: "100%",
        height: o,
        top: i,
        left: 0,
        position: "absolute",
        background: "rgba(0, 0, 0, 0.5)",
        borderRadius: "99px",
        cursor: "pointer",
        userSelect: "none"
      },
      onMousedown: this.onMouseDown
    }, null)]);
  }
});
function dz(e, t, n, o) {
  const i = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), a = le(Symbol("update"));
  Ie(e, () => {
    a.value = Symbol("update");
  });
  let l;
  function s() {
    Mt.cancel(l);
  }
  function u() {
    s(), l = Mt(() => {
      i.forEach((d, f) => {
        if (d && d.offsetParent) {
          const {
            offsetHeight: p
          } = d;
          r.get(f) !== p && (a.value = Symbol("update"), r.set(f, d.offsetHeight));
        }
      });
    });
  }
  function c(d, f) {
    const p = t(d);
    i.get(p), f ? (i.set(p, f.$el || f), u()) : i.delete(p);
  }
  return Lo(() => {
    s();
  }), [c, u, r, a];
}
function fz(e, t, n, o, i, r, a, l) {
  let s;
  return (u) => {
    if (u == null) {
      l();
      return;
    }
    Mt.cancel(s);
    const c = t.value, d = o.itemHeight;
    if (typeof u == "number")
      a(u);
    else if (u && typeof u == "object") {
      let f;
      const {
        align: p
      } = u;
      "index" in u ? {
        index: f
      } = u : f = c.findIndex((y) => i(y) === u.key);
      const {
        offset: m = 0
      } = u, b = (y, S) => {
        if (y < 0 || !e.value) return;
        const C = e.value.clientHeight;
        let O = !1, $ = S;
        if (C) {
          const P = S || p;
          let k = 0, x = 0, E = 0;
          const z = Math.min(c.length, f);
          for (let W = 0; W <= z; W += 1) {
            const H = i(c[W]);
            x = k;
            const L = n.get(H);
            E = x + (L === void 0 ? d : L), k = E, W === f && L === void 0 && (O = !0);
          }
          const N = e.value.scrollTop;
          let D = null;
          switch (P) {
            case "top":
              D = x - m;
              break;
            case "bottom":
              D = E - C + m;
              break;
            default: {
              const W = N + C;
              x < N ? $ = "top" : E > W && ($ = "bottom");
            }
          }
          D !== null && D !== N && a(D);
        }
        s = Mt(() => {
          O && r(), b(y - 1, $);
        }, 2);
      };
      b(5);
    }
  };
}
const pz = typeof navigator == "object" && /Firefox/i.test(navigator.userAgent), NC = ((e, t) => {
  let n = !1, o = null;
  function i() {
    clearTimeout(o), n = !0, o = setTimeout(() => {
      n = !1;
    }, 50);
  }
  return function(r) {
    let a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
    const l = (
      // Pass origin wheel when on the top
      r < 0 && e.value || // Pass origin wheel when on the bottom
      r > 0 && t.value
    );
    return a && l ? (clearTimeout(o), n = !1) : (!l || n) && i(), !n && l;
  };
});
function gz(e, t, n, o) {
  let i = 0, r = null, a = null, l = !1;
  const s = NC(t, n);
  function u(d) {
    if (!e.value) return;
    Mt.cancel(r);
    const {
      deltaY: f
    } = d;
    i += f, a = f, !s(f) && (pz || d.preventDefault(), r = Mt(() => {
      o(i * (l ? 10 : 1)), i = 0;
    }));
  }
  function c(d) {
    e.value && (l = d.detail === a);
  }
  return [u, c];
}
const hz = 14 / 15;
function vz(e, t, n) {
  let o = !1, i = 0, r = null, a = null;
  const l = () => {
    r && (r.removeEventListener("touchmove", s), r.removeEventListener("touchend", u));
  }, s = (f) => {
    if (o) {
      const p = Math.ceil(f.touches[0].pageY);
      let m = i - p;
      i = p, n(m) && f.preventDefault(), clearInterval(a), a = setInterval(() => {
        m *= hz, (!n(m, !0) || Math.abs(m) <= 0.1) && clearInterval(a);
      }, 16);
    }
  }, u = () => {
    o = !1, l();
  }, c = (f) => {
    l(), f.touches.length === 1 && !o && (o = !0, i = Math.ceil(f.touches[0].pageY), r = f.target, r.addEventListener("touchmove", s, {
      passive: !1
    }), r.addEventListener("touchend", u));
  }, d = () => {
  };
  Pt(() => {
    document.addEventListener("touchmove", d, {
      passive: !1
    }), Ie(e, (f) => {
      t.value.removeEventListener("touchstart", c), l(), clearInterval(a), f && t.value.addEventListener("touchstart", c, {
        passive: !1
      });
    }, {
      immediate: !0
    });
  }), At(() => {
    document.removeEventListener("touchmove", d);
  });
}
var mz = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const bz = [], yz = {
  overflowY: "auto",
  overflowAnchor: "none"
};
function xz(e, t, n, o, i, r) {
  let {
    getKey: a
  } = r;
  return e.slice(t, n + 1).map((l, s) => {
    const u = t + s, c = i(l, u, {
      // style: status === 'MEASURE_START' ? { visibility: 'hidden' } : {},
    }), d = a(l);
    return v(RC, {
      key: d,
      setRef: (f) => o(l, f)
    }, {
      default: () => [c]
    });
  });
}
const wz = ye({
  compatConfig: {
    MODE: 3
  },
  name: "List",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    data: ue.array,
    height: Number,
    itemHeight: Number,
    /** If not match virtual scroll condition, Set List still use height of container. */
    fullHeight: {
      type: Boolean,
      default: void 0
    },
    itemKey: {
      type: [String, Number, Function],
      required: !0
    },
    component: {
      type: [String, Object]
    },
    /** Set `false` will always use real scroll instead of virtual one */
    virtual: {
      type: Boolean,
      default: void 0
    },
    children: Function,
    onScroll: Function,
    onMousedown: Function,
    onMouseenter: Function,
    onVisibleChange: Function
  },
  setup(e, t) {
    let {
      expose: n
    } = t;
    const o = R(() => {
      const {
        height: G,
        itemHeight: Y,
        virtual: K
      } = e;
      return !!(K !== !1 && G && Y);
    }), i = R(() => {
      const {
        height: G,
        itemHeight: Y,
        data: K
      } = e;
      return o.value && K && Y * K.length > G;
    }), r = Dn({
      scrollTop: 0,
      scrollMoving: !1
    }), a = R(() => e.data || bz), l = Pe([]);
    Ie(a, () => {
      l.value = ii(a.value).slice();
    }, {
      immediate: !0
    });
    const s = Pe((G) => {
    });
    Ie(() => e.itemKey, (G) => {
      typeof G == "function" ? s.value = G : s.value = (Y) => Y?.[G];
    }, {
      immediate: !0
    });
    const u = Pe(), c = Pe(), d = Pe(), f = (G) => s.value(G), p = {
      getKey: f
    };
    function m(G) {
      let Y;
      typeof G == "function" ? Y = G(r.scrollTop) : Y = G;
      const K = k(Y);
      u.value && (u.value.scrollTop = K), r.scrollTop = K;
    }
    const [b, y, S, C] = dz(l, f), O = Dn({
      scrollHeight: void 0,
      start: 0,
      end: 0,
      offset: void 0
    }), $ = Pe(0);
    Pt(() => {
      Nt(() => {
        var G;
        $.value = ((G = c.value) === null || G === void 0 ? void 0 : G.offsetHeight) || 0;
      });
    }), Ds(() => {
      Nt(() => {
        var G;
        $.value = ((G = c.value) === null || G === void 0 ? void 0 : G.offsetHeight) || 0;
      });
    }), Ie([o, l], () => {
      o.value || I(O, {
        scrollHeight: void 0,
        start: 0,
        end: l.value.length - 1,
        offset: void 0
      });
    }, {
      immediate: !0
    }), Ie([o, l, $, i], () => {
      o.value && !i.value && I(O, {
        scrollHeight: $.value,
        start: 0,
        end: l.value.length - 1,
        offset: void 0
      }), u.value && (r.scrollTop = u.value.scrollTop);
    }, {
      immediate: !0
    }), Ie([i, o, () => r.scrollTop, l, C, () => e.height, $], () => {
      if (!o.value || !i.value)
        return;
      let G = 0, Y, K, J;
      const be = l.value.length, xe = l.value, ge = r.scrollTop, {
        itemHeight: de,
        height: ne
      } = e, we = ge + ne;
      for (let ae = 0; ae < be; ae += 1) {
        const se = xe[ae], he = f(se);
        let Me = S.get(he);
        Me === void 0 && (Me = de);
        const ke = G + Me;
        Y === void 0 && ke >= ge && (Y = ae, K = G), J === void 0 && ke > we && (J = ae), G = ke;
      }
      Y === void 0 && (Y = 0, K = 0, J = Math.ceil(ne / de)), J === void 0 && (J = be - 1), J = Math.min(J + 1, be), I(O, {
        scrollHeight: G,
        start: Y,
        end: J,
        offset: K
      });
    }, {
      immediate: !0
    });
    const P = R(() => O.scrollHeight - e.height);
    function k(G) {
      let Y = G;
      return Number.isNaN(P.value) || (Y = Math.min(Y, P.value)), Y = Math.max(Y, 0), Y;
    }
    const x = R(() => r.scrollTop <= 0), E = R(() => r.scrollTop >= P.value), z = NC(x, E);
    function N(G) {
      m(G);
    }
    function D(G) {
      var Y;
      const {
        scrollTop: K
      } = G.currentTarget;
      K !== r.scrollTop && m(K), (Y = e.onScroll) === null || Y === void 0 || Y.call(e, G);
    }
    const [W, H] = gz(o, x, E, (G) => {
      m((Y) => Y + G);
    });
    vz(o, u, (G, Y) => z(G, Y) ? !1 : (W({
      preventDefault() {
      },
      deltaY: G
    }), !0));
    function L(G) {
      o.value && G.preventDefault();
    }
    const A = () => {
      u.value && (u.value.removeEventListener("wheel", W, bo ? {
        passive: !1
      } : !1), u.value.removeEventListener("DOMMouseScroll", H), u.value.removeEventListener("MozMousePixelScroll", L));
    };
    Lt(() => {
      Nt(() => {
        u.value && (A(), u.value.addEventListener("wheel", W, bo ? {
          passive: !1
        } : !1), u.value.addEventListener("DOMMouseScroll", H), u.value.addEventListener("MozMousePixelScroll", L));
      });
    }), At(() => {
      A();
    });
    const U = fz(u, l, S, e, f, y, m, () => {
      var G;
      (G = d.value) === null || G === void 0 || G.delayHidden();
    });
    n({
      scrollTo: U
    });
    const j = R(() => {
      let G = null;
      return e.height && (G = I({
        [e.fullHeight ? "height" : "maxHeight"]: e.height + "px"
      }, yz), o.value && (G.overflowY = "hidden", r.scrollMoving && (G.pointerEvents = "none"))), G;
    });
    return Ie([() => O.start, () => O.end, l], () => {
      if (e.onVisibleChange) {
        const G = l.value.slice(O.start, O.end + 1);
        e.onVisibleChange(G, l.value);
      }
    }, {
      flush: "post"
    }), {
      state: r,
      mergedData: l,
      componentStyle: j,
      onFallbackScroll: D,
      onScrollBar: N,
      componentRef: u,
      useVirtual: o,
      calRes: O,
      collectHeight: y,
      setInstance: b,
      sharedConfig: p,
      scrollBarRef: d,
      fillerInnerRef: c,
      delayHideScrollBar: () => {
        var G;
        (G = d.value) === null || G === void 0 || G.delayHidden();
      }
    };
  },
  render() {
    const e = I(I({}, this.$props), this.$attrs), {
      prefixCls: t = "rc-virtual-list",
      height: n,
      itemHeight: o,
      // eslint-disable-next-line no-unused-vars
      fullHeight: i,
      data: r,
      itemKey: a,
      virtual: l,
      component: s = "div",
      onScroll: u,
      children: c = this.$slots.default,
      style: d,
      class: f
    } = e, p = mz(e, ["prefixCls", "height", "itemHeight", "fullHeight", "data", "itemKey", "virtual", "component", "onScroll", "children", "style", "class"]), m = Te(t, f), {
      scrollTop: b
    } = this.state, {
      scrollHeight: y,
      offset: S,
      start: C,
      end: O
    } = this.calRes, {
      componentStyle: $,
      onFallbackScroll: P,
      onScrollBar: k,
      useVirtual: x,
      collectHeight: E,
      sharedConfig: z,
      setInstance: N,
      mergedData: D,
      delayHideScrollBar: W
    } = this;
    return v("div", Z({
      style: I(I({}, d), {
        position: "relative"
      }),
      class: m
    }, p), [v(s, {
      class: `${t}-holder`,
      style: $,
      ref: "componentRef",
      onScroll: P,
      onMouseenter: W
    }, {
      default: () => [v(xf, {
        prefixCls: t,
        height: y,
        offset: S,
        onInnerResize: E,
        ref: "fillerInnerRef"
      }, {
        default: () => xz(D, C, O, N, c, z)
      })]
    }), x && v(cz, {
      ref: "scrollBarRef",
      prefixCls: t,
      scrollTop: b,
      height: n,
      scrollHeight: y,
      count: D.length,
      onScroll: k,
      onStartMove: () => {
        this.state.scrollMoving = !0;
      },
      onStopMove: () => {
        this.state.scrollMoving = !1;
      }
    }, null)]);
  }
});
function BC(e, t, n) {
  const o = le(e());
  return Ie(t, (i, r) => {
    n ? n(i, r) && (o.value = e()) : o.value = e();
  }), o;
}
function Sz() {
  return /(mac\sos|macintosh)/i.test(navigator.appVersion);
}
const LC = Symbol("SelectContextKey");
function Cz(e) {
  return kt(LC, e);
}
function $z() {
  return Tt(LC, {});
}
var Pz = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
function oy(e) {
  return typeof e == "string" || typeof e == "number";
}
const Oz = ye({
  compatConfig: {
    MODE: 3
  },
  name: "OptionList",
  inheritAttrs: !1,
  setup(e, t) {
    let {
      expose: n,
      slots: o
    } = t;
    const i = oz(), r = $z(), a = R(() => `${i.prefixCls}-item`), l = BC(() => r.flattenOptions, [() => i.open, () => r.flattenOptions], (P) => P[0]), s = ju(), u = (P) => {
      P.preventDefault();
    }, c = (P) => {
      s.current && s.current.scrollTo(typeof P == "number" ? {
        index: P
      } : P);
    }, d = function(P) {
      let k = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
      const x = l.value.length;
      for (let E = 0; E < x; E += 1) {
        const z = (P + E * k + x) % x, {
          group: N,
          data: D
        } = l.value[z];
        if (!N && !D.disabled)
          return z;
      }
      return -1;
    }, f = Dn({
      activeIndex: d(0)
    }), p = function(P) {
      let k = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
      f.activeIndex = P;
      const x = {
        source: k ? "keyboard" : "mouse"
      }, E = l.value[P];
      if (!E) {
        r.onActiveValue(null, -1, x);
        return;
      }
      r.onActiveValue(E.value, P, x);
    };
    Ie([() => l.value.length, () => i.searchValue], () => {
      p(r.defaultActiveFirstOption !== !1 ? d(0) : -1);
    }, {
      immediate: !0
    });
    const m = (P) => r.rawValues.has(P) && i.mode !== "combobox";
    Ie([() => i.open, () => i.searchValue], () => {
      if (!i.multiple && i.open && r.rawValues.size === 1) {
        const P = Array.from(r.rawValues)[0], k = ii(l.value).findIndex((x) => {
          let {
            data: E
          } = x;
          return E[r.fieldNames.value] === P;
        });
        k !== -1 && (p(k), Nt(() => {
          c(k);
        }));
      }
      i.open && Nt(() => {
        var P;
        (P = s.current) === null || P === void 0 || P.scrollTo(void 0);
      });
    }, {
      immediate: !0,
      flush: "post"
    });
    const b = (P) => {
      P !== void 0 && r.onSelect(P, {
        selected: !r.rawValues.has(P)
      }), i.multiple || i.toggleOpen(!1);
    }, y = (P) => typeof P.label == "function" ? P.label() : P.label;
    function S(P) {
      const k = l.value[P];
      if (!k) return null;
      const x = k.data || {}, {
        value: E
      } = x, {
        group: z
      } = k, N = yf(x, !0), D = y(k);
      return k ? v("div", Z(Z({
        "aria-label": typeof D == "string" && !z ? D : null
      }, N), {}, {
        key: P,
        role: z ? "presentation" : "option",
        id: `${i.id}_list_${P}`,
        "aria-selected": m(E)
      }), [E]) : null;
    }
    return n({
      onKeydown: (P) => {
        const {
          which: k,
          ctrlKey: x
        } = P;
        switch (k) {
          // >>> Arrow keys & ctrl + n/p on Mac
          case Xe.N:
          case Xe.P:
          case Xe.UP:
          case Xe.DOWN: {
            let E = 0;
            if (k === Xe.UP ? E = -1 : k === Xe.DOWN ? E = 1 : Sz() && x && (k === Xe.N ? E = 1 : k === Xe.P && (E = -1)), E !== 0) {
              const z = d(f.activeIndex + E, E);
              c(z), p(z, !0);
            }
            break;
          }
          // >>> Select
          case Xe.ENTER: {
            const E = l.value[f.activeIndex];
            E && !E.data.disabled ? b(E.value) : b(void 0), i.open && P.preventDefault();
            break;
          }
          // >>> Close
          case Xe.ESC:
            i.toggleOpen(!1), i.open && P.stopPropagation();
        }
      },
      onKeyup: () => {
      },
      scrollTo: (P) => {
        c(P);
      }
    }), () => {
      const {
        id: P,
        notFoundContent: k,
        onPopupScroll: x
      } = i, {
        menuItemSelectedIcon: E,
        fieldNames: z,
        virtual: N,
        listHeight: D,
        listItemHeight: W
      } = r, H = o.option, {
        activeIndex: L
      } = f, A = Object.keys(z).map((U) => z[U]);
      return l.value.length === 0 ? v("div", {
        role: "listbox",
        id: `${P}_list`,
        class: `${a.value}-empty`,
        onMousedown: u
      }, [k]) : v(Ve, null, [v("div", {
        role: "listbox",
        id: `${P}_list`,
        style: {
          height: 0,
          width: 0,
          overflow: "hidden"
        }
      }, [S(L - 1), S(L), S(L + 1)]), v(wz, {
        itemKey: "key",
        ref: s,
        data: l.value,
        height: D,
        itemHeight: W,
        fullHeight: !1,
        onMousedown: u,
        onScroll: x,
        virtual: N
      }, {
        default: (U, j) => {
          var re;
          const {
            group: G,
            groupOption: Y,
            data: K,
            value: J
          } = U, {
            key: be
          } = K, xe = typeof U.label == "function" ? U.label() : U.label;
          if (G) {
            const Ge = (re = K.title) !== null && re !== void 0 ? re : oy(xe) && xe;
            return v("div", {
              class: Te(a.value, `${a.value}-group`),
              title: Ge
            }, [H ? H(K) : xe !== void 0 ? xe : be]);
          }
          const {
            disabled: ge,
            title: de,
            children: ne,
            style: we,
            class: ae,
            className: se
          } = K, he = Pz(K, ["disabled", "title", "children", "style", "class", "className"]), Me = Tn(he, A), ke = m(J), Le = `${a.value}-option`, Re = Te(a.value, Le, ae, se, {
            [`${Le}-grouped`]: Y,
            [`${Le}-active`]: L === j && !ge,
            [`${Le}-disabled`]: ge,
            [`${Le}-selected`]: ke
          }), We = y(U), et = !E || typeof E == "function" || ke, Fe = typeof We == "number" ? We : We || J;
          let Ne = oy(Fe) ? Fe.toString() : void 0;
          return de !== void 0 && (Ne = de), v("div", Z(Z({}, Me), {}, {
            "aria-selected": ke,
            class: Re,
            title: Ne,
            onMousemove: (Ge) => {
              he.onMousemove && he.onMousemove(Ge), !(L === j || ge) && p(j);
            },
            onClick: (Ge) => {
              ge || b(J), he.onClick && he.onClick(Ge);
            },
            style: we
          }), [v("div", {
            class: `${Le}-content`
          }, [H ? H(K) : Fe]), Bo(E) || ke, et && v(wl, {
            class: `${a.value}-option-state`,
            customizeIcon: E,
            customizeIconProps: {
              isSelected: ke
            }
          }, {
            default: () => [ke ? "✓" : null]
          })]);
        }
      })]);
    };
  }
});
var Iz = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
function Mz(e) {
  const t = e, {
    key: n,
    children: o
  } = t, i = t.props, {
    value: r,
    disabled: a
  } = i, l = Iz(i, ["value", "disabled"]), s = o?.default;
  return I({
    key: n,
    value: r !== void 0 ? r : n,
    children: s,
    disabled: a || a === ""
  }, l);
}
function Hv(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  return no(e).map((o, i) => {
    var r;
    if (!Bo(o) || !o.type)
      return null;
    const {
      type: {
        isSelectOptGroup: a
      },
      key: l,
      children: s,
      props: u
    } = o;
    if (t || !a)
      return Mz(o);
    const c = s && s.default ? s.default() : void 0, d = u?.label || ((r = s.label) === null || r === void 0 ? void 0 : r.call(s)) || l;
    return I(I({
      key: `__RC_SELECT_GRP__${l === null ? i : String(l)}__`
    }, u), {
      label: d,
      options: Hv(c || [])
    });
  }).filter((o) => o);
}
function Tz(e, t, n) {
  const o = Pe(), i = Pe(), r = Pe(), a = Pe([]);
  return Ie([e, t], () => {
    e.value ? a.value = ii(e.value).slice() : a.value = Hv(t.value);
  }, {
    immediate: !0,
    deep: !0
  }), Lt(() => {
    const l = a.value, s = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), c = n.value;
    function d(f) {
      let p = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
      for (let m = 0; m < f.length; m += 1) {
        const b = f[m];
        !b[c.options] || p ? (s.set(b[c.value], b), u.set(b[c.label], b)) : d(b[c.options], !0);
      }
    }
    d(l), o.value = l, i.value = s, r.value = u;
  }), {
    options: o,
    valueOptions: i,
    labelOptions: r
  };
}
let iy = 0;
const kz = process.env.NODE_ENV !== "test" && ki();
function Ez() {
  let e;
  return kz ? (e = iy, iy += 1) : e = "TEST_OR_SSR", e;
}
function _z() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : le("");
  const t = `rc_select_${Ez()}`;
  return e.value || t;
}
function Vv(e) {
  return Array.isArray(e) ? e : e !== void 0 ? [e] : [];
}
const Az = typeof window < "u" && window.document && window.document.documentElement;
process.env.NODE_ENV;
function Dz(e) {
  const {
    mode: t,
    options: n,
    children: o,
    backfill: i,
    allowClear: r,
    placeholder: a,
    getInputElement: l,
    showSearch: s,
    onSearch: u,
    defaultOpen: c,
    autofocus: d,
    labelInValue: f,
    value: p,
    inputValue: m,
    optionLabelProp: b
  } = e, y = Fv(t), S = s !== void 0 ? s : y || t === "combobox", C = n || Hv(o);
  if (ei(t !== "tags" || C.every((O) => !O.disabled), "Please avoid setting option to disabled in tags mode since user can always type text as tag."), ei(t !== "combobox" || !b, "`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."), ei(t === "combobox" || !i, "`backfill` only works with `combobox` mode."), ei(t === "combobox" || !l, "`getInputElement` only work with `combobox` mode."), Lg(t !== "combobox" || !l || !r || !a, "Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."), u && !S && t !== "combobox" && t !== "tags" && ei(!1, "`onSearch` should work with `showSearch` instead of use alone."), Lg(!c || d, "`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autofocus` if needed."), p != null) {
    const O = Vv(p);
    ei(!f || O.every(($) => typeof $ == "object" && ("key" in $ || "value" in $)), "`value` should in shape of `{ value: string | number, label?: any }` when you set `labelInValue` to `true`"), ei(!y || Array.isArray(p), "`value` should be array when `mode` is `multiple` or `tags`");
  }
  if (o) {
    let O = null;
    o.some(($) => {
      var P;
      if (!Bo($) || !$.type)
        return !1;
      const {
        type: k
      } = $;
      return k.isSelectOption ? !1 : k.isSelectOptGroup ? !(((P = $.children) === null || P === void 0 ? void 0 : P.default()) || []).every((z) => !Bo(z) || !$.type || z.type.isSelectOption ? !0 : (O = z.type, !1)) : (O = k, !0);
    }), O && ei(!1, `\`children\` should be \`Select.Option\` or \`Select.OptGroup\` instead of \`${O.displayName || O.name || O}\`.`), ei(m === void 0, "`inputValue` is deprecated, please use `searchValue` instead.");
  }
}
function Mp(e, t) {
  return Vv(e).join("").toUpperCase().includes(t);
}
const zz = ((e, t, n, o, i) => R(() => {
  const r = n.value, a = i?.value, l = o?.value;
  if (!r || l === !1)
    return e.value;
  const {
    options: s,
    label: u,
    value: c
  } = t.value, d = [], f = typeof l == "function", p = r.toUpperCase(), m = f ? l : (y, S) => a ? Mp(S[a], p) : S[s] ? Mp(S[u !== "children" ? u : "label"], p) : Mp(S[c], p), b = f ? (y) => Qg(y) : (y) => y;
  return e.value.forEach((y) => {
    if (y[s]) {
      if (m(r, b(y)))
        d.push(y);
      else {
        const C = y[s].filter((O) => m(r, b(O)));
        C.length && d.push(I(I({}, y), {
          [s]: C
        }));
      }
      return;
    }
    m(r, b(y)) && d.push(y);
  }), d;
})), Rz = ((e, t) => {
  const n = Pe({
    values: /* @__PURE__ */ new Map(),
    options: /* @__PURE__ */ new Map()
  });
  return [R(() => {
    const {
      values: r,
      options: a
    } = n.value, l = e.value.map((c) => {
      var d;
      return c.label === void 0 ? I(I({}, c), {
        label: (d = r.get(c.value)) === null || d === void 0 ? void 0 : d.label
      }) : c;
    }), s = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map();
    return l.forEach((c) => {
      s.set(c.value, c), u.set(c.value, t.value.get(c.value) || a.get(c.value));
    }), n.value.values = s, n.value.options = u, l;
  }), (r) => t.value.get(r) || n.value.options.get(r)];
});
function Wo(e, t) {
  const {
    defaultValue: n,
    value: o = le()
  } = t || {};
  let i = typeof e == "function" ? e() : e;
  o.value !== void 0 && (i = M(o)), n !== void 0 && (i = typeof n == "function" ? n() : n);
  const r = le(i), a = le(i);
  Lt(() => {
    let s = o.value !== void 0 ? o.value : r.value;
    t.postState && (s = t.postState(s)), a.value = s;
  });
  function l(s) {
    const u = a.value;
    r.value = s, ii(a.value) !== s && t.onChange && t.onChange(s, u);
  }
  return Ie(o, () => {
    r.value = o.value;
  }), [a, l];
}
function On(e) {
  const t = typeof e == "function" ? e() : e, n = le(t);
  function o(i) {
    n.value = i;
  }
  return [n, o];
}
const Nz = ["inputValue"];
function FC() {
  return I(I({}, zC()), {
    prefixCls: String,
    id: String,
    backfill: {
      type: Boolean,
      default: void 0
    },
    // >>> Field Names
    fieldNames: Object,
    // >>> Search
    /** @deprecated Use `searchValue` instead */
    inputValue: String,
    searchValue: String,
    onSearch: Function,
    autoClearSearchValue: {
      type: Boolean,
      default: void 0
    },
    // >>> Select
    onSelect: Function,
    onDeselect: Function,
    // >>> Options
    /**
     * In Select, `false` means do nothing.
     * In TreeSelect, `false` will highlight match item.
     * It's by design.
     */
    filterOption: {
      type: [Boolean, Function],
      default: void 0
    },
    filterSort: Function,
    optionFilterProp: String,
    optionLabelProp: String,
    options: Array,
    defaultActiveFirstOption: {
      type: Boolean,
      default: void 0
    },
    virtual: {
      type: Boolean,
      default: void 0
    },
    listHeight: Number,
    listItemHeight: Number,
    // >>> Icon
    menuItemSelectedIcon: ue.any,
    mode: String,
    labelInValue: {
      type: Boolean,
      default: void 0
    },
    value: ue.any,
    defaultValue: ue.any,
    onChange: Function,
    children: Array
  });
}
function Bz(e) {
  return !e || typeof e != "object";
}
const Lz = ye({
  compatConfig: {
    MODE: 3
  },
  name: "VcSelect",
  inheritAttrs: !1,
  props: wn(FC(), {
    prefixCls: "vc-select",
    autoClearSearchValue: !0,
    listHeight: 200,
    listItemHeight: 20,
    dropdownMatchSelectWidth: !0
  }),
  setup(e, t) {
    let {
      expose: n,
      attrs: o,
      slots: i
    } = t;
    const r = _z(Ut(e, "id")), a = R(() => Fv(e.mode)), l = R(() => !!(!e.options && e.children)), s = R(() => e.filterOption === void 0 && e.mode === "combobox" ? !1 : e.filterOption), u = R(() => gC(e.fieldNames, l.value)), [c, d] = Wo("", {
      value: R(() => e.searchValue !== void 0 ? e.searchValue : e.inputValue),
      postState: (ae) => ae || ""
    }), f = Tz(Ut(e, "options"), Ut(e, "children"), u), {
      valueOptions: p,
      labelOptions: m,
      options: b
    } = f, y = (ae) => Vv(ae).map((he) => {
      var Me, ke;
      let Le, Re, We, et;
      Bz(he) ? Le = he : (We = he.key, Re = he.label, Le = (Me = he.value) !== null && Me !== void 0 ? Me : We);
      const Fe = p.value.get(Le);
      return Fe && (Re === void 0 && (Re = Fe?.[e.optionLabelProp || u.value.label]), We === void 0 && (We = (ke = Fe?.key) !== null && ke !== void 0 ? ke : Le), et = Fe?.disabled), {
        label: Re,
        value: Le,
        key: We,
        disabled: et,
        option: Fe
      };
    }), [S, C] = Wo(e.defaultValue, {
      value: Ut(e, "value")
    }), O = R(() => {
      var ae;
      const se = y(S.value);
      return e.mode === "combobox" && !(!((ae = se[0]) === null || ae === void 0) && ae.value) ? [] : se;
    }), [$, P] = Rz(O, p), k = R(() => {
      if (!e.mode && $.value.length === 1) {
        const ae = $.value[0];
        if (ae.value === null && (ae.label === null || ae.label === void 0))
          return [];
      }
      return $.value.map((ae) => {
        var se;
        return I(I({}, ae), {
          label: (se = typeof ae.label == "function" ? ae.label() : ae.label) !== null && se !== void 0 ? se : ae.value
        });
      });
    }), x = R(() => new Set($.value.map((ae) => ae.value)));
    Lt(() => {
      var ae;
      if (e.mode === "combobox") {
        const se = (ae = $.value[0]) === null || ae === void 0 ? void 0 : ae.value;
        se != null && d(String(se));
      }
    }, {
      flush: "post"
    });
    const E = (ae, se) => {
      const he = se ?? ae;
      return {
        [u.value.value]: ae,
        [u.value.label]: he
      };
    }, z = Pe();
    Lt(() => {
      if (e.mode !== "tags") {
        z.value = b.value;
        return;
      }
      const ae = b.value.slice(), se = (he) => p.value.has(he);
      [...$.value].sort((he, Me) => he.value < Me.value ? -1 : 1).forEach((he) => {
        const Me = he.value;
        se(Me) || ae.push(E(Me, he.label));
      }), z.value = ae;
    });
    const N = zz(z, u, c, s, Ut(e, "optionFilterProp")), D = R(() => e.mode !== "tags" || !c.value || N.value.some((ae) => ae[e.optionFilterProp || "value"] === c.value) ? N.value : [E(c.value), ...N.value]), W = R(() => e.filterSort ? [...D.value].sort((ae, se) => e.filterSort(ae, se)) : D.value), H = R(() => MA(W.value, {
      fieldNames: u.value,
      childrenAsData: l.value
    })), L = (ae) => {
      const se = y(ae);
      if (C(se), e.onChange && // Trigger event only when value changed
      (se.length !== $.value.length || se.some((he, Me) => {
        var ke;
        return ((ke = $.value[Me]) === null || ke === void 0 ? void 0 : ke.value) !== he?.value;
      }))) {
        const he = e.labelInValue ? se.map((ke) => I(I({}, ke), {
          originLabel: ke.label,
          label: typeof ke.label == "function" ? ke.label() : ke.label
        })) : se.map((ke) => ke.value), Me = se.map((ke) => Qg(P(ke.value)));
        e.onChange(
          // Value
          a.value ? he : he[0],
          // Option
          a.value ? Me : Me[0]
        );
      }
    }, [A, U] = On(null), [j, re] = On(0), G = R(() => e.defaultActiveFirstOption !== void 0 ? e.defaultActiveFirstOption : e.mode !== "combobox"), Y = function(ae, se) {
      let {
        source: he = "keyboard"
      } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
      re(se), e.backfill && e.mode === "combobox" && ae !== null && he === "keyboard" && U(String(ae));
    }, K = (ae, se) => {
      const he = () => {
        var Me;
        const ke = P(ae), Le = ke?.[u.value.label];
        return [e.labelInValue ? {
          label: typeof Le == "function" ? Le() : Le,
          originLabel: Le,
          value: ae,
          key: (Me = ke?.key) !== null && Me !== void 0 ? Me : ae
        } : ae, Qg(ke)];
      };
      if (se && e.onSelect) {
        const [Me, ke] = he();
        e.onSelect(Me, ke);
      } else if (!se && e.onDeselect) {
        const [Me, ke] = he();
        e.onDeselect(Me, ke);
      }
    }, J = (ae, se) => {
      let he;
      const Me = a.value ? se.selected : !0;
      Me ? he = a.value ? [...$.value, ae] : [ae] : he = $.value.filter((ke) => ke.value !== ae), L(he), K(ae, Me), e.mode === "combobox" ? U("") : (!a.value || e.autoClearSearchValue) && (d(""), U(""));
    }, be = (ae, se) => {
      L(ae), (se.type === "remove" || se.type === "clear") && se.values.forEach((he) => {
        K(he.value, !1);
      });
    }, xe = (ae, se) => {
      var he;
      if (d(ae), U(null), se.source === "submit") {
        const Me = (ae || "").trim();
        if (Me) {
          const ke = Array.from(/* @__PURE__ */ new Set([...x.value, Me]));
          L(ke), K(Me, !0), d("");
        }
        return;
      }
      se.source !== "blur" && (e.mode === "combobox" && L(ae), (he = e.onSearch) === null || he === void 0 || he.call(e, ae));
    }, ge = (ae) => {
      let se = ae;
      e.mode !== "tags" && (se = ae.map((Me) => {
        const ke = m.value.get(Me);
        return ke?.value;
      }).filter((Me) => Me !== void 0));
      const he = Array.from(/* @__PURE__ */ new Set([...x.value, ...se]));
      L(he), he.forEach((Me) => {
        K(Me, !0);
      });
    }, de = R(() => e.virtual !== !1 && e.dropdownMatchSelectWidth !== !1);
    Cz(DC(I(I({}, f), {
      flattenOptions: H,
      onActiveValue: Y,
      defaultActiveFirstOption: G,
      onSelect: J,
      menuItemSelectedIcon: Ut(e, "menuItemSelectedIcon"),
      rawValues: x,
      fieldNames: u,
      virtual: de,
      listHeight: Ut(e, "listHeight"),
      listItemHeight: Ut(e, "listItemHeight"),
      childrenAsData: l
    }))), process.env.NODE_ENV !== "production" && Lt(() => {
      Dz(e);
    }, {
      flush: "post"
    });
    const ne = le();
    n({
      focus() {
        var ae;
        (ae = ne.value) === null || ae === void 0 || ae.focus();
      },
      blur() {
        var ae;
        (ae = ne.value) === null || ae === void 0 || ae.blur();
      },
      scrollTo(ae) {
        var se;
        (se = ne.value) === null || se === void 0 || se.scrollTo(ae);
      }
    });
    const we = R(() => Tn(e, [
      "id",
      "mode",
      "prefixCls",
      "backfill",
      "fieldNames",
      // Search
      "inputValue",
      "searchValue",
      "onSearch",
      "autoClearSearchValue",
      // Select
      "onSelect",
      "onDeselect",
      "dropdownMatchSelectWidth",
      // Options
      "filterOption",
      "filterSort",
      "optionFilterProp",
      "optionLabelProp",
      "options",
      "children",
      "defaultActiveFirstOption",
      "menuItemSelectedIcon",
      "virtual",
      "listHeight",
      "listItemHeight",
      // Value
      "value",
      "defaultValue",
      "labelInValue",
      "onChange"
    ]));
    return () => v(sz, Z(Z(Z({}, we.value), o), {}, {
      id: r,
      prefixCls: e.prefixCls,
      ref: ne,
      omitDomProps: Nz,
      mode: e.mode,
      displayValues: k.value,
      onDisplayValuesChange: be,
      searchValue: c.value,
      onSearch: xe,
      onSearchSplit: ge,
      dropdownMatchSelectWidth: e.dropdownMatchSelectWidth,
      OptionList: Oz,
      emptyOptions: !H.value.length,
      activeValue: A.value,
      activeDescendantId: `${r}_list_${j.value}`
    }), i);
  }
}), jv = () => null;
jv.isSelectOption = !0;
jv.displayName = "ASelectOption";
const Wv = () => null;
Wv.isSelectOptGroup = !0;
Wv.displayName = "ASelectOptGroup";
var Fz = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" } }] }, name: "down", theme: "outlined" }, Hz = Symbol("iconContext"), HC = function() {
  return Tt(Hz, {
    prefixCls: le("anticon"),
    rootClassName: le(""),
    csp: le()
  });
};
function qv() {
  return !!(typeof window < "u" && window.document && window.document.createElement);
}
function Vz(e, t) {
  return e && e.contains ? e.contains(t) : !1;
}
var ry = "data-vc-order", jz = "vc-icon-key", oh = /* @__PURE__ */ new Map();
function VC() {
  var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.mark;
  return t ? t.startsWith("data-") ? t : "data-".concat(t) : jz;
}
function Gv(e) {
  if (e.attachTo)
    return e.attachTo;
  var t = document.querySelector("head");
  return t || document.body;
}
function Wz(e) {
  return e === "queue" ? "prependQueue" : e ? "prepend" : "append";
}
function jC(e) {
  return Array.from((oh.get(e) || e).children).filter(function(t) {
    return t.tagName === "STYLE";
  });
}
function WC(e) {
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  if (!qv())
    return null;
  var n = t.csp, o = t.prepend, i = document.createElement("style");
  i.setAttribute(ry, Wz(o)), n && n.nonce && (i.nonce = n.nonce), i.innerHTML = e;
  var r = Gv(t), a = r.firstChild;
  if (o) {
    if (o === "queue") {
      var l = jC(r).filter(function(s) {
        return ["prepend", "prependQueue"].includes(s.getAttribute(ry));
      });
      if (l.length)
        return r.insertBefore(i, l[l.length - 1].nextSibling), i;
    }
    r.insertBefore(i, a);
  } else
    r.appendChild(i);
  return i;
}
function qz(e) {
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = Gv(t);
  return jC(n).find(function(o) {
    return o.getAttribute(VC(t)) === e;
  });
}
function Gz(e, t) {
  var n = oh.get(e);
  if (!n || !Vz(document, n)) {
    var o = WC("", t), i = o.parentNode;
    oh.set(e, i), e.removeChild(o);
  }
}
function Kz(e, t) {
  var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, o = Gv(n);
  Gz(o, n);
  var i = qz(t, n);
  if (i)
    return n.csp && n.csp.nonce && i.nonce !== n.csp.nonce && (i.nonce = n.csp.nonce), i.innerHTML !== e && (i.innerHTML = e), i;
  var r = WC(e, n);
  return r.setAttribute(VC(n), t), r;
}
function ay(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      Yz(e, i, n[i]);
    });
  }
  return e;
}
function Yz(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
function Uz(e, t) {
  process.env.NODE_ENV !== "production" && !e && console !== void 0 && console.error("Warning: ".concat(t));
}
function Xz(e, t) {
  Uz(e, "[@ant-design/icons-vue] ".concat(t));
}
function ly(e) {
  return typeof e == "object" && typeof e.name == "string" && typeof e.theme == "string" && (typeof e.icon == "object" || typeof e.icon == "function");
}
function ih(e, t, n) {
  return n ? ro(e.tag, ay({
    key: t
  }, n, e.attrs), (e.children || []).map(function(o, i) {
    return ih(o, "".concat(t, "-").concat(e.tag, "-").concat(i));
  })) : ro(e.tag, ay({
    key: t
  }, e.attrs), (e.children || []).map(function(o, i) {
    return ih(o, "".concat(t, "-").concat(e.tag, "-").concat(i));
  }));
}
function qC(e) {
  return Gr(e)[0];
}
function GC(e) {
  return e ? Array.isArray(e) ? e : [e] : [];
}
var Qz = `
.anticon {
  display: inline-block;
  color: inherit;
  font-style: normal;
  line-height: 0;
  text-align: center;
  text-transform: none;
  vertical-align: -0.125em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.anticon > * {
  line-height: 1;
}

.anticon svg {
  display: inline-block;
}

.anticon::before {
  display: none;
}

.anticon .anticon-icon {
  display: block;
}

.anticon[tabindex] {
  cursor: pointer;
}

.anticon-spin::before,
.anticon-spin {
  display: inline-block;
  -webkit-animation: loadingCircle 1s infinite linear;
  animation: loadingCircle 1s infinite linear;
}

@-webkit-keyframes loadingCircle {
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

@keyframes loadingCircle {
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
`;
function KC(e) {
  return e && e.getRootNode && e.getRootNode();
}
function Zz(e) {
  return qv() ? KC(e) instanceof ShadowRoot : !1;
}
function Jz(e) {
  return Zz(e) ? KC(e) : null;
}
var eR = function() {
  var t = HC(), n = t.prefixCls, o = t.csp, i = ci(), r = Qz;
  n && (r = r.replace(/anticon/g, n.value)), Nt(function() {
    if (qv()) {
      var a = i.vnode.el, l = Jz(a);
      Kz(r, "@ant-design-vue-icons", {
        prepend: !0,
        csp: o.value,
        attachTo: l
      });
    }
  });
}, tR = ["icon", "primaryColor", "secondaryColor"];
function nR(e, t) {
  if (e == null) return {};
  var n = oR(e, t), o, i;
  if (Object.getOwnPropertySymbols) {
    var r = Object.getOwnPropertySymbols(e);
    for (i = 0; i < r.length; i++)
      o = r[i], !(t.indexOf(o) >= 0) && Object.prototype.propertyIsEnumerable.call(e, o) && (n[o] = e[o]);
  }
  return n;
}
function oR(e, t) {
  if (e == null) return {};
  var n = {}, o = Object.keys(e), i, r;
  for (r = 0; r < o.length; r++)
    i = o[r], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
  return n;
}
function dd(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      iR(e, i, n[i]);
    });
  }
  return e;
}
function iR(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Pu = Dn({
  primaryColor: "#333",
  secondaryColor: "#E6E6E6",
  calculated: !1
});
function rR(e) {
  var t = e.primaryColor, n = e.secondaryColor;
  Pu.primaryColor = t, Pu.secondaryColor = n || qC(t), Pu.calculated = !!n;
}
function aR() {
  return dd({}, Pu);
}
var Aa = function(t, n) {
  var o = dd({}, t, n.attrs), i = o.icon, r = o.primaryColor, a = o.secondaryColor, l = nR(o, tR), s = Pu;
  if (r && (s = {
    primaryColor: r,
    secondaryColor: a || qC(r)
  }), Xz(ly(i), "icon should be icon definiton, but got ".concat(i)), !ly(i))
    return null;
  var u = i;
  return u && typeof u.icon == "function" && (u = dd({}, u, {
    icon: u.icon(s.primaryColor, s.secondaryColor)
  })), ih(u.icon, "svg-".concat(u.name), dd({}, l, {
    "data-icon": u.name,
    width: "1em",
    height: "1em",
    fill: "currentColor",
    "aria-hidden": "true"
  }));
};
Aa.props = {
  icon: Object,
  primaryColor: String,
  secondaryColor: String,
  focusable: String
};
Aa.inheritAttrs = !1;
Aa.displayName = "IconBase";
Aa.getTwoToneColors = aR;
Aa.setTwoToneColors = rR;
function lR(e, t) {
  return dR(e) || cR(e, t) || uR(e, t) || sR();
}
function sR() {
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function uR(e, t) {
  if (e) {
    if (typeof e == "string") return sy(e, t);
    var n = Object.prototype.toString.call(e).slice(8, -1);
    if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set") return Array.from(e);
    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return sy(e, t);
  }
}
function sy(e, t) {
  (t == null || t > e.length) && (t = e.length);
  for (var n = 0, o = new Array(t); n < t; n++)
    o[n] = e[n];
  return o;
}
function cR(e, t) {
  var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
  if (n != null) {
    var o = [], i = !0, r = !1, a, l;
    try {
      for (n = n.call(e); !(i = (a = n.next()).done) && (o.push(a.value), !(t && o.length === t)); i = !0)
        ;
    } catch (s) {
      r = !0, l = s;
    } finally {
      try {
        !i && n.return != null && n.return();
      } finally {
        if (r) throw l;
      }
    }
    return o;
  }
}
function dR(e) {
  if (Array.isArray(e)) return e;
}
function YC(e) {
  var t = GC(e), n = lR(t, 2), o = n[0], i = n[1];
  return Aa.setTwoToneColors({
    primaryColor: o,
    secondaryColor: i
  });
}
function fR() {
  var e = Aa.getTwoToneColors();
  return e.calculated ? [e.primaryColor, e.secondaryColor] : e.primaryColor;
}
var pR = ye({
  name: "InsertStyles",
  setup: function() {
    return eR(), function() {
      return null;
    };
  }
}), gR = ["class", "icon", "spin", "rotate", "tabindex", "twoToneColor", "onClick"];
function hR(e, t) {
  return yR(e) || bR(e, t) || mR(e, t) || vR();
}
function vR() {
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function mR(e, t) {
  if (e) {
    if (typeof e == "string") return uy(e, t);
    var n = Object.prototype.toString.call(e).slice(8, -1);
    if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set") return Array.from(e);
    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return uy(e, t);
  }
}
function uy(e, t) {
  (t == null || t > e.length) && (t = e.length);
  for (var n = 0, o = new Array(t); n < t; n++)
    o[n] = e[n];
  return o;
}
function bR(e, t) {
  var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
  if (n != null) {
    var o = [], i = !0, r = !1, a, l;
    try {
      for (n = n.call(e); !(i = (a = n.next()).done) && (o.push(a.value), !(t && o.length === t)); i = !0)
        ;
    } catch (s) {
      r = !0, l = s;
    } finally {
      try {
        !i && n.return != null && n.return();
      } finally {
        if (r) throw l;
      }
    }
    return o;
  }
}
function yR(e) {
  if (Array.isArray(e)) return e;
}
function cy(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      mu(e, i, n[i]);
    });
  }
  return e;
}
function mu(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
function xR(e, t) {
  if (e == null) return {};
  var n = wR(e, t), o, i;
  if (Object.getOwnPropertySymbols) {
    var r = Object.getOwnPropertySymbols(e);
    for (i = 0; i < r.length; i++)
      o = r[i], !(t.indexOf(o) >= 0) && Object.prototype.propertyIsEnumerable.call(e, o) && (n[o] = e[o]);
  }
  return n;
}
function wR(e, t) {
  if (e == null) return {};
  var n = {}, o = Object.keys(e), i, r;
  for (r = 0; r < o.length; r++)
    i = o[r], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
  return n;
}
YC(z_.primary);
var pn = function(t, n) {
  var o, i = cy({}, t, n.attrs), r = i.class, a = i.icon, l = i.spin, s = i.rotate, u = i.tabindex, c = i.twoToneColor, d = i.onClick, f = xR(i, gR), p = HC(), m = p.prefixCls, b = p.rootClassName, y = (o = {}, mu(o, b.value, !!b.value), mu(o, m.value, !0), mu(o, "".concat(m.value, "-").concat(a.name), !!a.name), mu(o, "".concat(m.value, "-spin"), !!l || a.name === "loading"), o), S = u;
  S === void 0 && d && (S = -1);
  var C = s ? {
    msTransform: "rotate(".concat(s, "deg)"),
    transform: "rotate(".concat(s, "deg)")
  } : void 0, O = GC(c), $ = hR(O, 2), P = $[0], k = $[1];
  return v("span", cy({
    role: "img",
    "aria-label": a.name
  }, f, {
    onClick: d,
    class: [y, r],
    tabindex: S
  }), [v(Aa, {
    icon: a,
    primaryColor: P,
    secondaryColor: k,
    style: C
  }, null), v(pR, null, null)]);
};
pn.props = {
  spin: Boolean,
  rotate: Number,
  icon: Object,
  twoToneColor: [String, Array]
};
pn.displayName = "AntdIcon";
pn.inheritAttrs = !1;
pn.getTwoToneColor = fR;
pn.setTwoToneColor = YC;
function dy(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      SR(e, i, n[i]);
    });
  }
  return e;
}
function SR(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var wf = function(t, n) {
  var o = dy({}, t, n.attrs);
  return v(pn, dy({}, o, {
    icon: Fz
  }), null);
};
wf.displayName = "DownOutlined";
wf.inheritAttrs = !1;
var CR = { icon: { tag: "svg", attrs: { viewBox: "0 0 1024 1024", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z" } }] }, name: "loading", theme: "outlined" };
function fy(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      $R(e, i, n[i]);
    });
  }
  return e;
}
function $R(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var yr = function(t, n) {
  var o = fy({}, t, n.attrs);
  return v(pn, fy({}, o, {
    icon: CR
  }), null);
};
yr.displayName = "LoadingOutlined";
yr.inheritAttrs = !1;
var PR = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z" } }] }, name: "check", theme: "outlined" };
function py(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      OR(e, i, n[i]);
    });
  }
  return e;
}
function OR(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Kv = function(t, n) {
  var o = py({}, t, n.attrs);
  return v(pn, py({}, o, {
    icon: PR
  }), null);
};
Kv.displayName = "CheckOutlined";
Kv.inheritAttrs = !1;
var IR = { icon: { tag: "svg", attrs: { "fill-rule": "evenodd", viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z" } }] }, name: "close", theme: "outlined" };
function gy(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      MR(e, i, n[i]);
    });
  }
  return e;
}
function MR(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Sr = function(t, n) {
  var o = gy({}, t, n.attrs);
  return v(pn, gy({}, o, {
    icon: IR
  }), null);
};
Sr.displayName = "CloseOutlined";
Sr.inheritAttrs = !1;
var TR = { icon: { tag: "svg", attrs: { "fill-rule": "evenodd", viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z" } }] }, name: "close-circle", theme: "filled" };
function hy(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      kR(e, i, n[i]);
    });
  }
  return e;
}
function kR(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var fi = function(t, n) {
  var o = hy({}, t, n.attrs);
  return v(pn, hy({}, o, {
    icon: TR
  }), null);
};
fi.displayName = "CloseCircleFilled";
fi.inheritAttrs = !1;
var ER = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z" } }] }, name: "search", theme: "outlined" };
function vy(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      _R(e, i, n[i]);
    });
  }
  return e;
}
function _R(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Sf = function(t, n) {
  var o = vy({}, t, n.attrs);
  return v(pn, vy({}, o, {
    icon: ER
  }), null);
};
Sf.displayName = "SearchOutlined";
Sf.inheritAttrs = !1;
function AR(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  const {
    loading: n,
    multiple: o,
    prefixCls: i,
    hasFeedback: r,
    feedbackIcon: a,
    showArrow: l
  } = e, s = e.suffixIcon || t.suffixIcon && t.suffixIcon(), u = e.clearIcon || t.clearIcon && t.clearIcon(), c = e.menuItemSelectedIcon || t.menuItemSelectedIcon && t.menuItemSelectedIcon(), d = e.removeIcon || t.removeIcon && t.removeIcon(), f = u ?? v(fi, null, null), p = (S) => v(Ve, null, [l !== !1 && S, r && a]);
  let m = null;
  if (s !== void 0)
    m = p(s);
  else if (n)
    m = p(v(yr, {
      spin: !0
    }, null));
  else {
    const S = `${i}-suffix`;
    m = (C) => {
      let {
        open: O,
        showSearch: $
      } = C;
      return p(O && $ ? v(Sf, {
        class: S
      }, null) : v(wf, {
        class: S
      }, null));
    };
  }
  let b = null;
  c !== void 0 ? b = c : o ? b = v(Kv, null, null) : b = null;
  let y = null;
  return d !== void 0 ? y = d : y = v(Sr, null, null), {
    clearIcon: f,
    suffixIcon: m,
    itemIcon: b,
    removeIcon: y
  };
}
function Yv(e) {
  const t = Symbol("contextKey");
  return {
    useProvide: (i, r) => {
      const a = Dn({});
      return kt(t, a), Lt(() => {
        I(a, i, r || {});
      }), a;
    },
    useInject: () => Tt(t, e) || {}
  };
}
const zd = Symbol("ContextProps"), Rd = Symbol("InternalContextProps"), DR = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : R(() => !0);
  const n = le(/* @__PURE__ */ new Map()), o = (a, l) => {
    n.value.set(a, l), n.value = new Map(n.value);
  }, i = (a) => {
    n.value.delete(a), n.value = new Map(n.value);
  }, r = ci();
  Ie([t, n], () => {
    if (process.env.NODE_ENV !== "production" && t.value && n.value.size > 1) {
      Fn(!1, "Form.Item", `FormItem can only collect one field item, you haved set ${[...n.value.values()].map((l) => `\`${l.name}\``).join(", ")} ${n.value.size} field items.
        You can set not need to be collected fields into \`a-form-item-rest\``);
      let a = r;
      for (; a.parent; )
        console.warn("at", a.type), a = a.parent;
    }
  }), kt(zd, e), kt(Rd, {
    addFormItemField: o,
    removeFormItemField: i
  });
}, rh = {
  id: R(() => {
  }),
  onFieldBlur: () => {
  },
  onFieldChange: () => {
  },
  clearValidate: () => {
  }
}, ah = {
  addFormItemField: () => {
  },
  removeFormItemField: () => {
  }
}, pi = () => {
  const e = Tt(Rd, ah), t = Symbol("FormItemFieldKey"), n = ci();
  return e.addFormItemField(t, n.type), At(() => {
    e.removeFormItemField(t);
  }), kt(Rd, ah), kt(zd, rh), Tt(zd, rh);
}, lh = ye({
  compatConfig: {
    MODE: 3
  },
  name: "AFormItemRest",
  setup(e, t) {
    let {
      slots: n
    } = t;
    return kt(Rd, ah), kt(zd, rh), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
}), ui = Yv({}), Nd = ye({
  name: "NoFormStatus",
  setup(e, t) {
    let {
      slots: n
    } = t;
    return ui.useProvide({}), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
});
function Yi(e, t, n) {
  return Te({
    [`${e}-status-success`]: t === "success",
    [`${e}-status-warning`]: t === "warning",
    [`${e}-status-error`]: t === "error",
    [`${e}-status-validating`]: t === "validating",
    [`${e}-has-feedback`]: n
  });
}
const Ol = (e, t) => t || e, zR = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [t]: {
      display: "inline-flex",
      "&-block": {
        display: "flex",
        width: "100%"
      },
      "&-vertical": {
        flexDirection: "column"
      }
    }
  };
}, RR = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [t]: {
      display: "inline-flex",
      "&-rtl": {
        direction: "rtl"
      },
      "&-vertical": {
        flexDirection: "column"
      },
      "&-align": {
        flexDirection: "column",
        "&-center": {
          alignItems: "center"
        },
        "&-start": {
          alignItems: "flex-start"
        },
        "&-end": {
          alignItems: "flex-end"
        },
        "&-baseline": {
          alignItems: "baseline"
        }
      },
      [`${t}-item`]: {
        "&:empty": {
          display: "none"
        }
      }
    }
  };
}, UC = nn("Space", (e) => [RR(e), zR(e)]), NR = () => ({
  compactSize: String,
  compactDirection: ue.oneOf(li("horizontal", "vertical")).def("horizontal"),
  isFirstItem: st(),
  isLastItem: st()
}), Cf = Yv(null), Vs = (e, t) => {
  const n = Cf.useInject(), o = R(() => {
    if (!n || cw(n)) return "";
    const {
      compactDirection: i,
      isFirstItem: r,
      isLastItem: a
    } = n, l = i === "vertical" ? "-vertical-" : "-";
    return Te({
      [`${e.value}-compact${l}item`]: !0,
      [`${e.value}-compact${l}first-item`]: r,
      [`${e.value}-compact${l}last-item`]: a,
      [`${e.value}-compact${l}item-rtl`]: t.value === "rtl"
    });
  });
  return {
    compactSize: R(() => n?.compactSize),
    compactDirection: R(() => n?.compactDirection),
    compactItemClassnames: o
  };
}, Wu = ye({
  name: "NoCompactStyle",
  setup(e, t) {
    let {
      slots: n
    } = t;
    return Cf.useProvide(null), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
}), BR = () => ({
  prefixCls: String,
  size: {
    type: String
  },
  direction: ue.oneOf(li("horizontal", "vertical")).def("horizontal"),
  align: ue.oneOf(li("start", "end", "center", "baseline")),
  block: {
    type: Boolean,
    default: void 0
  }
}), LR = ye({
  name: "CompactItem",
  props: NR(),
  setup(e, t) {
    let {
      slots: n
    } = t;
    return Cf.useProvide(e), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
}), sh = ye({
  name: "ASpaceCompact",
  inheritAttrs: !1,
  props: BR(),
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const {
      prefixCls: i,
      direction: r
    } = yt("space-compact", e), a = Cf.useInject(), [l, s] = UC(i), u = R(() => Te(i.value, s.value, {
      [`${i.value}-rtl`]: r.value === "rtl",
      [`${i.value}-block`]: e.block,
      [`${i.value}-vertical`]: e.direction === "vertical"
    }));
    return () => {
      var c;
      const d = no(((c = o.default) === null || c === void 0 ? void 0 : c.call(o)) || []);
      return d.length === 0 ? null : l(v("div", Z(Z({}, n), {}, {
        class: [u.value, n.class]
      }), [d.map((f, p) => {
        var m;
        const b = f && f.key || `${i.value}-item-${p}`, y = !a || cw(a);
        return v(LR, {
          key: b,
          compactSize: (m = e.size) !== null && m !== void 0 ? m : "middle",
          compactDirection: e.direction,
          isFirstItem: p === 0 && (y || a?.isFirstItem),
          isLastItem: p === d.length - 1 && (y || a?.isLastItem)
        }, {
          default: () => [f]
        });
      })]));
    };
  }
}), FR = (e) => ({
  animationDuration: e,
  animationFillMode: "both"
}), HR = (e) => ({
  animationDuration: e,
  animationFillMode: "both"
}), $f = function(e, t, n, o) {
  const r = (arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1) ? "&" : "";
  return {
    [`
      ${r}${e}-enter,
      ${r}${e}-appear
    `]: I(I({}, FR(o)), {
      animationPlayState: "paused"
    }),
    [`${r}${e}-leave`]: I(I({}, HR(o)), {
      animationPlayState: "paused"
    }),
    [`
      ${r}${e}-enter${e}-enter-active,
      ${r}${e}-appear${e}-appear-active
    `]: {
      animationName: t,
      animationPlayState: "running"
    },
    [`${r}${e}-leave${e}-leave-active`]: {
      animationName: n,
      animationPlayState: "running",
      pointerEvents: "none"
    }
  };
}, VR = new Bt("antFadeIn", {
  "0%": {
    opacity: 0
  },
  "100%": {
    opacity: 1
  }
}), jR = new Bt("antFadeOut", {
  "0%": {
    opacity: 1
  },
  "100%": {
    opacity: 0
  }
}), WR = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  const {
    antCls: n
  } = e, o = `${n}-fade`, i = t ? "&" : "";
  return [$f(o, VR, jR, e.motionDurationMid, t), {
    [`
        ${i}${o}-enter,
        ${i}${o}-appear
      `]: {
      opacity: 0,
      animationTimingFunction: "linear"
    },
    [`${i}${o}-leave`]: {
      animationTimingFunction: "linear"
    }
  }];
}, qR = new Bt("antMoveDownIn", {
  "0%": {
    transform: "translate3d(0, 100%, 0)",
    transformOrigin: "0 0",
    opacity: 0
  },
  "100%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  }
}), GR = new Bt("antMoveDownOut", {
  "0%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  },
  "100%": {
    transform: "translate3d(0, 100%, 0)",
    transformOrigin: "0 0",
    opacity: 0
  }
}), KR = new Bt("antMoveLeftIn", {
  "0%": {
    transform: "translate3d(-100%, 0, 0)",
    transformOrigin: "0 0",
    opacity: 0
  },
  "100%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  }
}), YR = new Bt("antMoveLeftOut", {
  "0%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  },
  "100%": {
    transform: "translate3d(-100%, 0, 0)",
    transformOrigin: "0 0",
    opacity: 0
  }
}), UR = new Bt("antMoveRightIn", {
  "0%": {
    transform: "translate3d(100%, 0, 0)",
    transformOrigin: "0 0",
    opacity: 0
  },
  "100%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  }
}), XR = new Bt("antMoveRightOut", {
  "0%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  },
  "100%": {
    transform: "translate3d(100%, 0, 0)",
    transformOrigin: "0 0",
    opacity: 0
  }
}), QR = new Bt("antMoveUpIn", {
  "0%": {
    transform: "translate3d(0, -100%, 0)",
    transformOrigin: "0 0",
    opacity: 0
  },
  "100%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  }
}), ZR = new Bt("antMoveUpOut", {
  "0%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  },
  "100%": {
    transform: "translate3d(0, -100%, 0)",
    transformOrigin: "0 0",
    opacity: 0
  }
}), JR = {
  "move-up": {
    inKeyframes: QR,
    outKeyframes: ZR
  },
  "move-down": {
    inKeyframes: qR,
    outKeyframes: GR
  },
  "move-left": {
    inKeyframes: KR,
    outKeyframes: YR
  },
  "move-right": {
    inKeyframes: UR,
    outKeyframes: XR
  }
}, Ts = (e, t) => {
  const {
    antCls: n
  } = e, o = `${n}-${t}`, {
    inKeyframes: i,
    outKeyframes: r
  } = JR[t];
  return [$f(o, i, r, e.motionDurationMid), {
    [`
        ${o}-enter,
        ${o}-appear
      `]: {
      opacity: 0,
      animationTimingFunction: e.motionEaseOutCirc
    },
    [`${o}-leave`]: {
      animationTimingFunction: e.motionEaseInOutCirc
    }
  }];
}, Pf = new Bt("antSlideUpIn", {
  "0%": {
    transform: "scaleY(0.8)",
    transformOrigin: "0% 0%",
    opacity: 0
  },
  "100%": {
    transform: "scaleY(1)",
    transformOrigin: "0% 0%",
    opacity: 1
  }
}), Of = new Bt("antSlideUpOut", {
  "0%": {
    transform: "scaleY(1)",
    transformOrigin: "0% 0%",
    opacity: 1
  },
  "100%": {
    transform: "scaleY(0.8)",
    transformOrigin: "0% 0%",
    opacity: 0
  }
}), If = new Bt("antSlideDownIn", {
  "0%": {
    transform: "scaleY(0.8)",
    transformOrigin: "100% 100%",
    opacity: 0
  },
  "100%": {
    transform: "scaleY(1)",
    transformOrigin: "100% 100%",
    opacity: 1
  }
}), Mf = new Bt("antSlideDownOut", {
  "0%": {
    transform: "scaleY(1)",
    transformOrigin: "100% 100%",
    opacity: 1
  },
  "100%": {
    transform: "scaleY(0.8)",
    transformOrigin: "100% 100%",
    opacity: 0
  }
}), eN = new Bt("antSlideLeftIn", {
  "0%": {
    transform: "scaleX(0.8)",
    transformOrigin: "0% 0%",
    opacity: 0
  },
  "100%": {
    transform: "scaleX(1)",
    transformOrigin: "0% 0%",
    opacity: 1
  }
}), tN = new Bt("antSlideLeftOut", {
  "0%": {
    transform: "scaleX(1)",
    transformOrigin: "0% 0%",
    opacity: 1
  },
  "100%": {
    transform: "scaleX(0.8)",
    transformOrigin: "0% 0%",
    opacity: 0
  }
}), nN = new Bt("antSlideRightIn", {
  "0%": {
    transform: "scaleX(0.8)",
    transformOrigin: "100% 0%",
    opacity: 0
  },
  "100%": {
    transform: "scaleX(1)",
    transformOrigin: "100% 0%",
    opacity: 1
  }
}), oN = new Bt("antSlideRightOut", {
  "0%": {
    transform: "scaleX(1)",
    transformOrigin: "100% 0%",
    opacity: 1
  },
  "100%": {
    transform: "scaleX(0.8)",
    transformOrigin: "100% 0%",
    opacity: 0
  }
}), iN = {
  "slide-up": {
    inKeyframes: Pf,
    outKeyframes: Of
  },
  "slide-down": {
    inKeyframes: If,
    outKeyframes: Mf
  },
  "slide-left": {
    inKeyframes: eN,
    outKeyframes: tN
  },
  "slide-right": {
    inKeyframes: nN,
    outKeyframes: oN
  }
}, xr = (e, t) => {
  const {
    antCls: n
  } = e, o = `${n}-${t}`, {
    inKeyframes: i,
    outKeyframes: r
  } = iN[t];
  return [$f(o, i, r, e.motionDurationMid), {
    [`
      ${o}-enter,
      ${o}-appear
    `]: {
      transform: "scale(0)",
      transformOrigin: "0% 0%",
      opacity: 0,
      animationTimingFunction: e.motionEaseOutQuint
    },
    [`${o}-leave`]: {
      animationTimingFunction: e.motionEaseInQuint
    }
  }];
}, Uv = new Bt("antZoomIn", {
  "0%": {
    transform: "scale(0.2)",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    opacity: 1
  }
}), rN = new Bt("antZoomOut", {
  "0%": {
    transform: "scale(1)"
  },
  "100%": {
    transform: "scale(0.2)",
    opacity: 0
  }
}), my = new Bt("antZoomBigIn", {
  "0%": {
    transform: "scale(0.8)",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    opacity: 1
  }
}), by = new Bt("antZoomBigOut", {
  "0%": {
    transform: "scale(1)"
  },
  "100%": {
    transform: "scale(0.8)",
    opacity: 0
  }
}), aN = new Bt("antZoomUpIn", {
  "0%": {
    transform: "scale(0.8)",
    transformOrigin: "50% 0%",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    transformOrigin: "50% 0%"
  }
}), lN = new Bt("antZoomUpOut", {
  "0%": {
    transform: "scale(1)",
    transformOrigin: "50% 0%"
  },
  "100%": {
    transform: "scale(0.8)",
    transformOrigin: "50% 0%",
    opacity: 0
  }
}), sN = new Bt("antZoomLeftIn", {
  "0%": {
    transform: "scale(0.8)",
    transformOrigin: "0% 50%",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    transformOrigin: "0% 50%"
  }
}), uN = new Bt("antZoomLeftOut", {
  "0%": {
    transform: "scale(1)",
    transformOrigin: "0% 50%"
  },
  "100%": {
    transform: "scale(0.8)",
    transformOrigin: "0% 50%",
    opacity: 0
  }
}), cN = new Bt("antZoomRightIn", {
  "0%": {
    transform: "scale(0.8)",
    transformOrigin: "100% 50%",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    transformOrigin: "100% 50%"
  }
}), dN = new Bt("antZoomRightOut", {
  "0%": {
    transform: "scale(1)",
    transformOrigin: "100% 50%"
  },
  "100%": {
    transform: "scale(0.8)",
    transformOrigin: "100% 50%",
    opacity: 0
  }
}), fN = new Bt("antZoomDownIn", {
  "0%": {
    transform: "scale(0.8)",
    transformOrigin: "50% 100%",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    transformOrigin: "50% 100%"
  }
}), pN = new Bt("antZoomDownOut", {
  "0%": {
    transform: "scale(1)",
    transformOrigin: "50% 100%"
  },
  "100%": {
    transform: "scale(0.8)",
    transformOrigin: "50% 100%",
    opacity: 0
  }
}), gN = {
  zoom: {
    inKeyframes: Uv,
    outKeyframes: rN
  },
  "zoom-big": {
    inKeyframes: my,
    outKeyframes: by
  },
  "zoom-big-fast": {
    inKeyframes: my,
    outKeyframes: by
  },
  "zoom-left": {
    inKeyframes: sN,
    outKeyframes: uN
  },
  "zoom-right": {
    inKeyframes: cN,
    outKeyframes: dN
  },
  "zoom-up": {
    inKeyframes: aN,
    outKeyframes: lN
  },
  "zoom-down": {
    inKeyframes: fN,
    outKeyframes: pN
  }
}, Ju = (e, t) => {
  const {
    antCls: n
  } = e, o = `${n}-${t}`, {
    inKeyframes: i,
    outKeyframes: r
  } = gN[t];
  return [$f(o, i, r, t === "zoom-big-fast" ? e.motionDurationFast : e.motionDurationMid), {
    [`
        ${o}-enter,
        ${o}-appear
      `]: {
      transform: "scale(0)",
      opacity: 0,
      animationTimingFunction: e.motionEaseOutCirc,
      "&-prepare": {
        transform: "none"
      }
    },
    [`${o}-leave`]: {
      animationTimingFunction: e.motionEaseInOutCirc
    }
  }];
}, Xv = (e) => ({
  [e.componentCls]: {
    // For common/openAnimation
    [`${e.antCls}-motion-collapse-legacy`]: {
      overflow: "hidden",
      "&-active": {
        transition: `height ${e.motionDurationMid} ${e.motionEaseInOut},
        opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`
      }
    },
    [`${e.antCls}-motion-collapse`]: {
      overflow: "hidden",
      transition: `height ${e.motionDurationMid} ${e.motionEaseInOut},
        opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`
    }
  }
}), yy = (e) => {
  const {
    controlPaddingHorizontal: t
  } = e;
  return {
    position: "relative",
    display: "block",
    minHeight: e.controlHeight,
    padding: `${(e.controlHeight - e.fontSize * e.lineHeight) / 2}px ${t}px`,
    color: e.colorText,
    fontWeight: "normal",
    fontSize: e.fontSize,
    lineHeight: e.lineHeight,
    boxSizing: "border-box"
  };
}, hN = (e) => {
  const {
    antCls: t,
    componentCls: n
  } = e, o = `${n}-item`;
  return [
    {
      [`${n}-dropdown`]: I(I({}, Zt(e)), {
        position: "absolute",
        top: -9999,
        zIndex: e.zIndexPopup,
        boxSizing: "border-box",
        padding: e.paddingXXS,
        overflow: "hidden",
        fontSize: e.fontSize,
        // Fix select render lag of long text in chrome
        // https://github.com/ant-design/ant-design/issues/11456
        // https://github.com/ant-design/ant-design/issues/11843
        fontVariant: "initial",
        backgroundColor: e.colorBgElevated,
        borderRadius: e.borderRadiusLG,
        outline: "none",
        boxShadow: e.boxShadowSecondary,
        [`
            &${t}-slide-up-enter${t}-slide-up-enter-active${n}-dropdown-placement-bottomLeft,
            &${t}-slide-up-appear${t}-slide-up-appear-active${n}-dropdown-placement-bottomLeft
          `]: {
          animationName: Pf
        },
        [`
            &${t}-slide-up-enter${t}-slide-up-enter-active${n}-dropdown-placement-topLeft,
            &${t}-slide-up-appear${t}-slide-up-appear-active${n}-dropdown-placement-topLeft
          `]: {
          animationName: If
        },
        [`&${t}-slide-up-leave${t}-slide-up-leave-active${n}-dropdown-placement-bottomLeft`]: {
          animationName: Of
        },
        [`&${t}-slide-up-leave${t}-slide-up-leave-active${n}-dropdown-placement-topLeft`]: {
          animationName: Mf
        },
        "&-hidden": {
          display: "none"
        },
        "&-empty": {
          color: e.colorTextDisabled
        },
        // ========================= Options =========================
        [`${o}-empty`]: I(I({}, yy(e)), {
          color: e.colorTextDisabled
        }),
        [`${o}`]: I(I({}, yy(e)), {
          cursor: "pointer",
          transition: `background ${e.motionDurationSlow} ease`,
          borderRadius: e.borderRadiusSM,
          // =========== Group ============
          "&-group": {
            color: e.colorTextDescription,
            fontSize: e.fontSizeSM,
            cursor: "default"
          },
          // =========== Option ===========
          "&-option": {
            display: "flex",
            "&-content": I({
              flex: "auto"
            }, ka),
            "&-state": {
              flex: "none"
            },
            [`&-active:not(${o}-option-disabled)`]: {
              backgroundColor: e.controlItemBgHover
            },
            [`&-selected:not(${o}-option-disabled)`]: {
              color: e.colorText,
              fontWeight: e.fontWeightStrong,
              backgroundColor: e.controlItemBgActive,
              [`${o}-option-state`]: {
                color: e.colorPrimary
              }
            },
            "&-disabled": {
              [`&${o}-option-selected`]: {
                backgroundColor: e.colorBgContainerDisabled
              },
              color: e.colorTextDisabled,
              cursor: "not-allowed"
            },
            "&-grouped": {
              paddingInlineStart: e.controlPaddingHorizontal * 2
            }
          }
        }),
        // =========================== RTL ===========================
        "&-rtl": {
          direction: "rtl"
        }
      })
    },
    // Follow code may reuse in other components
    xr(e, "slide-up"),
    xr(e, "slide-down"),
    Ts(e, "move-up"),
    Ts(e, "move-down")
  ];
}, jl = 2;
function XC(e) {
  let {
    controlHeightSM: t,
    controlHeight: n,
    lineWidth: o
  } = e;
  const i = (n - t) / 2 - o, r = Math.ceil(i / 2);
  return [i, r];
}
function Tp(e, t) {
  const {
    componentCls: n,
    iconCls: o
  } = e, i = `${n}-selection-overflow`, r = e.controlHeightSM, [a] = XC(e), l = t ? `${n}-${t}` : "";
  return {
    [`${n}-multiple${l}`]: {
      fontSize: e.fontSize,
      /**
       * Do not merge `height` & `line-height` under style with `selection` & `search`, since chrome
       * may update to redesign with its align logic.
       */
      // =========================== Overflow ===========================
      [i]: {
        position: "relative",
        display: "flex",
        flex: "auto",
        flexWrap: "wrap",
        maxWidth: "100%",
        "&-item": {
          flex: "none",
          alignSelf: "center",
          maxWidth: "100%",
          display: "inline-flex"
        }
      },
      // ========================= Selector =========================
      [`${n}-selector`]: {
        display: "flex",
        flexWrap: "wrap",
        alignItems: "center",
        // Multiple is little different that horizontal is follow the vertical
        padding: `${a - jl}px ${jl * 2}px`,
        borderRadius: e.borderRadius,
        [`${n}-show-search&`]: {
          cursor: "text"
        },
        [`${n}-disabled&`]: {
          background: e.colorBgContainerDisabled,
          cursor: "not-allowed"
        },
        "&:after": {
          display: "inline-block",
          width: 0,
          margin: `${jl}px 0`,
          lineHeight: `${r}px`,
          content: '"\\a0"'
        }
      },
      [`
        &${n}-show-arrow ${n}-selector,
        &${n}-allow-clear ${n}-selector
      `]: {
        paddingInlineEnd: e.fontSizeIcon + e.controlPaddingHorizontal
      },
      // ======================== Selections ========================
      [`${n}-selection-item`]: {
        position: "relative",
        display: "flex",
        flex: "none",
        boxSizing: "border-box",
        maxWidth: "100%",
        height: r,
        marginTop: jl,
        marginBottom: jl,
        lineHeight: `${r - e.lineWidth * 2}px`,
        background: e.colorFillSecondary,
        border: `${e.lineWidth}px solid ${e.colorSplit}`,
        borderRadius: e.borderRadiusSM,
        cursor: "default",
        transition: `font-size ${e.motionDurationSlow}, line-height ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,
        userSelect: "none",
        marginInlineEnd: jl * 2,
        paddingInlineStart: e.paddingXS,
        paddingInlineEnd: e.paddingXS / 2,
        [`${n}-disabled&`]: {
          color: e.colorTextDisabled,
          borderColor: e.colorBorder,
          cursor: "not-allowed"
        },
        // It's ok not to do this, but 24px makes bottom narrow in view should adjust
        "&-content": {
          display: "inline-block",
          marginInlineEnd: e.paddingXS / 2,
          overflow: "hidden",
          whiteSpace: "pre",
          textOverflow: "ellipsis"
        },
        "&-remove": I(I({}, Fs()), {
          display: "inline-block",
          color: e.colorIcon,
          fontWeight: "bold",
          fontSize: 10,
          lineHeight: "inherit",
          cursor: "pointer",
          [`> ${o}`]: {
            verticalAlign: "-0.2em"
          },
          "&:hover": {
            color: e.colorIconHover
          }
        })
      },
      // ========================== Input ==========================
      [`${i}-item + ${i}-item`]: {
        [`${n}-selection-search`]: {
          marginInlineStart: 0
        }
      },
      [`${n}-selection-search`]: {
        display: "inline-flex",
        position: "relative",
        maxWidth: "100%",
        marginInlineStart: e.inputPaddingHorizontalBase - a,
        "\n          &-input,\n          &-mirror\n        ": {
          height: r,
          fontFamily: e.fontFamily,
          lineHeight: `${r}px`,
          transition: `all ${e.motionDurationSlow}`
        },
        "&-input": {
          width: "100%",
          minWidth: 4.1
          // fix search cursor missing
        },
        "&-mirror": {
          position: "absolute",
          top: 0,
          insetInlineStart: 0,
          insetInlineEnd: "auto",
          zIndex: 999,
          whiteSpace: "pre",
          visibility: "hidden"
        }
      },
      // ======================= Placeholder =======================
      [`${n}-selection-placeholder `]: {
        position: "absolute",
        top: "50%",
        insetInlineStart: e.inputPaddingHorizontalBase,
        insetInlineEnd: e.inputPaddingHorizontalBase,
        transform: "translateY(-50%)",
        transition: `all ${e.motionDurationSlow}`
      }
    }
  };
}
function vN(e) {
  const {
    componentCls: t
  } = e, n = _t(e, {
    controlHeight: e.controlHeightSM,
    controlHeightSM: e.controlHeightXS,
    borderRadius: e.borderRadiusSM,
    borderRadiusSM: e.borderRadiusXS
  }), [, o] = XC(e);
  return [
    Tp(e),
    // ======================== Small ========================
    // Shared
    Tp(n, "sm"),
    // Padding
    {
      [`${t}-multiple${t}-sm`]: {
        [`${t}-selection-placeholder`]: {
          insetInlineStart: e.controlPaddingHorizontalSM - e.lineWidth,
          insetInlineEnd: "auto"
        },
        // https://github.com/ant-design/ant-design/issues/29559
        [`${t}-selection-search`]: {
          marginInlineStart: o
        }
      }
    },
    // ======================== Large ========================
    // Shared
    Tp(_t(e, {
      fontSize: e.fontSizeLG,
      controlHeight: e.controlHeightLG,
      controlHeightSM: e.controlHeight,
      borderRadius: e.borderRadiusLG,
      borderRadiusSM: e.borderRadius
    }), "lg")
  ];
}
function kp(e, t) {
  const {
    componentCls: n,
    inputPaddingHorizontalBase: o,
    borderRadius: i
  } = e, r = e.controlHeight - e.lineWidth * 2, a = Math.ceil(e.fontSize * 1.25), l = t ? `${n}-${t}` : "";
  return {
    [`${n}-single${l}`]: {
      fontSize: e.fontSize,
      // ========================= Selector =========================
      [`${n}-selector`]: I(I({}, Zt(e)), {
        display: "flex",
        borderRadius: i,
        [`${n}-selection-search`]: {
          position: "absolute",
          top: 0,
          insetInlineStart: o,
          insetInlineEnd: o,
          bottom: 0,
          "&-input": {
            width: "100%"
          }
        },
        [`
          ${n}-selection-item,
          ${n}-selection-placeholder
        `]: {
          padding: 0,
          lineHeight: `${r}px`,
          transition: `all ${e.motionDurationSlow}`,
          // Firefox inline-block position calculation is not same as Chrome & Safari. Patch this:
          "@supports (-moz-appearance: meterbar)": {
            lineHeight: `${r}px`
          }
        },
        [`${n}-selection-item`]: {
          position: "relative",
          userSelect: "none"
        },
        [`${n}-selection-placeholder`]: {
          transition: "none",
          pointerEvents: "none"
        },
        // For common baseline align
        [[
          "&:after",
          /* For '' value baseline align */
          `${n}-selection-item:after`,
          /* For undefined value baseline align */
          `${n}-selection-placeholder:after`
        ].join(",")]: {
          display: "inline-block",
          width: 0,
          visibility: "hidden",
          content: '"\\a0"'
        }
      }),
      [`
        &${n}-show-arrow ${n}-selection-item,
        &${n}-show-arrow ${n}-selection-placeholder
      `]: {
        paddingInlineEnd: a
      },
      // Opacity selection if open
      [`&${n}-open ${n}-selection-item`]: {
        color: e.colorTextPlaceholder
      },
      // ========================== Input ==========================
      // We only change the style of non-customize input which is only support by `combobox` mode.
      // Not customize
      [`&:not(${n}-customize-input)`]: {
        [`${n}-selector`]: {
          width: "100%",
          height: e.controlHeight,
          padding: `0 ${o}px`,
          [`${n}-selection-search-input`]: {
            height: r
          },
          "&:after": {
            lineHeight: `${r}px`
          }
        }
      },
      [`&${n}-customize-input`]: {
        [`${n}-selector`]: {
          "&:after": {
            display: "none"
          },
          [`${n}-selection-search`]: {
            position: "static",
            width: "100%"
          },
          [`${n}-selection-placeholder`]: {
            position: "absolute",
            insetInlineStart: 0,
            insetInlineEnd: 0,
            padding: `0 ${o}px`,
            "&:after": {
              display: "none"
            }
          }
        }
      }
    }
  };
}
function mN(e) {
  const {
    componentCls: t
  } = e, n = e.controlPaddingHorizontalSM - e.lineWidth;
  return [
    kp(e),
    // ======================== Small ========================
    // Shared
    kp(_t(e, {
      controlHeight: e.controlHeightSM,
      borderRadius: e.borderRadiusSM
    }), "sm"),
    // padding
    {
      [`${t}-single${t}-sm`]: {
        [`&:not(${t}-customize-input)`]: {
          [`${t}-selection-search`]: {
            insetInlineStart: n,
            insetInlineEnd: n
          },
          [`${t}-selector`]: {
            padding: `0 ${n}px`
          },
          // With arrow should provides `padding-right` to show the arrow
          [`&${t}-show-arrow ${t}-selection-search`]: {
            insetInlineEnd: n + e.fontSize * 1.5
          },
          [`
            &${t}-show-arrow ${t}-selection-item,
            &${t}-show-arrow ${t}-selection-placeholder
          `]: {
            paddingInlineEnd: e.fontSize * 1.5
          }
        }
      }
    },
    // ======================== Large ========================
    // Shared
    kp(_t(e, {
      controlHeight: e.controlHeightLG,
      fontSize: e.fontSizeLG,
      borderRadius: e.borderRadiusLG
    }), "lg")
  ];
}
function bN(e, t, n) {
  const {
    focusElCls: o,
    focus: i,
    borderElCls: r
  } = n, a = r ? "> *" : "", l = ["hover", i ? "focus" : null, "active"].filter(Boolean).map((s) => `&:${s} ${a}`).join(",");
  return {
    [`&-item:not(${t}-last-item)`]: {
      marginInlineEnd: -e.lineWidth
    },
    "&-item": I(I({
      [l]: {
        zIndex: 2
      }
    }, o ? {
      [`&${o}`]: {
        zIndex: 2
      }
    } : {}), {
      [`&[disabled] ${a}`]: {
        zIndex: 0
      }
    })
  };
}
function yN(e, t, n) {
  const {
    borderElCls: o
  } = n, i = o ? `> ${o}` : "";
  return {
    [`&-item:not(${t}-first-item):not(${t}-last-item) ${i}`]: {
      borderRadius: 0
    },
    [`&-item:not(${t}-last-item)${t}-first-item`]: {
      [`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]: {
        borderStartEndRadius: 0,
        borderEndEndRadius: 0
      }
    },
    [`&-item:not(${t}-first-item)${t}-last-item`]: {
      [`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]: {
        borderStartStartRadius: 0,
        borderEndStartRadius: 0
      }
    }
  };
}
function ec(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
    focus: !0
  };
  const {
    componentCls: n
  } = e, o = `${n}-compact`;
  return {
    [o]: I(I({}, bN(e, o, t)), yN(n, o, t))
  };
}
const xN = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    position: "relative",
    backgroundColor: e.colorBgContainer,
    border: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,
    transition: `all ${e.motionDurationMid} ${e.motionEaseInOut}`,
    input: {
      cursor: "pointer"
    },
    [`${t}-show-search&`]: {
      cursor: "text",
      input: {
        cursor: "auto",
        color: "inherit"
      }
    },
    [`${t}-disabled&`]: {
      color: e.colorTextDisabled,
      background: e.colorBgContainerDisabled,
      cursor: "not-allowed",
      [`${t}-multiple&`]: {
        background: e.colorBgContainerDisabled
      },
      input: {
        cursor: "not-allowed"
      }
    }
  };
}, Ep = function(e, t) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
  const {
    componentCls: o,
    borderHoverColor: i,
    outlineColor: r,
    antCls: a
  } = t, l = n ? {
    [`${o}-selector`]: {
      borderColor: i
    }
  } : {};
  return {
    [e]: {
      [`&:not(${o}-disabled):not(${o}-customize-input):not(${a}-pagination-size-changer)`]: I(I({}, l), {
        [`${o}-focused& ${o}-selector`]: {
          borderColor: i,
          boxShadow: `0 0 0 ${t.controlOutlineWidth}px ${r}`,
          borderInlineEndWidth: `${t.controlLineWidth}px !important`,
          outline: 0
        },
        [`&:hover ${o}-selector`]: {
          borderColor: i,
          borderInlineEndWidth: `${t.controlLineWidth}px !important`
        }
      })
    }
  };
}, wN = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-selection-search-input`]: {
      margin: 0,
      padding: 0,
      background: "transparent",
      border: "none",
      outline: "none",
      appearance: "none",
      "&::-webkit-search-cancel-button": {
        display: "none",
        "-webkit-appearance": "none"
      }
    }
  };
}, SN = (e) => {
  const {
    componentCls: t,
    inputPaddingHorizontalBase: n,
    iconCls: o
  } = e;
  return {
    [t]: I(I({}, Zt(e)), {
      position: "relative",
      display: "inline-block",
      cursor: "pointer",
      [`&:not(${t}-customize-input) ${t}-selector`]: I(I({}, xN(e)), wN(e)),
      // [`&:not(&-disabled):hover ${selectCls}-selector`]: {
      //   ...genHoverStyle(token),
      // },
      // ======================== Selection ========================
      [`${t}-selection-item`]: I({
        flex: 1,
        fontWeight: "normal"
      }, ka),
      // ======================= Placeholder =======================
      [`${t}-selection-placeholder`]: I(I({}, ka), {
        flex: 1,
        color: e.colorTextPlaceholder,
        pointerEvents: "none"
      }),
      // ========================== Arrow ==========================
      [`${t}-arrow`]: I(I({}, Fs()), {
        position: "absolute",
        top: "50%",
        insetInlineStart: "auto",
        insetInlineEnd: n,
        height: e.fontSizeIcon,
        marginTop: -e.fontSizeIcon / 2,
        color: e.colorTextQuaternary,
        fontSize: e.fontSizeIcon,
        lineHeight: 1,
        textAlign: "center",
        pointerEvents: "none",
        display: "flex",
        alignItems: "center",
        [o]: {
          verticalAlign: "top",
          transition: `transform ${e.motionDurationSlow}`,
          "> svg": {
            verticalAlign: "top"
          },
          [`&:not(${t}-suffix)`]: {
            pointerEvents: "auto"
          }
        },
        [`${t}-disabled &`]: {
          cursor: "not-allowed"
        },
        "> *:not(:last-child)": {
          marginInlineEnd: 8
          // FIXME: magic
        }
      }),
      // ========================== Clear ==========================
      [`${t}-clear`]: {
        position: "absolute",
        top: "50%",
        insetInlineStart: "auto",
        insetInlineEnd: n,
        zIndex: 1,
        display: "inline-block",
        width: e.fontSizeIcon,
        height: e.fontSizeIcon,
        marginTop: -e.fontSizeIcon / 2,
        color: e.colorTextQuaternary,
        fontSize: e.fontSizeIcon,
        fontStyle: "normal",
        lineHeight: 1,
        textAlign: "center",
        textTransform: "none",
        background: e.colorBgContainer,
        cursor: "pointer",
        opacity: 0,
        transition: `color ${e.motionDurationMid} ease, opacity ${e.motionDurationSlow} ease`,
        textRendering: "auto",
        "&:before": {
          display: "block"
        },
        "&:hover": {
          color: e.colorTextTertiary
        }
      },
      "&:hover": {
        [`${t}-clear`]: {
          opacity: 1
        }
      }
    }),
    // ========================= Feedback ==========================
    [`${t}-has-feedback`]: {
      [`${t}-clear`]: {
        insetInlineEnd: n + e.fontSize + e.paddingXXS
      }
    }
  };
}, CN = (e) => {
  const {
    componentCls: t
  } = e;
  return [
    {
      [t]: {
        // ==================== BorderLess ====================
        [`&-borderless ${t}-selector`]: {
          backgroundColor: "transparent !important",
          borderColor: "transparent !important",
          boxShadow: "none !important"
        },
        // ==================== In Form ====================
        [`&${t}-in-form-item`]: {
          width: "100%"
        }
      }
    },
    // =====================================================
    // ==                       LTR                       ==
    // =====================================================
    // Base
    SN(e),
    // Single
    mN(e),
    // Multiple
    vN(e),
    // Dropdown
    hN(e),
    // =====================================================
    // ==                       RTL                       ==
    // =====================================================
    {
      [`${t}-rtl`]: {
        direction: "rtl"
      }
    },
    // =====================================================
    // ==                     Status                      ==
    // =====================================================
    Ep(t, _t(e, {
      borderHoverColor: e.colorPrimaryHover,
      outlineColor: e.controlOutline
    })),
    Ep(`${t}-status-error`, _t(e, {
      borderHoverColor: e.colorErrorHover,
      outlineColor: e.colorErrorOutline
    }), !0),
    Ep(`${t}-status-warning`, _t(e, {
      borderHoverColor: e.colorWarningHover,
      outlineColor: e.colorWarningOutline
    }), !0),
    // =====================================================
    // ==             Space Compact                       ==
    // =====================================================
    ec(e, {
      borderElCls: `${t}-selector`,
      focusElCls: `${t}-focused`
    })
  ];
}, $N = nn("Select", (e, t) => {
  let {
    rootPrefixCls: n
  } = t;
  const o = _t(e, {
    rootPrefixCls: n,
    inputPaddingHorizontalBase: e.paddingSM - 1
  });
  return [CN(o)];
}, (e) => ({
  zIndexPopup: e.zIndexPopupBase + 50
})), PN = () => I(I({}, Tn(FC(), ["inputIcon", "mode", "getInputElement", "getRawInputElement", "backfill"])), {
  value: tn([Array, Object, String, Number]),
  defaultValue: tn([Array, Object, String, Number]),
  notFoundContent: ue.any,
  suffixIcon: ue.any,
  itemIcon: ue.any,
  size: dn(),
  mode: dn(),
  bordered: st(!0),
  transitionName: String,
  choiceTransitionName: dn(""),
  popupClassName: String,
  /** @deprecated Please use `popupClassName` instead */
  dropdownClassName: String,
  placement: dn(),
  status: dn(),
  "onUpdate:value": Qe()
}), xy = "SECRET_COMBOBOX_MODE_DO_NOT_USE", bt = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ASelect",
  Option: jv,
  OptGroup: Wv,
  inheritAttrs: !1,
  props: wn(PN(), {
    listHeight: 256,
    listItemHeight: 24
  }),
  SECRET_COMBOBOX_MODE_DO_NOT_USE: xy,
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      emit: o,
      slots: i,
      expose: r
    } = t;
    const a = le(), l = pi(), s = ui.useInject(), u = R(() => Ol(s.status, e.status)), c = () => {
      var K;
      (K = a.value) === null || K === void 0 || K.focus();
    }, d = () => {
      var K;
      (K = a.value) === null || K === void 0 || K.blur();
    }, f = (K) => {
      var J;
      (J = a.value) === null || J === void 0 || J.scrollTo(K);
    }, p = R(() => {
      const {
        mode: K
      } = e;
      if (K !== "combobox")
        return K === xy ? "combobox" : K;
    });
    process.env.NODE_ENV !== "production" && Fn(!e.dropdownClassName, "Select", "`dropdownClassName` is deprecated. Please use `popupClassName` instead.");
    const {
      prefixCls: m,
      direction: b,
      renderEmpty: y,
      size: S,
      getPrefixCls: C,
      getPopupContainer: O,
      disabled: $,
      select: P
    } = yt("select", e), {
      compactSize: k,
      compactItemClassnames: x
    } = Vs(m, b), E = R(() => k.value || S.value), z = Ji(), N = R(() => {
      var K;
      return (K = $.value) !== null && K !== void 0 ? K : z.value;
    }), [D, W] = $N(m), H = R(() => C()), L = R(() => e.placement !== void 0 ? e.placement : b.value === "rtl" ? "bottomRight" : "bottomLeft"), A = R(() => Kr(H.value, yD(L.value), e.transitionName)), U = R(() => Te({
      [`${m.value}-lg`]: E.value === "large",
      [`${m.value}-sm`]: E.value === "small",
      [`${m.value}-rtl`]: b.value === "rtl",
      [`${m.value}-borderless`]: !e.bordered,
      [`${m.value}-in-form-item`]: s.isFormItemInput
    }, Yi(m.value, u.value, s.hasFeedback), x.value, W.value)), j = function() {
      for (var K = arguments.length, J = new Array(K), be = 0; be < K; be++)
        J[be] = arguments[be];
      o("update:value", J[0]), o("change", ...J), l.onFieldChange();
    }, re = (K) => {
      o("blur", K), l.onFieldBlur();
    };
    r({
      blur: d,
      focus: c,
      scrollTo: f
    });
    const G = R(() => p.value === "multiple" || p.value === "tags"), Y = R(() => e.showArrow !== void 0 ? e.showArrow : e.loading || !(G.value || p.value === "combobox"));
    return () => {
      var K, J, be, xe;
      const {
        notFoundContent: ge,
        listHeight: de = 256,
        listItemHeight: ne = 24,
        popupClassName: we,
        dropdownClassName: ae,
        virtual: se,
        dropdownMatchSelectWidth: he,
        id: Me = l.id.value,
        placeholder: ke = (K = i.placeholder) === null || K === void 0 ? void 0 : K.call(i),
        showArrow: Le
      } = e, {
        hasFeedback: Re,
        feedbackIcon: We
      } = s;
      let et;
      ge !== void 0 ? et = ge : i.notFoundContent ? et = i.notFoundContent() : p.value === "combobox" ? et = null : et = y?.("Select") || v(Cv, {
        componentName: "Select"
      }, null);
      const {
        suffixIcon: Fe,
        itemIcon: Ne,
        removeIcon: Ge,
        clearIcon: it
      } = AR(I(I({}, e), {
        multiple: G.value,
        prefixCls: m.value,
        hasFeedback: Re,
        feedbackIcon: We,
        showArrow: Y.value
      }), i), Ke = Tn(e, ["prefixCls", "suffixIcon", "itemIcon", "removeIcon", "clearIcon", "size", "bordered", "status"]), Oe = Te(we || ae, {
        [`${m.value}-dropdown-${b.value}`]: b.value === "rtl"
      }, W.value);
      return D(v(Lz, Z(Z(Z({
        ref: a,
        virtual: se,
        dropdownMatchSelectWidth: he
      }, Ke), n), {}, {
        showSearch: (J = e.showSearch) !== null && J !== void 0 ? J : (be = P?.value) === null || be === void 0 ? void 0 : be.showSearch,
        placeholder: ke,
        listHeight: de,
        listItemHeight: ne,
        mode: p.value,
        prefixCls: m.value,
        direction: b.value,
        inputIcon: Fe,
        menuItemSelectedIcon: Ne,
        removeIcon: Ge,
        clearIcon: it,
        notFoundContent: et,
        class: [U.value, n.class],
        getPopupContainer: O?.value,
        dropdownClassName: Oe,
        onChange: j,
        onBlur: re,
        id: Me,
        dropdownRender: Ke.dropdownRender || i.dropdownRender,
        transitionName: A.value,
        children: (xe = i.default) === null || xe === void 0 ? void 0 : xe.call(i),
        tagRender: e.tagRender || i.tagRender,
        optionLabelRender: i.optionLabel,
        maxTagPlaceholder: e.maxTagPlaceholder || i.maxTagPlaceholder,
        showArrow: Re || Le,
        disabled: N.value
      }), {
        option: i.option
      }));
    };
  }
});
bt.install = function(e) {
  return e.component(bt.name, bt), e.component(bt.Option.displayName, bt.Option), e.component(bt.OptGroup.displayName, bt.OptGroup), e;
};
bt.Option;
bt.OptGroup;
var ON = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z" } }, { tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }] }, name: "check-circle", theme: "outlined" };
function wy(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      IN(e, i, n[i]);
    });
  }
  return e;
}
function IN(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Qv = function(t, n) {
  var o = wy({}, t, n.attrs);
  return v(pn, wy({}, o, {
    icon: ON
  }), null);
};
Qv.displayName = "CheckCircleOutlined";
Qv.inheritAttrs = !1;
var MN = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { tag: "path", attrs: { d: "M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z" } }] }, name: "exclamation-circle", theme: "outlined" };
function Sy(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      TN(e, i, n[i]);
    });
  }
  return e;
}
function TN(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Zv = function(t, n) {
  var o = Sy({}, t, n.attrs);
  return v(pn, Sy({}, o, {
    icon: MN
  }), null);
};
Zv.displayName = "ExclamationCircleOutlined";
Zv.inheritAttrs = !1;
var kN = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { tag: "path", attrs: { d: "M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z" } }] }, name: "info-circle", theme: "outlined" };
function Cy(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      EN(e, i, n[i]);
    });
  }
  return e;
}
function EN(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Jv = function(t, n) {
  var o = Cy({}, t, n.attrs);
  return v(pn, Cy({}, o, {
    icon: kN
  }), null);
};
Jv.displayName = "InfoCircleOutlined";
Jv.inheritAttrs = !1;
var _N = { icon: { tag: "svg", attrs: { "fill-rule": "evenodd", viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z" } }] }, name: "close-circle", theme: "outlined" };
function $y(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      AN(e, i, n[i]);
    });
  }
  return e;
}
function AN(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var em = function(t, n) {
  var o = $y({}, t, n.attrs);
  return v(pn, $y({}, o, {
    icon: _N
  }), null);
};
em.displayName = "CloseCircleOutlined";
em.inheritAttrs = !1;
var DN = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z" } }] }, name: "check-circle", theme: "filled" };
function Py(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      zN(e, i, n[i]);
    });
  }
  return e;
}
function zN(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Da = function(t, n) {
  var o = Py({}, t, n.attrs);
  return v(pn, Py({}, o, {
    icon: DN
  }), null);
};
Da.displayName = "CheckCircleFilled";
Da.inheritAttrs = !1;
var RN = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, name: "exclamation-circle", theme: "filled" };
function Oy(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      NN(e, i, n[i]);
    });
  }
  return e;
}
function NN(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var za = function(t, n) {
  var o = Oy({}, t, n.attrs);
  return v(pn, Oy({}, o, {
    icon: RN
  }), null);
};
za.displayName = "ExclamationCircleFilled";
za.inheritAttrs = !1;
var BN = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, name: "info-circle", theme: "filled" };
function Iy(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      LN(e, i, n[i]);
    });
  }
  return e;
}
function LN(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Il = function(t, n) {
  var o = Iy({}, t, n.attrs);
  return v(pn, Iy({}, o, {
    icon: BN
  }), null);
};
Il.displayName = "InfoCircleFilled";
Il.inheritAttrs = !1;
const Rc = ["xxxl", "xxl", "xl", "lg", "md", "sm", "xs"], FN = (e) => ({
  xs: `(max-width: ${e.screenXSMax}px)`,
  sm: `(min-width: ${e.screenSM}px)`,
  md: `(min-width: ${e.screenMD}px)`,
  lg: `(min-width: ${e.screenLG}px)`,
  xl: `(min-width: ${e.screenXL}px)`,
  xxl: `(min-width: ${e.screenXXL}px)`,
  xxxl: `{min-width: ${e.screenXXXL}px}`
});
function HN() {
  const [, e] = Hs();
  return R(() => {
    const t = FN(e.value), n = /* @__PURE__ */ new Map();
    let o = -1, i = {};
    return {
      matchHandlers: {},
      dispatch(r) {
        return i = r, n.forEach((a) => a(i)), n.size >= 1;
      },
      subscribe(r) {
        return n.size || this.register(), o += 1, n.set(o, r), r(i), o;
      },
      unsubscribe(r) {
        n.delete(r), n.size || this.unregister();
      },
      unregister() {
        Object.keys(t).forEach((r) => {
          const a = t[r], l = this.matchHandlers[a];
          l?.mql.removeListener(l?.listener);
        }), n.clear();
      },
      register() {
        Object.keys(t).forEach((r) => {
          const a = t[r], l = (u) => {
            let {
              matches: c
            } = u;
            this.dispatch(I(I({}, i), {
              [r]: c
            }));
          }, s = window.matchMedia(a);
          s.addListener(l), this.matchHandlers[a] = {
            mql: s,
            listener: l
          }, l(s);
        });
      },
      responsiveMap: t
    };
  });
}
const bi = {
  adjustX: 1,
  adjustY: 1
}, yi = [0, 0], QC = {
  left: {
    points: ["cr", "cl"],
    overflow: bi,
    offset: [-4, 0],
    targetOffset: yi
  },
  right: {
    points: ["cl", "cr"],
    overflow: bi,
    offset: [4, 0],
    targetOffset: yi
  },
  top: {
    points: ["bc", "tc"],
    overflow: bi,
    offset: [0, -4],
    targetOffset: yi
  },
  bottom: {
    points: ["tc", "bc"],
    overflow: bi,
    offset: [0, 4],
    targetOffset: yi
  },
  topLeft: {
    points: ["bl", "tl"],
    overflow: bi,
    offset: [0, -4],
    targetOffset: yi
  },
  leftTop: {
    points: ["tr", "tl"],
    overflow: bi,
    offset: [-4, 0],
    targetOffset: yi
  },
  topRight: {
    points: ["br", "tr"],
    overflow: bi,
    offset: [0, -4],
    targetOffset: yi
  },
  rightTop: {
    points: ["tl", "tr"],
    overflow: bi,
    offset: [4, 0],
    targetOffset: yi
  },
  bottomRight: {
    points: ["tr", "br"],
    overflow: bi,
    offset: [0, 4],
    targetOffset: yi
  },
  rightBottom: {
    points: ["bl", "br"],
    overflow: bi,
    offset: [4, 0],
    targetOffset: yi
  },
  bottomLeft: {
    points: ["tl", "bl"],
    overflow: bi,
    offset: [0, 4],
    targetOffset: yi
  },
  leftBottom: {
    points: ["br", "bl"],
    overflow: bi,
    offset: [-4, 0],
    targetOffset: yi
  }
}, VN = {
  prefixCls: String,
  id: String,
  overlayInnerStyle: ue.any
}, jN = ye({
  compatConfig: {
    MODE: 3
  },
  name: "TooltipContent",
  props: VN,
  setup(e, t) {
    let {
      slots: n
    } = t;
    return () => {
      var o;
      return v("div", {
        class: `${e.prefixCls}-inner`,
        id: e.id,
        role: "tooltip",
        style: e.overlayInnerStyle
      }, [(o = n.overlay) === null || o === void 0 ? void 0 : o.call(n)]);
    };
  }
});
var WN = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
function My() {
}
const qN = ye({
  compatConfig: {
    MODE: 3
  },
  name: "Tooltip",
  inheritAttrs: !1,
  props: {
    trigger: ue.any.def(["hover"]),
    defaultVisible: {
      type: Boolean,
      default: void 0
    },
    visible: {
      type: Boolean,
      default: void 0
    },
    placement: ue.string.def("right"),
    transitionName: String,
    animation: ue.any,
    afterVisibleChange: ue.func.def(() => {
    }),
    overlayStyle: {
      type: Object,
      default: void 0
    },
    overlayClassName: String,
    prefixCls: ue.string.def("rc-tooltip"),
    mouseEnterDelay: ue.number.def(0.1),
    mouseLeaveDelay: ue.number.def(0.1),
    getPopupContainer: Function,
    destroyTooltipOnHide: {
      type: Boolean,
      default: !1
    },
    align: ue.object.def(() => ({})),
    arrowContent: ue.any.def(null),
    tipId: String,
    builtinPlacements: ue.object,
    overlayInnerStyle: {
      type: Object,
      default: void 0
    },
    popupVisible: {
      type: Boolean,
      default: void 0
    },
    onVisibleChange: Function,
    onPopupAlign: Function,
    arrow: {
      type: Boolean,
      default: !0
    }
  },
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      expose: i
    } = t;
    const r = Pe(), a = () => {
      const {
        prefixCls: c,
        tipId: d,
        overlayInnerStyle: f
      } = e;
      return [e.arrow ? v("div", {
        class: `${c}-arrow`,
        key: "arrow"
      }, [Mi(n, e, "arrowContent")]) : null, v(jN, {
        key: "content",
        prefixCls: c,
        id: d,
        overlayInnerStyle: f
      }, {
        overlay: n.overlay
      })];
    };
    i({
      getPopupDomNode: () => r.value.getPopupDomNode(),
      triggerDOM: r,
      forcePopupAlign: () => {
        var c;
        return (c = r.value) === null || c === void 0 ? void 0 : c.forcePopupAlign();
      }
    });
    const s = Pe(!1), u = Pe(!1);
    return Lt(() => {
      const {
        destroyTooltipOnHide: c
      } = e;
      if (typeof c == "boolean")
        s.value = c;
      else if (c && typeof c == "object") {
        const {
          keepParent: d
        } = c;
        s.value = d === !0, u.value = d === !1;
      }
    }), () => {
      const {
        overlayClassName: c,
        trigger: d,
        mouseEnterDelay: f,
        mouseLeaveDelay: p,
        overlayStyle: m,
        prefixCls: b,
        afterVisibleChange: y,
        transitionName: S,
        animation: C,
        placement: O,
        align: $,
        destroyTooltipOnHide: P,
        defaultVisible: k
      } = e, x = WN(e, ["overlayClassName", "trigger", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "prefixCls", "afterVisibleChange", "transitionName", "animation", "placement", "align", "destroyTooltipOnHide", "defaultVisible"]), E = I({}, x);
      e.visible !== void 0 && (E.popupVisible = e.visible);
      const z = I(I(I({
        popupClassName: c,
        prefixCls: b,
        action: d,
        builtinPlacements: QC,
        popupPlacement: O,
        popupAlign: $,
        afterPopupVisibleChange: y,
        popupTransitionName: S,
        popupAnimation: C,
        defaultPopupVisible: k,
        destroyPopupOnHide: s.value,
        autoDestroy: u.value,
        mouseLeaveDelay: p,
        popupStyle: m,
        mouseEnterDelay: f
      }, E), o), {
        onPopupVisibleChange: e.onVisibleChange || My,
        onPopupAlign: e.onPopupAlign || My,
        ref: r,
        arrow: !!e.arrow,
        popup: a()
      });
      return v(Zu, z, {
        default: n.default
      });
    };
  }
}), ZC = (() => ({
  trigger: [String, Array],
  open: {
    type: Boolean,
    default: void 0
  },
  /** @deprecated Please use `open` instead. */
  visible: {
    type: Boolean,
    default: void 0
  },
  placement: String,
  color: String,
  transitionName: String,
  overlayStyle: Ct(),
  overlayInnerStyle: Ct(),
  overlayClassName: String,
  openClassName: String,
  prefixCls: String,
  mouseEnterDelay: Number,
  mouseLeaveDelay: Number,
  getPopupContainer: Function,
  /**@deprecated Please use `arrow={{ pointAtCenter: true }}` instead. */
  arrowPointAtCenter: {
    type: Boolean,
    default: void 0
  },
  arrow: {
    type: [Boolean, Object],
    default: !0
  },
  autoAdjustOverflow: {
    type: [Boolean, Object],
    default: void 0
  },
  destroyTooltipOnHide: {
    type: Boolean,
    default: void 0
  },
  align: Ct(),
  builtinPlacements: Ct(),
  children: Array,
  /** @deprecated Please use `onOpenChange` instead. */
  onVisibleChange: Function,
  /** @deprecated Please use `onUpdate:open` instead. */
  "onUpdate:visible": Function,
  onOpenChange: Function,
  "onUpdate:open": Function
})), GN = {
  adjustX: 1,
  adjustY: 1
}, Ty = {
  adjustX: 0,
  adjustY: 0
}, KN = [0, 0];
function ky(e) {
  return typeof e == "boolean" ? e ? GN : Ty : I(I({}, Ty), e);
}
function JC(e) {
  const {
    arrowWidth: t = 4,
    horizontalArrowShift: n = 16,
    verticalArrowShift: o = 8,
    autoAdjustOverflow: i,
    arrowPointAtCenter: r
  } = e, a = {
    left: {
      points: ["cr", "cl"],
      offset: [-4, 0]
    },
    right: {
      points: ["cl", "cr"],
      offset: [4, 0]
    },
    top: {
      points: ["bc", "tc"],
      offset: [0, -4]
    },
    bottom: {
      points: ["tc", "bc"],
      offset: [0, 4]
    },
    topLeft: {
      points: ["bl", "tc"],
      offset: [-(n + t), -4]
    },
    leftTop: {
      points: ["tr", "cl"],
      offset: [-4, -(o + t)]
    },
    topRight: {
      points: ["br", "tc"],
      offset: [n + t, -4]
    },
    rightTop: {
      points: ["tl", "cr"],
      offset: [4, -(o + t)]
    },
    bottomRight: {
      points: ["tr", "bc"],
      offset: [n + t, 4]
    },
    rightBottom: {
      points: ["bl", "cr"],
      offset: [4, o + t]
    },
    bottomLeft: {
      points: ["tl", "bc"],
      offset: [-(n + t), 4]
    },
    leftBottom: {
      points: ["br", "cl"],
      offset: [-4, o + t]
    }
  };
  return Object.keys(a).forEach((l) => {
    a[l] = r ? I(I({}, a[l]), {
      overflow: ky(i),
      targetOffset: KN
    }) : I(I({}, QC[l]), {
      overflow: ky(i)
    }), a[l].ignoreShake = !0;
  }), a;
}
function e$() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
  for (let t = 0, n = e.length; t < n; t++)
    if (e[t] !== void 0)
      return e[t];
}
const YN = Fu.map((e) => `${e}-inverse`), UN = ["success", "processing", "error", "default", "warning"];
function t$(e) {
  return (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0) ? [...YN, ...Fu].includes(e) : Fu.includes(e);
}
function XN(e) {
  return UN.includes(e);
}
function QN(e, t) {
  const n = t$(t), o = Te({
    [`${e}-${t}`]: t && n
  }), i = {}, r = {};
  return t && !n && (i.background = t, r["--antd-arrow-background-color"] = t), {
    className: o,
    overlayStyle: i,
    arrowStyle: r
  };
}
function Nc(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
  return e.map((n) => `${t}${n}`).join(",");
}
const n$ = 8;
function o$(e) {
  const t = n$, {
    sizePopupArrow: n,
    contentRadius: o,
    borderRadiusOuter: i,
    limitVerticalRadius: r
  } = e, a = n / 2 - Math.ceil(i * (Math.sqrt(2) - 1)), l = (o > 12 ? o + 2 : 12) - a, s = r ? t - a : l;
  return {
    dropdownArrowOffset: l,
    dropdownArrowOffsetVertical: s
  };
}
function i$(e, t) {
  const {
    componentCls: n,
    sizePopupArrow: o,
    marginXXS: i,
    borderRadiusXS: r,
    borderRadiusOuter: a,
    boxShadowPopoverArrow: l
  } = e, {
    colorBg: s,
    showArrowCls: u,
    contentRadius: c = e.borderRadiusLG,
    limitVerticalRadius: d
  } = t, {
    dropdownArrowOffsetVertical: f,
    dropdownArrowOffset: p
  } = o$({
    sizePopupArrow: o,
    contentRadius: c,
    borderRadiusOuter: a,
    limitVerticalRadius: d
  }), m = o / 2 + i;
  return {
    [n]: {
      // ============================ Basic ============================
      [`${n}-arrow`]: [I(I({
        position: "absolute",
        zIndex: 1,
        display: "block"
      }, yv(o, r, a, s, l)), {
        "&:before": {
          background: s
        }
      })],
      // ========================== Placement ==========================
      // Here handle the arrow position and rotate stuff
      // >>>>> Top
      [[`&-placement-top ${n}-arrow`, `&-placement-topLeft ${n}-arrow`, `&-placement-topRight ${n}-arrow`].join(",")]: {
        bottom: 0,
        transform: "translateY(100%) rotate(180deg)"
      },
      [`&-placement-top ${n}-arrow`]: {
        left: {
          _skip_check_: !0,
          value: "50%"
        },
        transform: "translateX(-50%) translateY(100%) rotate(180deg)"
      },
      [`&-placement-topLeft ${n}-arrow`]: {
        left: {
          _skip_check_: !0,
          value: p
        }
      },
      [`&-placement-topRight ${n}-arrow`]: {
        right: {
          _skip_check_: !0,
          value: p
        }
      },
      // >>>>> Bottom
      [[`&-placement-bottom ${n}-arrow`, `&-placement-bottomLeft ${n}-arrow`, `&-placement-bottomRight ${n}-arrow`].join(",")]: {
        top: 0,
        transform: "translateY(-100%)"
      },
      [`&-placement-bottom ${n}-arrow`]: {
        left: {
          _skip_check_: !0,
          value: "50%"
        },
        transform: "translateX(-50%) translateY(-100%)"
      },
      [`&-placement-bottomLeft ${n}-arrow`]: {
        left: {
          _skip_check_: !0,
          value: p
        }
      },
      [`&-placement-bottomRight ${n}-arrow`]: {
        right: {
          _skip_check_: !0,
          value: p
        }
      },
      // >>>>> Left
      [[`&-placement-left ${n}-arrow`, `&-placement-leftTop ${n}-arrow`, `&-placement-leftBottom ${n}-arrow`].join(",")]: {
        right: {
          _skip_check_: !0,
          value: 0
        },
        transform: "translateX(100%) rotate(90deg)"
      },
      [`&-placement-left ${n}-arrow`]: {
        top: {
          _skip_check_: !0,
          value: "50%"
        },
        transform: "translateY(-50%) translateX(100%) rotate(90deg)"
      },
      [`&-placement-leftTop ${n}-arrow`]: {
        top: f
      },
      [`&-placement-leftBottom ${n}-arrow`]: {
        bottom: f
      },
      // >>>>> Right
      [[`&-placement-right ${n}-arrow`, `&-placement-rightTop ${n}-arrow`, `&-placement-rightBottom ${n}-arrow`].join(",")]: {
        left: {
          _skip_check_: !0,
          value: 0
        },
        transform: "translateX(-100%) rotate(-90deg)"
      },
      [`&-placement-right ${n}-arrow`]: {
        top: {
          _skip_check_: !0,
          value: "50%"
        },
        transform: "translateY(-50%) translateX(-100%) rotate(-90deg)"
      },
      [`&-placement-rightTop ${n}-arrow`]: {
        top: f
      },
      [`&-placement-rightBottom ${n}-arrow`]: {
        bottom: f
      },
      // =========================== Offset ============================
      // Offset the popover to account for the dropdown arrow
      // >>>>> Top
      [Nc(["&-placement-topLeft", "&-placement-top", "&-placement-topRight"].map((b) => b += ":not(&-arrow-hidden)"), u)]: {
        paddingBottom: m
      },
      // >>>>> Bottom
      [Nc(["&-placement-bottomLeft", "&-placement-bottom", "&-placement-bottomRight"].map((b) => b += ":not(&-arrow-hidden)"), u)]: {
        paddingTop: m
      },
      // >>>>> Left
      [Nc(["&-placement-leftTop", "&-placement-left", "&-placement-leftBottom"].map((b) => b += ":not(&-arrow-hidden)"), u)]: {
        paddingRight: {
          _skip_check_: !0,
          value: m
        }
      },
      // >>>>> Right
      [Nc(["&-placement-rightTop", "&-placement-right", "&-placement-rightBottom"].map((b) => b += ":not(&-arrow-hidden)"), u)]: {
        paddingLeft: {
          _skip_check_: !0,
          value: m
        }
      }
    }
  };
}
const ZN = (e) => {
  const {
    componentCls: t,
    // ant-tooltip
    tooltipMaxWidth: n,
    tooltipColor: o,
    tooltipBg: i,
    tooltipBorderRadius: r,
    zIndexPopup: a,
    controlHeight: l,
    boxShadowSecondary: s,
    paddingSM: u,
    paddingXS: c,
    tooltipRadiusOuter: d
  } = e;
  return [
    {
      [t]: I(I(I(I({}, Zt(e)), {
        position: "absolute",
        zIndex: a,
        display: "block",
        "&": [{
          width: "max-content"
        }, {
          width: "intrinsic"
        }],
        maxWidth: n,
        visibility: "visible",
        "&-hidden": {
          display: "none"
        },
        "--antd-arrow-background-color": i,
        // Wrapper for the tooltip content
        [`${t}-inner`]: {
          minWidth: l,
          minHeight: l,
          padding: `${u / 2}px ${c}px`,
          color: o,
          textAlign: "start",
          textDecoration: "none",
          wordWrap: "break-word",
          backgroundColor: i,
          borderRadius: r,
          boxShadow: s
        },
        // Limit left and right placement radius
        [["&-placement-left", "&-placement-leftTop", "&-placement-leftBottom", "&-placement-right", "&-placement-rightTop", "&-placement-rightBottom"].join(",")]: {
          [`${t}-inner`]: {
            borderRadius: Math.min(r, n$)
          }
        },
        [`${t}-content`]: {
          position: "relative"
        }
      }), QS(e, (f, p) => {
        let {
          darkColor: m
        } = p;
        return {
          [`&${t}-${f}`]: {
            [`${t}-inner`]: {
              backgroundColor: m
            },
            [`${t}-arrow`]: {
              "--antd-arrow-background-color": m
            }
          }
        };
      })), {
        // RTL
        "&-rtl": {
          direction: "rtl"
        }
      })
    },
    // Arrow Style
    i$(_t(e, {
      borderRadiusOuter: d
    }), {
      colorBg: "var(--antd-arrow-background-color)",
      showArrowCls: "",
      contentRadius: r,
      limitVerticalRadius: !0
    }),
    // Pure Render
    {
      [`${t}-pure`]: {
        position: "relative",
        maxWidth: "none"
      }
    }
  ];
}, JN = ((e, t) => nn("Tooltip", (o) => {
  if (t?.value === !1)
    return [];
  const {
    borderRadius: i,
    colorTextLightSolid: r,
    colorBgDefault: a,
    borderRadiusOuter: l
  } = o, s = _t(o, {
    // default variables
    tooltipMaxWidth: 250,
    tooltipColor: r,
    tooltipBorderRadius: i,
    tooltipBg: a,
    tooltipRadiusOuter: l > 4 ? 4 : l
  });
  return [ZN(s), Ju(o, "zoom-big-fast")];
}, (o) => {
  let {
    zIndexPopupBase: i,
    colorBgSpotlight: r
  } = o;
  return {
    zIndexPopup: i + 70,
    colorBgDefault: r
  };
})(e)), e4 = (e, t) => {
  const n = {}, o = I({}, e);
  return t.forEach((i) => {
    e && i in e && (n[i] = e[i], delete o[i]);
  }), {
    picked: n,
    omitted: o
  };
}, r$ = () => I(I({}, ZC()), {
  title: ue.any
}), t4 = () => ({
  trigger: "hover",
  align: {},
  placement: "top",
  mouseEnterDelay: 0.1,
  mouseLeaveDelay: 0.1,
  arrowPointAtCenter: !1,
  autoAdjustOverflow: !0
}), n4 = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ATooltip",
  inheritAttrs: !1,
  props: wn(r$(), {
    trigger: "hover",
    align: {},
    placement: "top",
    mouseEnterDelay: 0.1,
    mouseLeaveDelay: 0.1,
    arrowPointAtCenter: !1,
    autoAdjustOverflow: !0
  }),
  slots: Object,
  // emits: ['update:visible', 'visibleChange'],
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      attrs: i,
      expose: r
    } = t;
    process.env.NODE_ENV !== "production" && [["visible", "open"], ["onVisibleChange", "onOpenChange"]].forEach((N) => {
      let [D, W] = N;
      Zn(e[D] === void 0, "Tooltip", `\`${D}\` is deprecated, please use \`${W}\` instead.`);
    });
    const {
      prefixCls: a,
      getPopupContainer: l,
      direction: s,
      rootPrefixCls: u
    } = yt("tooltip", e), c = R(() => {
      var N;
      return (N = e.open) !== null && N !== void 0 ? N : e.visible;
    }), d = le(e$([e.open, e.visible])), f = le();
    let p;
    Ie(c, (N) => {
      Mt.cancel(p), p = Mt(() => {
        d.value = !!N;
      });
    });
    const m = () => {
      var N;
      const D = (N = e.title) !== null && N !== void 0 ? N : n.title;
      return !D && D !== 0;
    }, b = (N) => {
      const D = m();
      c.value === void 0 && (d.value = D ? !1 : N), D || (o("update:visible", N), o("visibleChange", N), o("update:open", N), o("openChange", N));
    };
    r({
      getPopupDomNode: () => f.value.getPopupDomNode(),
      open: d,
      forcePopupAlign: () => {
        var N;
        return (N = f.value) === null || N === void 0 ? void 0 : N.forcePopupAlign();
      }
    });
    const S = R(() => {
      var N;
      const {
        builtinPlacements: D,
        autoAdjustOverflow: W,
        arrow: H,
        arrowPointAtCenter: L
      } = e;
      let A = L;
      return typeof H == "object" && (A = (N = H.pointAtCenter) !== null && N !== void 0 ? N : L), D || JC({
        arrowPointAtCenter: A,
        autoAdjustOverflow: W
      });
    }), C = (N) => N || N === "", O = (N) => {
      const D = N.type;
      if (typeof D == "object" && N.props && ((D.__ANT_BUTTON === !0 || D === "button") && C(N.props.disabled) || D.__ANT_SWITCH === !0 && (C(N.props.disabled) || C(N.props.loading)) || D.__ANT_RADIO === !0 && C(N.props.disabled))) {
        const {
          picked: W,
          omitted: H
        } = e4(cE(N), ["position", "left", "right", "top", "bottom", "float", "display", "zIndex"]), L = I(I({
          display: "inline-block"
        }, W), {
          cursor: "not-allowed",
          lineHeight: 1,
          width: N.props && N.props.block ? "100%" : void 0
        }), A = I(I({}, H), {
          pointerEvents: "none"
        }), U = An(N, {
          style: A
        }, !0);
        return v("span", {
          style: L,
          class: `${a.value}-disabled-compatible-wrapper`
        }, [U]);
      }
      return N;
    }, $ = () => {
      var N, D;
      return (N = e.title) !== null && N !== void 0 ? N : (D = n.title) === null || D === void 0 ? void 0 : D.call(n);
    }, P = (N, D) => {
      const W = S.value, H = Object.keys(W).find((L) => {
        var A, U;
        return W[L].points[0] === ((A = D.points) === null || A === void 0 ? void 0 : A[0]) && W[L].points[1] === ((U = D.points) === null || U === void 0 ? void 0 : U[1]);
      });
      if (H) {
        const L = N.getBoundingClientRect(), A = {
          top: "50%",
          left: "50%"
        };
        H.indexOf("top") >= 0 || H.indexOf("Bottom") >= 0 ? A.top = `${L.height - D.offset[1]}px` : (H.indexOf("Top") >= 0 || H.indexOf("bottom") >= 0) && (A.top = `${-D.offset[1]}px`), H.indexOf("left") >= 0 || H.indexOf("Right") >= 0 ? A.left = `${L.width - D.offset[0]}px` : (H.indexOf("right") >= 0 || H.indexOf("Left") >= 0) && (A.left = `${-D.offset[0]}px`), N.style.transformOrigin = `${A.left} ${A.top}`;
      }
    }, k = R(() => QN(a.value, e.color)), x = R(() => i["data-popover-inject"]), [E, z] = JN(a, R(() => !x.value));
    return () => {
      var N, D;
      const {
        openClassName: W,
        overlayClassName: H,
        overlayStyle: L,
        overlayInnerStyle: A
      } = e;
      let U = (D = Ko((N = n.default) === null || N === void 0 ? void 0 : N.call(n))) !== null && D !== void 0 ? D : null;
      U = U.length === 1 ? U[0] : U;
      let j = d.value;
      if (c.value === void 0 && m() && (j = !1), !U)
        return null;
      const re = O(Bo(U) && !dE(U) ? U : v("span", null, [U])), G = Te({
        [W || `${a.value}-open`]: !0,
        [re.props && re.props.class]: re.props && re.props.class
      }), Y = Te(H, {
        [`${a.value}-rtl`]: s.value === "rtl"
      }, k.value.className, z.value), K = I(I({}, k.value.overlayStyle), A), J = k.value.arrowStyle, be = I(I(I({}, i), e), {
        prefixCls: a.value,
        arrow: !!e.arrow,
        getPopupContainer: l?.value,
        builtinPlacements: S.value,
        visible: j,
        ref: f,
        overlayClassName: Y,
        overlayStyle: I(I({}, J), L),
        overlayInnerStyle: K,
        onVisibleChange: b,
        onPopupAlign: P,
        transitionName: Kr(u.value, "zoom-big-fast", e.transitionName)
      });
      return E(v(qN, be, {
        default: () => [d.value ? An(re, {
          class: G
        }) : re],
        arrowContent: () => v("span", {
          class: `${a.value}-arrow-content`
        }, null),
        overlay: $
      }));
    };
  }
}), xo = er(n4), o4 = (e) => {
  const {
    componentCls: t,
    popoverBg: n,
    popoverColor: o,
    width: i,
    fontWeightStrong: r,
    popoverPadding: a,
    boxShadowSecondary: l,
    colorTextHeading: s,
    borderRadiusLG: u,
    zIndexPopup: c,
    marginXS: d,
    colorBgElevated: f
  } = e;
  return [
    {
      [t]: I(I({}, Zt(e)), {
        position: "absolute",
        top: 0,
        // use `left` to fix https://github.com/ant-design/ant-design/issues/39195
        left: {
          _skip_check_: !0,
          value: 0
        },
        zIndex: c,
        fontWeight: "normal",
        whiteSpace: "normal",
        textAlign: "start",
        cursor: "auto",
        userSelect: "text",
        "--antd-arrow-background-color": f,
        "&-rtl": {
          direction: "rtl"
        },
        "&-hidden": {
          display: "none"
        },
        [`${t}-content`]: {
          position: "relative"
        },
        [`${t}-inner`]: {
          backgroundColor: n,
          backgroundClip: "padding-box",
          borderRadius: u,
          boxShadow: l,
          padding: a
        },
        [`${t}-title`]: {
          minWidth: i,
          marginBottom: d,
          color: s,
          fontWeight: r
        },
        [`${t}-inner-content`]: {
          color: o
        }
      })
    },
    // Arrow Style
    i$(e, {
      colorBg: "var(--antd-arrow-background-color)"
    }),
    // Pure Render
    {
      [`${t}-pure`]: {
        position: "relative",
        maxWidth: "none",
        [`${t}-content`]: {
          display: "inline-block"
        }
      }
    }
  ];
}, i4 = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [t]: Fu.map((n) => {
      const o = e[`${n}-6`];
      return {
        [`&${t}-${n}`]: {
          "--antd-arrow-background-color": o,
          [`${t}-inner`]: {
            backgroundColor: o
          },
          [`${t}-arrow`]: {
            background: "transparent"
          }
        }
      };
    })
  };
}, r4 = (e) => {
  const {
    componentCls: t,
    lineWidth: n,
    lineType: o,
    colorSplit: i,
    paddingSM: r,
    controlHeight: a,
    fontSize: l,
    lineHeight: s,
    padding: u
  } = e, c = a - Math.round(l * s), d = c / 2, f = c / 2 - n, p = u;
  return {
    [t]: {
      [`${t}-inner`]: {
        padding: 0
      },
      [`${t}-title`]: {
        margin: 0,
        padding: `${d}px ${p}px ${f}px`,
        borderBottom: `${n}px ${o} ${i}`
      },
      [`${t}-inner-content`]: {
        padding: `${r}px ${p}px`
      }
    }
  };
}, a4 = nn("Popover", (e) => {
  const {
    colorBgElevated: t,
    colorText: n,
    wireframe: o
  } = e, i = _t(e, {
    popoverBg: t,
    popoverColor: n,
    popoverPadding: 12
    // Fixed Value
  });
  return [o4(i), i4(i), o && r4(i), Ju(i, "zoom-big")];
}, (e) => {
  let {
    zIndexPopupBase: t
  } = e;
  return {
    zIndexPopup: t + 30,
    width: 177
  };
}), l4 = () => I(I({}, ZC()), {
  content: ni(),
  title: ni()
}), s4 = ye({
  compatConfig: {
    MODE: 3
  },
  name: "APopover",
  inheritAttrs: !1,
  props: wn(l4(), I(I({}, t4()), {
    trigger: "hover",
    placement: "top",
    mouseEnterDelay: 0.1,
    mouseLeaveDelay: 0.1
  })),
  setup(e, t) {
    let {
      expose: n,
      slots: o,
      attrs: i
    } = t;
    const r = le();
    Zn(e.visible === void 0, "popover", "`visible` will be removed in next major version, please use `open` instead."), n({
      getPopupDomNode: () => {
        var f, p;
        return (p = (f = r.value) === null || f === void 0 ? void 0 : f.getPopupDomNode) === null || p === void 0 ? void 0 : p.call(f);
      }
    });
    const {
      prefixCls: a,
      configProvider: l
    } = yt("popover", e), [s, u] = a4(a), c = R(() => l.getPrefixCls()), d = () => {
      var f, p;
      const {
        title: m = Ko((f = o.title) === null || f === void 0 ? void 0 : f.call(o)),
        content: b = Ko((p = o.content) === null || p === void 0 ? void 0 : p.call(o))
      } = e, y = !!(Array.isArray(m) ? m.length : m), S = !!(Array.isArray(b) ? b.length : m);
      return !y && !S ? null : v(Ve, null, [y && v("div", {
        class: `${a.value}-title`
      }, [m]), v("div", {
        class: `${a.value}-inner-content`
      }, [b])]);
    };
    return () => {
      const f = Te(e.overlayClassName, u.value);
      return s(v(xo, Z(Z(Z({}, Tn(e, ["title", "content"])), i), {}, {
        prefixCls: a.value,
        ref: r,
        overlayClassName: f,
        transitionName: Kr(c.value, "zoom-big", e.transitionName),
        "data-popover-inject": !0
      }), {
        title: d,
        default: o.default
      }));
    };
  }
}), u4 = er(s4), uh = (e) => !isNaN(parseFloat(e)) && isFinite(e), Wl = {
  adjustX: 1,
  adjustY: 1
}, ql = [0, 0], c4 = {
  topLeft: {
    points: ["bl", "tl"],
    overflow: Wl,
    offset: [0, -4],
    targetOffset: ql
  },
  topCenter: {
    points: ["bc", "tc"],
    overflow: Wl,
    offset: [0, -4],
    targetOffset: ql
  },
  topRight: {
    points: ["br", "tr"],
    overflow: Wl,
    offset: [0, -4],
    targetOffset: ql
  },
  bottomLeft: {
    points: ["tl", "bl"],
    overflow: Wl,
    offset: [0, 4],
    targetOffset: ql
  },
  bottomCenter: {
    points: ["tc", "bc"],
    overflow: Wl,
    offset: [0, 4],
    targetOffset: ql
  },
  bottomRight: {
    points: ["tr", "br"],
    overflow: Wl,
    offset: [0, 4],
    targetOffset: ql
  }
};
var d4 = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const a$ = ye({
  compatConfig: {
    MODE: 3
  },
  props: {
    minOverlayWidthMatchTrigger: {
      type: Boolean,
      default: void 0
    },
    arrow: {
      type: Boolean,
      default: !1
    },
    prefixCls: ue.string.def("rc-dropdown"),
    transitionName: String,
    overlayClassName: ue.string.def(""),
    openClassName: String,
    animation: ue.any,
    align: ue.object,
    overlayStyle: {
      type: Object,
      default: void 0
    },
    placement: ue.string.def("bottomLeft"),
    overlay: ue.any,
    trigger: ue.oneOfType([ue.string, ue.arrayOf(ue.string)]).def("hover"),
    alignPoint: {
      type: Boolean,
      default: void 0
    },
    showAction: ue.array,
    hideAction: ue.array,
    getPopupContainer: Function,
    visible: {
      type: Boolean,
      default: void 0
    },
    defaultVisible: {
      type: Boolean,
      default: !1
    },
    mouseEnterDelay: ue.number.def(0.15),
    mouseLeaveDelay: ue.number.def(0.1)
  },
  emits: ["visibleChange", "overlayClick"],
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      expose: i
    } = t;
    const r = le(!!e.visible);
    Ie(() => e.visible, (p) => {
      p !== void 0 && (r.value = p);
    });
    const a = le();
    i({
      triggerRef: a
    });
    const l = (p) => {
      e.visible === void 0 && (r.value = !1), o("overlayClick", p);
    }, s = (p) => {
      e.visible === void 0 && (r.value = p), o("visibleChange", p);
    }, u = () => {
      var p;
      const m = (p = n.overlay) === null || p === void 0 ? void 0 : p.call(n), b = {
        prefixCls: `${e.prefixCls}-menu`,
        onClick: l
      };
      return v(Ve, {
        key: hS
      }, [e.arrow && v("div", {
        class: `${e.prefixCls}-arrow`
      }, null), An(m, b, !1)]);
    }, c = R(() => {
      const {
        minOverlayWidthMatchTrigger: p = !e.alignPoint
      } = e;
      return p;
    }), d = () => {
      var p;
      const m = (p = n.default) === null || p === void 0 ? void 0 : p.call(n);
      return r.value && m ? An(m[0], {
        class: e.openClassName || `${e.prefixCls}-open`
      }, !1) : m;
    }, f = R(() => !e.hideAction && e.trigger.indexOf("contextmenu") !== -1 ? ["click"] : e.hideAction);
    return () => {
      const {
        prefixCls: p,
        arrow: m,
        showAction: b,
        overlayStyle: y,
        trigger: S,
        placement: C,
        align: O,
        getPopupContainer: $,
        transitionName: P,
        animation: k,
        overlayClassName: x
      } = e, E = d4(e, ["prefixCls", "arrow", "showAction", "overlayStyle", "trigger", "placement", "align", "getPopupContainer", "transitionName", "animation", "overlayClassName"]);
      return v(Zu, Z(Z({}, E), {}, {
        prefixCls: p,
        ref: a,
        popupClassName: Te(x, {
          [`${p}-show-arrow`]: m
        }),
        popupStyle: y,
        builtinPlacements: c4,
        action: S,
        showAction: b,
        hideAction: f.value || [],
        popupPlacement: C,
        popupAlign: O,
        popupTransitionName: P,
        popupAnimation: k,
        popupVisible: r.value,
        stretch: c.value ? "minWidth" : "",
        onPopupVisibleChange: s,
        getPopupContainer: $
      }), {
        popup: u,
        default: d
      });
    };
  }
}), f4 = (e) => {
  const {
    componentCls: t,
    colorPrimary: n
  } = e;
  return {
    [t]: {
      position: "absolute",
      background: "transparent",
      pointerEvents: "none",
      boxSizing: "border-box",
      color: `var(--wave-color, ${n})`,
      boxShadow: "0 0 0 0 currentcolor",
      opacity: 0.2,
      // =================== Motion ===================
      "&.wave-motion-appear": {
        transition: [`box-shadow 0.4s ${e.motionEaseOutCirc}`, `opacity 2s ${e.motionEaseOutCirc}`].join(","),
        "&-active": {
          boxShadow: "0 0 0 6px currentcolor",
          opacity: 0
        }
      }
    }
  };
}, p4 = nn("Wave", (e) => [f4(e)]);
function g4(e) {
  const t = (e || "").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);
  return t && t[1] && t[2] && t[3] ? !(t[1] === t[2] && t[2] === t[3]) : !0;
}
function _p(e) {
  return e && e !== "#fff" && e !== "#ffffff" && e !== "rgb(255, 255, 255)" && e !== "rgba(255, 255, 255, 1)" && g4(e) && !/rgba\((?:\d*, ){3}0\)/.test(e) && // any transparent rgba color
  e !== "transparent";
}
function h4(e) {
  const {
    borderTopColor: t,
    borderColor: n,
    backgroundColor: o
  } = getComputedStyle(e);
  return _p(t) ? t : _p(n) ? n : _p(o) ? o : null;
}
function Ap(e) {
  return Number.isNaN(e) ? 0 : e;
}
const v4 = ye({
  props: {
    target: Ct(),
    className: String
  },
  setup(e) {
    const t = Pe(null), [n, o] = On(null), [i, r] = On([]), [a, l] = On(0), [s, u] = On(0), [c, d] = On(0), [f, p] = On(0), [m, b] = On(!1);
    function y() {
      const {
        target: x
      } = e, E = getComputedStyle(x);
      o(h4(x));
      const z = E.position === "static", {
        borderLeftWidth: N,
        borderTopWidth: D
      } = E;
      l(z ? x.offsetLeft : Ap(-parseFloat(N))), u(z ? x.offsetTop : Ap(-parseFloat(D))), d(x.offsetWidth), p(x.offsetHeight);
      const {
        borderTopLeftRadius: W,
        borderTopRightRadius: H,
        borderBottomLeftRadius: L,
        borderBottomRightRadius: A
      } = E;
      r([W, H, A, L].map((U) => Ap(parseFloat(U))));
    }
    let S, C, O;
    const $ = () => {
      clearTimeout(O), Mt.cancel(C), S?.disconnect();
    }, P = () => {
      var x;
      const E = (x = t.value) === null || x === void 0 ? void 0 : x.parentElement;
      E && (Ia(null, E), E.parentElement && E.parentElement.removeChild(E));
    };
    Pt(() => {
      $(), O = setTimeout(() => {
        P();
      }, 5e3);
      const {
        target: x
      } = e;
      x && (C = Mt(() => {
        y(), b(!0);
      }), typeof ResizeObserver < "u" && (S = new ResizeObserver(y), S.observe(x)));
    }), At(() => {
      $();
    });
    const k = (x) => {
      x.propertyName === "opacity" && P();
    };
    return () => {
      if (!m.value)
        return null;
      const x = {
        left: `${a.value}px`,
        top: `${s.value}px`,
        width: `${c.value}px`,
        height: `${f.value}px`,
        borderRadius: i.value.map((E) => `${E}px`).join(" ")
      };
      return n && (x["--wave-color"] = n.value), v(Ti, {
        appear: !0,
        name: "wave-motion",
        appearFromClass: "wave-motion-appear",
        appearActiveClass: "wave-motion-appear",
        appearToClass: "wave-motion-appear wave-motion-appear-active"
      }, {
        default: () => [v("div", {
          ref: t,
          class: e.className,
          style: x,
          onTransitionend: k
        }, null)]
      });
    };
  }
});
function m4(e, t) {
  const n = document.createElement("div");
  return n.style.position = "absolute", n.style.left = "0px", n.style.top = "0px", e?.insertBefore(n, e?.firstChild), Ia(v(v4, {
    target: e,
    className: t
  }, null), n), () => {
    Ia(null, n), n.parentElement && n.parentElement.removeChild(n);
  };
}
function b4(e, t) {
  const n = ci();
  let o;
  function i() {
    var r;
    const a = Br(n);
    o?.(), !(!((r = t?.value) === null || r === void 0) && r.disabled || !a) && (o = m4(a, e.value));
  }
  return At(() => {
    o?.();
  }), i;
}
const tm = ye({
  compatConfig: {
    MODE: 3
  },
  name: "Wave",
  props: {
    disabled: Boolean
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = ci(), {
      prefixCls: i,
      wave: r
    } = yt("wave", e), [, a] = p4(i), l = b4(R(() => Te(i.value, a.value)), r);
    let s;
    const u = () => {
      Br(o).removeEventListener("click", s, !0);
    };
    return Pt(() => {
      Ie(() => e.disabled, () => {
        u(), Nt(() => {
          const c = Br(o);
          c?.removeEventListener("click", s, !0), !(!c || c.nodeType !== 1 || e.disabled) && (s = (d) => {
            d.target.tagName === "INPUT" || !_v(d.target) || // No need wave
            !c.getAttribute || c.getAttribute("disabled") || c.disabled || c.className.includes("disabled") || c.className.includes("-leave") || l();
          }, c.addEventListener("click", s, !0));
        });
      }, {
        immediate: !0,
        flush: "post"
      });
    }), At(() => {
      u();
    }), () => {
      var c;
      return (c = n.default) === null || c === void 0 ? void 0 : c.call(n)[0];
    };
  }
});
function l$(e) {
  return e === "danger" ? {
    danger: !0
  } : {
    type: e
  };
}
const s$ = () => ({
  prefixCls: String,
  type: String,
  htmlType: {
    type: String,
    default: "button"
  },
  shape: {
    type: String
  },
  size: {
    type: String
  },
  loading: {
    type: [Boolean, Object],
    default: () => !1
  },
  disabled: {
    type: Boolean,
    default: void 0
  },
  ghost: {
    type: Boolean,
    default: void 0
  },
  block: {
    type: Boolean,
    default: void 0
  },
  danger: {
    type: Boolean,
    default: void 0
  },
  icon: ue.any,
  href: String,
  target: String,
  title: String,
  onClick: Cs(),
  onMousedown: Cs()
}), Ey = (e) => {
  e && (e.style.width = "0px", e.style.opacity = "0", e.style.transform = "scale(0)");
}, _y = (e) => {
  Nt(() => {
    e && (e.style.width = `${e.scrollWidth}px`, e.style.opacity = "1", e.style.transform = "scale(1)");
  });
}, Ay = (e) => {
  e && e.style && (e.style.width = null, e.style.opacity = null, e.style.transform = null);
}, y4 = ye({
  compatConfig: {
    MODE: 3
  },
  name: "LoadingIcon",
  props: {
    prefixCls: String,
    loading: [Boolean, Object],
    existIcon: Boolean
  },
  setup(e) {
    return () => {
      const {
        existIcon: t,
        prefixCls: n,
        loading: o
      } = e;
      if (t)
        return v("span", {
          class: `${n}-loading-icon`
        }, [v(yr, null, null)]);
      const i = !!o;
      return v(Ti, {
        name: `${n}-loading-icon-motion`,
        onBeforeEnter: Ey,
        onEnter: _y,
        onAfterEnter: Ay,
        onBeforeLeave: _y,
        onLeave: (r) => {
          setTimeout(() => {
            Ey(r);
          });
        },
        onAfterLeave: Ay
      }, {
        default: () => [i ? v("span", {
          class: `${n}-loading-icon`
        }, [v(yr, null, null)]) : null]
      });
    };
  }
}), Dy = (e, t) => ({
  // Border
  [`> span, > ${e}`]: {
    "&:not(:last-child)": {
      [`&, & > ${e}`]: {
        "&:not(:disabled)": {
          borderInlineEndColor: t
        }
      }
    },
    "&:not(:first-child)": {
      [`&, & > ${e}`]: {
        "&:not(:disabled)": {
          borderInlineStartColor: t
        }
      }
    }
  }
}), x4 = (e) => {
  const {
    componentCls: t,
    fontSize: n,
    lineWidth: o,
    colorPrimaryHover: i,
    colorErrorHover: r
  } = e;
  return {
    [`${t}-group`]: [
      {
        position: "relative",
        display: "inline-flex",
        // Border
        [`> span, > ${t}`]: {
          "&:not(:last-child)": {
            [`&, & > ${t}`]: {
              borderStartEndRadius: 0,
              borderEndEndRadius: 0
            }
          },
          "&:not(:first-child)": {
            marginInlineStart: -o,
            [`&, & > ${t}`]: {
              borderStartStartRadius: 0,
              borderEndStartRadius: 0
            }
          }
        },
        [t]: {
          position: "relative",
          zIndex: 1,
          "&:hover,\n          &:focus,\n          &:active": {
            zIndex: 2
          },
          "&[disabled]": {
            zIndex: 0
          }
        },
        [`${t}-icon-only`]: {
          fontSize: n
        }
      },
      // Border Color
      Dy(`${t}-primary`, i),
      Dy(`${t}-danger`, r)
    ]
  };
};
function w4(e, t) {
  return {
    // border collapse
    [`&-item:not(${t}-last-item)`]: {
      marginBottom: -e.lineWidth
    },
    "&-item": {
      "&:hover,&:focus,&:active": {
        zIndex: 2
      },
      "&[disabled]": {
        zIndex: 0
      }
    }
  };
}
function S4(e, t) {
  return {
    [`&-item:not(${t}-first-item):not(${t}-last-item)`]: {
      borderRadius: 0
    },
    [`&-item${t}-first-item:not(${t}-last-item)`]: {
      [`&, &${e}-sm, &${e}-lg`]: {
        borderEndEndRadius: 0,
        borderEndStartRadius: 0
      }
    },
    [`&-item${t}-last-item:not(${t}-first-item)`]: {
      [`&, &${e}-sm, &${e}-lg`]: {
        borderStartStartRadius: 0,
        borderStartEndRadius: 0
      }
    }
  };
}
function C4(e) {
  const t = `${e.componentCls}-compact-vertical`;
  return {
    [t]: I(I({}, w4(e, t)), S4(e.componentCls, t))
  };
}
const $4 = (e) => {
  const {
    componentCls: t,
    iconCls: n
  } = e;
  return {
    [t]: {
      outline: "none",
      position: "relative",
      display: "inline-block",
      fontWeight: 400,
      whiteSpace: "nowrap",
      textAlign: "center",
      backgroundImage: "none",
      backgroundColor: "transparent",
      border: `${e.lineWidth}px ${e.lineType} transparent`,
      cursor: "pointer",
      transition: `all ${e.motionDurationMid} ${e.motionEaseInOut}`,
      userSelect: "none",
      touchAction: "manipulation",
      lineHeight: e.lineHeight,
      color: e.colorText,
      "> span": {
        display: "inline-block"
      },
      // Leave a space between icon and text.
      [`> ${n} + span, > span + ${n}`]: {
        marginInlineStart: e.marginXS
      },
      "> a": {
        color: "currentColor"
      },
      "&:not(:disabled)": I({}, bl(e)),
      // make `btn-icon-only` not too narrow
      [`&-icon-only${t}-compact-item`]: {
        flex: "none"
      },
      // Special styles for Primary Button
      [`&-compact-item${t}-primary`]: {
        [`&:not([disabled]) + ${t}-compact-item${t}-primary:not([disabled])`]: {
          position: "relative",
          "&:before": {
            position: "absolute",
            top: -e.lineWidth,
            insetInlineStart: -e.lineWidth,
            display: "inline-block",
            width: e.lineWidth,
            height: `calc(100% + ${e.lineWidth * 2}px)`,
            backgroundColor: e.colorPrimaryHover,
            content: '""'
          }
        }
      },
      // Special styles for Primary Button
      "&-compact-vertical-item": {
        [`&${t}-primary`]: {
          [`&:not([disabled]) + ${t}-compact-vertical-item${t}-primary:not([disabled])`]: {
            position: "relative",
            "&:before": {
              position: "absolute",
              top: -e.lineWidth,
              insetInlineStart: -e.lineWidth,
              display: "inline-block",
              width: `calc(100% + ${e.lineWidth * 2}px)`,
              height: e.lineWidth,
              backgroundColor: e.colorPrimaryHover,
              content: '""'
            }
          }
        }
      }
    }
  };
}, Yr = (e, t) => ({
  "&:not(:disabled)": {
    "&:hover": e,
    "&:active": t
  }
}), P4 = (e) => ({
  minWidth: e.controlHeight,
  paddingInlineStart: 0,
  paddingInlineEnd: 0,
  borderRadius: "50%"
}), O4 = (e) => ({
  borderRadius: e.controlHeight,
  paddingInlineStart: e.controlHeight / 2,
  paddingInlineEnd: e.controlHeight / 2
}), ch = (e) => ({
  cursor: "not-allowed",
  borderColor: e.colorBorder,
  color: e.colorTextDisabled,
  backgroundColor: e.colorBgContainerDisabled,
  boxShadow: "none"
}), Bd = (e, t, n, o, i, r, a) => ({
  [`&${e}-background-ghost`]: I(I({
    color: t || void 0,
    backgroundColor: "transparent",
    borderColor: n || void 0,
    boxShadow: "none"
  }, Yr(I({
    backgroundColor: "transparent"
  }, r), I({
    backgroundColor: "transparent"
  }, a))), {
    "&:disabled": {
      cursor: "not-allowed",
      color: o || void 0,
      borderColor: i || void 0
    }
  })
}), nm = (e) => ({
  "&:disabled": I({}, ch(e))
}), u$ = (e) => I({}, nm(e)), Ld = (e) => ({
  "&:disabled": {
    cursor: "not-allowed",
    color: e.colorTextDisabled
  }
}), c$ = (e) => I(I(I(I(I({}, u$(e)), {
  backgroundColor: e.colorBgContainer,
  borderColor: e.colorBorder,
  boxShadow: `0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`
}), Yr({
  color: e.colorPrimaryHover,
  borderColor: e.colorPrimaryHover
}, {
  color: e.colorPrimaryActive,
  borderColor: e.colorPrimaryActive
})), Bd(e.componentCls, e.colorBgContainer, e.colorBgContainer, e.colorTextDisabled, e.colorBorder)), {
  [`&${e.componentCls}-dangerous`]: I(I(I({
    color: e.colorError,
    borderColor: e.colorError
  }, Yr({
    color: e.colorErrorHover,
    borderColor: e.colorErrorBorderHover
  }, {
    color: e.colorErrorActive,
    borderColor: e.colorErrorActive
  })), Bd(e.componentCls, e.colorError, e.colorError, e.colorTextDisabled, e.colorBorder)), nm(e))
}), I4 = (e) => I(I(I(I(I({}, u$(e)), {
  color: e.colorTextLightSolid,
  backgroundColor: e.colorPrimary,
  boxShadow: `0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`
}), Yr({
  color: e.colorTextLightSolid,
  backgroundColor: e.colorPrimaryHover
}, {
  color: e.colorTextLightSolid,
  backgroundColor: e.colorPrimaryActive
})), Bd(e.componentCls, e.colorPrimary, e.colorPrimary, e.colorTextDisabled, e.colorBorder, {
  color: e.colorPrimaryHover,
  borderColor: e.colorPrimaryHover
}, {
  color: e.colorPrimaryActive,
  borderColor: e.colorPrimaryActive
})), {
  [`&${e.componentCls}-dangerous`]: I(I(I({
    backgroundColor: e.colorError,
    boxShadow: `0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`
  }, Yr({
    backgroundColor: e.colorErrorHover
  }, {
    backgroundColor: e.colorErrorActive
  })), Bd(e.componentCls, e.colorError, e.colorError, e.colorTextDisabled, e.colorBorder, {
    color: e.colorErrorHover,
    borderColor: e.colorErrorHover
  }, {
    color: e.colorErrorActive,
    borderColor: e.colorErrorActive
  })), nm(e))
}), M4 = (e) => I(I({}, c$(e)), {
  borderStyle: "dashed"
}), T4 = (e) => I(I(I({
  color: e.colorLink
}, Yr({
  color: e.colorLinkHover
}, {
  color: e.colorLinkActive
})), Ld(e)), {
  [`&${e.componentCls}-dangerous`]: I(I({
    color: e.colorError
  }, Yr({
    color: e.colorErrorHover
  }, {
    color: e.colorErrorActive
  })), Ld(e))
}), k4 = (e) => I(I(I({}, Yr({
  color: e.colorText,
  backgroundColor: e.colorBgTextHover
}, {
  color: e.colorText,
  backgroundColor: e.colorBgTextActive
})), Ld(e)), {
  [`&${e.componentCls}-dangerous`]: I(I({
    color: e.colorError
  }, Ld(e)), Yr({
    color: e.colorErrorHover,
    backgroundColor: e.colorErrorBg
  }, {
    color: e.colorErrorHover,
    backgroundColor: e.colorErrorBg
  }))
}), E4 = (e) => I(I({}, ch(e)), {
  [`&${e.componentCls}:hover`]: I({}, ch(e))
}), _4 = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-default`]: c$(e),
    [`${t}-primary`]: I4(e),
    [`${t}-dashed`]: M4(e),
    [`${t}-link`]: T4(e),
    [`${t}-text`]: k4(e),
    [`${t}-disabled`]: E4(e)
  };
}, om = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
  const {
    componentCls: n,
    iconCls: o,
    controlHeight: i,
    fontSize: r,
    lineHeight: a,
    lineWidth: l,
    borderRadius: s,
    buttonPaddingHorizontal: u
  } = e, c = Math.max(0, (i - r * a) / 2 - l), d = u - l, f = `${n}-icon-only`;
  return [
    // Size
    {
      [`${n}${t}`]: {
        fontSize: r,
        height: i,
        padding: `${c}px ${d}px`,
        borderRadius: s,
        [`&${f}`]: {
          width: i,
          paddingInlineStart: 0,
          paddingInlineEnd: 0,
          [`&${n}-round`]: {
            width: "auto"
          },
          "> span": {
            transform: "scale(1.143)"
            // 14px -> 16px
          }
        },
        // Loading
        [`&${n}-loading`]: {
          opacity: e.opacityLoading,
          cursor: "default"
        },
        [`${n}-loading-icon`]: {
          transition: `width ${e.motionDurationSlow} ${e.motionEaseInOut}, opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`
        },
        [`&:not(${f}) ${n}-loading-icon > ${o}`]: {
          marginInlineEnd: e.marginXS
        }
      }
    },
    // Shape - patch prefixCls again to override solid border radius style
    {
      [`${n}${n}-circle${t}`]: P4(e)
    },
    {
      [`${n}${n}-round${t}`]: O4(e)
    }
  ];
}, A4 = (e) => om(e), D4 = (e) => {
  const t = _t(e, {
    controlHeight: e.controlHeightSM,
    padding: e.paddingXS,
    buttonPaddingHorizontal: 8,
    borderRadius: e.borderRadiusSM
  });
  return om(t, `${e.componentCls}-sm`);
}, z4 = (e) => {
  const t = _t(e, {
    controlHeight: e.controlHeightLG,
    fontSize: e.fontSizeLG,
    borderRadius: e.borderRadiusLG
  });
  return om(t, `${e.componentCls}-lg`);
}, R4 = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [t]: {
      [`&${t}-block`]: {
        width: "100%"
      }
    }
  };
}, N4 = nn("Button", (e) => {
  const {
    controlTmpOutline: t,
    paddingContentHorizontal: n
  } = e, o = _t(e, {
    colorOutlineDefault: t,
    buttonPaddingHorizontal: n
  });
  return [
    // Shared
    $4(o),
    // Size
    D4(o),
    A4(o),
    z4(o),
    // Block
    R4(o),
    // Group (type, ghost, danger, disabled, loading)
    _4(o),
    // Button Group
    x4(o),
    // Space Compact
    ec(e, {
      focus: !1
    }),
    C4(e)
  ];
}), B4 = () => ({
  prefixCls: String,
  size: {
    type: String
  }
}), d$ = Yv(), dh = ye({
  compatConfig: {
    MODE: 3
  },
  name: "AButtonGroup",
  props: B4(),
  setup(e, t) {
    let {
      slots: n
    } = t;
    const {
      prefixCls: o,
      direction: i
    } = yt("btn-group", e), [, , r] = Hs();
    d$.useProvide(Dn({
      size: R(() => e.size)
    }));
    const a = R(() => {
      const {
        size: l
      } = e;
      let s = "";
      switch (l) {
        case "large":
          s = "lg";
          break;
        case "small":
          s = "sm";
          break;
        case "middle":
        case void 0:
          break;
        default:
          Fn(!l, "Button.Group", "Invalid prop `size`.");
      }
      return {
        [`${o.value}`]: !0,
        [`${o.value}-${s}`]: s,
        [`${o.value}-rtl`]: i.value === "rtl",
        [r.value]: !0
      };
    });
    return () => {
      var l;
      return v("div", {
        class: a.value
      }, [no((l = n.default) === null || l === void 0 ? void 0 : l.call(n))]);
    };
  }
}), zy = /^[\u4e00-\u9fa5]{2}$/, Ry = zy.test.bind(zy);
function Bc(e) {
  return e === "text" || e === "link";
}
const $t = ye({
  compatConfig: {
    MODE: 3
  },
  name: "AButton",
  inheritAttrs: !1,
  __ANT_BUTTON: !0,
  props: wn(s$(), {
    type: "default"
  }),
  slots: Object,
  // emits: ['click', 'mousedown'],
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      emit: i,
      expose: r
    } = t;
    const {
      prefixCls: a,
      autoInsertSpaceInButton: l,
      direction: s,
      size: u
    } = yt("btn", e), [c, d] = N4(a), f = d$.useInject(), p = Ji(), m = R(() => {
      var A;
      return (A = e.disabled) !== null && A !== void 0 ? A : p.value;
    }), b = Pe(null), y = Pe(void 0);
    let S = !1;
    const C = Pe(!1), O = Pe(!1), $ = R(() => l.value !== !1), {
      compactSize: P,
      compactItemClassnames: k
    } = Vs(a, s), x = R(() => typeof e.loading == "object" && e.loading.delay ? e.loading.delay || !0 : !!e.loading);
    Ie(x, (A) => {
      clearTimeout(y.value), typeof x.value == "number" ? y.value = setTimeout(() => {
        C.value = A;
      }, x.value) : C.value = A;
    }, {
      immediate: !0
    });
    const E = R(() => {
      const {
        type: A,
        shape: U = "default",
        ghost: j,
        block: re,
        danger: G
      } = e, Y = a.value, K = {
        large: "lg",
        small: "sm",
        middle: void 0
      }, J = P.value || f?.size || u.value, be = J && K[J] || "";
      return [k.value, {
        [d.value]: !0,
        [`${Y}`]: !0,
        [`${Y}-${U}`]: U !== "default" && U,
        [`${Y}-${A}`]: A,
        [`${Y}-${be}`]: be,
        [`${Y}-loading`]: C.value,
        [`${Y}-background-ghost`]: j && !Bc(A),
        [`${Y}-two-chinese-chars`]: O.value && $.value,
        [`${Y}-block`]: re,
        [`${Y}-dangerous`]: !!G,
        [`${Y}-rtl`]: s.value === "rtl"
      }];
    }), z = () => {
      const A = b.value;
      if (!A || l.value === !1)
        return;
      const U = A.textContent;
      S && Ry(U) ? O.value || (O.value = !0) : O.value && (O.value = !1);
    }, N = (A) => {
      if (C.value || m.value) {
        A.preventDefault();
        return;
      }
      i("click", A);
    }, D = (A) => {
      i("mousedown", A);
    }, W = (A, U) => {
      const j = U ? " " : "";
      if (A.type === rw) {
        let re = A.children.trim();
        return Ry(re) && (re = re.split("").join(j)), v("span", null, [re]);
      }
      return A;
    };
    return Lt(() => {
      Fn(!(e.ghost && Bc(e.type)), "Button", "`link` or `text` button can't be a `ghost` button.");
    }), Pt(z), Ds(z), At(() => {
      y.value && clearTimeout(y.value);
    }), r({
      focus: () => {
        var A;
        (A = b.value) === null || A === void 0 || A.focus();
      },
      blur: () => {
        var A;
        (A = b.value) === null || A === void 0 || A.blur();
      }
    }), () => {
      var A, U;
      const {
        icon: j = (A = n.icon) === null || A === void 0 ? void 0 : A.call(n)
      } = e, re = no((U = n.default) === null || U === void 0 ? void 0 : U.call(n));
      S = re.length === 1 && !j && !Bc(e.type);
      const {
        type: G,
        htmlType: Y,
        href: K,
        title: J,
        target: be
      } = e, xe = C.value ? "loading" : j, ge = I(I({}, o), {
        title: J,
        disabled: m.value,
        class: [E.value, o.class, {
          [`${a.value}-icon-only`]: re.length === 0 && !!xe
        }],
        onClick: N,
        onMousedown: D
      });
      m.value || delete ge.disabled;
      const de = j && !C.value ? j : v(y4, {
        existIcon: !!j,
        prefixCls: a.value,
        loading: !!C.value
      }, null), ne = re.map((ae) => W(ae, S && $.value));
      if (K !== void 0)
        return c(v("a", Z(Z({}, ge), {}, {
          href: K,
          target: be,
          ref: b
        }), [de, ne]));
      let we = v("button", Z(Z({}, ge), {}, {
        ref: b,
        type: Y
      }), [de, ne]);
      if (!Bc(G)) {
        const ae = /* @__PURE__ */ (function() {
          return we;
        })();
        we = v(tm, {
          ref: "wave",
          disabled: !!C.value
        }, {
          default: () => [ae]
        });
      }
      return c(we);
    };
  }
});
$t.Group = dh;
$t.install = function(e) {
  return e.component($t.name, $t), e.component(dh.name, dh), e;
};
const f$ = () => ({
  arrow: tn([Boolean, Object]),
  trigger: {
    type: [Array, String]
  },
  menu: Ct(),
  overlay: ue.any,
  /** @deprecated Please use `open` instead */
  visible: st(),
  open: st(),
  disabled: st(),
  danger: st(),
  autofocus: st(),
  align: Ct(),
  getPopupContainer: Function,
  prefixCls: String,
  transitionName: String,
  placement: String,
  overlayClassName: String,
  overlayStyle: Ct(),
  forceRender: st(),
  mouseEnterDelay: Number,
  mouseLeaveDelay: Number,
  openClassName: String,
  minOverlayWidthMatchTrigger: st(),
  destroyPopupOnHide: st(),
  /** @deprecated Please use `onOpenChange` instead */
  onVisibleChange: {
    type: Function
  },
  /** @deprecated Please use `onUpdate:open` instead */
  "onUpdate:visible": {
    type: Function
  },
  onOpenChange: {
    type: Function
  },
  "onUpdate:open": {
    type: Function
  }
}), Dp = s$(), L4 = () => I(I({}, f$()), {
  type: Dp.type,
  size: String,
  htmlType: Dp.htmlType,
  href: String,
  disabled: st(),
  prefixCls: String,
  icon: ue.any,
  title: String,
  loading: Dp.loading,
  onClick: Cs()
});
var F4 = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, name: "ellipsis", theme: "outlined" };
function Ny(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      H4(e, i, n[i]);
    });
  }
  return e;
}
function H4(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var tc = function(t, n) {
  var o = Ny({}, t, n.attrs);
  return v(pn, Ny({}, o, {
    icon: F4
  }), null);
};
tc.displayName = "EllipsisOutlined";
tc.inheritAttrs = !1;
const V4 = (e) => {
  const {
    componentCls: t,
    antCls: n,
    paddingXS: o,
    opacityLoading: i
  } = e;
  return {
    [`${t}-button`]: {
      whiteSpace: "nowrap",
      [`&${n}-btn-group > ${n}-btn`]: {
        [`&-loading, &-loading + ${n}-btn`]: {
          cursor: "default",
          pointerEvents: "none",
          opacity: i
        },
        [`&:last-child:not(:first-child):not(${n}-btn-icon-only)`]: {
          paddingInline: o
        }
      }
    }
  };
}, j4 = (e) => {
  const {
    componentCls: t,
    menuCls: n,
    colorError: o,
    colorTextLightSolid: i
  } = e, r = `${n}-item`;
  return {
    [`${t}, ${t}-menu-submenu`]: {
      [`${n} ${r}`]: {
        [`&${r}-danger:not(${r}-disabled)`]: {
          color: o,
          "&:hover": {
            color: i,
            backgroundColor: o
          }
        }
      }
    }
  };
}, W4 = (e) => {
  const {
    componentCls: t,
    menuCls: n,
    zIndexPopup: o,
    dropdownArrowDistance: i,
    dropdownArrowOffset: r,
    sizePopupArrow: a,
    antCls: l,
    iconCls: s,
    motionDurationMid: u,
    dropdownPaddingVertical: c,
    fontSize: d,
    dropdownEdgeChildPadding: f,
    colorTextDisabled: p,
    fontSizeIcon: m,
    controlPaddingHorizontal: b,
    colorBgElevated: y,
    boxShadowPopoverArrow: S
  } = e;
  return [
    {
      [t]: I(I({}, Zt(e)), {
        position: "absolute",
        top: -9999,
        left: {
          _skip_check_: !0,
          value: -9999
        },
        zIndex: o,
        display: "block",
        // A placeholder out of dropdown visible range to avoid close when user moving
        "&::before": {
          position: "absolute",
          insetBlock: -i + a / 2,
          // insetInlineStart: -7, // FIXME: Seems not work for hidden element
          zIndex: -9999,
          opacity: 1e-4,
          content: '""'
        },
        [`${t}-wrap`]: {
          position: "relative",
          [`${l}-btn > ${s}-down`]: {
            fontSize: m
          },
          [`${s}-down::before`]: {
            transition: `transform ${u}`
          }
        },
        [`${t}-wrap-open`]: {
          [`${s}-down::before`]: {
            transform: "rotate(180deg)"
          }
        },
        "\n        &-hidden,\n        &-menu-hidden,\n        &-menu-submenu-hidden\n      ": {
          display: "none"
        },
        // =============================================================
        // ==                          Arrow                          ==
        // =============================================================
        // Offset the popover to account for the dropdown arrow
        [`
        &-show-arrow${t}-placement-topLeft,
        &-show-arrow${t}-placement-top,
        &-show-arrow${t}-placement-topRight
      `]: {
          paddingBottom: i
        },
        [`
        &-show-arrow${t}-placement-bottomLeft,
        &-show-arrow${t}-placement-bottom,
        &-show-arrow${t}-placement-bottomRight
      `]: {
          paddingTop: i
        },
        // Note: .popover-arrow is outer, .popover-arrow:after is inner
        [`${t}-arrow`]: I({
          position: "absolute",
          zIndex: 1,
          display: "block"
        }, yv(a, e.borderRadiusXS, e.borderRadiusOuter, y, S)),
        [`
        &-placement-top > ${t}-arrow,
        &-placement-topLeft > ${t}-arrow,
        &-placement-topRight > ${t}-arrow
      `]: {
          bottom: i,
          transform: "translateY(100%) rotate(180deg)"
        },
        [`&-placement-top > ${t}-arrow`]: {
          left: {
            _skip_check_: !0,
            value: "50%"
          },
          transform: "translateX(-50%) translateY(100%) rotate(180deg)"
        },
        [`&-placement-topLeft > ${t}-arrow`]: {
          left: {
            _skip_check_: !0,
            value: r
          }
        },
        [`&-placement-topRight > ${t}-arrow`]: {
          right: {
            _skip_check_: !0,
            value: r
          }
        },
        [`
          &-placement-bottom > ${t}-arrow,
          &-placement-bottomLeft > ${t}-arrow,
          &-placement-bottomRight > ${t}-arrow
        `]: {
          top: i,
          transform: "translateY(-100%)"
        },
        [`&-placement-bottom > ${t}-arrow`]: {
          left: {
            _skip_check_: !0,
            value: "50%"
          },
          transform: "translateY(-100%) translateX(-50%)"
        },
        [`&-placement-bottomLeft > ${t}-arrow`]: {
          left: {
            _skip_check_: !0,
            value: r
          }
        },
        [`&-placement-bottomRight > ${t}-arrow`]: {
          right: {
            _skip_check_: !0,
            value: r
          }
        },
        // =============================================================
        // ==                         Motion                          ==
        // =============================================================
        // When position is not enough for dropdown, the placement will revert.
        // We will handle this with revert motion name.
        [`&${l}-slide-down-enter${l}-slide-down-enter-active${t}-placement-bottomLeft,
          &${l}-slide-down-appear${l}-slide-down-appear-active${t}-placement-bottomLeft,
          &${l}-slide-down-enter${l}-slide-down-enter-active${t}-placement-bottom,
          &${l}-slide-down-appear${l}-slide-down-appear-active${t}-placement-bottom,
          &${l}-slide-down-enter${l}-slide-down-enter-active${t}-placement-bottomRight,
          &${l}-slide-down-appear${l}-slide-down-appear-active${t}-placement-bottomRight`]: {
          animationName: Pf
        },
        [`&${l}-slide-up-enter${l}-slide-up-enter-active${t}-placement-topLeft,
          &${l}-slide-up-appear${l}-slide-up-appear-active${t}-placement-topLeft,
          &${l}-slide-up-enter${l}-slide-up-enter-active${t}-placement-top,
          &${l}-slide-up-appear${l}-slide-up-appear-active${t}-placement-top,
          &${l}-slide-up-enter${l}-slide-up-enter-active${t}-placement-topRight,
          &${l}-slide-up-appear${l}-slide-up-appear-active${t}-placement-topRight`]: {
          animationName: If
        },
        [`&${l}-slide-down-leave${l}-slide-down-leave-active${t}-placement-bottomLeft,
          &${l}-slide-down-leave${l}-slide-down-leave-active${t}-placement-bottom,
          &${l}-slide-down-leave${l}-slide-down-leave-active${t}-placement-bottomRight`]: {
          animationName: Of
        },
        [`&${l}-slide-up-leave${l}-slide-up-leave-active${t}-placement-topLeft,
          &${l}-slide-up-leave${l}-slide-up-leave-active${t}-placement-top,
          &${l}-slide-up-leave${l}-slide-up-leave-active${t}-placement-topRight`]: {
          animationName: Mf
        }
      })
    },
    {
      // =============================================================
      // ==                          Menu                           ==
      // =============================================================
      [`${t} ${n}`]: {
        position: "relative",
        margin: 0
      },
      [`${n}-submenu-popup`]: {
        position: "absolute",
        zIndex: o,
        background: "transparent",
        boxShadow: "none",
        transformOrigin: "0 0",
        "ul,li": {
          listStyle: "none"
        },
        ul: {
          marginInline: "0.3em"
        }
      },
      [`${t}, ${t}-menu-submenu`]: {
        [n]: I(I({
          padding: f,
          listStyleType: "none",
          backgroundColor: y,
          backgroundClip: "padding-box",
          borderRadius: e.borderRadiusLG,
          outline: "none",
          boxShadow: e.boxShadowSecondary
        }, bl(e)), {
          [`${n}-item-group-title`]: {
            padding: `${c}px ${b}px`,
            color: e.colorTextDescription,
            transition: `all ${u}`
          },
          // ======================= Item Content =======================
          [`${n}-item`]: {
            position: "relative",
            display: "flex",
            alignItems: "center",
            borderRadius: e.borderRadiusSM
          },
          [`${n}-item-icon`]: {
            minWidth: d,
            marginInlineEnd: e.marginXS,
            fontSize: e.fontSizeSM
          },
          [`${n}-title-content`]: {
            flex: "auto",
            "> a": {
              color: "inherit",
              transition: `all ${u}`,
              "&:hover": {
                color: "inherit"
              },
              "&::after": {
                position: "absolute",
                inset: 0,
                content: '""'
              }
            }
          },
          // =========================== Item ===========================
          [`${n}-item, ${n}-submenu-title`]: I(I({
            clear: "both",
            margin: 0,
            padding: `${c}px ${b}px`,
            color: e.colorText,
            fontWeight: "normal",
            fontSize: d,
            lineHeight: e.lineHeight,
            cursor: "pointer",
            transition: `all ${u}`,
            "&:hover, &-active": {
              backgroundColor: e.controlItemBgHover
            }
          }, bl(e)), {
            "&-selected": {
              color: e.colorPrimary,
              backgroundColor: e.controlItemBgActive,
              "&:hover, &-active": {
                backgroundColor: e.controlItemBgActiveHover
              }
            },
            "&-disabled": {
              color: p,
              cursor: "not-allowed",
              "&:hover": {
                color: p,
                backgroundColor: y,
                cursor: "not-allowed"
              },
              a: {
                pointerEvents: "none"
              }
            },
            "&-divider": {
              height: 1,
              margin: `${e.marginXXS}px 0`,
              overflow: "hidden",
              lineHeight: 0,
              backgroundColor: e.colorSplit
            },
            [`${t}-menu-submenu-expand-icon`]: {
              position: "absolute",
              insetInlineEnd: e.paddingXS,
              [`${t}-menu-submenu-arrow-icon`]: {
                marginInlineEnd: "0 !important",
                color: e.colorTextDescription,
                fontSize: m,
                fontStyle: "normal"
              }
            }
          }),
          [`${n}-item-group-list`]: {
            margin: `0 ${e.marginXS}px`,
            padding: 0,
            listStyle: "none"
          },
          [`${n}-submenu-title`]: {
            paddingInlineEnd: b + e.fontSizeSM
          },
          [`${n}-submenu-vertical`]: {
            position: "relative"
          },
          [`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]: {
            [`&, ${t}-menu-submenu-arrow-icon`]: {
              color: p,
              backgroundColor: y,
              cursor: "not-allowed"
            }
          },
          // https://github.com/ant-design/ant-design/issues/19264
          [`${n}-submenu-selected ${t}-menu-submenu-title`]: {
            color: e.colorPrimary
          }
        })
      }
    },
    // Follow code may reuse in other components
    [xr(e, "slide-up"), xr(e, "slide-down"), Ts(e, "move-up"), Ts(e, "move-down"), Ju(e, "zoom-big")]
  ];
}, p$ = nn("Dropdown", (e, t) => {
  let {
    rootPrefixCls: n
  } = t;
  const {
    marginXXS: o,
    sizePopupArrow: i,
    controlHeight: r,
    fontSize: a,
    lineHeight: l,
    paddingXXS: s,
    componentCls: u,
    borderRadiusOuter: c,
    borderRadiusLG: d
  } = e, f = (r - a * l) / 2, {
    dropdownArrowOffset: p
  } = o$({
    sizePopupArrow: i,
    contentRadius: d,
    borderRadiusOuter: c
  }), m = _t(e, {
    menuCls: `${u}-menu`,
    rootPrefixCls: n,
    dropdownArrowDistance: i / 2 + o,
    dropdownArrowOffset: p,
    dropdownPaddingVertical: f,
    dropdownEdgeChildPadding: s
  });
  return [W4(m), V4(m), j4(m)];
}, (e) => ({
  zIndexPopup: e.zIndexPopupBase + 50
}));
var q4 = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const G4 = $t.Group, Fd = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ADropdownButton",
  inheritAttrs: !1,
  __ANT_BUTTON: !0,
  props: wn(L4(), {
    trigger: "hover",
    placement: "bottomRight",
    type: "default"
  }),
  // emits: ['click', 'visibleChange', 'update:visible'],s
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      emit: i
    } = t;
    const r = (f) => {
      i("update:visible", f), i("visibleChange", f), i("update:open", f), i("openChange", f);
    }, {
      prefixCls: a,
      direction: l,
      getPopupContainer: s
    } = yt("dropdown", e), u = R(() => `${a.value}-button`), [c, d] = p$(a);
    return () => {
      var f, p;
      const m = I(I({}, e), o), {
        type: b = "default",
        disabled: y,
        danger: S,
        loading: C,
        htmlType: O,
        class: $ = "",
        overlay: P = (f = n.overlay) === null || f === void 0 ? void 0 : f.call(n),
        trigger: k,
        align: x,
        open: E,
        visible: z,
        onVisibleChange: N,
        placement: D = l.value === "rtl" ? "bottomLeft" : "bottomRight",
        href: W,
        title: H,
        icon: L = ((p = n.icon) === null || p === void 0 ? void 0 : p.call(n)) || v(tc, null, null),
        mouseEnterDelay: A,
        mouseLeaveDelay: U,
        overlayClassName: j,
        overlayStyle: re,
        destroyPopupOnHide: G,
        onClick: Y,
        "onUpdate:open": K
      } = m, J = q4(m, ["type", "disabled", "danger", "loading", "htmlType", "class", "overlay", "trigger", "align", "open", "visible", "onVisibleChange", "placement", "href", "title", "icon", "mouseEnterDelay", "mouseLeaveDelay", "overlayClassName", "overlayStyle", "destroyPopupOnHide", "onClick", "onUpdate:open"]), be = {
        align: x,
        disabled: y,
        trigger: y ? [] : k,
        placement: D,
        getPopupContainer: s?.value,
        onOpenChange: r,
        mouseEnterDelay: A,
        mouseLeaveDelay: U,
        open: E ?? z,
        overlayClassName: j,
        overlayStyle: re,
        destroyPopupOnHide: G
      }, xe = v($t, {
        danger: S,
        type: b,
        disabled: y,
        loading: C,
        onClick: Y,
        htmlType: O,
        href: W,
        title: H
      }, {
        default: n.default
      }), ge = v($t, {
        danger: S,
        type: b,
        icon: L
      }, null);
      return c(v(G4, Z(Z({}, J), {}, {
        class: Te(u.value, $, d.value)
      }), {
        default: () => [n.leftButton ? n.leftButton({
          button: xe
        }) : xe, v(Ui, be, {
          default: () => [n.rightButton ? n.rightButton({
            button: ge
          }) : ge],
          overlay: () => P
        })]
      }));
    };
  }
});
var K4 = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z" } }] }, name: "right", theme: "outlined" };
function By(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      Y4(e, i, n[i]);
    });
  }
  return e;
}
function Y4(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Sl = function(t, n) {
  var o = By({}, t, n.attrs);
  return v(pn, By({}, o, {
    icon: K4
  }), null);
};
Sl.displayName = "RightOutlined";
Sl.inheritAttrs = !1;
const g$ = Symbol("OverrideContextKey"), h$ = () => Tt(g$, void 0), v$ = (e) => {
  var t, n, o;
  const {
    prefixCls: i,
    mode: r,
    selectable: a,
    validator: l,
    onClick: s,
    expandIcon: u
  } = h$() || {};
  kt(g$, {
    prefixCls: R(() => {
      var c, d;
      return (d = (c = e.prefixCls) === null || c === void 0 ? void 0 : c.value) !== null && d !== void 0 ? d : i?.value;
    }),
    mode: R(() => {
      var c, d;
      return (d = (c = e.mode) === null || c === void 0 ? void 0 : c.value) !== null && d !== void 0 ? d : r?.value;
    }),
    selectable: R(() => {
      var c, d;
      return (d = (c = e.selectable) === null || c === void 0 ? void 0 : c.value) !== null && d !== void 0 ? d : a?.value;
    }),
    validator: (t = e.validator) !== null && t !== void 0 ? t : l,
    onClick: (n = e.onClick) !== null && n !== void 0 ? n : s,
    expandIcon: (o = e.expandIcon) !== null && o !== void 0 ? o : u?.value
  });
}, Ui = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ADropdown",
  inheritAttrs: !1,
  props: wn(f$(), {
    mouseEnterDelay: 0.15,
    mouseLeaveDelay: 0.1,
    placement: "bottomLeft",
    trigger: "hover"
  }),
  // emits: ['visibleChange', 'update:visible'],
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      emit: i
    } = t;
    const {
      prefixCls: r,
      rootPrefixCls: a,
      direction: l,
      getPopupContainer: s
    } = yt("dropdown", e), [u, c] = p$(r);
    process.env.NODE_ENV !== "production" && [["visible", "open"], ["onVisibleChange", "onOpenChange"], ["onUpdate:visible", "onUpdate:open"]].forEach((y) => {
      let [S, C] = y;
      Zn(e[S] === void 0, "Dropdown", `\`${S}\` is deprecated which will be removed in next major version, please use \`${C}\` instead.`);
    });
    const d = R(() => {
      const {
        placement: y = "",
        transitionName: S
      } = e;
      return S !== void 0 ? S : y.includes("top") ? `${a.value}-slide-down` : `${a.value}-slide-up`;
    });
    v$({
      prefixCls: R(() => `${r.value}-menu`),
      expandIcon: R(() => v("span", {
        class: `${r.value}-menu-submenu-arrow`
      }, [v(Sl, {
        class: `${r.value}-menu-submenu-arrow-icon`
      }, null)])),
      mode: R(() => "vertical"),
      selectable: R(() => !1),
      onClick: () => {
      },
      validator: (y) => {
        let {
          mode: S
        } = y;
        Zn(!S || S === "vertical", "Dropdown", `mode="${S}" is not supported for Dropdown's Menu.`);
      }
    });
    const f = () => {
      var y, S, C;
      const O = e.overlay || ((y = n.overlay) === null || y === void 0 ? void 0 : y.call(n)), $ = Array.isArray(O) ? O[0] : O;
      if (!$) return null;
      const P = $.props || {};
      Fn(!P.mode || P.mode === "vertical", "Dropdown", `mode="${P.mode}" is not supported for Dropdown's Menu.`);
      const {
        selectable: k = !1,
        expandIcon: x = (C = (S = $.children) === null || S === void 0 ? void 0 : S.expandIcon) === null || C === void 0 ? void 0 : C.call(S)
      } = P, E = typeof x < "u" && Bo(x) ? x : v("span", {
        class: `${r.value}-menu-submenu-arrow`
      }, [v(Sl, {
        class: `${r.value}-menu-submenu-arrow-icon`
      }, null)]);
      return Bo($) ? An($, {
        mode: "vertical",
        selectable: k,
        expandIcon: () => E
      }) : $;
    }, p = R(() => {
      const y = e.placement;
      if (!y)
        return l.value === "rtl" ? "bottomRight" : "bottomLeft";
      if (y.includes("Center")) {
        const S = y.slice(0, y.indexOf("Center"));
        return Fn(!y.includes("Center"), "Dropdown", `You are using '${y}' placement in Dropdown, which is deprecated. Try to use '${S}' instead.`), S;
      }
      return y;
    }), m = R(() => typeof e.visible == "boolean" ? e.visible : e.open), b = (y) => {
      i("update:visible", y), i("visibleChange", y), i("update:open", y), i("openChange", y);
    };
    return () => {
      var y, S;
      const {
        arrow: C,
        trigger: O,
        disabled: $,
        overlayClassName: P
      } = e, k = (y = n.default) === null || y === void 0 ? void 0 : y.call(n)[0], x = An(k, I({
        class: Te((S = k?.props) === null || S === void 0 ? void 0 : S.class, {
          [`${r.value}-rtl`]: l.value === "rtl"
        }, `${r.value}-trigger`)
      }, $ ? {
        disabled: $
      } : {})), E = Te(P, c.value, {
        [`${r.value}-rtl`]: l.value === "rtl"
      }), z = $ ? [] : O;
      let N;
      z && z.includes("contextmenu") && (N = !0);
      const D = JC({
        arrowPointAtCenter: typeof C == "object" && C.pointAtCenter,
        autoAdjustOverflow: !0
      }), W = Tn(I(I(I({}, e), o), {
        visible: m.value,
        builtinPlacements: D,
        overlayClassName: E,
        arrow: !!C,
        alignPoint: N,
        prefixCls: r.value,
        getPopupContainer: s?.value,
        transitionName: d.value,
        trigger: z,
        onVisibleChange: b,
        placement: p.value
      }), ["overlay", "onUpdate:visible"]);
      return u(v(a$, W, {
        default: () => [x],
        overlay: f
      }));
    };
  }
});
Ui.Button = Fd;
function U4(e, t, n, o) {
  let i;
  if (i !== void 0)
    return !!i;
  if (e === t)
    return !0;
  if (typeof e != "object" || !e || typeof t != "object" || !t)
    return !1;
  const r = Object.keys(e), a = Object.keys(t);
  if (r.length !== a.length)
    return !1;
  const l = Object.prototype.hasOwnProperty.bind(t);
  for (let s = 0; s < r.length; s++) {
    const u = r[s];
    if (!l(u))
      return !1;
    const c = e[u], d = t[u];
    if (i = void 0, i === !1 || i === void 0 && c !== d)
      return !1;
  }
  return !0;
}
function Jl(e, t) {
  return U4(ii(e), ii(t));
}
const m$ = Symbol("menuContextKey"), b$ = (e) => {
  kt(m$, e);
}, Ur = () => Tt(m$), y$ = Symbol("ForceRenderKey"), X4 = (e) => {
  kt(y$, e);
}, x$ = () => Tt(y$, !1), w$ = Symbol("menuFirstLevelContextKey"), S$ = (e) => {
  kt(w$, e);
}, Q4 = () => Tt(w$, !0), Hd = ye({
  compatConfig: {
    MODE: 3
  },
  name: "MenuContextProvider",
  inheritAttrs: !1,
  props: {
    mode: {
      type: String,
      default: void 0
    },
    overflowDisabled: {
      type: Boolean,
      default: void 0
    }
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = Ur(), i = I({}, o);
    return e.mode !== void 0 && (i.mode = Ut(e, "mode")), e.overflowDisabled !== void 0 && (i.overflowDisabled = Ut(e, "overflowDisabled")), b$(i), () => {
      var r;
      return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
    };
  }
}), C$ = Symbol("siderCollapsed"), $$ = Symbol("siderHookProvider"), Lc = "$$__vc-menu-more__key", P$ = Symbol("KeyPathContext"), im = () => Tt(P$, {
  parentEventKeys: R(() => []),
  parentKeys: R(() => []),
  parentInfo: {}
}), Z4 = (e, t, n) => {
  const {
    parentEventKeys: o,
    parentKeys: i
  } = im(), r = R(() => [...o.value, e]), a = R(() => [...i.value, t]);
  return kt(P$, {
    parentEventKeys: r,
    parentKeys: a,
    parentInfo: n
  }), a;
}, O$ = Symbol("measure"), Ly = ye({
  compatConfig: {
    MODE: 3
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    return kt(O$, !0), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
}), rm = () => Tt(O$, !1);
function I$(e) {
  const {
    mode: t,
    rtl: n,
    inlineIndent: o
  } = Ur();
  return R(() => t.value !== "inline" ? null : n.value ? {
    paddingRight: `${e.value * o.value}px`
  } : {
    paddingLeft: `${e.value * o.value}px`
  });
}
let J4 = 0;
const e5 = () => ({
  id: String,
  role: String,
  disabled: Boolean,
  danger: Boolean,
  title: {
    type: [String, Boolean],
    default: void 0
  },
  icon: ue.any,
  onMouseenter: Function,
  onMouseleave: Function,
  onClick: Function,
  onKeydown: Function,
  onFocus: Function,
  // Internal user prop
  originItemValue: Ct()
}), ks = ye({
  compatConfig: {
    MODE: 3
  },
  name: "AMenuItem",
  inheritAttrs: !1,
  props: e5(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      attrs: i
    } = t;
    const r = ci(), a = rm(), l = typeof r.vnode.key == "symbol" ? String(r.vnode.key) : r.vnode.key;
    Fn(typeof r.vnode.key != "symbol", "MenuItem", `MenuItem \`:key="${String(l)}"\` not support Symbol type`);
    const s = `menu_item_${++J4}_$$_${l}`, {
      parentEventKeys: u,
      parentKeys: c
    } = im(), {
      prefixCls: d,
      activeKeys: f,
      disabled: p,
      changeActiveKeys: m,
      rtl: b,
      inlineCollapsed: y,
      siderCollapsed: S,
      onItemClick: C,
      selectedKeys: O,
      registerMenuInfo: $,
      unRegisterMenuInfo: P
    } = Ur(), k = Q4(), x = Pe(!1), E = R(() => [...c.value, l]);
    $(s, {
      eventKey: s,
      key: l,
      parentEventKeys: u,
      parentKeys: c,
      isLeaf: !0
    }), At(() => {
      P(s);
    }), Ie(f, () => {
      x.value = !!f.value.find((K) => K === l);
    }, {
      immediate: !0
    });
    const N = R(() => p.value || e.disabled), D = R(() => O.value.includes(l)), W = R(() => {
      const K = `${d.value}-item`;
      return {
        [`${K}`]: !0,
        [`${K}-danger`]: e.danger,
        [`${K}-active`]: x.value,
        [`${K}-selected`]: D.value,
        [`${K}-disabled`]: N.value
      };
    }), H = (K) => ({
      key: l,
      eventKey: s,
      keyPath: E.value,
      eventKeyPath: [...u.value, s],
      domEvent: K,
      item: I(I({}, e), i)
    }), L = (K) => {
      if (N.value)
        return;
      const J = H(K);
      o("click", K), C(J);
    }, A = (K) => {
      N.value || (m(E.value), o("mouseenter", K));
    }, U = (K) => {
      N.value || (m([]), o("mouseleave", K));
    }, j = (K) => {
      if (o("keydown", K), K.which === Xe.ENTER) {
        const J = H(K);
        o("click", K), C(J);
      }
    }, re = (K) => {
      m(E.value), o("focus", K);
    }, G = (K, J) => {
      const be = v("span", {
        class: `${d.value}-title-content`
      }, [J]);
      return (!K || Bo(J) && J.type === "span") && J && y.value && k && typeof J == "string" ? v("div", {
        class: `${d.value}-inline-collapsed-noicon`
      }, [J.charAt(0)]) : be;
    }, Y = I$(R(() => E.value.length));
    return () => {
      var K, J, be, xe, ge;
      if (a) return null;
      const de = (K = e.title) !== null && K !== void 0 ? K : (J = n.title) === null || J === void 0 ? void 0 : J.call(n), ne = no((be = n.default) === null || be === void 0 ? void 0 : be.call(n)), we = ne.length;
      let ae = de;
      typeof de > "u" ? ae = k && we ? ne : "" : de === !1 && (ae = "");
      const se = {
        title: ae
      };
      !S.value && !y.value && (se.title = null, se.open = !1);
      const he = {};
      e.role === "option" && (he["aria-selected"] = D.value);
      const Me = (xe = e.icon) !== null && xe !== void 0 ? xe : (ge = n.icon) === null || ge === void 0 ? void 0 : ge.call(n, e);
      return v(xo, Z(Z({}, se), {}, {
        placement: b.value ? "left" : "right",
        overlayClassName: `${d.value}-inline-collapsed-tooltip`
      }), {
        default: () => [v(jr.Item, Z(Z(Z({
          component: "li"
        }, i), {}, {
          id: e.id,
          style: I(I({}, i.style || {}), Y.value),
          class: [W.value, {
            [`${i.class}`]: !!i.class,
            [`${d.value}-item-only-child`]: (Me ? we + 1 : we) === 1
          }],
          role: e.role || "menuitem",
          tabindex: e.disabled ? null : -1,
          "data-menu-id": l,
          "aria-disabled": e.disabled
        }, he), {}, {
          onMouseenter: A,
          onMouseleave: U,
          onClick: L,
          onKeydown: j,
          onFocus: re,
          title: typeof de == "string" ? de : void 0
        }), {
          default: () => [An(typeof Me == "function" ? Me(e.originItemValue) : Me, {
            class: `${d.value}-item-icon`
          }, !1), G(Me, ne)]
        })]
      });
    };
  }
}), Sa = {
  adjustX: 1,
  adjustY: 1
}, t5 = {
  topLeft: {
    points: ["bl", "tl"],
    overflow: Sa,
    offset: [0, -7]
  },
  bottomLeft: {
    points: ["tl", "bl"],
    overflow: Sa,
    offset: [0, 7]
  },
  leftTop: {
    points: ["tr", "tl"],
    overflow: Sa,
    offset: [-4, 0]
  },
  rightTop: {
    points: ["tl", "tr"],
    overflow: Sa,
    offset: [4, 0]
  }
}, n5 = {
  topLeft: {
    points: ["bl", "tl"],
    overflow: Sa,
    offset: [0, -7]
  },
  bottomLeft: {
    points: ["tl", "bl"],
    overflow: Sa,
    offset: [0, 7]
  },
  rightTop: {
    points: ["tr", "tl"],
    overflow: Sa,
    offset: [-4, 0]
  },
  leftTop: {
    points: ["tl", "tr"],
    overflow: Sa,
    offset: [4, 0]
  }
}, o5 = {
  horizontal: "bottomLeft",
  vertical: "rightTop",
  "vertical-left": "rightTop",
  "vertical-right": "leftTop"
}, Fy = ye({
  compatConfig: {
    MODE: 3
  },
  name: "PopupTrigger",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    mode: String,
    visible: Boolean,
    // popup: React.ReactNode;
    popupClassName: String,
    popupOffset: Array,
    disabled: Boolean,
    onVisibleChange: Function
  },
  slots: Object,
  emits: ["visibleChange"],
  setup(e, t) {
    let {
      slots: n,
      emit: o
    } = t;
    const i = Pe(!1), {
      getPopupContainer: r,
      rtl: a,
      subMenuOpenDelay: l,
      subMenuCloseDelay: s,
      builtinPlacements: u,
      triggerSubMenuAction: c,
      forceSubMenuRender: d,
      motion: f,
      defaultMotions: p,
      rootClassName: m
    } = Ur(), b = x$(), y = R(() => a.value ? I(I({}, n5), u.value) : I(I({}, t5), u.value)), S = R(() => o5[e.mode]), C = Pe();
    Ie(() => e.visible, (P) => {
      Mt.cancel(C.value), C.value = Mt(() => {
        i.value = P;
      });
    }, {
      immediate: !0
    }), At(() => {
      Mt.cancel(C.value);
    });
    const O = (P) => {
      o("visibleChange", P);
    }, $ = R(() => {
      var P, k;
      const x = f.value || ((P = p.value) === null || P === void 0 ? void 0 : P[e.mode]) || ((k = p.value) === null || k === void 0 ? void 0 : k.other), E = typeof x == "function" ? x() : x;
      return E ? xl(E.name, {
        css: !0
      }) : void 0;
    });
    return () => {
      const {
        prefixCls: P,
        popupClassName: k,
        mode: x,
        popupOffset: E,
        disabled: z
      } = e;
      return v(Zu, {
        prefixCls: P,
        popupClassName: Te(`${P}-popup`, {
          [`${P}-rtl`]: a.value
        }, k, m.value),
        stretch: x === "horizontal" ? "minWidth" : null,
        getPopupContainer: r.value,
        builtinPlacements: y.value,
        popupPlacement: S.value,
        popupVisible: i.value,
        popupAlign: E && {
          offset: E
        },
        action: z ? [] : [c.value],
        mouseEnterDelay: l.value,
        mouseLeaveDelay: s.value,
        onPopupVisibleChange: O,
        forceRender: b || d.value,
        popupAnimation: $.value
      }, {
        popup: n.popup,
        default: n.default
      });
    };
  }
}), am = (e, t) => {
  let {
    slots: n,
    attrs: o
  } = t;
  var i;
  const {
    prefixCls: r,
    mode: a
  } = Ur();
  return v("ul", Z(Z({}, o), {}, {
    class: Te(r.value, `${r.value}-sub`, `${r.value}-${a.value === "inline" ? "inline" : "vertical"}`),
    "data-menu-list": !0
  }), [(i = n.default) === null || i === void 0 ? void 0 : i.call(n)]);
};
am.displayName = "SubMenuList";
const i5 = ye({
  compatConfig: {
    MODE: 3
  },
  name: "InlineSubMenuList",
  inheritAttrs: !1,
  props: {
    id: String,
    open: Boolean,
    keyPath: Array
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = R(() => "inline"), {
      motion: i,
      mode: r,
      defaultMotions: a
    } = Ur(), l = R(() => r.value === o.value), s = le(!l.value), u = R(() => l.value ? e.open : !1);
    Ie(r, () => {
      l.value && (s.value = !1);
    }, {
      flush: "post"
    });
    const c = R(() => {
      var d, f;
      const p = i.value || ((d = a.value) === null || d === void 0 ? void 0 : d[o.value]) || ((f = a.value) === null || f === void 0 ? void 0 : f.other), m = typeof p == "function" ? p() : p;
      return I(I({}, m), {
        appear: e.keyPath.length <= 1
      });
    });
    return () => {
      var d;
      return s.value ? null : v(Hd, {
        mode: o.value
      }, {
        default: () => [v(Ti, c.value, {
          default: () => [Zi(v(am, {
            id: e.id
          }, {
            default: () => [(d = n.default) === null || d === void 0 ? void 0 : d.call(n)]
          }), [[mr, u.value]])]
        })]
      });
    };
  }
});
let Hy = 0;
const r5 = () => ({
  icon: ue.any,
  title: ue.any,
  disabled: Boolean,
  level: Number,
  popupClassName: String,
  popupOffset: Array,
  internalPopupClose: Boolean,
  eventKey: String,
  expandIcon: Function,
  theme: String,
  onMouseenter: Function,
  onMouseleave: Function,
  onTitleClick: Function,
  // Internal user prop
  originItemValue: Ct()
}), Es = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ASubMenu",
  inheritAttrs: !1,
  props: r5(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      emit: i
    } = t;
    var r, a;
    S$(!1);
    const l = rm(), s = ci(), u = typeof s.vnode.key == "symbol" ? String(s.vnode.key) : s.vnode.key;
    Fn(typeof s.vnode.key != "symbol", "SubMenu", `SubMenu \`:key="${String(u)}"\` not support Symbol type`);
    const c = zg(u) ? u : `sub_menu_${++Hy}_$$_not_set_key`, d = (r = e.eventKey) !== null && r !== void 0 ? r : zg(u) ? `sub_menu_${++Hy}_$$_${u}` : c, {
      parentEventKeys: f,
      parentInfo: p,
      parentKeys: m
    } = im(), b = R(() => [...m.value, c]), y = Pe([]), S = {
      eventKey: d,
      key: c,
      parentEventKeys: f,
      childrenEventKeys: y,
      parentKeys: m
    };
    (a = p.childrenEventKeys) === null || a === void 0 || a.value.push(d), At(() => {
      var Ne;
      p.childrenEventKeys && (p.childrenEventKeys.value = (Ne = p.childrenEventKeys) === null || Ne === void 0 ? void 0 : Ne.value.filter((Ge) => Ge != d));
    }), Z4(d, c, S);
    const {
      prefixCls: C,
      activeKeys: O,
      disabled: $,
      changeActiveKeys: P,
      mode: k,
      inlineCollapsed: x,
      openKeys: E,
      overflowDisabled: z,
      onOpenChange: N,
      registerMenuInfo: D,
      unRegisterMenuInfo: W,
      selectedSubMenuKeys: H,
      expandIcon: L,
      theme: A
    } = Ur(), U = u != null, j = !l && (x$() || !U);
    X4(j), (l && U || !l && !U || j) && (D(d, S), At(() => {
      W(d);
    }));
    const re = R(() => `${C.value}-submenu`), G = R(() => $.value || e.disabled), Y = Pe(), K = Pe(), J = R(() => E.value.includes(c)), be = R(() => !z.value && J.value), xe = R(() => H.value.includes(c)), ge = Pe(!1);
    Ie(O, () => {
      ge.value = !!O.value.find((Ne) => Ne === c);
    }, {
      immediate: !0
    });
    const de = (Ne) => {
      G.value || (i("titleClick", Ne, c), k.value === "inline" && N(c, !J.value));
    }, ne = (Ne) => {
      G.value || (P(b.value), i("mouseenter", Ne));
    }, we = (Ne) => {
      G.value || (P([]), i("mouseleave", Ne));
    }, ae = I$(R(() => b.value.length)), se = (Ne) => {
      k.value !== "inline" && N(c, Ne);
    }, he = () => {
      P(b.value);
    }, Me = d && `${d}-popup`, ke = R(() => Te(C.value, `${C.value}-${e.theme || A.value}`, e.popupClassName)), Le = (Ne, Ge) => {
      if (!Ge)
        return x.value && !m.value.length && Ne && typeof Ne == "string" ? v("div", {
          class: `${C.value}-inline-collapsed-noicon`
        }, [Ne.charAt(0)]) : v("span", {
          class: `${C.value}-title-content`
        }, [Ne]);
      const it = Bo(Ne) && Ne.type === "span";
      return v(Ve, null, [An(typeof Ge == "function" ? Ge(e.originItemValue) : Ge, {
        class: `${C.value}-item-icon`
      }, !1), it ? Ne : v("span", {
        class: `${C.value}-title-content`
      }, [Ne])]);
    }, Re = R(() => k.value !== "inline" && b.value.length > 1 ? "vertical" : k.value), We = R(() => k.value === "horizontal" ? "vertical" : k.value), et = R(() => Re.value === "horizontal" ? "vertical" : Re.value), Fe = () => {
      var Ne, Ge;
      const it = re.value, Ke = (Ne = e.icon) !== null && Ne !== void 0 ? Ne : (Ge = n.icon) === null || Ge === void 0 ? void 0 : Ge.call(n, e), Oe = e.expandIcon || n.expandIcon || L.value, je = Le(Mi(n, e, "title"), Ke);
      return v("div", {
        style: ae.value,
        class: `${it}-title`,
        tabindex: G.value ? null : -1,
        ref: Y,
        title: typeof je == "string" ? je : null,
        "data-menu-id": c,
        "aria-expanded": be.value,
        "aria-haspopup": !0,
        "aria-controls": Me,
        "aria-disabled": G.value,
        onClick: de,
        onFocus: he
      }, [je, k.value !== "horizontal" && Oe ? Oe(I(I({}, e), {
        isOpen: be.value
      })) : v("i", {
        class: `${it}-arrow`
      }, null)]);
    };
    return () => {
      var Ne;
      if (l)
        return U ? (Ne = n.default) === null || Ne === void 0 ? void 0 : Ne.call(n) : null;
      const Ge = re.value;
      let it = () => null;
      if (!z.value && k.value !== "inline") {
        const Ke = k.value === "horizontal" ? [0, 8] : [10, 0];
        it = () => v(Fy, {
          mode: Re.value,
          prefixCls: Ge,
          visible: !e.internalPopupClose && be.value,
          popupClassName: ke.value,
          popupOffset: e.popupOffset || Ke,
          disabled: G.value,
          onVisibleChange: se
        }, {
          default: () => [Fe()],
          popup: () => v(Hd, {
            mode: et.value
          }, {
            default: () => [v(am, {
              id: Me,
              ref: K
            }, {
              default: n.default
            })]
          })
        });
      } else
        it = () => v(Fy, null, {
          default: Fe
        });
      return v(Hd, {
        mode: We.value
      }, {
        default: () => [v(jr.Item, Z(Z({
          component: "li"
        }, o), {}, {
          role: "none",
          class: Te(Ge, `${Ge}-${k.value}`, o.class, {
            [`${Ge}-open`]: be.value,
            [`${Ge}-active`]: ge.value,
            [`${Ge}-selected`]: xe.value,
            [`${Ge}-disabled`]: G.value
          }),
          onMouseenter: ne,
          onMouseleave: we,
          "data-submenu-id": c
        }), {
          default: () => v(Ve, null, [it(), !z.value && v(i5, {
            id: Me,
            open: be.value,
            keyPath: b.value
          }, {
            default: n.default
          })])
        })]
      });
    };
  }
});
function M$(e, t) {
  return e.classList ? e.classList.contains(t) : ` ${e.className} `.indexOf(` ${t} `) > -1;
}
function Vy(e, t) {
  e.classList ? e.classList.add(t) : M$(e, t) || (e.className = `${e.className} ${t}`);
}
function jy(e, t) {
  if (e.classList)
    e.classList.remove(t);
  else if (M$(e, t)) {
    const n = e.className;
    e.className = ` ${n} `.replace(` ${t} `, " ");
  }
}
const lm = function() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "ant-motion-collapse", t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
  return {
    name: e,
    appear: t,
    css: !0,
    onBeforeEnter: (n) => {
      n.style.height = "0px", n.style.opacity = "0", Vy(n, e);
    },
    onEnter: (n) => {
      Nt(() => {
        n.style.height = `${n.scrollHeight}px`, n.style.opacity = "1";
      });
    },
    onAfterEnter: (n) => {
      n && (jy(n, e), n.style.height = null, n.style.opacity = null);
    },
    onBeforeLeave: (n) => {
      Vy(n, e), n.style.height = `${n.offsetHeight}px`, n.style.opacity = null;
    },
    onLeave: (n) => {
      setTimeout(() => {
        n.style.height = "0px", n.style.opacity = "0";
      });
    },
    onAfterLeave: (n) => {
      n && (jy(n, e), n.style && (n.style.height = null, n.style.opacity = null));
    }
  };
}, a5 = () => ({
  title: ue.any,
  // Internal user prop
  originItemValue: Ct()
}), Vd = ye({
  compatConfig: {
    MODE: 3
  },
  name: "AMenuItemGroup",
  inheritAttrs: !1,
  props: a5(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: i
    } = Ur(), r = R(() => `${i.value}-item-group`), a = rm();
    return () => {
      var l, s;
      return a ? (l = n.default) === null || l === void 0 ? void 0 : l.call(n) : v("li", Z(Z({}, o), {}, {
        onClick: (u) => u.stopPropagation(),
        class: r.value
      }), [v("div", {
        title: typeof e.title == "string" ? e.title : void 0,
        class: `${r.value}-title`
      }, [Mi(n, e, "title")]), v("ul", {
        class: `${r.value}-list`
      }, [(s = n.default) === null || s === void 0 ? void 0 : s.call(n)])]);
    };
  }
}), l5 = () => ({
  prefixCls: String,
  dashed: Boolean
}), jd = ye({
  compatConfig: {
    MODE: 3
  },
  name: "AMenuDivider",
  props: l5(),
  setup(e) {
    const {
      prefixCls: t
    } = Ur(), n = R(() => ({
      [`${t.value}-item-divider`]: !0,
      [`${t.value}-item-divider-dashed`]: !!e.dashed
    }));
    return () => v("li", {
      class: n.value
    }, null);
  }
});
var s5 = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
function fh(e, t, n) {
  return (e || []).map((o, i) => {
    if (o && typeof o == "object") {
      const r = o, {
        label: a,
        children: l,
        key: s,
        type: u
      } = r, c = s5(r, ["label", "children", "key", "type"]), d = s ?? `tmp-${i}`, f = n ? n.parentKeys.slice() : [], p = [], m = {
        eventKey: d,
        key: d,
        parentEventKeys: le(f),
        parentKeys: le(f),
        childrenEventKeys: le(p),
        isLeaf: !1
      };
      if (l || u === "group") {
        if (u === "group") {
          const y = fh(l, t, n);
          return v(Vd, Z(Z({
            key: d
          }, c), {}, {
            title: a,
            originItemValue: o
          }), {
            default: () => [y]
          });
        }
        t.set(d, m), n && n.childrenEventKeys.push(d);
        const b = fh(l, t, {
          childrenEventKeys: p,
          parentKeys: [].concat(f, d)
        });
        return v(Es, Z(Z({
          key: d
        }, c), {}, {
          title: a,
          originItemValue: o
        }), {
          default: () => [b]
        });
      }
      return u === "divider" ? v(jd, Z({
        key: d
      }, c), null) : (m.isLeaf = !0, t.set(d, m), v(ks, Z(Z({
        key: d
      }, c), {}, {
        originItemValue: o
      }), {
        default: () => [a]
      }));
    }
    return null;
  }).filter((o) => o);
}
function u5(e) {
  const t = Pe([]), n = Pe(!1), o = Pe(/* @__PURE__ */ new Map());
  return Ie(() => e.items, () => {
    const i = /* @__PURE__ */ new Map();
    n.value = !1, e.items ? (n.value = !0, t.value = fh(e.items, i)) : t.value = void 0, o.value = i;
  }, {
    immediate: !0,
    deep: !0
  }), {
    itemsNodes: t,
    store: o,
    hasItmes: n
  };
}
const c5 = (e) => {
  const {
    componentCls: t,
    motionDurationSlow: n,
    menuHorizontalHeight: o,
    colorSplit: i,
    lineWidth: r,
    lineType: a,
    menuItemPaddingInline: l
  } = e;
  return {
    [`${t}-horizontal`]: {
      lineHeight: `${o}px`,
      border: 0,
      borderBottom: `${r}px ${a} ${i}`,
      boxShadow: "none",
      "&::after": {
        display: "block",
        clear: "both",
        height: 0,
        content: '"\\20"'
      },
      // ======================= Item =======================
      [`${t}-item, ${t}-submenu`]: {
        position: "relative",
        display: "inline-block",
        verticalAlign: "bottom",
        paddingInline: l
      },
      [`> ${t}-item:hover,
        > ${t}-item-active,
        > ${t}-submenu ${t}-submenu-title:hover`]: {
        backgroundColor: "transparent"
      },
      [`${t}-item, ${t}-submenu-title`]: {
        transition: [`border-color ${n}`, `background ${n}`].join(",")
      },
      // ===================== Sub Menu =====================
      [`${t}-submenu-arrow`]: {
        display: "none"
      }
    }
  };
}, d5 = (e) => {
  let {
    componentCls: t,
    menuArrowOffset: n
  } = e;
  return {
    [`${t}-rtl`]: {
      direction: "rtl"
    },
    [`${t}-submenu-rtl`]: {
      transformOrigin: "100% 0"
    },
    // Vertical Arrow
    [`${t}-rtl${t}-vertical,
    ${t}-submenu-rtl ${t}-vertical`]: {
      [`${t}-submenu-arrow`]: {
        "&::before": {
          transform: `rotate(-45deg) translateY(-${n})`
        },
        "&::after": {
          transform: `rotate(45deg) translateY(${n})`
        }
      }
    }
  };
}, Wy = (e) => I({}, Xu(e)), qy = (e, t) => {
  const {
    componentCls: n,
    colorItemText: o,
    colorItemTextSelected: i,
    colorGroupTitle: r,
    colorItemBg: a,
    colorSubItemBg: l,
    colorItemBgSelected: s,
    colorActiveBarHeight: u,
    colorActiveBarWidth: c,
    colorActiveBarBorderSize: d,
    motionDurationSlow: f,
    motionEaseInOut: p,
    motionEaseOut: m,
    menuItemPaddingInline: b,
    motionDurationMid: y,
    colorItemTextHover: S,
    lineType: C,
    colorSplit: O,
    // Disabled
    colorItemTextDisabled: $,
    // Danger
    colorDangerItemText: P,
    colorDangerItemTextHover: k,
    colorDangerItemTextSelected: x,
    colorDangerItemBgActive: E,
    colorDangerItemBgSelected: z,
    colorItemBgHover: N,
    menuSubMenuBg: D,
    // Horizontal
    colorItemTextSelectedHorizontal: W,
    colorItemBgSelectedHorizontal: H
  } = e;
  return {
    [`${n}-${t}`]: {
      color: o,
      background: a,
      [`&${n}-root:focus-visible`]: I({}, Wy(e)),
      // ======================== Item ========================
      [`${n}-item-group-title`]: {
        color: r
      },
      [`${n}-submenu-selected`]: {
        [`> ${n}-submenu-title`]: {
          color: i
        }
      },
      // Disabled
      [`${n}-item-disabled, ${n}-submenu-disabled`]: {
        color: `${$} !important`
      },
      // Hover
      [`${n}-item:hover, ${n}-submenu-title:hover`]: {
        [`&:not(${n}-item-selected):not(${n}-submenu-selected)`]: {
          color: S
        }
      },
      [`&:not(${n}-horizontal)`]: {
        [`${n}-item:not(${n}-item-selected)`]: {
          "&:hover": {
            backgroundColor: N
          },
          "&:active": {
            backgroundColor: s
          }
        },
        [`${n}-submenu-title`]: {
          "&:hover": {
            backgroundColor: N
          },
          "&:active": {
            backgroundColor: s
          }
        }
      },
      // Danger - only Item has
      [`${n}-item-danger`]: {
        color: P,
        [`&${n}-item:hover`]: {
          [`&:not(${n}-item-selected):not(${n}-submenu-selected)`]: {
            color: k
          }
        },
        [`&${n}-item:active`]: {
          background: E
        }
      },
      [`${n}-item a`]: {
        "&, &:hover": {
          color: "inherit"
        }
      },
      [`${n}-item-selected`]: {
        color: i,
        // Danger
        [`&${n}-item-danger`]: {
          color: x
        },
        "a, a:hover": {
          color: "inherit"
        }
      },
      [`& ${n}-item-selected`]: {
        backgroundColor: s,
        // Danger
        [`&${n}-item-danger`]: {
          backgroundColor: z
        }
      },
      [`${n}-item, ${n}-submenu-title`]: {
        [`&:not(${n}-item-disabled):focus-visible`]: I({}, Wy(e))
      },
      [`&${n}-submenu > ${n}`]: {
        backgroundColor: D
      },
      [`&${n}-popup > ${n}`]: {
        backgroundColor: a
      },
      // ====================== Horizontal ======================
      [`&${n}-horizontal`]: I(I({}, t === "dark" ? {
        borderBottom: 0
      } : {}), {
        [`> ${n}-item, > ${n}-submenu`]: {
          top: d,
          marginTop: -d,
          marginBottom: 0,
          borderRadius: 0,
          "&::after": {
            position: "absolute",
            insetInline: b,
            bottom: 0,
            borderBottom: `${u}px solid transparent`,
            transition: `border-color ${f} ${p}`,
            content: '""'
          },
          "&:hover, &-active, &-open": {
            "&::after": {
              borderBottomWidth: u,
              borderBottomColor: W
            }
          },
          "&-selected": {
            color: W,
            backgroundColor: H,
            "&::after": {
              borderBottomWidth: u,
              borderBottomColor: W
            }
          }
        }
      }),
      // ================== Inline & Vertical ===================
      //
      [`&${n}-root`]: {
        [`&${n}-inline, &${n}-vertical`]: {
          borderInlineEnd: `${d}px ${C} ${O}`
        }
      },
      // ======================== Inline ========================
      [`&${n}-inline`]: {
        // Sub
        [`${n}-sub${n}-inline`]: {
          background: l
        },
        // Item
        [`${n}-item, ${n}-submenu-title`]: d && c ? {
          width: `calc(100% + ${d}px)`
        } : {},
        [`${n}-item`]: {
          position: "relative",
          "&::after": {
            position: "absolute",
            insetBlock: 0,
            insetInlineEnd: 0,
            borderInlineEnd: `${c}px solid ${i}`,
            transform: "scaleY(0.0001)",
            opacity: 0,
            transition: [`transform ${y} ${m}`, `opacity ${y} ${m}`].join(","),
            content: '""'
          },
          // Danger
          [`&${n}-item-danger`]: {
            "&::after": {
              borderInlineEndColor: x
            }
          }
        },
        [`${n}-selected, ${n}-item-selected`]: {
          "&::after": {
            transform: "scaleY(1)",
            opacity: 1,
            transition: [`transform ${y} ${p}`, `opacity ${y} ${p}`].join(",")
          }
        }
      }
    }
  };
}, Gy = (e) => {
  const {
    componentCls: t,
    menuItemHeight: n,
    itemMarginInline: o,
    padding: i,
    menuArrowSize: r,
    marginXS: a,
    marginXXS: l
  } = e, s = i + r + a;
  return {
    [`${t}-item`]: {
      position: "relative"
    },
    [`${t}-item, ${t}-submenu-title`]: {
      height: n,
      lineHeight: `${n}px`,
      paddingInline: i,
      overflow: "hidden",
      textOverflow: "ellipsis",
      marginInline: o,
      marginBlock: l,
      width: `calc(100% - ${o * 2}px)`
    },
    // disable margin collapsed
    [`${t}-submenu`]: {
      paddingBottom: 0.02
    },
    [`> ${t}-item,
            > ${t}-submenu > ${t}-submenu-title`]: {
      height: n,
      lineHeight: `${n}px`
    },
    [`${t}-item-group-list ${t}-submenu-title,
            ${t}-submenu-title`]: {
      paddingInlineEnd: s
    }
  };
}, f5 = (e) => {
  const {
    componentCls: t,
    iconCls: n,
    menuItemHeight: o,
    colorTextLightSolid: i,
    dropdownWidth: r,
    controlHeightLG: a,
    motionDurationMid: l,
    motionEaseOut: s,
    paddingXL: u,
    fontSizeSM: c,
    fontSizeLG: d,
    motionDurationSlow: f,
    paddingXS: p,
    boxShadowSecondary: m
  } = e, b = {
    height: o,
    lineHeight: `${o}px`,
    listStylePosition: "inside",
    listStyleType: "disc"
  };
  return [
    {
      [t]: {
        "&-inline, &-vertical": I({
          [`&${t}-root`]: {
            boxShadow: "none"
          }
        }, Gy(e))
      },
      [`${t}-submenu-popup`]: {
        [`${t}-vertical`]: I(I({}, Gy(e)), {
          boxShadow: m
        })
      }
    },
    // Vertical only
    {
      [`${t}-submenu-popup ${t}-vertical${t}-sub`]: {
        minWidth: r,
        maxHeight: `calc(100vh - ${a * 2.5}px)`,
        padding: "0",
        overflow: "hidden",
        borderInlineEnd: 0,
        // https://github.com/ant-design/ant-design/issues/22244
        // https://github.com/ant-design/ant-design/issues/26812
        "&:not([class*='-active'])": {
          overflowX: "hidden",
          overflowY: "auto"
        }
      }
    },
    // Inline Only
    {
      [`${t}-inline`]: {
        width: "100%",
        // Motion enhance for first level
        [`&${t}-root`]: {
          [`${t}-item, ${t}-submenu-title`]: {
            display: "flex",
            alignItems: "center",
            transition: [`border-color ${f}`, `background ${f}`, `padding ${l} ${s}`].join(","),
            [`> ${t}-title-content`]: {
              flex: "auto",
              minWidth: 0,
              overflow: "hidden",
              textOverflow: "ellipsis"
            },
            "> *": {
              flex: "none"
            }
          }
        },
        // >>>>> Sub
        [`${t}-sub${t}-inline`]: {
          padding: 0,
          border: 0,
          borderRadius: 0,
          boxShadow: "none",
          [`& > ${t}-submenu > ${t}-submenu-title`]: b,
          [`& ${t}-item-group-title`]: {
            paddingInlineStart: u
          }
        },
        // >>>>> Item
        [`${t}-item`]: b
      }
    },
    // Inline Collapse Only
    {
      [`${t}-inline-collapsed`]: {
        width: o * 2,
        [`&${t}-root`]: {
          [`${t}-item, ${t}-submenu ${t}-submenu-title`]: {
            [`> ${t}-inline-collapsed-noicon`]: {
              fontSize: d,
              textAlign: "center"
            }
          }
        },
        [`> ${t}-item,
          > ${t}-item-group > ${t}-item-group-list > ${t}-item,
          > ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title,
          > ${t}-submenu > ${t}-submenu-title`]: {
          insetInlineStart: 0,
          paddingInline: `calc(50% - ${c}px)`,
          textOverflow: "clip",
          [`
            ${t}-submenu-arrow,
            ${t}-submenu-expand-icon
          `]: {
            opacity: 0
          },
          [`${t}-item-icon, ${n}`]: {
            margin: 0,
            fontSize: d,
            lineHeight: `${o}px`,
            "+ span": {
              display: "inline-block",
              opacity: 0
            }
          }
        },
        [`${t}-item-icon, ${n}`]: {
          display: "inline-block"
        },
        "&-tooltip": {
          pointerEvents: "none",
          [`${t}-item-icon, ${n}`]: {
            display: "none"
          },
          "a, a:hover": {
            color: i
          }
        },
        [`${t}-item-group-title`]: I(I({}, ka), {
          paddingInline: p
        })
      }
    }
  ];
}, Ky = (e) => {
  const {
    componentCls: t,
    fontSize: n,
    motionDurationSlow: o,
    motionDurationMid: i,
    motionEaseInOut: r,
    motionEaseOut: a,
    iconCls: l,
    controlHeightSM: s
  } = e;
  return {
    // >>>>> Item
    [`${t}-item, ${t}-submenu-title`]: {
      position: "relative",
      display: "block",
      margin: 0,
      whiteSpace: "nowrap",
      cursor: "pointer",
      transition: [`border-color ${o}`, `background ${o}`, `padding ${o} ${r}`].join(","),
      [`${t}-item-icon, ${l}`]: {
        minWidth: n,
        fontSize: n,
        transition: [`font-size ${i} ${a}`, `margin ${o} ${r}`, `color ${o}`].join(","),
        "+ span": {
          marginInlineStart: s - n,
          opacity: 1,
          transition: [`opacity ${o} ${r}`, `margin ${o}`, `color ${o}`].join(",")
        }
      },
      [`${t}-item-icon`]: I({}, Fs()),
      [`&${t}-item-only-child`]: {
        [`> ${l}, > ${t}-item-icon`]: {
          marginInlineEnd: 0
        }
      }
    },
    // Disabled state sets text to gray and nukes hover/tab effects
    [`${t}-item-disabled, ${t}-submenu-disabled`]: {
      background: "none !important",
      cursor: "not-allowed",
      "&::after": {
        borderColor: "transparent !important"
      },
      a: {
        color: "inherit !important"
      },
      [`> ${t}-submenu-title`]: {
        color: "inherit !important",
        cursor: "not-allowed"
      }
    }
  };
}, Yy = (e) => {
  const {
    componentCls: t,
    motionDurationSlow: n,
    motionEaseInOut: o,
    borderRadius: i,
    menuArrowSize: r,
    menuArrowOffset: a
  } = e;
  return {
    [`${t}-submenu`]: {
      "&-expand-icon, &-arrow": {
        position: "absolute",
        top: "50%",
        insetInlineEnd: e.margin,
        width: r,
        color: "currentcolor",
        transform: "translateY(-50%)",
        transition: `transform ${n} ${o}, opacity ${n}`
      },
      "&-arrow": {
        // →
        "&::before, &::after": {
          position: "absolute",
          width: r * 0.6,
          height: r * 0.15,
          backgroundColor: "currentcolor",
          borderRadius: i,
          transition: [`background ${n} ${o}`, `transform ${n} ${o}`, `top ${n} ${o}`, `color ${n} ${o}`].join(","),
          content: '""'
        },
        "&::before": {
          transform: `rotate(45deg) translateY(-${a})`
        },
        "&::after": {
          transform: `rotate(-45deg) translateY(${a})`
        }
      }
    }
  };
}, p5 = (e) => {
  const {
    antCls: t,
    componentCls: n,
    fontSize: o,
    motionDurationSlow: i,
    motionDurationMid: r,
    motionEaseInOut: a,
    lineHeight: l,
    paddingXS: s,
    padding: u,
    colorSplit: c,
    lineWidth: d,
    zIndexPopup: f,
    borderRadiusLG: p,
    radiusSubMenuItem: m,
    menuArrowSize: b,
    menuArrowOffset: y,
    lineType: S,
    menuPanelMaskInset: C
  } = e;
  return [
    // Misc
    {
      "": {
        [`${n}`]: I(I({}, Ea()), {
          // Hidden
          "&-hidden": {
            display: "none"
          }
        })
      },
      [`${n}-submenu-hidden`]: {
        display: "none"
      }
    },
    {
      [n]: I(I(I(I(I(I(I({}, Zt(e)), Ea()), {
        marginBottom: 0,
        paddingInlineStart: 0,
        // Override default ul/ol
        fontSize: o,
        lineHeight: 0,
        listStyle: "none",
        outline: "none",
        transition: `width ${i} cubic-bezier(0.2, 0, 0, 1) 0s`,
        "ul, ol": {
          margin: 0,
          padding: 0,
          listStyle: "none"
        },
        // Overflow ellipsis
        "&-overflow": {
          display: "flex",
          [`${n}-item`]: {
            flex: "none"
          }
        },
        [`${n}-item, ${n}-submenu, ${n}-submenu-title`]: {
          borderRadius: e.radiusItem
        },
        [`${n}-item-group-title`]: {
          padding: `${s}px ${u}px`,
          fontSize: o,
          lineHeight: l,
          transition: `all ${i}`
        },
        [`&-horizontal ${n}-submenu`]: {
          transition: [`border-color ${i} ${a}`, `background ${i} ${a}`].join(",")
        },
        [`${n}-submenu, ${n}-submenu-inline`]: {
          transition: [`border-color ${i} ${a}`, `background ${i} ${a}`, `padding ${r} ${a}`].join(",")
        },
        [`${n}-submenu ${n}-sub`]: {
          cursor: "initial",
          transition: [`background ${i} ${a}`, `padding ${i} ${a}`].join(",")
        },
        [`${n}-title-content`]: {
          transition: `color ${i}`
        },
        [`${n}-item a`]: {
          "&::before": {
            position: "absolute",
            inset: 0,
            backgroundColor: "transparent",
            content: '""'
          }
        },
        // Removed a Badge related style seems it's safe
        // https://github.com/ant-design/ant-design/issues/19809
        // >>>>> Divider
        [`${n}-item-divider`]: {
          overflow: "hidden",
          lineHeight: 0,
          borderColor: c,
          borderStyle: S,
          borderWidth: 0,
          borderTopWidth: d,
          marginBlock: d,
          padding: 0,
          "&-dashed": {
            borderStyle: "dashed"
          }
        }
      }), Ky(e)), {
        [`${n}-item-group`]: {
          [`${n}-item-group-list`]: {
            margin: 0,
            padding: 0,
            [`${n}-item, ${n}-submenu-title`]: {
              paddingInline: `${o * 2}px ${u}px`
            }
          }
        },
        // ======================= Sub Menu =======================
        "&-submenu": {
          "&-popup": {
            position: "absolute",
            zIndex: f,
            background: "transparent",
            borderRadius: p,
            boxShadow: "none",
            transformOrigin: "0 0",
            // https://github.com/ant-design/ant-design/issues/13955
            "&::before": {
              position: "absolute",
              inset: `${C}px 0 0`,
              zIndex: -1,
              width: "100%",
              height: "100%",
              opacity: 0,
              content: '""'
            }
          },
          // https://github.com/ant-design/ant-design/issues/13955
          "&-placement-rightTop::before": {
            top: 0,
            insetInlineStart: C
          },
          [`> ${n}`]: I(I(I({
            borderRadius: p
          }, Ky(e)), Yy(e)), {
            [`${n}-item, ${n}-submenu > ${n}-submenu-title`]: {
              borderRadius: m
            },
            [`${n}-submenu-title::after`]: {
              transition: `transform ${i} ${a}`
            }
          })
        }
      }), Yy(e)), {
        [`&-inline-collapsed ${n}-submenu-arrow,
        &-inline ${n}-submenu-arrow`]: {
          // ↓
          "&::before": {
            transform: `rotate(-45deg) translateX(${y})`
          },
          "&::after": {
            transform: `rotate(45deg) translateX(-${y})`
          }
        },
        [`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]: {
          // ↑
          transform: `translateY(-${b * 0.2}px)`,
          "&::after": {
            transform: `rotate(-45deg) translateX(-${y})`
          },
          "&::before": {
            transform: `rotate(45deg) translateX(${y})`
          }
        }
      })
    },
    // Integration with header element so menu items have the same height
    {
      [`${t}-layout-header`]: {
        [n]: {
          lineHeight: "inherit"
        }
      }
    }
  ];
}, g5 = ((e, t) => nn("Menu", (o, i) => {
  let {
    overrideComponentToken: r
  } = i;
  if (t?.value === !1)
    return [];
  const {
    colorBgElevated: a,
    colorPrimary: l,
    colorError: s,
    colorErrorHover: u,
    colorTextLightSolid: c
  } = o, {
    controlHeightLG: d,
    fontSize: f
  } = o, p = f / 7 * 5, m = _t(o, {
    menuItemHeight: d,
    menuItemPaddingInline: o.margin,
    menuArrowSize: p,
    menuHorizontalHeight: d * 1.15,
    menuArrowOffset: `${p * 0.25}px`,
    menuPanelMaskInset: -7,
    menuSubMenuBg: a
  }), b = new In(c).setAlpha(0.65).toRgbString(), y = _t(m, {
    colorItemText: b,
    colorItemTextHover: c,
    colorGroupTitle: b,
    colorItemTextSelected: c,
    colorItemBg: "#001529",
    colorSubItemBg: "#000c17",
    colorItemBgActive: "transparent",
    colorItemBgSelected: l,
    colorActiveBarWidth: 0,
    colorActiveBarHeight: 0,
    colorActiveBarBorderSize: 0,
    // Disabled
    colorItemTextDisabled: new In(c).setAlpha(0.25).toRgbString(),
    // Danger
    colorDangerItemText: s,
    colorDangerItemTextHover: u,
    colorDangerItemTextSelected: c,
    colorDangerItemBgActive: s,
    colorDangerItemBgSelected: s,
    menuSubMenuBg: "#001529",
    // Horizontal
    colorItemTextSelectedHorizontal: c,
    colorItemBgSelectedHorizontal: l
  }, I({}, r));
  return [
    // Basic
    p5(m),
    // Horizontal
    c5(m),
    // Vertical
    f5(m),
    // Theme
    qy(m, "light"),
    qy(y, "dark"),
    // RTL
    d5(m),
    // Motion
    Xv(m),
    xr(m, "slide-up"),
    xr(m, "slide-down"),
    Ju(m, "zoom-big")
  ];
}, (o) => {
  const {
    colorPrimary: i,
    colorError: r,
    colorTextDisabled: a,
    colorErrorBg: l,
    colorText: s,
    colorTextDescription: u,
    colorBgContainer: c,
    colorFillAlter: d,
    colorFillContent: f,
    lineWidth: p,
    lineWidthBold: m,
    controlItemBgActive: b,
    colorBgTextHover: y
  } = o;
  return {
    dropdownWidth: 160,
    zIndexPopup: o.zIndexPopupBase + 50,
    radiusItem: o.borderRadiusLG,
    radiusSubMenuItem: o.borderRadiusSM,
    colorItemText: s,
    colorItemTextHover: s,
    colorItemTextHoverHorizontal: i,
    colorGroupTitle: u,
    colorItemTextSelected: i,
    colorItemTextSelectedHorizontal: i,
    colorItemBg: c,
    colorItemBgHover: y,
    colorItemBgActive: f,
    colorSubItemBg: d,
    colorItemBgSelected: b,
    colorItemBgSelectedHorizontal: "transparent",
    colorActiveBarWidth: 0,
    colorActiveBarHeight: m,
    colorActiveBarBorderSize: p,
    // Disabled
    colorItemTextDisabled: a,
    // Danger
    colorDangerItemText: r,
    colorDangerItemTextHover: r,
    colorDangerItemTextSelected: r,
    colorDangerItemBgActive: l,
    colorDangerItemBgSelected: l,
    itemMarginInline: o.marginXXS
  };
})(e)), h5 = () => ({
  id: String,
  prefixCls: String,
  // donot use items, now only support inner use
  items: Array,
  disabled: Boolean,
  inlineCollapsed: Boolean,
  disabledOverflow: Boolean,
  forceSubMenuRender: Boolean,
  openKeys: Array,
  selectedKeys: Array,
  activeKey: String,
  selectable: {
    type: Boolean,
    default: !0
  },
  multiple: {
    type: Boolean,
    default: !1
  },
  tabindex: {
    type: [Number, String]
  },
  motion: Object,
  role: String,
  theme: {
    type: String,
    default: "light"
  },
  mode: {
    type: String,
    default: "vertical"
  },
  inlineIndent: {
    type: Number,
    default: 24
  },
  subMenuOpenDelay: {
    type: Number,
    default: 0
  },
  subMenuCloseDelay: {
    type: Number,
    default: 0.1
  },
  builtinPlacements: {
    type: Object
  },
  triggerSubMenuAction: {
    type: String,
    default: "hover"
  },
  getPopupContainer: Function,
  expandIcon: Function,
  onOpenChange: Function,
  onSelect: Function,
  onDeselect: Function,
  onClick: [Function, Array],
  onFocus: Function,
  onBlur: Function,
  onMousedown: Function,
  "onUpdate:openKeys": Function,
  "onUpdate:selectedKeys": Function,
  "onUpdate:activeKey": Function
}), Uy = [], lo = ye({
  compatConfig: {
    MODE: 3
  },
  name: "AMenu",
  inheritAttrs: !1,
  props: h5(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      attrs: i
    } = t;
    const {
      direction: r,
      getPrefixCls: a
    } = yt("menu", e), l = h$(), s = R(() => {
      var ne;
      return a("menu", e.prefixCls || ((ne = l?.prefixCls) === null || ne === void 0 ? void 0 : ne.value));
    }), [u, c] = g5(s, R(() => !l)), d = Pe(/* @__PURE__ */ new Map()), f = Tt(C$, le(void 0)), p = R(() => f.value !== void 0 ? f.value : e.inlineCollapsed), {
      itemsNodes: m
    } = u5(e), b = Pe(!1);
    Pt(() => {
      b.value = !0;
    }), Lt(() => {
      Fn(!(e.inlineCollapsed === !0 && e.mode !== "inline"), "Menu", "`inlineCollapsed` should only be used when `mode` is inline."), Fn(!(f.value !== void 0 && e.inlineCollapsed === !0), "Menu", "`inlineCollapsed` not control Menu under Sider. Should set `collapsed` on Sider instead.");
    });
    const y = le([]), S = le([]), C = le({});
    Ie(d, () => {
      const ne = {};
      for (const we of d.value.values())
        ne[we.key] = we;
      C.value = ne;
    }, {
      flush: "post"
    }), Lt(() => {
      if (e.activeKey !== void 0) {
        let ne = [];
        const we = e.activeKey ? C.value[e.activeKey] : void 0;
        we && e.activeKey !== void 0 ? ne = ep([].concat(M(we.parentKeys), e.activeKey)) : ne = [], Jl(y.value, ne) || (y.value = ne);
      }
    }), Ie(() => e.selectedKeys, (ne) => {
      ne && (S.value = ne.slice());
    }, {
      immediate: !0,
      deep: !0
    });
    const O = le([]);
    Ie([C, S], () => {
      let ne = [];
      S.value.forEach((we) => {
        const ae = C.value[we];
        ae && (ne = ne.concat(M(ae.parentKeys)));
      }), ne = ep(ne), Jl(O.value, ne) || (O.value = ne);
    }, {
      immediate: !0
    });
    const $ = (ne) => {
      if (e.selectable) {
        const {
          key: we
        } = ne, ae = S.value.includes(we);
        let se;
        e.multiple ? ae ? se = S.value.filter((Me) => Me !== we) : se = [...S.value, we] : se = [we];
        const he = I(I({}, ne), {
          selectedKeys: se
        });
        Jl(se, S.value) || (e.selectedKeys === void 0 && (S.value = se), o("update:selectedKeys", se), ae && e.multiple ? o("deselect", he) : o("select", he));
      }
      N.value !== "inline" && !e.multiple && P.value.length && H(Uy);
    }, P = le([]);
    Ie(() => e.openKeys, function() {
      let ne = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : P.value;
      Jl(P.value, ne) || (P.value = ne.slice());
    }, {
      immediate: !0,
      deep: !0
    });
    let k;
    const x = (ne) => {
      clearTimeout(k), k = setTimeout(() => {
        e.activeKey === void 0 && (y.value = ne), o("update:activeKey", ne[ne.length - 1]);
      });
    }, E = R(() => !!e.disabled), z = R(() => r.value === "rtl"), N = le("vertical"), D = Pe(!1);
    Lt(() => {
      var ne;
      (e.mode === "inline" || e.mode === "vertical") && p.value ? (N.value = "vertical", D.value = p.value) : (N.value = e.mode, D.value = !1), !((ne = l?.mode) === null || ne === void 0) && ne.value && (N.value = l.mode.value);
    });
    const W = R(() => N.value === "inline"), H = (ne) => {
      P.value = ne, o("update:openKeys", ne), o("openChange", ne);
    }, L = le(P.value), A = Pe(!1);
    Ie(P, () => {
      W.value && (L.value = P.value);
    }, {
      immediate: !0
    }), Ie(W, () => {
      if (!A.value) {
        A.value = !0;
        return;
      }
      W.value ? P.value = L.value : H(Uy);
    }, {
      immediate: !0
    });
    const U = R(() => ({
      [`${s.value}`]: !0,
      [`${s.value}-root`]: !0,
      [`${s.value}-${N.value}`]: !0,
      [`${s.value}-inline-collapsed`]: D.value,
      [`${s.value}-rtl`]: z.value,
      [`${s.value}-${e.theme}`]: !0
    })), j = R(() => a()), re = R(() => ({
      horizontal: {
        name: `${j.value}-slide-up`
      },
      inline: lm(`${j.value}-motion-collapse`),
      other: {
        name: `${j.value}-zoom-big`
      }
    }));
    S$(!0);
    const G = function() {
      let ne = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
      const we = [], ae = d.value;
      return ne.forEach((se) => {
        const {
          key: he,
          childrenEventKeys: Me
        } = ae.get(se);
        we.push(he, ...G(M(Me)));
      }), we;
    }, Y = (ne) => {
      var we;
      o("click", ne), $(ne), (we = l?.onClick) === null || we === void 0 || we.call(l);
    }, K = (ne, we) => {
      var ae;
      const se = ((ae = C.value[ne]) === null || ae === void 0 ? void 0 : ae.childrenEventKeys) || [];
      let he = P.value.filter((Me) => Me !== ne);
      if (we)
        he.push(ne);
      else if (N.value !== "inline") {
        const Me = G(M(se));
        he = ep(he.filter((ke) => !Me.includes(ke)));
      }
      Jl(P, he) || H(he);
    }, J = (ne, we) => {
      d.value.set(ne, we), d.value = new Map(d.value);
    }, be = (ne) => {
      d.value.delete(ne), d.value = new Map(d.value);
    }, xe = le(0), ge = R(() => {
      var ne;
      return e.expandIcon || n.expandIcon || !((ne = l?.expandIcon) === null || ne === void 0) && ne.value ? (we) => {
        let ae = e.expandIcon || n.expandIcon;
        return ae = typeof ae == "function" ? ae(we) : ae, An(ae, {
          class: `${s.value}-submenu-expand-icon`
        }, !1);
      } : null;
    });
    b$({
      prefixCls: s,
      activeKeys: y,
      openKeys: P,
      selectedKeys: S,
      changeActiveKeys: x,
      disabled: E,
      rtl: z,
      mode: N,
      inlineIndent: R(() => e.inlineIndent),
      subMenuCloseDelay: R(() => e.subMenuCloseDelay),
      subMenuOpenDelay: R(() => e.subMenuOpenDelay),
      builtinPlacements: R(() => e.builtinPlacements),
      triggerSubMenuAction: R(() => e.triggerSubMenuAction),
      getPopupContainer: R(() => e.getPopupContainer),
      inlineCollapsed: D,
      theme: R(() => e.theme),
      siderCollapsed: f,
      defaultMotions: R(() => b.value ? re.value : null),
      motion: R(() => b.value ? e.motion : null),
      overflowDisabled: Pe(void 0),
      onOpenChange: K,
      onItemClick: Y,
      registerMenuInfo: J,
      unRegisterMenuInfo: be,
      selectedSubMenuKeys: O,
      expandIcon: ge,
      forceSubMenuRender: R(() => e.forceSubMenuRender),
      rootClassName: c
    });
    const de = () => {
      var ne;
      return m.value || no((ne = n.default) === null || ne === void 0 ? void 0 : ne.call(n));
    };
    return () => {
      var ne;
      const we = de(), ae = xe.value >= we.length - 1 || N.value !== "horizontal" || e.disabledOverflow, se = (Me) => N.value !== "horizontal" || e.disabledOverflow ? Me : (
        // Need wrap for overflow dropdown that do not response for open
        Me.map((ke, Le) => (
          // Always wrap provider to avoid sub node re-mount
          v(Hd, {
            key: ke.key,
            overflowDisabled: Le > xe.value
          }, {
            default: () => ke
          })
        ))
      ), he = ((ne = n.overflowedIndicator) === null || ne === void 0 ? void 0 : ne.call(n)) || v(tc, null, null);
      return u(v(jr, Z(Z({}, i), {}, {
        onMousedown: e.onMousedown,
        prefixCls: `${s.value}-overflow`,
        component: "ul",
        itemComponent: ks,
        class: [U.value, i.class, c.value],
        role: "menu",
        id: e.id,
        data: se(we),
        renderRawItem: (Me) => Me,
        renderRawRest: (Me) => {
          const ke = Me.length, Le = ke ? we.slice(-ke) : null;
          return v(Ve, null, [v(Es, {
            eventKey: Lc,
            key: Lc,
            title: he,
            disabled: ae,
            internalPopupClose: ke === 0
          }, {
            default: () => Le
          }), v(Ly, null, {
            default: () => [v(Es, {
              eventKey: Lc,
              key: Lc,
              title: he,
              disabled: ae,
              internalPopupClose: ke === 0
            }, {
              default: () => Le
            })]
          })]);
        },
        maxCount: N.value !== "horizontal" || e.disabledOverflow ? jr.INVALIDATE : jr.RESPONSIVE,
        ssr: "full",
        "data-menu-list": !0,
        onVisibleChange: (Me) => {
          xe.value = Me;
        }
      }), {
        default: () => [v(Qd, {
          to: "body"
        }, {
          default: () => [v("div", {
            style: {
              display: "none"
            },
            "aria-hidden": !0
          }, [v(Ly, null, {
            default: () => [se(de())]
          })])]
        })]
      }));
    };
  }
});
lo.install = function(e) {
  return e.component(lo.name, lo), e.component(ks.name, ks), e.component(Es.name, Es), e.component(jd.name, jd), e.component(Vd.name, Vd), e;
};
lo.Item = ks;
lo.Divider = jd;
lo.SubMenu = Es;
lo.ItemGroup = Vd;
Xn.extend(MO);
Xn.extend(IO);
Xn.extend(SO);
Xn.extend(CO);
Xn.extend($O);
Xn.extend(PO);
Xn.extend(OO);
Xn.extend((e, t) => {
  const n = t.prototype, o = n.format;
  n.format = function(r) {
    const a = (r || "").replace("Wo", "wo");
    return o.bind(this)(a);
  };
});
const v5 = {
  // ar_EG:
  // az_AZ:
  // bg_BG:
  bn_BD: "bn-bd",
  by_BY: "be",
  // ca_ES:
  // cs_CZ:
  // da_DK:
  // de_DE:
  // el_GR:
  en_GB: "en-gb",
  en_US: "en",
  // es_ES:
  // et_EE:
  // fa_IR:
  // fi_FI:
  fr_BE: "fr",
  fr_CA: "fr-ca",
  // fr_FR:
  // ga_IE:
  // gl_ES:
  // he_IL:
  // hi_IN:
  // hr_HR:
  // hu_HU:
  hy_AM: "hy-am",
  // id_ID:
  // is_IS:
  // it_IT:
  // ja_JP:
  // ka_GE:
  // kk_KZ:
  // km_KH:
  kmr_IQ: "ku",
  // kn_IN:
  // ko_KR:
  // ku_IQ: // previous ku in antd
  // lt_LT:
  // lv_LV:
  // mk_MK:
  // ml_IN:
  // mn_MN:
  // ms_MY:
  // nb_NO:
  // ne_NP:
  nl_BE: "nl-be",
  // nl_NL:
  // pl_PL:
  pt_BR: "pt-br",
  // pt_PT:
  // ro_RO:
  // ru_RU:
  // sk_SK:
  // sl_SI:
  // sr_RS:
  // sv_SE:
  // ta_IN:
  // th_TH:
  // tr_TR:
  // uk_UA:
  // ur_PK:
  // vi_VN:
  zh_CN: "zh-cn",
  zh_HK: "zh-hk",
  zh_TW: "zh-tw"
}, Ua = (e) => v5[e] || e.split("_")[0], Xy = () => {
  Lg(!1, "Not match any format. Please help to fire a issue about this.");
}, m5 = /\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|k{1,2}|S/g;
function Qy(e, t, n) {
  const o = [...new Set(e.split(n))];
  let i = 0;
  for (let r = 0; r < o.length; r++) {
    const a = o[r];
    if (i += a.length, i > t)
      return a;
    i += n.length;
  }
}
const Zy = (e, t) => {
  if (!e) return null;
  if (Xn.isDayjs(e))
    return e;
  const n = t.matchAll(m5);
  let o = Xn(e, t);
  if (n === null)
    return o;
  for (const i of n) {
    const r = i[0], a = i.index;
    if (r === "Q") {
      const l = e.slice(a - 1, a), s = Qy(e, a, l).match(/\d+/)[0];
      o = o.quarter(parseInt(s));
    }
    if (r.toLowerCase() === "wo") {
      const l = e.slice(a - 1, a), s = Qy(e, a, l).match(/\d+/)[0];
      o = o.week(parseInt(s));
    }
    r.toLowerCase() === "ww" && (o = o.week(parseInt(e.slice(a, a + r.length)))), r.toLowerCase() === "w" && (o = o.week(parseInt(e.slice(a, a + r.length + 1))));
  }
  return o;
}, b5 = {
  // get
  getNow: () => Xn(),
  getFixedDate: (e) => Xn(e, ["YYYY-M-DD", "YYYY-MM-DD"]),
  getEndDate: (e) => e.endOf("month"),
  getWeekDay: (e) => {
    const t = e.locale("en");
    return t.weekday() + t.localeData().firstDayOfWeek();
  },
  getYear: (e) => e.year(),
  getMonth: (e) => e.month(),
  getDate: (e) => e.date(),
  getHour: (e) => e.hour(),
  getMinute: (e) => e.minute(),
  getSecond: (e) => e.second(),
  // set
  addYear: (e, t) => e.add(t, "year"),
  addMonth: (e, t) => e.add(t, "month"),
  addDate: (e, t) => e.add(t, "day"),
  setYear: (e, t) => e.year(t),
  setMonth: (e, t) => e.month(t),
  setDate: (e, t) => e.date(t),
  setHour: (e, t) => e.hour(t),
  setMinute: (e, t) => e.minute(t),
  setSecond: (e, t) => e.second(t),
  // Compare
  isAfter: (e, t) => e.isAfter(t),
  isValidate: (e) => e.isValid(),
  locale: {
    getWeekFirstDay: (e) => Xn().locale(Ua(e)).localeData().firstDayOfWeek(),
    getWeekFirstDate: (e, t) => t.locale(Ua(e)).weekday(0),
    getWeek: (e, t) => t.locale(Ua(e)).week(),
    getShortWeekDays: (e) => Xn().locale(Ua(e)).localeData().weekdaysMin(),
    getShortMonths: (e) => Xn().locale(Ua(e)).localeData().monthsShort(),
    format: (e, t, n) => t.locale(Ua(e)).format(n),
    parse: (e, t, n) => {
      const o = Ua(e);
      for (let i = 0; i < n.length; i += 1) {
        const r = n[i], a = t;
        if (r.includes("wo") || r.includes("Wo")) {
          const s = a.split("-")[0], u = a.split("-")[1], c = Xn(s, "YYYY").startOf("year").locale(o);
          for (let d = 0; d <= 52; d += 1) {
            const f = c.add(d, "week");
            if (f.format("Wo") === u)
              return f;
          }
          return Xy(), null;
        }
        const l = Xn(a, r, !0).locale(o);
        if (l.isValid())
          return l;
      }
      return t || Xy(), null;
    }
  },
  toDate: (e, t) => Array.isArray(e) ? e.map((n) => Zy(n, t)) : Zy(e, t),
  toString: (e, t) => Array.isArray(e) ? e.map((n) => Xn.isDayjs(n) ? n.format(t) : n) : Xn.isDayjs(e) ? e.format(t) : e
};
function Yn(e) {
  const t = mO();
  return I(I({}, e), t);
}
const T$ = Symbol("PanelContextProps"), sm = (e) => {
  kt(T$, e);
}, Cr = () => Tt(T$, {}), Fc = {
  visibility: "hidden"
};
function Ra(e, t) {
  let {
    slots: n
  } = t;
  var o;
  const i = Yn(e), {
    prefixCls: r,
    prevIcon: a = "‹",
    nextIcon: l = "›",
    superPrevIcon: s = "«",
    superNextIcon: u = "»",
    onSuperPrev: c,
    onSuperNext: d,
    onPrev: f,
    onNext: p
  } = i, {
    hideNextBtn: m,
    hidePrevBtn: b
  } = Cr();
  return v("div", {
    class: r
  }, [c && v("button", {
    type: "button",
    onClick: c,
    tabindex: -1,
    class: `${r}-super-prev-btn`,
    style: b.value ? Fc : {}
  }, [s]), f && v("button", {
    type: "button",
    onClick: f,
    tabindex: -1,
    class: `${r}-prev-btn`,
    style: b.value ? Fc : {}
  }, [a]), v("div", {
    class: `${r}-view`
  }, [(o = n.default) === null || o === void 0 ? void 0 : o.call(n)]), p && v("button", {
    type: "button",
    onClick: p,
    tabindex: -1,
    class: `${r}-next-btn`,
    style: m.value ? Fc : {}
  }, [l]), d && v("button", {
    type: "button",
    onClick: d,
    tabindex: -1,
    class: `${r}-super-next-btn`,
    style: m.value ? Fc : {}
  }, [u])]);
}
Ra.displayName = "Header";
Ra.inheritAttrs = !1;
function um(e) {
  const t = Yn(e), {
    prefixCls: n,
    generateConfig: o,
    viewDate: i,
    onPrevDecades: r,
    onNextDecades: a
  } = t, {
    hideHeader: l
  } = Cr();
  if (l)
    return null;
  const s = `${n}-header`, u = o.getYear(i), c = Math.floor(u / Lr) * Lr, d = c + Lr - 1;
  return v(Ra, Z(Z({}, t), {}, {
    prefixCls: s,
    onSuperPrev: r,
    onSuperNext: a
  }), {
    default: () => [c, Ee("-"), d]
  });
}
um.displayName = "DecadeHeader";
um.inheritAttrs = !1;
function k$(e, t, n, o, i) {
  let r = e.setHour(t, n);
  return r = e.setMinute(r, o), r = e.setSecond(r, i), r;
}
function fd(e, t, n) {
  if (!n)
    return t;
  let o = t;
  return o = e.setHour(o, e.getHour(n)), o = e.setMinute(o, e.getMinute(n)), o = e.setSecond(o, e.getSecond(n)), o;
}
function y5(e, t, n, o, i, r) {
  const a = Math.floor(e / o) * o;
  if (a < e)
    return [a, 60 - i, 60 - r];
  const l = Math.floor(t / i) * i;
  if (l < t)
    return [a, l, 60 - r];
  const s = Math.floor(n / r) * r;
  return [a, l, s];
}
function x5(e, t) {
  const n = e.getYear(t), o = e.getMonth(t) + 1, i = e.getEndDate(e.getFixedDate(`${n}-${o}-01`)), r = e.getDate(i), a = o < 10 ? `0${o}` : `${o}`;
  return `${n}-${a}-${r}`;
}
function Ml(e) {
  const {
    prefixCls: t,
    disabledDate: n,
    onSelect: o,
    picker: i,
    rowNum: r,
    colNum: a,
    prefixColumn: l,
    rowClassName: s,
    baseDate: u,
    getCellClassName: c,
    getCellText: d,
    getCellNode: f,
    getCellDate: p,
    generateConfig: m,
    titleCell: b,
    headerCells: y
  } = Yn(e), {
    onDateMouseenter: S,
    onDateMouseleave: C,
    mode: O
  } = Cr(), $ = `${t}-cell`, P = [];
  for (let k = 0; k < r; k += 1) {
    const x = [];
    let E;
    for (let z = 0; z < a; z += 1) {
      const N = k * a + z, D = p(u, N), W = vh({
        cellDate: D,
        mode: O.value,
        disabledDate: n,
        generateConfig: m
      });
      z === 0 && (E = D, l && x.push(l(E)));
      const H = b && b(D);
      x.push(v("td", {
        key: z,
        title: H,
        class: Te($, I({
          [`${$}-disabled`]: W,
          [`${$}-start`]: d(D) === 1 || i === "year" && Number(H) % 10 === 0,
          [`${$}-end`]: H === x5(m, D) || i === "year" && Number(H) % 10 === 9
        }, c(D))),
        onClick: (L) => {
          L.stopPropagation(), W || o(D);
        },
        onMouseenter: () => {
          !W && S && S(D);
        },
        onMouseleave: () => {
          !W && C && C(D);
        }
      }, [f ? f(D) : v("div", {
        class: `${$}-inner`
      }, [d(D)])]));
    }
    P.push(v("tr", {
      key: k,
      class: s && s(E)
    }, [x]));
  }
  return v("div", {
    class: `${t}-body`
  }, [v("table", {
    class: `${t}-content`
  }, [y && v("thead", null, [v("tr", null, [y])]), v("tbody", null, [P])])]);
}
Ml.displayName = "PanelBody";
Ml.inheritAttrs = !1;
const ph = 3, Jy = 4;
function cm(e) {
  const t = Yn(e), n = Wi - 1, {
    prefixCls: o,
    viewDate: i,
    generateConfig: r
  } = t, a = `${o}-cell`, l = r.getYear(i), s = Math.floor(l / Wi) * Wi, u = Math.floor(l / Lr) * Lr, c = u + Lr - 1, d = r.setYear(i, u - Math.ceil((ph * Jy * Wi - Lr) / 2)), f = (p) => {
    const m = r.getYear(p), b = m + n;
    return {
      [`${a}-in-view`]: u <= m && b <= c,
      [`${a}-selected`]: m === s
    };
  };
  return v(Ml, Z(Z({}, t), {}, {
    rowNum: Jy,
    colNum: ph,
    baseDate: d,
    getCellText: (p) => {
      const m = r.getYear(p);
      return `${m}-${m + n}`;
    },
    getCellClassName: f,
    getCellDate: (p, m) => r.addYear(p, m * Wi)
  }), null);
}
cm.displayName = "DecadeBody";
cm.inheritAttrs = !1;
const Hc = /* @__PURE__ */ new Map();
function w5(e, t) {
  let n;
  function o() {
    _v(e) ? t() : n = Mt(() => {
      o();
    });
  }
  return o(), () => {
    Mt.cancel(n);
  };
}
function gh(e, t, n) {
  if (Hc.get(e) && Mt.cancel(Hc.get(e)), n <= 0) {
    Hc.set(e, Mt(() => {
      e.scrollTop = t;
    }));
    return;
  }
  const i = (t - e.scrollTop) / n * 10;
  Hc.set(e, Mt(() => {
    e.scrollTop += i, e.scrollTop !== t && gh(e, t, n - 10);
  }));
}
function js(e, t) {
  let {
    onLeftRight: n,
    onCtrlLeftRight: o,
    onUpDown: i,
    onPageUpDown: r,
    onEnter: a
  } = t;
  const {
    which: l,
    ctrlKey: s,
    metaKey: u
  } = e;
  switch (l) {
    case Xe.LEFT:
      if (s || u) {
        if (o)
          return o(-1), !0;
      } else if (n)
        return n(-1), !0;
      break;
    case Xe.RIGHT:
      if (s || u) {
        if (o)
          return o(1), !0;
      } else if (n)
        return n(1), !0;
      break;
    case Xe.UP:
      if (i)
        return i(-1), !0;
      break;
    case Xe.DOWN:
      if (i)
        return i(1), !0;
      break;
    case Xe.PAGE_UP:
      if (r)
        return r(-1), !0;
      break;
    case Xe.PAGE_DOWN:
      if (r)
        return r(1), !0;
      break;
    case Xe.ENTER:
      if (a)
        return a(), !0;
      break;
  }
  return !1;
}
function E$(e, t, n, o) {
  let i = e;
  if (!i)
    switch (t) {
      case "time":
        i = o ? "hh:mm:ss a" : "HH:mm:ss";
        break;
      case "week":
        i = "gggg-wo";
        break;
      case "month":
        i = "YYYY-MM";
        break;
      case "quarter":
        i = "YYYY-[Q]Q";
        break;
      case "year":
        i = "YYYY";
        break;
      default:
        i = n ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
    }
  return i;
}
function _$(e, t, n) {
  const o = e === "time" ? 8 : 10, i = typeof t == "function" ? t(n.getNow()).length : t.length;
  return Math.max(o, i) + 2;
}
let lu = null;
const Vc = /* @__PURE__ */ new Set();
function S5(e) {
  return !lu && typeof window < "u" && window.addEventListener && (lu = (t) => {
    [...Vc].forEach((n) => {
      n(t);
    });
  }, window.addEventListener("mousedown", lu)), Vc.add(e), () => {
    Vc.delete(e), Vc.size === 0 && (window.removeEventListener("mousedown", lu), lu = null);
  };
}
function C5(e) {
  var t;
  const n = e.target;
  return e.composed && n.shadowRoot && ((t = e.composedPath) === null || t === void 0 ? void 0 : t.call(e)[0]) || n;
}
const $5 = (e) => e === "month" || e === "date" ? "year" : e, P5 = (e) => e === "date" ? "month" : e, O5 = (e) => e === "month" || e === "date" ? "quarter" : e, I5 = (e) => e === "date" ? "week" : e, M5 = {
  year: $5,
  month: P5,
  quarter: O5,
  week: I5,
  time: null,
  date: null
};
function A$(e, t) {
  return process.env.NODE_ENV === "test" ? !1 : e.some((n) => n && n.contains(t));
}
const Wi = 10, Lr = Wi * 10;
function dm(e) {
  const t = Yn(e), {
    prefixCls: n,
    onViewDateChange: o,
    generateConfig: i,
    viewDate: r,
    operationRef: a,
    onSelect: l,
    onPanelChange: s
  } = t, u = `${n}-decade-panel`;
  a.value = {
    onKeydown: (f) => js(f, {
      onLeftRight: (p) => {
        l(i.addYear(r, p * Wi), "key");
      },
      onCtrlLeftRight: (p) => {
        l(i.addYear(r, p * Lr), "key");
      },
      onUpDown: (p) => {
        l(i.addYear(r, p * Wi * ph), "key");
      },
      onEnter: () => {
        s("year", r);
      }
    })
  };
  const c = (f) => {
    const p = i.addYear(r, f * Lr);
    o(p), s(null, p);
  }, d = (f) => {
    l(f, "mouse"), s("year", f);
  };
  return v("div", {
    class: u
  }, [v(um, Z(Z({}, t), {}, {
    prefixCls: n,
    onPrevDecades: () => {
      c(-1);
    },
    onNextDecades: () => {
      c(1);
    }
  }), null), v(cm, Z(Z({}, t), {}, {
    prefixCls: n,
    onSelect: d
  }), null)]);
}
dm.displayName = "DecadePanel";
dm.inheritAttrs = !1;
const pd = 7;
function Tl(e, t) {
  if (!e && !t)
    return !0;
  if (!e || !t)
    return !1;
}
function T5(e, t, n) {
  const o = Tl(t, n);
  if (typeof o == "boolean")
    return o;
  const i = Math.floor(e.getYear(t) / 10), r = Math.floor(e.getYear(n) / 10);
  return i === r;
}
function Tf(e, t, n) {
  const o = Tl(t, n);
  return typeof o == "boolean" ? o : e.getYear(t) === e.getYear(n);
}
function hh(e, t) {
  return Math.floor(e.getMonth(t) / 3) + 1;
}
function D$(e, t, n) {
  const o = Tl(t, n);
  return typeof o == "boolean" ? o : Tf(e, t, n) && hh(e, t) === hh(e, n);
}
function fm(e, t, n) {
  const o = Tl(t, n);
  return typeof o == "boolean" ? o : Tf(e, t, n) && e.getMonth(t) === e.getMonth(n);
}
function Fr(e, t, n) {
  const o = Tl(t, n);
  return typeof o == "boolean" ? o : e.getYear(t) === e.getYear(n) && e.getMonth(t) === e.getMonth(n) && e.getDate(t) === e.getDate(n);
}
function k5(e, t, n) {
  const o = Tl(t, n);
  return typeof o == "boolean" ? o : e.getHour(t) === e.getHour(n) && e.getMinute(t) === e.getMinute(n) && e.getSecond(t) === e.getSecond(n);
}
function z$(e, t, n, o) {
  const i = Tl(n, o);
  return typeof i == "boolean" ? i : e.locale.getWeek(t, n) === e.locale.getWeek(t, o);
}
function ss(e, t, n) {
  return Fr(e, t, n) && k5(e, t, n);
}
function jc(e, t, n, o) {
  return !t || !n || !o ? !1 : !Fr(e, t, o) && !Fr(e, n, o) && e.isAfter(o, t) && e.isAfter(n, o);
}
function E5(e, t, n) {
  const o = t.locale.getWeekFirstDay(e), i = t.setDate(n, 1), r = t.getWeekDay(i);
  let a = t.addDate(i, o - r);
  return t.getMonth(a) === t.getMonth(n) && t.getDate(a) > 1 && (a = t.addDate(a, -7)), a;
}
function Ou(e, t, n) {
  let o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 1;
  switch (t) {
    case "year":
      return n.addYear(e, o * 10);
    case "quarter":
    case "month":
      return n.addYear(e, o);
    default:
      return n.addMonth(e, o);
  }
}
function wo(e, t) {
  let {
    generateConfig: n,
    locale: o,
    format: i
  } = t;
  return typeof i == "function" ? i(e) : n.locale.format(o.locale, e, i);
}
function R$(e, t) {
  let {
    generateConfig: n,
    locale: o,
    formatList: i
  } = t;
  return !e || typeof i[0] == "function" ? null : n.locale.parse(o.locale, e, i);
}
function vh(e) {
  let {
    cellDate: t,
    mode: n,
    disabledDate: o,
    generateConfig: i
  } = e;
  if (!o) return !1;
  const r = (a, l, s) => {
    let u = l;
    for (; u <= s; ) {
      let c;
      switch (a) {
        case "date": {
          if (c = i.setDate(t, u), !o(c))
            return !1;
          break;
        }
        case "month": {
          if (c = i.setMonth(t, u), !vh({
            cellDate: c,
            mode: "month",
            generateConfig: i,
            disabledDate: o
          }))
            return !1;
          break;
        }
        case "year": {
          if (c = i.setYear(t, u), !vh({
            cellDate: c,
            mode: "year",
            generateConfig: i,
            disabledDate: o
          }))
            return !1;
          break;
        }
      }
      u += 1;
    }
    return !0;
  };
  switch (n) {
    case "date":
    case "week":
      return o(t);
    case "month": {
      const l = i.getDate(i.getEndDate(t));
      return r("date", 1, l);
    }
    case "quarter": {
      const a = Math.floor(i.getMonth(t) / 3) * 3, l = a + 2;
      return r("month", a, l);
    }
    case "year":
      return r("month", 0, 11);
    case "decade": {
      const a = i.getYear(t), l = Math.floor(a / Wi) * Wi, s = l + Wi - 1;
      return r("year", l, s);
    }
  }
}
function pm(e) {
  const t = Yn(e), {
    hideHeader: n
  } = Cr();
  if (n.value)
    return null;
  const {
    prefixCls: o,
    generateConfig: i,
    locale: r,
    value: a,
    format: l
  } = t, s = `${o}-header`;
  return v(Ra, {
    prefixCls: s
  }, {
    default: () => [a ? wo(a, {
      locale: r,
      format: l,
      generateConfig: i
    }) : " "]
  });
}
pm.displayName = "TimeHeader";
pm.inheritAttrs = !1;
const Wc = ye({
  name: "TimeUnitColumn",
  props: ["prefixCls", "units", "onSelect", "value", "active", "hideDisabledOptions"],
  setup(e) {
    const {
      open: t
    } = Cr(), n = Pe(null), o = le(/* @__PURE__ */ new Map()), i = le();
    return Ie(() => e.value, () => {
      const r = o.value.get(e.value);
      r && t.value !== !1 && gh(n.value, r.offsetTop, 120);
    }), At(() => {
      var r;
      (r = i.value) === null || r === void 0 || r.call(i);
    }), Ie(t, () => {
      var r;
      (r = i.value) === null || r === void 0 || r.call(i), Nt(() => {
        if (t.value) {
          const a = o.value.get(e.value);
          a && (i.value = w5(a, () => {
            gh(n.value, a.offsetTop, 0);
          }));
        }
      });
    }, {
      immediate: !0,
      flush: "post"
    }), () => {
      const {
        prefixCls: r,
        units: a,
        onSelect: l,
        value: s,
        active: u,
        hideDisabledOptions: c
      } = e, d = `${r}-cell`;
      return v("ul", {
        class: Te(`${r}-column`, {
          [`${r}-column-active`]: u
        }),
        ref: n,
        style: {
          position: "relative"
        }
      }, [a.map((f) => c && f.disabled ? null : v("li", {
        key: f.value,
        ref: (p) => {
          o.value.set(f.value, p);
        },
        class: Te(d, {
          [`${d}-disabled`]: f.disabled,
          [`${d}-selected`]: s === f.value
        }),
        onClick: () => {
          f.disabled || l(f.value);
        }
      }, [v("div", {
        class: `${d}-inner`
      }, [f.label])]))]);
    };
  }
});
function N$(e, t) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "0", o = String(e);
  for (; o.length < t; )
    o = `${n}${e}`;
  return o;
}
const _5 = function() {
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
    t[n] = arguments[n];
  return t;
};
function B$(e) {
  return e == null ? [] : Array.isArray(e) ? e : [e];
}
function L$(e) {
  const t = {};
  return Object.keys(e).forEach((n) => {
    (n.startsWith("data-") || n.startsWith("aria-") || n === "role" || n === "name") && !n.startsWith("data-__") && (t[n] = e[n]);
  }), t;
}
function Ft(e, t) {
  return e ? e[t] : null;
}
function $i(e, t, n) {
  const o = [Ft(e, 0), Ft(e, 1)];
  return o[n] = typeof t == "function" ? t(o[n]) : t, !o[0] && !o[1] ? null : o;
}
function zp(e, t, n, o) {
  const i = [];
  for (let r = e; r <= t; r += n)
    i.push({
      label: N$(r, 2),
      value: r,
      disabled: (o || []).includes(r)
    });
  return i;
}
const A5 = ye({
  compatConfig: {
    MODE: 3
  },
  name: "TimeBody",
  inheritAttrs: !1,
  props: ["generateConfig", "prefixCls", "operationRef", "activeColumnIndex", "value", "showHour", "showMinute", "showSecond", "use12Hours", "hourStep", "minuteStep", "secondStep", "disabledHours", "disabledMinutes", "disabledSeconds", "disabledTime", "hideDisabledOptions", "onSelect"],
  setup(e) {
    const t = R(() => e.value ? e.generateConfig.getHour(e.value) : -1), n = R(() => e.use12Hours ? t.value >= 12 : !1), o = R(() => e.use12Hours ? t.value % 12 : t.value), i = R(() => e.value ? e.generateConfig.getMinute(e.value) : -1), r = R(() => e.value ? e.generateConfig.getSecond(e.value) : -1), a = le(e.generateConfig.getNow()), l = le(), s = le(), u = le();
    Gh(() => {
      a.value = e.generateConfig.getNow();
    }), Lt(() => {
      if (e.disabledTime) {
        const y = e.disabledTime(a);
        [l.value, s.value, u.value] = [y.disabledHours, y.disabledMinutes, y.disabledSeconds];
      } else
        [l.value, s.value, u.value] = [e.disabledHours, e.disabledMinutes, e.disabledSeconds];
    });
    const c = (y, S, C, O) => {
      let $ = e.value || e.generateConfig.getNow();
      const P = Math.max(0, S), k = Math.max(0, C), x = Math.max(0, O);
      return $ = k$(e.generateConfig, $, !e.use12Hours || !y ? P : P + 12, k, x), $;
    }, d = R(() => {
      var y;
      return zp(0, 23, (y = e.hourStep) !== null && y !== void 0 ? y : 1, l.value && l.value());
    }), f = R(() => {
      if (!e.use12Hours)
        return [!1, !1];
      const y = [!0, !0];
      return d.value.forEach((S) => {
        let {
          disabled: C,
          value: O
        } = S;
        C || (O >= 12 ? y[1] = !1 : y[0] = !1);
      }), y;
    }), p = R(() => e.use12Hours ? d.value.filter(n.value ? (y) => y.value >= 12 : (y) => y.value < 12).map((y) => {
      const S = y.value % 12, C = S === 0 ? "12" : N$(S, 2);
      return I(I({}, y), {
        label: C,
        value: S
      });
    }) : d.value), m = R(() => {
      var y;
      return zp(0, 59, (y = e.minuteStep) !== null && y !== void 0 ? y : 1, s.value && s.value(t.value));
    }), b = R(() => {
      var y;
      return zp(0, 59, (y = e.secondStep) !== null && y !== void 0 ? y : 1, u.value && u.value(t.value, i.value));
    });
    return () => {
      const {
        prefixCls: y,
        operationRef: S,
        activeColumnIndex: C,
        showHour: O,
        showMinute: $,
        showSecond: P,
        use12Hours: k,
        hideDisabledOptions: x,
        onSelect: E
      } = e, z = [], N = `${y}-content`, D = `${y}-time-panel`;
      S.value = {
        onUpDown: (L) => {
          const A = z[C];
          if (A) {
            const U = A.units.findIndex((re) => re.value === A.value), j = A.units.length;
            for (let re = 1; re < j; re += 1) {
              const G = A.units[(U + L * re + j) % j];
              if (G.disabled !== !0) {
                A.onSelect(G.value);
                break;
              }
            }
          }
        }
      };
      function W(L, A, U, j, re) {
        L !== !1 && z.push({
          node: An(A, {
            prefixCls: D,
            value: U,
            active: C === z.length,
            onSelect: re,
            units: j,
            hideDisabledOptions: x
          }),
          onSelect: re,
          value: U,
          units: j
        });
      }
      W(O, v(Wc, {
        key: "hour"
      }, null), o.value, p.value, (L) => {
        E(c(n.value, L, i.value, r.value), "mouse");
      }), W($, v(Wc, {
        key: "minute"
      }, null), i.value, m.value, (L) => {
        E(c(n.value, o.value, L, r.value), "mouse");
      }), W(P, v(Wc, {
        key: "second"
      }, null), r.value, b.value, (L) => {
        E(c(n.value, o.value, i.value, L), "mouse");
      });
      let H = -1;
      return typeof n.value == "boolean" && (H = n.value ? 1 : 0), W(k === !0, v(Wc, {
        key: "12hours"
      }, null), H, [{
        label: "AM",
        value: 0,
        disabled: f.value[0]
      }, {
        label: "PM",
        value: 1,
        disabled: f.value[1]
      }], (L) => {
        E(c(!!L, o.value, i.value, r.value), "mouse");
      }), v("div", {
        class: N
      }, [z.map((L) => {
        let {
          node: A
        } = L;
        return A;
      })]);
    };
  }
}), D5 = (e) => e.filter((t) => t !== !1).length;
function kf(e) {
  const t = Yn(e), {
    generateConfig: n,
    format: o = "HH:mm:ss",
    prefixCls: i,
    active: r,
    operationRef: a,
    showHour: l,
    showMinute: s,
    showSecond: u,
    use12Hours: c = !1,
    onSelect: d,
    value: f
  } = t, p = `${i}-time-panel`, m = le(), b = le(-1), y = D5([l, s, u, c]);
  return a.value = {
    onKeydown: (S) => js(S, {
      onLeftRight: (C) => {
        b.value = (b.value + C + y) % y;
      },
      onUpDown: (C) => {
        b.value === -1 ? b.value = 0 : m.value && m.value.onUpDown(C);
      },
      onEnter: () => {
        d(f || n.getNow(), "key"), b.value = -1;
      }
    }),
    onBlur: () => {
      b.value = -1;
    }
  }, v("div", {
    class: Te(p, {
      [`${p}-active`]: r
    })
  }, [v(pm, Z(Z({}, t), {}, {
    format: o,
    prefixCls: i
  }), null), v(A5, Z(Z({}, t), {}, {
    prefixCls: i,
    activeColumnIndex: b.value,
    operationRef: m
  }), null)]);
}
kf.displayName = "TimePanel";
kf.inheritAttrs = !1;
function Ef(e) {
  let {
    cellPrefixCls: t,
    generateConfig: n,
    rangedValue: o,
    hoverRangedValue: i,
    isInView: r,
    isSameCell: a,
    offsetCell: l,
    today: s,
    value: u
  } = e;
  function c(d) {
    const f = l(d, -1), p = l(d, 1), m = Ft(o, 0), b = Ft(o, 1), y = Ft(i, 0), S = Ft(i, 1), C = jc(n, y, S, d);
    function O(z) {
      return a(m, z);
    }
    function $(z) {
      return a(b, z);
    }
    const P = a(y, d), k = a(S, d), x = (C || k) && (!r(f) || $(f)), E = (C || P) && (!r(p) || O(p));
    return {
      // In view
      [`${t}-in-view`]: r(d),
      // Range
      [`${t}-in-range`]: jc(n, m, b, d),
      [`${t}-range-start`]: O(d),
      [`${t}-range-end`]: $(d),
      [`${t}-range-start-single`]: O(d) && !b,
      [`${t}-range-end-single`]: $(d) && !m,
      [`${t}-range-start-near-hover`]: O(d) && (a(f, y) || jc(n, y, S, f)),
      [`${t}-range-end-near-hover`]: $(d) && (a(p, S) || jc(n, y, S, p)),
      // Range Hover
      [`${t}-range-hover`]: C,
      [`${t}-range-hover-start`]: P,
      [`${t}-range-hover-end`]: k,
      // Range Edge
      [`${t}-range-hover-edge-start`]: x,
      [`${t}-range-hover-edge-end`]: E,
      [`${t}-range-hover-edge-start-near-range`]: x && a(f, b),
      [`${t}-range-hover-edge-end-near-range`]: E && a(p, m),
      // Others
      [`${t}-today`]: a(s, d),
      [`${t}-selected`]: a(u, d)
    };
  }
  return c;
}
const F$ = Symbol("RangeContextProps"), z5 = (e) => {
  kt(F$, e);
}, nc = () => Tt(F$, {
  rangedValue: le(),
  hoverRangedValue: le(),
  inRange: le(),
  panelPosition: le()
}), R5 = ye({
  compatConfig: {
    MODE: 3
  },
  name: "PanelContextProvider",
  inheritAttrs: !1,
  props: {
    value: {
      type: Object,
      default: () => ({})
    }
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = {
      rangedValue: le(e.value.rangedValue),
      hoverRangedValue: le(e.value.hoverRangedValue),
      inRange: le(e.value.inRange),
      panelPosition: le(e.value.panelPosition)
    };
    return z5(o), Ie(() => e.value, () => {
      Object.keys(e.value).forEach((i) => {
        o[i] && (o[i].value = e.value[i]);
      });
    }), () => {
      var i;
      return (i = n.default) === null || i === void 0 ? void 0 : i.call(n);
    };
  }
});
function _f(e) {
  const t = Yn(e), {
    prefixCls: n,
    generateConfig: o,
    prefixColumn: i,
    locale: r,
    rowCount: a,
    viewDate: l,
    value: s,
    dateRender: u
  } = t, {
    rangedValue: c,
    hoverRangedValue: d
  } = nc(), f = E5(r.locale, o, l), p = `${n}-cell`, m = o.locale.getWeekFirstDay(r.locale), b = o.getNow(), y = [], S = r.shortWeekDays || (o.locale.getShortWeekDays ? o.locale.getShortWeekDays(r.locale) : []);
  i && y.push(v("th", {
    key: "empty",
    "aria-label": "empty cell"
  }, null));
  for (let $ = 0; $ < pd; $ += 1)
    y.push(v("th", {
      key: $
    }, [S[($ + m) % pd]]));
  const C = Ef({
    cellPrefixCls: p,
    today: b,
    value: s,
    generateConfig: o,
    rangedValue: i ? null : c.value,
    hoverRangedValue: i ? null : d.value,
    isSameCell: ($, P) => Fr(o, $, P),
    isInView: ($) => fm(o, $, l),
    offsetCell: ($, P) => o.addDate($, P)
  }), O = u ? ($) => u({
    current: $,
    today: b
  }) : void 0;
  return v(Ml, Z(Z({}, t), {}, {
    rowNum: a,
    colNum: pd,
    baseDate: f,
    getCellNode: O,
    getCellText: o.getDate,
    getCellClassName: C,
    getCellDate: o.addDate,
    titleCell: ($) => wo($, {
      locale: r,
      format: "YYYY-MM-DD",
      generateConfig: o
    }),
    headerCells: y
  }), null);
}
_f.displayName = "DateBody";
_f.inheritAttrs = !1;
_f.props = [
  "prefixCls",
  "generateConfig",
  "value?",
  "viewDate",
  "locale",
  "rowCount",
  "onSelect",
  "dateRender?",
  "disabledDate?",
  // Used for week panel
  "prefixColumn?",
  "rowClassName?"
];
function gm(e) {
  const t = Yn(e), {
    prefixCls: n,
    generateConfig: o,
    locale: i,
    viewDate: r,
    onNextMonth: a,
    onPrevMonth: l,
    onNextYear: s,
    onPrevYear: u,
    onYearClick: c,
    onMonthClick: d
  } = t, {
    hideHeader: f
  } = Cr();
  if (f.value)
    return null;
  const p = `${n}-header`, m = i.shortMonths || (o.locale.getShortMonths ? o.locale.getShortMonths(i.locale) : []), b = o.getMonth(r), y = v("button", {
    type: "button",
    key: "year",
    onClick: c,
    tabindex: -1,
    class: `${n}-year-btn`
  }, [wo(r, {
    locale: i,
    format: i.yearFormat,
    generateConfig: o
  })]), S = v("button", {
    type: "button",
    key: "month",
    onClick: d,
    tabindex: -1,
    class: `${n}-month-btn`
  }, [i.monthFormat ? wo(r, {
    locale: i,
    format: i.monthFormat,
    generateConfig: o
  }) : m[b]]), C = i.monthBeforeYear ? [S, y] : [y, S];
  return v(Ra, Z(Z({}, t), {}, {
    prefixCls: p,
    onSuperPrev: u,
    onPrev: l,
    onNext: a,
    onSuperNext: s
  }), {
    default: () => [C]
  });
}
gm.displayName = "DateHeader";
gm.inheritAttrs = !1;
const N5 = 6;
function oc(e) {
  const t = Yn(e), {
    prefixCls: n,
    panelName: o = "date",
    keyboardConfig: i,
    active: r,
    operationRef: a,
    generateConfig: l,
    value: s,
    viewDate: u,
    onViewDateChange: c,
    onPanelChange: d,
    onSelect: f
  } = t, p = `${n}-${o}-panel`;
  a.value = {
    onKeydown: (y) => js(y, I({
      onLeftRight: (S) => {
        f(l.addDate(s || u, S), "key");
      },
      onCtrlLeftRight: (S) => {
        f(l.addYear(s || u, S), "key");
      },
      onUpDown: (S) => {
        f(l.addDate(s || u, S * pd), "key");
      },
      onPageUpDown: (S) => {
        f(l.addMonth(s || u, S), "key");
      }
    }, i))
  };
  const m = (y) => {
    const S = l.addYear(u, y);
    c(S), d(null, S);
  }, b = (y) => {
    const S = l.addMonth(u, y);
    c(S), d(null, S);
  };
  return v("div", {
    class: Te(p, {
      [`${p}-active`]: r
    })
  }, [v(gm, Z(Z({}, t), {}, {
    prefixCls: n,
    value: s,
    viewDate: u,
    onPrevYear: () => {
      m(-1);
    },
    onNextYear: () => {
      m(1);
    },
    onPrevMonth: () => {
      b(-1);
    },
    onNextMonth: () => {
      b(1);
    },
    onMonthClick: () => {
      d("month", u);
    },
    onYearClick: () => {
      d("year", u);
    }
  }), null), v(_f, Z(Z({}, t), {}, {
    onSelect: (y) => f(y, "mouse"),
    prefixCls: n,
    value: s,
    viewDate: u,
    rowCount: N5
  }), null)]);
}
oc.displayName = "DatePanel";
oc.inheritAttrs = !1;
const ex = _5("date", "time");
function hm(e) {
  const t = Yn(e), {
    prefixCls: n,
    operationRef: o,
    generateConfig: i,
    value: r,
    defaultValue: a,
    disabledTime: l,
    showTime: s,
    onSelect: u
  } = t, c = `${n}-datetime-panel`, d = le(null), f = le({}), p = le({}), m = typeof s == "object" ? I({}, s) : {};
  function b(O) {
    const $ = ex.indexOf(d.value) + O;
    return ex[$] || null;
  }
  const y = (O) => {
    p.value.onBlur && p.value.onBlur(O), d.value = null;
  };
  o.value = {
    onKeydown: (O) => {
      if (O.which === Xe.TAB) {
        const $ = b(O.shiftKey ? -1 : 1);
        return d.value = $, $ && O.preventDefault(), !0;
      }
      if (d.value) {
        const $ = d.value === "date" ? f : p;
        return $.value && $.value.onKeydown && $.value.onKeydown(O), !0;
      }
      return [Xe.LEFT, Xe.RIGHT, Xe.UP, Xe.DOWN].includes(O.which) ? (d.value = "date", !0) : !1;
    },
    onBlur: y,
    onClose: y
  };
  const S = (O, $) => {
    let P = O;
    $ === "date" && !r && m.defaultValue ? (P = i.setHour(P, i.getHour(m.defaultValue)), P = i.setMinute(P, i.getMinute(m.defaultValue)), P = i.setSecond(P, i.getSecond(m.defaultValue))) : $ === "time" && !r && a && (P = i.setYear(P, i.getYear(a)), P = i.setMonth(P, i.getMonth(a)), P = i.setDate(P, i.getDate(a))), u && u(P, "mouse");
  }, C = l ? l(r || null) : {};
  return v("div", {
    class: Te(c, {
      [`${c}-active`]: d.value
    })
  }, [v(oc, Z(Z({}, t), {}, {
    operationRef: f,
    active: d.value === "date",
    onSelect: (O) => {
      S(fd(i, O, !r && typeof s == "object" ? s.defaultValue : null), "date");
    }
  }), null), v(kf, Z(Z(Z(Z({}, t), {}, {
    format: void 0
  }, m), C), {}, {
    disabledTime: null,
    defaultValue: void 0,
    operationRef: p,
    active: d.value === "time",
    onSelect: (O) => {
      S(O, "time");
    }
  }), null)]);
}
hm.displayName = "DatetimePanel";
hm.inheritAttrs = !1;
function vm(e) {
  const t = Yn(e), {
    prefixCls: n,
    generateConfig: o,
    locale: i,
    value: r
  } = t, a = `${n}-cell`, l = (c) => v("td", {
    key: "week",
    class: Te(a, `${a}-week`)
  }, [o.locale.getWeek(i.locale, c)]), s = `${n}-week-panel-row`, u = (c) => Te(s, {
    [`${s}-selected`]: z$(o, i.locale, r, c)
  });
  return v(oc, Z(Z({}, t), {}, {
    panelName: "week",
    prefixColumn: l,
    rowClassName: u,
    keyboardConfig: {
      onLeftRight: null
    }
  }), null);
}
vm.displayName = "WeekPanel";
vm.inheritAttrs = !1;
function mm(e) {
  const t = Yn(e), {
    prefixCls: n,
    generateConfig: o,
    locale: i,
    viewDate: r,
    onNextYear: a,
    onPrevYear: l,
    onYearClick: s
  } = t, {
    hideHeader: u
  } = Cr();
  if (u.value)
    return null;
  const c = `${n}-header`;
  return v(Ra, Z(Z({}, t), {}, {
    prefixCls: c,
    onSuperPrev: l,
    onSuperNext: a
  }), {
    default: () => [v("button", {
      type: "button",
      onClick: s,
      class: `${n}-year-btn`
    }, [wo(r, {
      locale: i,
      format: i.yearFormat,
      generateConfig: o
    })])]
  });
}
mm.displayName = "MonthHeader";
mm.inheritAttrs = !1;
const H$ = 3, B5 = 4;
function bm(e) {
  const t = Yn(e), {
    prefixCls: n,
    locale: o,
    value: i,
    viewDate: r,
    generateConfig: a,
    monthCellRender: l
  } = t, {
    rangedValue: s,
    hoverRangedValue: u
  } = nc(), c = `${n}-cell`, d = Ef({
    cellPrefixCls: c,
    value: i,
    generateConfig: a,
    rangedValue: s.value,
    hoverRangedValue: u.value,
    isSameCell: (b, y) => fm(a, b, y),
    isInView: () => !0,
    offsetCell: (b, y) => a.addMonth(b, y)
  }), f = o.shortMonths || (a.locale.getShortMonths ? a.locale.getShortMonths(o.locale) : []), p = a.setMonth(r, 0), m = l ? (b) => l({
    current: b,
    locale: o
  }) : void 0;
  return v(Ml, Z(Z({}, t), {}, {
    rowNum: B5,
    colNum: H$,
    baseDate: p,
    getCellNode: m,
    getCellText: (b) => o.monthFormat ? wo(b, {
      locale: o,
      format: o.monthFormat,
      generateConfig: a
    }) : f[a.getMonth(b)],
    getCellClassName: d,
    getCellDate: a.addMonth,
    titleCell: (b) => wo(b, {
      locale: o,
      format: "YYYY-MM",
      generateConfig: a
    })
  }), null);
}
bm.displayName = "MonthBody";
bm.inheritAttrs = !1;
function ym(e) {
  const t = Yn(e), {
    prefixCls: n,
    operationRef: o,
    onViewDateChange: i,
    generateConfig: r,
    value: a,
    viewDate: l,
    onPanelChange: s,
    onSelect: u
  } = t, c = `${n}-month-panel`;
  o.value = {
    onKeydown: (f) => js(f, {
      onLeftRight: (p) => {
        u(r.addMonth(a || l, p), "key");
      },
      onCtrlLeftRight: (p) => {
        u(r.addYear(a || l, p), "key");
      },
      onUpDown: (p) => {
        u(r.addMonth(a || l, p * H$), "key");
      },
      onEnter: () => {
        s("date", a || l);
      }
    })
  };
  const d = (f) => {
    const p = r.addYear(l, f);
    i(p), s(null, p);
  };
  return v("div", {
    class: c
  }, [v(mm, Z(Z({}, t), {}, {
    prefixCls: n,
    onPrevYear: () => {
      d(-1);
    },
    onNextYear: () => {
      d(1);
    },
    onYearClick: () => {
      s("year", l);
    }
  }), null), v(bm, Z(Z({}, t), {}, {
    prefixCls: n,
    onSelect: (f) => {
      u(f, "mouse"), s("date", f);
    }
  }), null)]);
}
ym.displayName = "MonthPanel";
ym.inheritAttrs = !1;
function xm(e) {
  const t = Yn(e), {
    prefixCls: n,
    generateConfig: o,
    locale: i,
    viewDate: r,
    onNextYear: a,
    onPrevYear: l,
    onYearClick: s
  } = t, {
    hideHeader: u
  } = Cr();
  if (u.value)
    return null;
  const c = `${n}-header`;
  return v(Ra, Z(Z({}, t), {}, {
    prefixCls: c,
    onSuperPrev: l,
    onSuperNext: a
  }), {
    default: () => [v("button", {
      type: "button",
      onClick: s,
      class: `${n}-year-btn`
    }, [wo(r, {
      locale: i,
      format: i.yearFormat,
      generateConfig: o
    })])]
  });
}
xm.displayName = "QuarterHeader";
xm.inheritAttrs = !1;
const L5 = 4, F5 = 1;
function wm(e) {
  const t = Yn(e), {
    prefixCls: n,
    locale: o,
    value: i,
    viewDate: r,
    generateConfig: a
  } = t, {
    rangedValue: l,
    hoverRangedValue: s
  } = nc(), u = `${n}-cell`, c = Ef({
    cellPrefixCls: u,
    value: i,
    generateConfig: a,
    rangedValue: l.value,
    hoverRangedValue: s.value,
    isSameCell: (f, p) => D$(a, f, p),
    isInView: () => !0,
    offsetCell: (f, p) => a.addMonth(f, p * 3)
  }), d = a.setDate(a.setMonth(r, 0), 1);
  return v(Ml, Z(Z({}, t), {}, {
    rowNum: F5,
    colNum: L5,
    baseDate: d,
    getCellText: (f) => wo(f, {
      locale: o,
      format: o.quarterFormat || "[Q]Q",
      generateConfig: a
    }),
    getCellClassName: c,
    getCellDate: (f, p) => a.addMonth(f, p * 3),
    titleCell: (f) => wo(f, {
      locale: o,
      format: "YYYY-[Q]Q",
      generateConfig: a
    })
  }), null);
}
wm.displayName = "QuarterBody";
wm.inheritAttrs = !1;
function Sm(e) {
  const t = Yn(e), {
    prefixCls: n,
    operationRef: o,
    onViewDateChange: i,
    generateConfig: r,
    value: a,
    viewDate: l,
    onPanelChange: s,
    onSelect: u
  } = t, c = `${n}-quarter-panel`;
  o.value = {
    onKeydown: (f) => js(f, {
      onLeftRight: (p) => {
        u(r.addMonth(a || l, p * 3), "key");
      },
      onCtrlLeftRight: (p) => {
        u(r.addYear(a || l, p), "key");
      },
      onUpDown: (p) => {
        u(r.addYear(a || l, p), "key");
      }
    })
  };
  const d = (f) => {
    const p = r.addYear(l, f);
    i(p), s(null, p);
  };
  return v("div", {
    class: c
  }, [v(xm, Z(Z({}, t), {}, {
    prefixCls: n,
    onPrevYear: () => {
      d(-1);
    },
    onNextYear: () => {
      d(1);
    },
    onYearClick: () => {
      s("year", l);
    }
  }), null), v(wm, Z(Z({}, t), {}, {
    prefixCls: n,
    onSelect: (f) => {
      u(f, "mouse");
    }
  }), null)]);
}
Sm.displayName = "QuarterPanel";
Sm.inheritAttrs = !1;
function Cm(e) {
  const t = Yn(e), {
    prefixCls: n,
    generateConfig: o,
    viewDate: i,
    onPrevDecade: r,
    onNextDecade: a,
    onDecadeClick: l
  } = t, {
    hideHeader: s
  } = Cr();
  if (s.value)
    return null;
  const u = `${n}-header`, c = o.getYear(i), d = Math.floor(c / Ca) * Ca, f = d + Ca - 1;
  return v(Ra, Z(Z({}, t), {}, {
    prefixCls: u,
    onSuperPrev: r,
    onSuperNext: a
  }), {
    default: () => [v("button", {
      type: "button",
      onClick: l,
      class: `${n}-decade-btn`
    }, [d, Ee("-"), f])]
  });
}
Cm.displayName = "YearHeader";
Cm.inheritAttrs = !1;
const mh = 3, tx = 4;
function $m(e) {
  const t = Yn(e), {
    prefixCls: n,
    value: o,
    viewDate: i,
    locale: r,
    generateConfig: a
  } = t, {
    rangedValue: l,
    hoverRangedValue: s
  } = nc(), u = `${n}-cell`, c = a.getYear(i), d = Math.floor(c / Ca) * Ca, f = d + Ca - 1, p = a.setYear(i, d - Math.ceil((mh * tx - Ca) / 2)), m = (y) => {
    const S = a.getYear(y);
    return d <= S && S <= f;
  }, b = Ef({
    cellPrefixCls: u,
    value: o,
    generateConfig: a,
    rangedValue: l.value,
    hoverRangedValue: s.value,
    isSameCell: (y, S) => Tf(a, y, S),
    isInView: m,
    offsetCell: (y, S) => a.addYear(y, S)
  });
  return v(Ml, Z(Z({}, t), {}, {
    rowNum: tx,
    colNum: mh,
    baseDate: p,
    getCellText: a.getYear,
    getCellClassName: b,
    getCellDate: a.addYear,
    titleCell: (y) => wo(y, {
      locale: r,
      format: "YYYY",
      generateConfig: a
    })
  }), null);
}
$m.displayName = "YearBody";
$m.inheritAttrs = !1;
const Ca = 10;
function Pm(e) {
  const t = Yn(e), {
    prefixCls: n,
    operationRef: o,
    onViewDateChange: i,
    generateConfig: r,
    value: a,
    viewDate: l,
    sourceMode: s,
    onSelect: u,
    onPanelChange: c
  } = t, d = `${n}-year-panel`;
  o.value = {
    onKeydown: (p) => js(p, {
      onLeftRight: (m) => {
        u(r.addYear(a || l, m), "key");
      },
      onCtrlLeftRight: (m) => {
        u(r.addYear(a || l, m * Ca), "key");
      },
      onUpDown: (m) => {
        u(r.addYear(a || l, m * mh), "key");
      },
      onEnter: () => {
        c(s === "date" ? "date" : "month", a || l);
      }
    })
  };
  const f = (p) => {
    const m = r.addYear(l, p * 10);
    i(m), c(null, m);
  };
  return v("div", {
    class: d
  }, [v(Cm, Z(Z({}, t), {}, {
    prefixCls: n,
    onPrevDecade: () => {
      f(-1);
    },
    onNextDecade: () => {
      f(1);
    },
    onDecadeClick: () => {
      c("decade", l);
    }
  }), null), v($m, Z(Z({}, t), {}, {
    prefixCls: n,
    onSelect: (p) => {
      c(s === "date" ? "date" : "month", p), u(p, "mouse");
    }
  }), null)]);
}
Pm.displayName = "YearPanel";
Pm.inheritAttrs = !1;
function V$(e, t, n) {
  return n ? v("div", {
    class: `${e}-footer-extra`
  }, [n(t)]) : null;
}
function j$(e) {
  let {
    prefixCls: t,
    components: n = {},
    needConfirmButton: o,
    onNow: i,
    onOk: r,
    okDisabled: a,
    showNow: l,
    locale: s
  } = e, u, c;
  if (o) {
    const d = n.button || "button";
    i && l !== !1 && (u = v("li", {
      class: `${t}-now`
    }, [v("a", {
      class: `${t}-now-btn`,
      onClick: i
    }, [s.now])])), c = o && v("li", {
      class: `${t}-ok`
    }, [v(d, {
      disabled: a,
      onClick: (f) => {
        f.stopPropagation(), r && r();
      }
    }, {
      default: () => [s.ok]
    })]);
  }
  return !u && !c ? null : v("ul", {
    class: `${t}-ranges`
  }, [u, c]);
}
function H5() {
  return ye({
    name: "PickerPanel",
    inheritAttrs: !1,
    props: {
      prefixCls: String,
      locale: Object,
      generateConfig: Object,
      value: Object,
      defaultValue: Object,
      pickerValue: Object,
      defaultPickerValue: Object,
      disabledDate: Function,
      mode: String,
      picker: {
        type: String,
        default: "date"
      },
      tabindex: {
        type: [Number, String],
        default: 0
      },
      showNow: {
        type: Boolean,
        default: void 0
      },
      showTime: [Boolean, Object],
      showToday: Boolean,
      renderExtraFooter: Function,
      dateRender: Function,
      hideHeader: {
        type: Boolean,
        default: void 0
      },
      onSelect: Function,
      onChange: Function,
      onPanelChange: Function,
      onMousedown: Function,
      onPickerValueChange: Function,
      onOk: Function,
      components: Object,
      direction: String,
      hourStep: {
        type: Number,
        default: 1
      },
      minuteStep: {
        type: Number,
        default: 1
      },
      secondStep: {
        type: Number,
        default: 1
      }
    },
    setup(e, t) {
      let {
        attrs: n
      } = t;
      const o = R(() => e.picker === "date" && !!e.showTime || e.picker === "time"), i = R(() => 24 % e.hourStep === 0), r = R(() => 60 % e.minuteStep === 0), a = R(() => 60 % e.secondStep === 0);
      process.env.NODE_ENV !== "production" && Lt(() => {
        const {
          generateConfig: j,
          value: re,
          hourStep: G = 1,
          minuteStep: Y = 1,
          secondStep: K = 1
        } = e;
        yo(!re || j.isValidate(re), "Invalidate date pass to `value`."), yo(!re || j.isValidate(re), "Invalidate date pass to `defaultValue`."), yo(i.value, `\`hourStep\` ${G} is invalid. It should be a factor of 24.`), yo(r.value, `\`minuteStep\` ${Y} is invalid. It should be a factor of 60.`), yo(a.value, `\`secondStep\` ${K} is invalid. It should be a factor of 60.`);
      });
      const l = Cr(), {
        operationRef: s,
        onSelect: u,
        hideRanges: c,
        defaultOpenValue: d
      } = l, {
        inRange: f,
        panelPosition: p,
        rangedValue: m,
        hoverRangedValue: b
      } = nc(), y = le({}), [S, C] = Wo(null, {
        value: Ut(e, "value"),
        defaultValue: e.defaultValue,
        postState: (j) => !j && d?.value && e.picker === "time" ? d.value : j
      }), [O, $] = Wo(null, {
        value: Ut(e, "pickerValue"),
        defaultValue: e.defaultPickerValue || S.value,
        postState: (j) => {
          const {
            generateConfig: re,
            showTime: G,
            defaultValue: Y
          } = e, K = re.getNow();
          return j ? !S.value && e.showTime ? typeof G == "object" ? fd(re, Array.isArray(j) ? j[0] : j, G.defaultValue || K) : Y ? fd(re, Array.isArray(j) ? j[0] : j, Y) : fd(re, Array.isArray(j) ? j[0] : j, K) : j : K;
        }
      }), P = (j) => {
        $(j), e.onPickerValueChange && e.onPickerValueChange(j);
      }, k = (j) => {
        const re = M5[e.picker];
        return re ? re(j) : j;
      }, [x, E] = Wo(() => e.picker === "time" ? "time" : k("date"), {
        value: Ut(e, "mode")
      });
      Ie(() => e.picker, () => {
        E(e.picker);
      });
      const z = le(x.value), N = (j) => {
        z.value = j;
      }, D = (j, re) => {
        const {
          onPanelChange: G,
          generateConfig: Y
        } = e, K = k(j || x.value);
        N(x.value), E(K), G && (x.value !== K || ss(Y, O.value, O.value)) && G(re, K);
      }, W = function(j, re) {
        let G = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
        const {
          picker: Y,
          generateConfig: K,
          onSelect: J,
          onChange: be,
          disabledDate: xe
        } = e;
        (x.value === Y || G) && (C(j), J && J(j), u && u(j, re), be && !ss(K, j, S.value) && !xe?.(j) && be(j));
      }, H = (j) => y.value && y.value.onKeydown ? ([Xe.LEFT, Xe.RIGHT, Xe.UP, Xe.DOWN, Xe.PAGE_UP, Xe.PAGE_DOWN, Xe.ENTER].includes(j.which) && j.preventDefault(), y.value.onKeydown(j)) : (yo(!1, "Panel not correct handle keyDown event. Please help to fire issue about this."), !1), L = (j) => {
        y.value && y.value.onBlur && y.value.onBlur(j);
      }, A = () => {
        const {
          generateConfig: j,
          hourStep: re,
          minuteStep: G,
          secondStep: Y
        } = e, K = j.getNow(), J = y5(j.getHour(K), j.getMinute(K), j.getSecond(K), i.value ? re : 1, r.value ? G : 1, a.value ? Y : 1), be = k$(
          j,
          K,
          J[0],
          // hour
          J[1],
          // minute
          J[2]
        );
        W(be, "submit");
      }, U = R(() => {
        const {
          prefixCls: j,
          direction: re
        } = e;
        return Te(`${j}-panel`, {
          [`${j}-panel-has-range`]: m && m.value && m.value[0] && m.value[1],
          [`${j}-panel-has-range-hover`]: b && b.value && b.value[0] && b.value[1],
          [`${j}-panel-rtl`]: re === "rtl"
        });
      });
      return sm(I(I({}, l), {
        mode: x,
        hideHeader: R(() => {
          var j;
          return e.hideHeader !== void 0 ? e.hideHeader : (j = l.hideHeader) === null || j === void 0 ? void 0 : j.value;
        }),
        hidePrevBtn: R(() => f.value && p.value === "right"),
        hideNextBtn: R(() => f.value && p.value === "left")
      })), Ie(() => e.value, () => {
        e.value && $(e.value);
      }), () => {
        const {
          prefixCls: j = "ant-picker",
          locale: re,
          generateConfig: G,
          disabledDate: Y,
          picker: K = "date",
          tabindex: J = 0,
          showNow: be,
          showTime: xe,
          showToday: ge,
          renderExtraFooter: de,
          onMousedown: ne,
          onOk: we,
          components: ae
        } = e;
        s && p.value !== "right" && (s.value = {
          onKeydown: H,
          onClose: () => {
            y.value && y.value.onClose && y.value.onClose();
          }
        });
        let se;
        const he = I(I(I({}, n), e), {
          operationRef: y,
          prefixCls: j,
          viewDate: O.value,
          value: S.value,
          onViewDateChange: P,
          sourceMode: z.value,
          onPanelChange: D,
          disabledDate: Y
        });
        switch (delete he.onChange, delete he.onSelect, x.value) {
          case "decade":
            se = v(dm, Z(Z({}, he), {}, {
              onSelect: (Re, We) => {
                P(Re), W(Re, We);
              }
            }), null);
            break;
          case "year":
            se = v(Pm, Z(Z({}, he), {}, {
              onSelect: (Re, We) => {
                P(Re), W(Re, We);
              }
            }), null);
            break;
          case "month":
            se = v(ym, Z(Z({}, he), {}, {
              onSelect: (Re, We) => {
                P(Re), W(Re, We);
              }
            }), null);
            break;
          case "quarter":
            se = v(Sm, Z(Z({}, he), {}, {
              onSelect: (Re, We) => {
                P(Re), W(Re, We);
              }
            }), null);
            break;
          case "week":
            se = v(vm, Z(Z({}, he), {}, {
              onSelect: (Re, We) => {
                P(Re), W(Re, We);
              }
            }), null);
            break;
          case "time":
            delete he.showTime, se = v(kf, Z(Z(Z({}, he), typeof xe == "object" ? xe : null), {}, {
              onSelect: (Re, We) => {
                P(Re), W(Re, We);
              }
            }), null);
            break;
          default:
            xe ? se = v(hm, Z(Z({}, he), {}, {
              onSelect: (Re, We) => {
                P(Re), W(Re, We);
              }
            }), null) : se = v(oc, Z(Z({}, he), {}, {
              onSelect: (Re, We) => {
                P(Re), W(Re, We);
              }
            }), null);
        }
        let Me, ke;
        c?.value || (Me = V$(j, x.value, de), ke = j$({
          prefixCls: j,
          components: ae,
          needConfirmButton: o.value,
          okDisabled: !S.value || Y && Y(S.value),
          locale: re,
          showNow: be,
          onNow: o.value && A,
          onOk: () => {
            S.value && (W(S.value, "submit", !0), we && we(S.value));
          }
        }));
        let Le;
        if (ge && x.value === "date" && K === "date" && !xe) {
          const Re = G.getNow(), We = `${j}-today-btn`, et = Y && Y(Re);
          Le = v("a", {
            class: Te(We, et && `${We}-disabled`),
            "aria-disabled": et,
            onClick: () => {
              et || W(Re, "mouse", !0);
            }
          }, [re.today]);
        }
        return v("div", {
          tabindex: J,
          class: Te(U.value, n.class),
          style: n.style,
          onKeydown: H,
          onBlur: L,
          onMousedown: ne
        }, [se, Me || ke || Le ? v("div", {
          class: `${j}-footer`
        }, [Me, ke, Le]) : null]);
      };
    }
  });
}
const V5 = H5(), W$ = ((e) => v(V5, e)), j5 = {
  bottomLeft: {
    points: ["tl", "bl"],
    offset: [0, 4],
    overflow: {
      adjustX: 1,
      adjustY: 1
    }
  },
  bottomRight: {
    points: ["tr", "br"],
    offset: [0, 4],
    overflow: {
      adjustX: 1,
      adjustY: 1
    }
  },
  topLeft: {
    points: ["bl", "tl"],
    offset: [0, -4],
    overflow: {
      adjustX: 0,
      adjustY: 1
    }
  },
  topRight: {
    points: ["br", "tr"],
    offset: [0, -4],
    overflow: {
      adjustX: 0,
      adjustY: 1
    }
  }
};
function q$(e, t) {
  let {
    slots: n
  } = t;
  const {
    prefixCls: o,
    popupStyle: i,
    visible: r,
    dropdownClassName: a,
    dropdownAlign: l,
    transitionName: s,
    getPopupContainer: u,
    range: c,
    popupPlacement: d,
    direction: f
  } = Yn(e), p = `${o}-dropdown`;
  return v(Zu, {
    showAction: [],
    hideAction: [],
    popupPlacement: d !== void 0 ? d : f === "rtl" ? "bottomRight" : "bottomLeft",
    builtinPlacements: j5,
    prefixCls: p,
    popupTransitionName: s,
    popupAlign: l,
    popupVisible: r,
    popupClassName: Te(a, {
      [`${p}-range`]: c,
      [`${p}-rtl`]: f === "rtl"
    }),
    popupStyle: i,
    getPopupContainer: u
  }, {
    default: n.default,
    popup: n.popupElement
  });
}
const G$ = ye({
  name: "PresetPanel",
  props: {
    prefixCls: String,
    presets: {
      type: Array,
      default: () => []
    },
    onClick: Function,
    onHover: Function
  },
  setup(e) {
    return () => e.presets.length ? v("div", {
      class: `${e.prefixCls}-presets`
    }, [v("ul", null, [e.presets.map((t, n) => {
      let {
        label: o,
        value: i
      } = t;
      return v("li", {
        key: n,
        onClick: (r) => {
          r.stopPropagation(), e.onClick(i);
        },
        onMouseenter: () => {
          var r;
          (r = e.onHover) === null || r === void 0 || r.call(e, i);
        },
        onMouseleave: () => {
          var r;
          (r = e.onHover) === null || r === void 0 || r.call(e, null);
        }
      }, [o]);
    })])]) : null;
  }
});
function bh(e) {
  let {
    open: t,
    value: n,
    isClickOutside: o,
    triggerOpen: i,
    forwardKeydown: r,
    onKeydown: a,
    blurToCancel: l,
    onSubmit: s,
    onCancel: u,
    onFocus: c,
    onBlur: d
  } = e;
  const f = Pe(!1), p = Pe(!1), m = Pe(!1), b = Pe(!1), y = Pe(!1), S = R(() => ({
    onMousedown: () => {
      f.value = !0, i(!0);
    },
    onKeydown: (O) => {
      if (a(O, () => {
        y.value = !0;
      }), !y.value) {
        switch (O.which) {
          case Xe.ENTER: {
            t.value ? s() !== !1 && (f.value = !0) : i(!0), O.preventDefault();
            return;
          }
          case Xe.TAB: {
            f.value && t.value && !O.shiftKey ? (f.value = !1, O.preventDefault()) : !f.value && t.value && !r(O) && O.shiftKey && (f.value = !0, O.preventDefault());
            return;
          }
          case Xe.ESC: {
            f.value = !0, u();
            return;
          }
        }
        !t.value && ![Xe.SHIFT].includes(O.which) ? i(!0) : f.value || r(O);
      }
    },
    onFocus: (O) => {
      f.value = !0, p.value = !0, c && c(O);
    },
    onBlur: (O) => {
      if (m.value || !o(document.activeElement)) {
        m.value = !1;
        return;
      }
      l.value ? setTimeout(() => {
        let {
          activeElement: $
        } = document;
        for (; $ && $.shadowRoot; )
          $ = $.shadowRoot.activeElement;
        o($) && u();
      }, 0) : t.value && (i(!1), b.value && s()), p.value = !1, d && d(O);
    }
  }));
  Ie(t, () => {
    b.value = !1;
  }), Ie(n, () => {
    b.value = !0;
  });
  const C = Pe();
  return Pt(() => {
    C.value = S5((O) => {
      const $ = C5(O);
      if (t.value) {
        const P = o($);
        P ? (!p.value || P) && i(!1) : (m.value = !0, Mt(() => {
          m.value = !1;
        }));
      }
    });
  }), At(() => {
    C.value && C.value();
  }), [S, {
    focused: p,
    typing: f
  }];
}
function yh(e) {
  let {
    valueTexts: t,
    onTextChange: n
  } = e;
  const o = le("");
  function i(a) {
    o.value = a, n(a);
  }
  function r() {
    o.value = t.value[0];
  }
  return Ie(() => [...t.value], function(a) {
    let l = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
    a.join("||") !== l.join("||") && t.value.every((s) => s !== o.value) && r();
  }, {
    immediate: !0
  }), [o, i, r];
}
function Wd(e, t) {
  let {
    formatList: n,
    generateConfig: o,
    locale: i
  } = t;
  const r = BC(() => {
    if (!e.value)
      return [[""], ""];
    let s = "";
    const u = [];
    for (let c = 0; c < n.value.length; c += 1) {
      const d = n.value[c], f = wo(e.value, {
        generateConfig: o.value,
        locale: i.value,
        format: d
      });
      u.push(f), c === 0 && (s = f);
    }
    return [u, s];
  }, [e, n], (s, u) => u[0] !== s[0] || !Jl(u[1], s[1])), a = R(() => r.value[0]), l = R(() => r.value[1]);
  return [a, l];
}
function xh(e, t) {
  let {
    formatList: n,
    generateConfig: o,
    locale: i
  } = t;
  const r = le(null);
  let a;
  function l(d) {
    let f = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
    if (Mt.cancel(a), f) {
      r.value = d;
      return;
    }
    a = Mt(() => {
      r.value = d;
    });
  }
  const [, s] = Wd(r, {
    formatList: n,
    generateConfig: o,
    locale: i
  });
  function u(d) {
    l(d);
  }
  function c() {
    let d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
    l(null, d);
  }
  return Ie(e, () => {
    c(!0);
  }), At(() => {
    Mt.cancel(a);
  }), [s, u, c];
}
function K$(e, t) {
  return R(() => e?.value ? e.value : t?.value ? (ei(!1, "`ranges` is deprecated. Please use `presets` instead."), Object.keys(t.value).map((o) => {
    const i = t.value[o], r = typeof i == "function" ? i() : i;
    return {
      label: o,
      value: r
    };
  })) : []);
}
function Y$(e) {
  const {
    picker: t,
    disabledHours: n,
    disabledMinutes: o,
    disabledSeconds: i
  } = e;
  t === "time" && (n || o || i) && yo(!1, "'disabledHours', 'disabledMinutes', 'disabledSeconds' will be removed in the next major version, please use 'disabledTime' instead.");
}
function W5() {
  return ye({
    name: "Picker",
    inheritAttrs: !1,
    props: ["prefixCls", "id", "tabindex", "dropdownClassName", "dropdownAlign", "popupStyle", "transitionName", "generateConfig", "locale", "inputReadOnly", "allowClear", "autofocus", "showTime", "showNow", "showHour", "showMinute", "showSecond", "picker", "format", "use12Hours", "value", "defaultValue", "open", "defaultOpen", "defaultOpenValue", "suffixIcon", "presets", "clearIcon", "disabled", "disabledDate", "placeholder", "getPopupContainer", "panelRender", "inputRender", "onChange", "onOpenChange", "onPanelChange", "onFocus", "onBlur", "onMousedown", "onMouseup", "onMouseenter", "onMouseleave", "onContextmenu", "onClick", "onKeydown", "onSelect", "direction", "autocomplete", "showToday", "renderExtraFooter", "dateRender", "minuteStep", "hourStep", "secondStep", "hideDisabledOptions"],
    setup(e, t) {
      let {
        attrs: n,
        expose: o
      } = t;
      const i = le(null), r = R(() => e.presets), a = K$(r), l = R(() => {
        var Y;
        return (Y = e.picker) !== null && Y !== void 0 ? Y : "date";
      }), s = R(() => l.value === "date" && !!e.showTime || l.value === "time");
      process.env.NODE_ENV !== "production" && Y$(e);
      const u = R(() => B$(E$(e.format, l.value, e.showTime, e.use12Hours))), c = le(null), d = le(null), f = le(null), [p, m] = Wo(null, {
        value: Ut(e, "value"),
        defaultValue: e.defaultValue
      }), b = le(p.value), y = (Y) => {
        b.value = Y;
      }, S = le(null), [C, O] = Wo(!1, {
        value: Ut(e, "open"),
        defaultValue: e.defaultOpen,
        postState: (Y) => e.disabled ? !1 : Y,
        onChange: (Y) => {
          e.onOpenChange && e.onOpenChange(Y), !Y && S.value && S.value.onClose && S.value.onClose();
        }
      }), [$, P] = Wd(b, {
        formatList: u,
        generateConfig: Ut(e, "generateConfig"),
        locale: Ut(e, "locale")
      }), [k, x, E] = yh({
        valueTexts: $,
        onTextChange: (Y) => {
          const K = R$(Y, {
            locale: e.locale,
            formatList: u.value,
            generateConfig: e.generateConfig
          });
          K && (!e.disabledDate || !e.disabledDate(K)) && y(K);
        }
      }), z = (Y) => {
        const {
          onChange: K,
          generateConfig: J,
          locale: be
        } = e;
        y(Y), m(Y), K && !ss(J, p.value, Y) && K(Y, Y ? wo(Y, {
          generateConfig: J,
          locale: be,
          format: u.value[0]
        }) : "");
      }, N = (Y) => {
        e.disabled && Y || O(Y);
      }, D = (Y) => C.value && S.value && S.value.onKeydown ? S.value.onKeydown(Y) : (yo(!1, "Picker not correct forward Keydown operation. Please help to fire issue about this."), !1), W = function() {
        e.onMouseup && e.onMouseup(...arguments), i.value && (i.value.focus(), N(!0));
      }, [H, {
        focused: L,
        typing: A
      }] = bh({
        blurToCancel: s,
        open: C,
        value: k,
        triggerOpen: N,
        forwardKeydown: D,
        isClickOutside: (Y) => !A$([c.value, d.value, f.value], Y),
        onSubmit: () => (
          // When user typing disabledDate with keyboard and enter, this value will be empty
          !b.value || // Normal disabled check
          e.disabledDate && e.disabledDate(b.value) ? !1 : (z(b.value), N(!1), E(), !0)
        ),
        onCancel: () => {
          N(!1), y(p.value), E();
        },
        onKeydown: (Y, K) => {
          var J;
          (J = e.onKeydown) === null || J === void 0 || J.call(e, Y, K);
        },
        onFocus: (Y) => {
          var K;
          (K = e.onFocus) === null || K === void 0 || K.call(e, Y);
        },
        onBlur: (Y) => {
          var K;
          (K = e.onBlur) === null || K === void 0 || K.call(e, Y);
        }
      });
      Ie([C, $], () => {
        C.value || (y(p.value), !$.value.length || $.value[0] === "" ? x("") : P.value !== k.value && E());
      }), Ie(l, () => {
        C.value || E();
      }), Ie(p, () => {
        y(p.value);
      });
      const [U, j, re] = xh(k, {
        formatList: u,
        generateConfig: Ut(e, "generateConfig"),
        locale: Ut(e, "locale")
      }), G = (Y, K) => {
        (K === "submit" || K !== "key" && !s.value) && (z(Y), N(!1));
      };
      return sm({
        operationRef: S,
        hideHeader: R(() => l.value === "time"),
        onSelect: G,
        open: C,
        defaultOpenValue: Ut(e, "defaultOpenValue"),
        onDateMouseenter: j,
        onDateMouseleave: re
      }), o({
        focus: () => {
          i.value && i.value.focus();
        },
        blur: () => {
          i.value && i.value.blur();
        }
      }), () => {
        const {
          prefixCls: Y = "rc-picker",
          id: K,
          tabindex: J,
          dropdownClassName: be,
          dropdownAlign: xe,
          popupStyle: ge,
          transitionName: de,
          generateConfig: ne,
          locale: we,
          inputReadOnly: ae,
          allowClear: se,
          autofocus: he,
          picker: Me = "date",
          defaultOpenValue: ke,
          suffixIcon: Le,
          clearIcon: Re,
          disabled: We,
          placeholder: et,
          getPopupContainer: Fe,
          panelRender: Ne,
          onMousedown: Ge,
          onMouseenter: it,
          onMouseleave: Ke,
          onContextmenu: Oe,
          onClick: je,
          onSelect: De,
          direction: Je,
          autocomplete: wt = "off"
        } = e, lt = I(I(I({}, e), n), {
          class: Te({
            [`${Y}-panel-focused`]: !A.value
          }),
          style: void 0,
          pickerValue: void 0,
          onPickerValueChange: void 0,
          onChange: null
        });
        let qe = v("div", {
          class: `${Y}-panel-layout`
        }, [v(G$, {
          prefixCls: Y,
          presets: a.value,
          onClick: (Dt) => {
            z(Dt), N(!1);
          }
        }, null), v(W$, Z(Z({}, lt), {}, {
          generateConfig: ne,
          value: b.value,
          locale: we,
          tabindex: -1,
          onSelect: (Dt) => {
            De?.(Dt), y(Dt);
          },
          direction: Je,
          onPanelChange: (Dt, zn) => {
            const {
              onPanelChange: on
            } = e;
            re(!0), on?.(Dt, zn);
          }
        }), null)]);
        Ne && (qe = Ne(qe));
        const rt = v("div", {
          class: `${Y}-panel-container`,
          ref: c,
          onMousedown: (Dt) => {
            Dt.preventDefault();
          }
        }, [qe]);
        let dt;
        Le && (dt = v("span", {
          class: `${Y}-suffix`
        }, [Le]));
        let vt;
        se && p.value && !We && (vt = v("span", {
          onMousedown: (Dt) => {
            Dt.preventDefault(), Dt.stopPropagation();
          },
          onMouseup: (Dt) => {
            Dt.preventDefault(), Dt.stopPropagation(), z(null), N(!1);
          },
          class: `${Y}-clear`,
          role: "button"
        }, [Re || v("span", {
          class: `${Y}-clear-btn`
        }, null)]));
        const Rt = I(I(I(I({
          id: K,
          tabindex: J,
          disabled: We,
          readonly: ae || typeof u.value[0] == "function" || !A.value,
          value: U.value || k.value,
          onInput: (Dt) => {
            x(Dt.target.value);
          },
          autofocus: he,
          placeholder: et,
          ref: i,
          title: k.value
        }, H.value), {
          size: _$(Me, u.value[0], ne)
        }), L$(e)), {
          autocomplete: wt
        }), Xt = e.inputRender ? e.inputRender(Rt) : v("input", Rt, null);
        process.env.NODE_ENV !== "production" && yo(!ke, "`defaultOpenValue` may confuse user for the current value status. Please use `defaultValue` instead.");
        const vn = Je === "rtl" ? "bottomRight" : "bottomLeft";
        return v("div", {
          ref: f,
          class: Te(Y, n.class, {
            [`${Y}-disabled`]: We,
            [`${Y}-focused`]: L.value,
            [`${Y}-rtl`]: Je === "rtl"
          }),
          style: n.style,
          onMousedown: Ge,
          onMouseup: W,
          onMouseenter: it,
          onMouseleave: Ke,
          onContextmenu: Oe,
          onClick: je
        }, [v("div", {
          class: Te(`${Y}-input`, {
            [`${Y}-input-placeholder`]: !!U.value
          }),
          ref: d
        }, [Xt, dt, vt]), v(q$, {
          visible: C.value,
          popupStyle: ge,
          prefixCls: Y,
          dropdownClassName: be,
          dropdownAlign: xe,
          getPopupContainer: Fe,
          transitionName: de,
          popupPlacement: vn,
          direction: Je
        }, {
          default: () => [v("div", {
            style: {
              pointerEvents: "none",
              position: "absolute",
              top: 0,
              bottom: 0,
              left: 0,
              right: 0
            }
          }, null)],
          popupElement: () => rt
        })]);
      };
    }
  });
}
const q5 = W5();
function G5(e, t) {
  let {
    picker: n,
    locale: o,
    selectedValue: i,
    disabledDate: r,
    disabled: a,
    generateConfig: l
  } = e;
  const s = R(() => Ft(i.value, 0)), u = R(() => Ft(i.value, 1));
  function c(b) {
    return l.value.locale.getWeekFirstDate(o.value.locale, b);
  }
  function d(b) {
    const y = l.value.getYear(b), S = l.value.getMonth(b);
    return y * 100 + S;
  }
  function f(b) {
    const y = l.value.getYear(b), S = hh(l.value, b);
    return y * 10 + S;
  }
  return [(b) => {
    var y;
    if (r && (!((y = r?.value) === null || y === void 0) && y.call(r, b)))
      return !0;
    if (a[1] && u)
      return !Fr(l.value, b, u.value) && l.value.isAfter(b, u.value);
    if (t.value[1] && u.value)
      switch (n.value) {
        case "quarter":
          return f(b) > f(u.value);
        case "month":
          return d(b) > d(u.value);
        case "week":
          return c(b) > c(u.value);
        default:
          return !Fr(l.value, b, u.value) && l.value.isAfter(b, u.value);
      }
    return !1;
  }, (b) => {
    var y;
    if (!((y = r.value) === null || y === void 0) && y.call(r, b))
      return !0;
    if (a[0] && s)
      return !Fr(l.value, b, u.value) && l.value.isAfter(s.value, b);
    if (t.value[0] && s.value)
      switch (n.value) {
        case "quarter":
          return f(b) < f(s.value);
        case "month":
          return d(b) < d(s.value);
        case "week":
          return c(b) < c(s.value);
        default:
          return !Fr(l.value, b, s.value) && l.value.isAfter(s.value, b);
      }
    return !1;
  }];
}
function K5(e, t, n, o) {
  const i = Ou(e, n, o, 1);
  function r(a) {
    return a(e, t) ? "same" : a(i, t) ? "closing" : "far";
  }
  switch (n) {
    case "year":
      return r((a, l) => T5(o, a, l));
    case "quarter":
    case "month":
      return r((a, l) => Tf(o, a, l));
    default:
      return r((a, l) => fm(o, a, l));
  }
}
function Y5(e, t, n, o) {
  const i = Ft(e, 0), r = Ft(e, 1);
  if (t === 0)
    return i;
  if (i && r)
    switch (K5(i, r, n, o)) {
      case "same":
        return i;
      case "closing":
        return i;
      default:
        return Ou(r, n, o, -1);
    }
  return i;
}
function U5(e) {
  let {
    values: t,
    picker: n,
    defaultDates: o,
    generateConfig: i
  } = e;
  const r = le([Ft(o, 0), Ft(o, 1)]), a = le(null), l = R(() => Ft(t.value, 0)), s = R(() => Ft(t.value, 1)), u = (p) => r.value[p] ? r.value[p] : Ft(a.value, p) || Y5(t.value, p, n.value, i.value) || l.value || s.value || i.value.getNow(), c = le(null), d = le(null);
  Lt(() => {
    c.value = u(0), d.value = u(1);
  });
  function f(p, m) {
    if (p) {
      let b = $i(a.value, p, m);
      r.value = $i(r.value, null, m) || [null, null];
      const y = (m + 1) % 2;
      Ft(t.value, y) || (b = $i(b, p, y)), a.value = b;
    } else (l.value || s.value) && (a.value = null);
  }
  return [c, d, f];
}
function X5(e) {
  return lw() ? (sw(e), !0) : !1;
}
function Q5(e) {
  return typeof e == "function" ? e() : M(e);
}
function U$(e) {
  var t;
  const n = Q5(e);
  return (t = n?.$el) !== null && t !== void 0 ? t : n;
}
function Z5(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
  ci() ? Pt(e) : t ? e() : Nt(e);
}
function J5(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  const n = Pe(), o = () => n.value = !!e();
  return o(), Z5(o, t), n;
}
var Rp;
const X$ = typeof window < "u";
X$ && (!((Rp = window?.navigator) === null || Rp === void 0) && Rp.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
const e8 = X$ ? window : void 0;
var t8 = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
function n8(e, t) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  const {
    window: o = e8
  } = n, i = t8(n, ["window"]);
  let r;
  const a = J5(() => o && "ResizeObserver" in o), l = () => {
    r && (r.disconnect(), r = void 0);
  }, s = Ie(() => U$(e), (c) => {
    l(), a.value && o && c && (r = new ResizeObserver(t), r.observe(c, i));
  }, {
    immediate: !0,
    flush: "post"
  }), u = () => {
    l(), s();
  };
  return X5(u), {
    isSupported: a,
    stop: u
  };
}
function su(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
    width: 0,
    height: 0
  }, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  const {
    box: o = "content-box"
  } = n, i = Pe(t.width), r = Pe(t.height);
  return n8(e, (a) => {
    let [l] = a;
    const s = o === "border-box" ? l.borderBoxSize : o === "content-box" ? l.contentBoxSize : l.devicePixelContentBoxSize;
    s ? (i.value = s.reduce((u, c) => {
      let {
        inlineSize: d
      } = c;
      return u + d;
    }, 0), r.value = s.reduce((u, c) => {
      let {
        blockSize: d
      } = c;
      return u + d;
    }, 0)) : (i.value = l.contentRect.width, r.value = l.contentRect.height);
  }, n), Ie(() => U$(e), (a) => {
    i.value = a ? t.width : 0, r.value = a ? t.height : 0;
  }), {
    width: i,
    height: r
  };
}
function nx(e, t) {
  return e && e[0] && e[1] && t.isAfter(e[0], e[1]) ? [e[1], e[0]] : e;
}
function ox(e, t, n, o) {
  return !!(e || o && o[t] || n[(t + 1) % 2]);
}
function o8() {
  return ye({
    name: "RangerPicker",
    inheritAttrs: !1,
    props: ["prefixCls", "id", "popupStyle", "dropdownClassName", "transitionName", "dropdownAlign", "getPopupContainer", "generateConfig", "locale", "placeholder", "autofocus", "disabled", "format", "picker", "showTime", "showNow", "showHour", "showMinute", "showSecond", "use12Hours", "separator", "value", "defaultValue", "defaultPickerValue", "open", "defaultOpen", "disabledDate", "disabledTime", "dateRender", "panelRender", "ranges", "allowEmpty", "allowClear", "suffixIcon", "clearIcon", "pickerRef", "inputReadOnly", "mode", "renderExtraFooter", "onChange", "onOpenChange", "onPanelChange", "onCalendarChange", "onFocus", "onBlur", "onMousedown", "onMouseup", "onMouseenter", "onMouseleave", "onClick", "onOk", "onKeydown", "components", "order", "direction", "activePickerIndex", "autocomplete", "minuteStep", "hourStep", "secondStep", "hideDisabledOptions", "disabledMinutes", "presets", "prevIcon", "nextIcon", "superPrevIcon", "superNextIcon"],
    setup(e, t) {
      let {
        attrs: n,
        expose: o
      } = t;
      const i = R(() => e.picker === "date" && !!e.showTime || e.picker === "time"), r = R(() => e.presets), a = R(() => e.ranges), l = K$(r, a), s = le({}), u = le(null), c = le(null), d = le(null), f = le(null), p = le(null), m = le(null), b = le(null), y = le(null);
      process.env.NODE_ENV !== "production" && Y$(e);
      const S = R(() => B$(E$(e.format, e.picker, e.showTime, e.use12Hours))), [C, O] = Wo(0, {
        value: Ut(e, "activePickerIndex")
      }), $ = le(null), P = R(() => {
        const {
          disabled: ze
        } = e;
        return Array.isArray(ze) ? ze : [ze || !1, ze || !1];
      }), [k, x] = Wo(null, {
        value: Ut(e, "value"),
        defaultValue: e.defaultValue,
        postState: (ze) => e.picker === "time" && !e.order ? ze : nx(ze, e.generateConfig)
      }), [E, z, N] = U5({
        values: k,
        picker: Ut(e, "picker"),
        defaultDates: e.defaultPickerValue,
        generateConfig: Ut(e, "generateConfig")
      }), [D, W] = Wo(k.value, {
        postState: (ze) => {
          let nt = ze;
          if (P.value[0] && P.value[1])
            return nt;
          for (let tt = 0; tt < 2; tt += 1)
            P.value[tt] && !Ft(nt, tt) && !Ft(e.allowEmpty, tt) && (nt = $i(nt, e.generateConfig.getNow(), tt));
          return nt;
        }
      }), [H, L] = Wo([e.picker, e.picker], {
        value: Ut(e, "mode")
      });
      Ie(() => e.picker, () => {
        L([e.picker, e.picker]);
      });
      const A = (ze, nt) => {
        var tt;
        L(ze), (tt = e.onPanelChange) === null || tt === void 0 || tt.call(e, nt, ze);
      }, [U, j] = G5({
        picker: Ut(e, "picker"),
        selectedValue: D,
        locale: Ut(e, "locale"),
        disabled: P,
        disabledDate: Ut(e, "disabledDate"),
        generateConfig: Ut(e, "generateConfig")
      }, s), [re, G] = Wo(!1, {
        value: Ut(e, "open"),
        defaultValue: e.defaultOpen,
        postState: (ze) => P.value[C.value] ? !1 : ze,
        onChange: (ze) => {
          var nt;
          (nt = e.onOpenChange) === null || nt === void 0 || nt.call(e, ze), !ze && $.value && $.value.onClose && $.value.onClose();
        }
      }), Y = R(() => re.value && C.value === 0), K = R(() => re.value && C.value === 1), J = le(0), be = le(0), xe = le(0), {
        width: ge
      } = su(u);
      Ie([re, ge], () => {
        !re.value && u.value && (xe.value = ge.value);
      });
      const {
        width: de
      } = su(c), {
        width: ne
      } = su(y), {
        width: we
      } = su(d), {
        width: ae
      } = su(p);
      Ie([C, re, de, ne, we, ae, () => e.direction], () => {
        be.value = 0, C.value ? d.value && p.value && (be.value = we.value + ae.value, de.value && ne.value && be.value > de.value - ne.value - (e.direction === "rtl" || y.value.offsetLeft > be.value ? 0 : y.value.offsetLeft) && (J.value = be.value)) : C.value === 0 && (J.value = 0);
      }, {
        immediate: !0
      });
      const se = le();
      function he(ze, nt) {
        if (ze)
          clearTimeout(se.value), s.value[nt] = !0, O(nt), G(ze), re.value || N(null, nt);
        else if (C.value === nt) {
          G(ze);
          const tt = s.value;
          se.value = setTimeout(() => {
            tt === s.value && (s.value = {});
          });
        }
      }
      function Me(ze) {
        he(!0, ze), setTimeout(() => {
          const nt = [m, b][ze];
          nt.value && nt.value.focus();
        }, 0);
      }
      function ke(ze, nt) {
        let tt = ze, zt = Ft(tt, 0), Vn = Ft(tt, 1);
        const {
          generateConfig: Rn,
          locale: go,
          picker: Jt,
          order: ht,
          onCalendarChange: Jn,
          allowEmpty: $o,
          onChange: an,
          showTime: ln
        } = e;
        zt && Vn && Rn.isAfter(zt, Vn) && (// WeekPicker only compare week
        Jt === "week" && !z$(Rn, go.locale, zt, Vn) || // QuotaPicker only compare week
        Jt === "quarter" && !D$(Rn, zt, Vn) || // Other non-TimePicker compare date
        Jt !== "week" && Jt !== "quarter" && Jt !== "time" && !(ln ? ss(Rn, zt, Vn) : Fr(Rn, zt, Vn)) ? (nt === 0 ? (tt = [zt, null], Vn = null) : (zt = null, tt = [null, Vn]), s.value = {
          [nt]: !0
        }) : (Jt !== "time" || ht !== !1) && (tt = nx(tt, Rn))), W(tt);
        const Ht = tt && tt[0] ? wo(tt[0], {
          generateConfig: Rn,
          locale: go,
          format: S.value[0]
        }) : "", sn = tt && tt[1] ? wo(tt[1], {
          generateConfig: Rn,
          locale: go,
          format: S.value[0]
        }) : "";
        Jn && Jn(tt, [Ht, sn], {
          range: nt === 0 ? "start" : "end"
        });
        const Io = ox(zt, 0, P.value, $o), kn = ox(Vn, 1, P.value, $o);
        (tt === null || Io && kn) && (x(tt), an && (!ss(Rn, Ft(k.value, 0), zt) || !ss(Rn, Ft(k.value, 1), Vn)) && an(tt, [Ht, sn]));
        let ho = null;
        nt === 0 && !P.value[1] ? ho = 1 : nt === 1 && !P.value[0] && (ho = 0), ho !== null && ho !== C.value && (!s.value[ho] || !Ft(tt, ho)) && Ft(tt, nt) ? Me(ho) : he(!1, nt);
      }
      const Le = (ze) => re && $.value && $.value.onKeydown ? $.value.onKeydown(ze) : (yo(!1, "Picker not correct forward Keydown operation. Please help to fire issue about this."), !1), Re = {
        formatList: S,
        generateConfig: Ut(e, "generateConfig"),
        locale: Ut(e, "locale")
      }, [We, et] = Wd(R(() => Ft(D.value, 0)), Re), [Fe, Ne] = Wd(R(() => Ft(D.value, 1)), Re), Ge = (ze, nt) => {
        const tt = R$(ze, {
          locale: e.locale,
          formatList: S.value,
          generateConfig: e.generateConfig
        });
        tt && !(nt === 0 ? U : j)(tt) && (W($i(D.value, tt, nt)), N(tt, nt));
      }, [it, Ke, Oe] = yh({
        valueTexts: We,
        onTextChange: (ze) => Ge(ze, 0)
      }), [je, De, Je] = yh({
        valueTexts: Fe,
        onTextChange: (ze) => Ge(ze, 1)
      }), [wt, lt] = On(null), [qe, rt] = On(null), [dt, vt, Rt] = xh(it, Re), [Xt, vn, Dt] = xh(je, Re), zn = (ze) => {
        rt($i(D.value, ze, C.value)), C.value === 0 ? vt(ze) : vn(ze);
      }, on = () => {
        rt($i(D.value, null, C.value)), C.value === 0 ? Rt() : Dt();
      }, Qt = (ze, nt) => ({
        forwardKeydown: Le,
        onBlur: (tt) => {
          var zt;
          (zt = e.onBlur) === null || zt === void 0 || zt.call(e, tt);
        },
        isClickOutside: (tt) => !A$([c.value, d.value, f.value, u.value], tt),
        onFocus: (tt) => {
          var zt;
          O(ze), (zt = e.onFocus) === null || zt === void 0 || zt.call(e, tt);
        },
        triggerOpen: (tt) => {
          he(tt, ze);
        },
        onSubmit: () => {
          if (
            // When user typing disabledDate with keyboard and enter, this value will be empty
            !D.value || // Normal disabled check
            e.disabledDate && e.disabledDate(D.value[ze])
          )
            return !1;
          ke(D.value, ze), nt();
        },
        onCancel: () => {
          he(!1, ze), W(k.value), nt();
        }
      }), [mn, {
        focused: Kt,
        typing: Mn
      }] = bh(I(I({}, Qt(0, Oe)), {
        blurToCancel: i,
        open: Y,
        value: it,
        onKeydown: (ze, nt) => {
          var tt;
          (tt = e.onKeydown) === null || tt === void 0 || tt.call(e, ze, nt);
        }
      })), [rn, {
        focused: gn,
        typing: Hn
      }] = bh(I(I({}, Qt(1, Je)), {
        blurToCancel: i,
        open: K,
        value: je,
        onKeydown: (ze, nt) => {
          var tt;
          (tt = e.onKeydown) === null || tt === void 0 || tt.call(e, ze, nt);
        }
      })), Co = (ze) => {
        var nt;
        (nt = e.onClick) === null || nt === void 0 || nt.call(e, ze), !re.value && !m.value.contains(ze.target) && !b.value.contains(ze.target) && (P.value[0] ? P.value[1] || Me(1) : Me(0));
      }, ut = (ze) => {
        var nt;
        (nt = e.onMousedown) === null || nt === void 0 || nt.call(e, ze), re.value && (Kt.value || gn.value) && !m.value.contains(ze.target) && !b.value.contains(ze.target) && ze.preventDefault();
      }, qn = R(() => {
        var ze;
        return !((ze = k.value) === null || ze === void 0) && ze[0] ? wo(k.value[0], {
          locale: e.locale,
          format: "YYYYMMDDHHmmss",
          generateConfig: e.generateConfig
        }) : "";
      }), bn = R(() => {
        var ze;
        return !((ze = k.value) === null || ze === void 0) && ze[1] ? wo(k.value[1], {
          locale: e.locale,
          format: "YYYYMMDDHHmmss",
          generateConfig: e.generateConfig
        }) : "";
      });
      Ie([re, We, Fe], () => {
        re.value || (W(k.value), !We.value.length || We.value[0] === "" ? Ke("") : et.value !== it.value && Oe(), !Fe.value.length || Fe.value[0] === "" ? De("") : Ne.value !== je.value && Je());
      }), Ie([qn, bn], () => {
        W(k.value);
      }), process.env.NODE_ENV !== "production" && Lt(() => {
        const {
          value: ze,
          disabled: nt
        } = e;
        ze && Array.isArray(nt) && (Ft(nt, 0) && !Ft(ze, 0) || Ft(nt, 1) && !Ft(ze, 1)) && yo(!1, "`disabled` should not set with empty `value`. You should set `allowEmpty` or `value` instead.");
      }), o({
        focus: () => {
          m.value && m.value.focus();
        },
        blur: () => {
          m.value && m.value.blur(), b.value && b.value.blur();
        }
      });
      const Gn = R(() => re.value && qe.value && qe.value[0] && qe.value[1] && e.generateConfig.isAfter(qe.value[1], qe.value[0]) ? qe.value : null);
      function Fo() {
        let ze = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, nt = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
        const {
          generateConfig: tt,
          showTime: zt,
          dateRender: Vn,
          direction: Rn,
          disabledTime: go,
          prefixCls: Jt,
          locale: ht
        } = e;
        let Jn = zt;
        if (zt && typeof zt == "object" && zt.defaultValue) {
          const an = zt.defaultValue;
          Jn = I(I({}, zt), {
            defaultValue: Ft(an, C.value) || void 0
          });
        }
        let $o = null;
        return Vn && ($o = (an) => {
          let {
            current: ln,
            today: Ht
          } = an;
          return Vn({
            current: ln,
            today: Ht,
            info: {
              range: C.value ? "end" : "start"
            }
          });
        }), v(R5, {
          value: {
            inRange: !0,
            panelPosition: ze,
            rangedValue: wt.value || D.value,
            hoverRangedValue: Gn.value
          }
        }, {
          default: () => [v(W$, Z(Z(Z({}, e), nt), {}, {
            dateRender: $o,
            showTime: Jn,
            mode: H.value[C.value],
            generateConfig: tt,
            style: void 0,
            direction: Rn,
            disabledDate: C.value === 0 ? U : j,
            disabledTime: (an) => go ? go(an, C.value === 0 ? "start" : "end") : !1,
            class: Te({
              [`${Jt}-panel-focused`]: C.value === 0 ? !Mn.value : !Hn.value
            }),
            value: Ft(D.value, C.value),
            locale: ht,
            tabIndex: -1,
            onPanelChange: (an, ln) => {
              C.value === 0 && Rt(!0), C.value === 1 && Dt(!0), A($i(H.value, ln, C.value), $i(D.value, an, C.value));
              let Ht = an;
              ze === "right" && H.value[C.value] === ln && (Ht = Ou(Ht, ln, tt, -1)), N(Ht, C.value);
            },
            onOk: null,
            onSelect: void 0,
            onChange: void 0,
            defaultValue: C.value === 0 ? Ft(D.value, 1) : Ft(D.value, 0)
          }), null)]
        });
      }
      const gi = (ze, nt) => {
        const tt = $i(D.value, ze, C.value);
        nt === "submit" || nt !== "key" && !i.value ? (ke(tt, C.value), C.value === 0 ? Rt() : Dt()) : W(tt);
      };
      return sm({
        operationRef: $,
        hideHeader: R(() => e.picker === "time"),
        onDateMouseenter: zn,
        onDateMouseleave: on,
        hideRanges: R(() => !0),
        onSelect: gi,
        open: re
      }), () => {
        const {
          prefixCls: ze = "rc-picker",
          id: nt,
          popupStyle: tt,
          dropdownClassName: zt,
          transitionName: Vn,
          dropdownAlign: Rn,
          getPopupContainer: go,
          generateConfig: Jt,
          locale: ht,
          placeholder: Jn,
          autofocus: $o,
          picker: an = "date",
          showTime: ln,
          separator: Ht = "~",
          disabledDate: sn,
          panelRender: Io,
          allowClear: kn,
          suffixIcon: Ho,
          clearIcon: ho,
          inputReadOnly: $r,
          renderExtraFooter: Pr,
          onMouseenter: _i,
          onMouseleave: tr,
          onMouseup: Xr,
          onOk: nr,
          components: Qr,
          direction: Ai,
          autocomplete: or = "off"
        } = e, Na = Ai === "rtl" ? {
          right: `${be.value}px`
        } : {
          left: `${be.value}px`
        };
        function Mo() {
          let Nn;
          const To = V$(ze, H.value[C.value], Pr), Or = j$({
            prefixCls: ze,
            components: Qr,
            needConfirmButton: i.value,
            okDisabled: !Ft(D.value, C.value) || sn && sn(D.value[C.value]),
            locale: ht,
            onOk: () => {
              Ft(D.value, C.value) && (ke(D.value, C.value), nr && nr(D.value));
            }
          });
          if (an !== "time" && !ln) {
            const co = C.value === 0 ? E.value : z.value, ta = Ou(co, an, Jt), oa = H.value[C.value] === an, ir = Fo(oa ? "left" : !1, {
              pickerValue: co,
              onPickerValueChange: (Ha) => {
                N(Ha, C.value);
              }
            }), _l = Fo("right", {
              pickerValue: ta,
              onPickerValueChange: (Ha) => {
                N(Ou(Ha, an, Jt, -1), C.value);
              }
            });
            Ai === "rtl" ? Nn = v(Ve, null, [_l, oa && ir]) : Nn = v(Ve, null, [ir, oa && _l]);
          } else
            Nn = Fo();
          let ko = v("div", {
            class: `${ze}-panel-layout`
          }, [v(G$, {
            prefixCls: ze,
            presets: l.value,
            onClick: (co) => {
              ke(co, null), he(!1, C.value);
            },
            onHover: (co) => {
              lt(co);
            }
          }, null), v("div", null, [v("div", {
            class: `${ze}-panels`
          }, [Nn]), (To || Or) && v("div", {
            class: `${ze}-footer`
          }, [To, Or])])]);
          return Io && (ko = Io(ko)), v("div", {
            class: `${ze}-panel-container`,
            style: {
              marginLeft: `${J.value}px`
            },
            ref: c,
            onMousedown: (co) => {
              co.preventDefault();
            }
          }, [ko]);
        }
        const El = v("div", {
          class: Te(`${ze}-range-wrapper`, `${ze}-${an}-range-wrapper`),
          style: {
            minWidth: `${xe.value}px`
          }
        }, [v("div", {
          ref: y,
          class: `${ze}-range-arrow`,
          style: Na
        }, null), Mo()]);
        let Ba;
        Ho && (Ba = v("span", {
          class: `${ze}-suffix`
        }, [Ho]));
        let Zr;
        kn && (Ft(k.value, 0) && !P.value[0] || Ft(k.value, 1) && !P.value[1]) && (Zr = v("span", {
          onMousedown: (Nn) => {
            Nn.preventDefault(), Nn.stopPropagation();
          },
          onMouseup: (Nn) => {
            Nn.preventDefault(), Nn.stopPropagation();
            let To = k.value;
            P.value[0] || (To = $i(To, null, 0)), P.value[1] || (To = $i(To, null, 1)), ke(To, null), he(!1, C.value);
          },
          class: `${ze}-clear`
        }, [ho || v("span", {
          class: `${ze}-clear-btn`
        }, null)]));
        const La = {
          size: _$(an, S.value[0], Jt)
        };
        let Fa = 0, Jr = 0;
        d.value && f.value && p.value && (C.value === 0 ? Jr = d.value.offsetWidth : (Fa = be.value, Jr = f.value.offsetWidth));
        const ea = Ai === "rtl" ? {
          right: `${Fa}px`
        } : {
          left: `${Fa}px`
        };
        return v("div", Z({
          ref: u,
          class: Te(ze, `${ze}-range`, n.class, {
            [`${ze}-disabled`]: P.value[0] && P.value[1],
            [`${ze}-focused`]: C.value === 0 ? Kt.value : gn.value,
            [`${ze}-rtl`]: Ai === "rtl"
          }),
          style: n.style,
          onClick: Co,
          onMouseenter: _i,
          onMouseleave: tr,
          onMousedown: ut,
          onMouseup: Xr
        }, L$(e)), [v("div", {
          class: Te(`${ze}-input`, {
            [`${ze}-input-active`]: C.value === 0,
            [`${ze}-input-placeholder`]: !!dt.value
          }),
          ref: d
        }, [v("input", Z(Z(Z({
          id: nt,
          disabled: P.value[0],
          readonly: $r || typeof S.value[0] == "function" || !Mn.value,
          value: dt.value || it.value,
          onInput: (Nn) => {
            Ke(Nn.target.value);
          },
          autofocus: $o,
          placeholder: Ft(Jn, 0) || "",
          ref: m
        }, mn.value), La), {}, {
          autocomplete: or
        }), null)]), v("div", {
          class: `${ze}-range-separator`,
          ref: p
        }, [Ht]), v("div", {
          class: Te(`${ze}-input`, {
            [`${ze}-input-active`]: C.value === 1,
            [`${ze}-input-placeholder`]: !!Xt.value
          }),
          ref: f
        }, [v("input", Z(Z(Z({
          disabled: P.value[1],
          readonly: $r || typeof S.value[0] == "function" || !Hn.value,
          value: Xt.value || je.value,
          onInput: (Nn) => {
            De(Nn.target.value);
          },
          placeholder: Ft(Jn, 1) || "",
          ref: b
        }, rn.value), La), {}, {
          autocomplete: or
        }), null)]), v("div", {
          class: `${ze}-active-bar`,
          style: I(I({}, ea), {
            width: `${Jr}px`,
            position: "absolute"
          })
        }, null), Ba, Zr, v(q$, {
          visible: re.value,
          popupStyle: tt,
          prefixCls: ze,
          dropdownClassName: zt,
          dropdownAlign: Rn,
          getPopupContainer: go,
          transitionName: Vn,
          range: !0,
          direction: Ai
        }, {
          default: () => [v("div", {
            style: {
              pointerEvents: "none",
              position: "absolute",
              top: 0,
              bottom: 0,
              left: 0,
              right: 0
            }
          }, null)],
          popupElement: () => El
        })]);
      };
    }
  });
}
const i8 = o8();
var r8 = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const a8 = {
  prefixCls: String,
  name: String,
  id: String,
  type: String,
  defaultChecked: {
    type: [Boolean, Number],
    default: void 0
  },
  checked: {
    type: [Boolean, Number],
    default: void 0
  },
  disabled: Boolean,
  tabindex: {
    type: [Number, String]
  },
  readonly: Boolean,
  autofocus: Boolean,
  value: ue.any,
  required: Boolean
}, Q$ = ye({
  compatConfig: {
    MODE: 3
  },
  name: "Checkbox",
  inheritAttrs: !1,
  props: wn(a8, {
    prefixCls: "rc-checkbox",
    type: "checkbox",
    defaultChecked: !1
  }),
  emits: ["click", "change"],
  setup(e, t) {
    let {
      attrs: n,
      emit: o,
      expose: i
    } = t;
    const r = le(e.checked === void 0 ? e.defaultChecked : e.checked), a = le();
    Ie(() => e.checked, () => {
      r.value = e.checked;
    }), i({
      focus() {
        var c;
        (c = a.value) === null || c === void 0 || c.focus();
      },
      blur() {
        var c;
        (c = a.value) === null || c === void 0 || c.blur();
      }
    });
    const l = le(), s = (c) => {
      if (e.disabled)
        return;
      e.checked === void 0 && (r.value = c.target.checked), c.shiftKey = l.value;
      const d = {
        target: I(I({}, e), {
          checked: c.target.checked
        }),
        stopPropagation() {
          c.stopPropagation();
        },
        preventDefault() {
          c.preventDefault();
        },
        nativeEvent: c
      };
      e.checked !== void 0 && (a.value.checked = !!e.checked), o("change", d), l.value = !1;
    }, u = (c) => {
      o("click", c), l.value = c.shiftKey;
    };
    return () => {
      const {
        prefixCls: c,
        name: d,
        id: f,
        type: p,
        disabled: m,
        readonly: b,
        tabindex: y,
        autofocus: S,
        value: C,
        required: O
      } = e, $ = r8(e, ["prefixCls", "name", "id", "type", "disabled", "readonly", "tabindex", "autofocus", "value", "required"]), {
        class: P,
        onFocus: k,
        onBlur: x,
        onKeydown: E,
        onKeypress: z,
        onKeyup: N
      } = n, D = I(I({}, $), n), W = Object.keys(D).reduce((A, U) => ((U.startsWith("data-") || U.startsWith("aria-") || U === "role") && (A[U] = D[U]), A), {}), H = Te(c, P, {
        [`${c}-checked`]: r.value,
        [`${c}-disabled`]: m
      }), L = I(I({
        name: d,
        id: f,
        type: p,
        readonly: b,
        disabled: m,
        tabindex: y,
        class: `${c}-input`,
        checked: !!r.value,
        autofocus: S,
        value: C
      }, W), {
        onChange: s,
        onClick: u,
        onFocus: k,
        onBlur: x,
        onKeydown: E,
        onKeypress: z,
        onKeyup: N,
        required: O
      });
      return v("span", {
        class: H
      }, [v("input", Z({
        ref: a
      }, L), null), v("span", {
        class: `${c}-inner`
      }, null)]);
    };
  }
}), Z$ = Symbol("radioGroupContextKey"), l8 = (e) => {
  kt(Z$, e);
}, s8 = () => Tt(Z$, void 0), J$ = Symbol("radioOptionTypeContextKey"), u8 = (e) => {
  kt(J$, e);
}, c8 = () => Tt(J$, void 0), d8 = new Bt("antRadioEffect", {
  "0%": {
    transform: "scale(1)",
    opacity: 0.5
  },
  "100%": {
    transform: "scale(1.6)",
    opacity: 0
  }
}), f8 = (e) => {
  const {
    componentCls: t,
    antCls: n
  } = e, o = `${t}-group`;
  return {
    [o]: I(I({}, Zt(e)), {
      display: "inline-block",
      fontSize: 0,
      // RTL
      [`&${o}-rtl`]: {
        direction: "rtl"
      },
      [`${n}-badge ${n}-badge-count`]: {
        zIndex: 1
      },
      [`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]: {
        borderInlineStart: "none"
      }
    })
  };
}, p8 = (e) => {
  const {
    componentCls: t,
    radioWrapperMarginRight: n,
    radioCheckedColor: o,
    radioSize: i,
    motionDurationSlow: r,
    motionDurationMid: a,
    motionEaseInOut: l,
    motionEaseInOutCirc: s,
    radioButtonBg: u,
    colorBorder: c,
    lineWidth: d,
    radioDotSize: f,
    colorBgContainerDisabled: p,
    colorTextDisabled: m,
    paddingXS: b,
    radioDotDisabledColor: y,
    lineType: S,
    radioDotDisabledSize: C,
    wireframe: O,
    colorWhite: $
  } = e, P = `${t}-inner`;
  return {
    [`${t}-wrapper`]: I(I({}, Zt(e)), {
      position: "relative",
      display: "inline-flex",
      alignItems: "baseline",
      marginInlineStart: 0,
      marginInlineEnd: n,
      cursor: "pointer",
      // RTL
      [`&${t}-wrapper-rtl`]: {
        direction: "rtl"
      },
      "&-disabled": {
        cursor: "not-allowed",
        color: e.colorTextDisabled
      },
      "&::after": {
        display: "inline-block",
        width: 0,
        overflow: "hidden",
        content: '"\\a0"'
      },
      // hashId 在 wrapper 上，只能铺平
      [`${t}-checked::after`]: {
        position: "absolute",
        insetBlockStart: 0,
        insetInlineStart: 0,
        width: "100%",
        height: "100%",
        border: `${d}px ${S} ${o}`,
        borderRadius: "50%",
        visibility: "hidden",
        animationName: d8,
        animationDuration: r,
        animationTimingFunction: l,
        animationFillMode: "both",
        content: '""'
      },
      [t]: I(I({}, Zt(e)), {
        position: "relative",
        display: "inline-block",
        outline: "none",
        cursor: "pointer",
        alignSelf: "center"
      }),
      [`${t}-wrapper:hover &,
        &:hover ${P}`]: {
        borderColor: o
      },
      [`${t}-input:focus-visible + ${P}`]: I({}, Xu(e)),
      [`${t}:hover::after, ${t}-wrapper:hover &::after`]: {
        visibility: "visible"
      },
      [`${t}-inner`]: {
        "&::after": {
          boxSizing: "border-box",
          position: "absolute",
          insetBlockStart: "50%",
          insetInlineStart: "50%",
          display: "block",
          width: i,
          height: i,
          marginBlockStart: i / -2,
          marginInlineStart: i / -2,
          backgroundColor: O ? o : $,
          borderBlockStart: 0,
          borderInlineStart: 0,
          borderRadius: i,
          transform: "scale(0)",
          opacity: 0,
          transition: `all ${r} ${s}`,
          content: '""'
        },
        boxSizing: "border-box",
        position: "relative",
        insetBlockStart: 0,
        insetInlineStart: 0,
        display: "block",
        width: i,
        height: i,
        backgroundColor: u,
        borderColor: c,
        borderStyle: "solid",
        borderWidth: d,
        borderRadius: "50%",
        transition: `all ${a}`
      },
      [`${t}-input`]: {
        position: "absolute",
        insetBlockStart: 0,
        insetInlineEnd: 0,
        insetBlockEnd: 0,
        insetInlineStart: 0,
        zIndex: 1,
        cursor: "pointer",
        opacity: 0
      },
      // 选中状态
      [`${t}-checked`]: {
        [P]: {
          borderColor: o,
          backgroundColor: O ? u : o,
          "&::after": {
            transform: `scale(${f / i})`,
            opacity: 1,
            transition: `all ${r} ${s}`
          }
        }
      },
      [`${t}-disabled`]: {
        cursor: "not-allowed",
        [P]: {
          backgroundColor: p,
          borderColor: c,
          cursor: "not-allowed",
          "&::after": {
            backgroundColor: y
          }
        },
        [`${t}-input`]: {
          cursor: "not-allowed"
        },
        [`${t}-disabled + span`]: {
          color: m,
          cursor: "not-allowed"
        },
        [`&${t}-checked`]: {
          [P]: {
            "&::after": {
              transform: `scale(${C / i})`
            }
          }
        }
      },
      [`span${t} + *`]: {
        paddingInlineStart: b,
        paddingInlineEnd: b
      }
    })
  };
}, g8 = (e) => {
  const {
    radioButtonColor: t,
    controlHeight: n,
    componentCls: o,
    lineWidth: i,
    lineType: r,
    colorBorder: a,
    motionDurationSlow: l,
    motionDurationMid: s,
    radioButtonPaddingHorizontal: u,
    fontSize: c,
    radioButtonBg: d,
    fontSizeLG: f,
    controlHeightLG: p,
    controlHeightSM: m,
    paddingXS: b,
    borderRadius: y,
    borderRadiusSM: S,
    borderRadiusLG: C,
    radioCheckedColor: O,
    radioButtonCheckedBg: $,
    radioButtonHoverColor: P,
    radioButtonActiveColor: k,
    radioSolidCheckedColor: x,
    colorTextDisabled: E,
    colorBgContainerDisabled: z,
    radioDisabledButtonCheckedColor: N,
    radioDisabledButtonCheckedBg: D
  } = e;
  return {
    [`${o}-button-wrapper`]: {
      position: "relative",
      display: "inline-block",
      height: n,
      margin: 0,
      paddingInline: u,
      paddingBlock: 0,
      color: t,
      fontSize: c,
      lineHeight: `${n - i * 2}px`,
      background: d,
      border: `${i}px ${r} ${a}`,
      // strange align fix for chrome but works
      // https://gw.alipayobjects.com/zos/rmsportal/VFTfKXJuogBAXcvfAUWJ.gif
      borderBlockStartWidth: i + 0.02,
      borderInlineStartWidth: 0,
      borderInlineEndWidth: i,
      cursor: "pointer",
      transition: [`color ${s}`, `background ${s}`, `border-color ${s}`, `box-shadow ${s}`].join(","),
      a: {
        color: t
      },
      [`> ${o}-button`]: {
        position: "absolute",
        insetBlockStart: 0,
        insetInlineStart: 0,
        zIndex: -1,
        width: "100%",
        height: "100%"
      },
      "&:not(:first-child)": {
        "&::before": {
          position: "absolute",
          insetBlockStart: -i,
          insetInlineStart: -i,
          display: "block",
          boxSizing: "content-box",
          width: 1,
          height: "100%",
          paddingBlock: i,
          paddingInline: 0,
          backgroundColor: a,
          transition: `background-color ${l}`,
          content: '""'
        }
      },
      "&:first-child": {
        borderInlineStart: `${i}px ${r} ${a}`,
        borderStartStartRadius: y,
        borderEndStartRadius: y
      },
      "&:last-child": {
        borderStartEndRadius: y,
        borderEndEndRadius: y
      },
      "&:first-child:last-child": {
        borderRadius: y
      },
      [`${o}-group-large &`]: {
        height: p,
        fontSize: f,
        lineHeight: `${p - i * 2}px`,
        "&:first-child": {
          borderStartStartRadius: C,
          borderEndStartRadius: C
        },
        "&:last-child": {
          borderStartEndRadius: C,
          borderEndEndRadius: C
        }
      },
      [`${o}-group-small &`]: {
        height: m,
        paddingInline: b - i,
        paddingBlock: 0,
        lineHeight: `${m - i * 2}px`,
        "&:first-child": {
          borderStartStartRadius: S,
          borderEndStartRadius: S
        },
        "&:last-child": {
          borderStartEndRadius: S,
          borderEndEndRadius: S
        }
      },
      "&:hover": {
        position: "relative",
        color: O
      },
      "&:has(:focus-visible)": I({}, Xu(e)),
      [`${o}-inner, input[type='checkbox'], input[type='radio']`]: {
        width: 0,
        height: 0,
        opacity: 0,
        pointerEvents: "none"
      },
      [`&-checked:not(${o}-button-wrapper-disabled)`]: {
        zIndex: 1,
        color: O,
        background: $,
        borderColor: O,
        "&::before": {
          backgroundColor: O
        },
        "&:first-child": {
          borderColor: O
        },
        "&:hover": {
          color: P,
          borderColor: P,
          "&::before": {
            backgroundColor: P
          }
        },
        "&:active": {
          color: k,
          borderColor: k,
          "&::before": {
            backgroundColor: k
          }
        }
      },
      [`${o}-group-solid &-checked:not(${o}-button-wrapper-disabled)`]: {
        color: x,
        background: O,
        borderColor: O,
        "&:hover": {
          color: x,
          background: P,
          borderColor: P
        },
        "&:active": {
          color: x,
          background: k,
          borderColor: k
        }
      },
      "&-disabled": {
        color: E,
        backgroundColor: z,
        borderColor: a,
        cursor: "not-allowed",
        "&:first-child, &:hover": {
          color: E,
          backgroundColor: z,
          borderColor: a
        }
      },
      [`&-disabled${o}-button-wrapper-checked`]: {
        color: N,
        backgroundColor: D,
        borderColor: a,
        boxShadow: "none"
      }
    }
  };
}, eP = nn("Radio", (e) => {
  const {
    padding: t,
    lineWidth: n,
    controlItemBgActiveDisabled: o,
    colorTextDisabled: i,
    colorBgContainer: r,
    fontSizeLG: a,
    controlOutline: l,
    colorPrimaryHover: s,
    colorPrimaryActive: u,
    colorText: c,
    colorPrimary: d,
    marginXS: f,
    controlOutlineWidth: p,
    colorTextLightSolid: m,
    wireframe: b
  } = e, y = `0 0 0 ${p}px ${l}`, S = y, C = a, O = 4, $ = C - O * 2, P = b ? $ : C - (O + n) * 2, k = d, x = c, E = s, z = u, N = t - n, H = _t(e, {
    radioFocusShadow: y,
    radioButtonFocusShadow: S,
    radioSize: C,
    radioDotSize: P,
    radioDotDisabledSize: $,
    radioCheckedColor: k,
    radioDotDisabledColor: i,
    radioSolidCheckedColor: m,
    radioButtonBg: r,
    radioButtonCheckedBg: r,
    radioButtonColor: x,
    radioButtonHoverColor: E,
    radioButtonActiveColor: z,
    radioButtonPaddingHorizontal: N,
    radioDisabledButtonCheckedBg: o,
    radioDisabledButtonCheckedColor: i,
    radioWrapperMarginRight: f
  });
  return [f8(H), p8(H), g8(H)];
});
var h8 = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const tP = () => ({
  prefixCls: String,
  checked: st(),
  disabled: st(),
  isGroup: st(),
  value: ue.any,
  name: String,
  id: String,
  autofocus: st(),
  onChange: Qe(),
  onFocus: Qe(),
  onBlur: Qe(),
  onClick: Qe(),
  "onUpdate:checked": Qe(),
  "onUpdate:value": Qe()
}), zo = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ARadio",
  inheritAttrs: !1,
  props: tP(),
  setup(e, t) {
    let {
      emit: n,
      expose: o,
      slots: i,
      attrs: r
    } = t;
    const a = pi(), l = ui.useInject(), s = c8(), u = s8(), c = Ji(), d = R(() => {
      var E;
      return (E = b.value) !== null && E !== void 0 ? E : c.value;
    }), f = le(), {
      prefixCls: p,
      direction: m,
      disabled: b
    } = yt("radio", e), y = R(() => u?.optionType.value === "button" || s === "button" ? `${p.value}-button` : p.value), S = Ji(), [C, O] = eP(p);
    o({
      focus: () => {
        f.value.focus();
      },
      blur: () => {
        f.value.blur();
      }
    });
    const k = (E) => {
      const z = E.target.checked;
      n("update:checked", z), n("update:value", z), n("change", E), a.onFieldChange();
    }, x = (E) => {
      n("change", E), u && u.onChange && u.onChange(E);
    };
    return () => {
      var E;
      const z = u, {
        prefixCls: N,
        id: D = a.id.value
      } = e, W = h8(e, ["prefixCls", "id"]), H = I(I({
        prefixCls: y.value,
        id: D
      }, Tn(W, ["onUpdate:checked", "onUpdate:value"])), {
        disabled: (E = b.value) !== null && E !== void 0 ? E : S.value
      });
      z ? (H.name = z.name.value, H.onChange = x, H.checked = e.value === z.value.value, H.disabled = d.value || z.disabled.value) : H.onChange = k;
      const L = Te({
        [`${y.value}-wrapper`]: !0,
        [`${y.value}-wrapper-checked`]: H.checked,
        [`${y.value}-wrapper-disabled`]: H.disabled,
        [`${y.value}-wrapper-rtl`]: m.value === "rtl",
        [`${y.value}-wrapper-in-form-item`]: l.isFormItemInput
      }, r.class, O.value);
      return C(v("label", Z(Z({}, r), {}, {
        class: L
      }), [v(Q$, Z(Z({}, H), {}, {
        type: "radio",
        ref: f
      }), null), i.default && v("span", null, [i.default()])]));
    };
  }
}), v8 = () => ({
  prefixCls: String,
  value: ue.any,
  size: dn(),
  options: Po(),
  disabled: st(),
  name: String,
  buttonStyle: dn("outline"),
  id: String,
  optionType: dn("default"),
  onChange: Qe(),
  "onUpdate:value": Qe()
}), m8 = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ARadioGroup",
  inheritAttrs: !1,
  props: v8(),
  // emits: ['update:value', 'change'],
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      attrs: i
    } = t;
    const r = pi(), {
      prefixCls: a,
      direction: l,
      size: s
    } = yt("radio", e), [u, c] = eP(a), d = le(e.value), f = le(!1);
    return Ie(() => e.value, (m) => {
      d.value = m, f.value = !1;
    }), l8({
      onChange: (m) => {
        const b = d.value, {
          value: y
        } = m.target;
        "value" in e || (d.value = y), !f.value && y !== b && (f.value = !0, o("update:value", y), o("change", m), r.onFieldChange()), Nt(() => {
          f.value = !1;
        });
      },
      value: d,
      disabled: R(() => e.disabled),
      name: R(() => e.name),
      optionType: R(() => e.optionType)
    }), () => {
      var m;
      const {
        options: b,
        buttonStyle: y,
        id: S = r.id.value
      } = e, C = `${a.value}-group`, O = Te(C, `${C}-${y}`, {
        [`${C}-${s.value}`]: s.value,
        [`${C}-rtl`]: l.value === "rtl"
      }, i.class, c.value);
      let $ = null;
      return b && b.length > 0 ? $ = b.map((P) => {
        if (typeof P == "string" || typeof P == "number")
          return v(zo, {
            key: P,
            prefixCls: a.value,
            disabled: e.disabled,
            value: P,
            checked: d.value === P
          }, {
            default: () => [P]
          });
        const {
          value: k,
          disabled: x,
          label: E
        } = P;
        return v(zo, {
          key: `radio-group-value-options-${k}`,
          prefixCls: a.value,
          disabled: x || e.disabled,
          value: k,
          checked: d.value === k
        }, {
          default: () => [E]
        });
      }) : $ = (m = n.default) === null || m === void 0 ? void 0 : m.call(n), u(v("div", Z(Z({}, i), {}, {
        class: O,
        id: S
      }), [$]));
    };
  }
}), b8 = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ARadioButton",
  inheritAttrs: !1,
  props: tP(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: i
    } = yt("radio", e);
    return u8("button"), () => {
      var r;
      return v(zo, Z(Z(Z({}, o), e), {}, {
        prefixCls: i.value
      }), {
        default: () => [(r = n.default) === null || r === void 0 ? void 0 : r.call(n)]
      });
    };
  }
});
zo.Group = m8;
zo.Button = b8;
zo.install = function(e) {
  return e.component(zo.name, zo), e.component(zo.Group.name, zo.Group), e.component(zo.Button.name, zo.Button), e;
};
const nP = (e) => ({
  // Firefox
  "&::-moz-placeholder": {
    opacity: 1
  },
  "&::placeholder": {
    color: e,
    userSelect: "none"
    // https://github.com/ant-design/ant-design/pull/32639
  },
  "&:placeholder-shown": {
    textOverflow: "ellipsis"
  }
}), Ws = (e) => ({
  borderColor: e.inputBorderHoverColor,
  borderInlineEndWidth: e.lineWidth
}), Cl = (e) => ({
  borderColor: e.inputBorderHoverColor,
  boxShadow: `0 0 0 ${e.controlOutlineWidth}px ${e.controlOutline}`,
  borderInlineEndWidth: e.lineWidth,
  outline: 0
}), oP = (e) => ({
  color: e.colorTextDisabled,
  backgroundColor: e.colorBgContainerDisabled,
  borderColor: e.colorBorder,
  boxShadow: "none",
  cursor: "not-allowed",
  opacity: 1,
  "&:hover": I({}, Ws(_t(e, {
    inputBorderHoverColor: e.colorBorder
  })))
}), iP = (e) => {
  const {
    inputPaddingVerticalLG: t,
    fontSizeLG: n,
    lineHeightLG: o,
    borderRadiusLG: i,
    inputPaddingHorizontalLG: r
  } = e;
  return {
    padding: `${t}px ${r}px`,
    fontSize: n,
    lineHeight: o,
    borderRadius: i
  };
}, rP = (e) => ({
  padding: `${e.inputPaddingVerticalSM}px ${e.controlPaddingHorizontalSM - 1}px`,
  borderRadius: e.borderRadiusSM
}), Af = (e, t) => {
  const {
    componentCls: n,
    colorError: o,
    colorWarning: i,
    colorErrorOutline: r,
    colorWarningOutline: a,
    colorErrorBorderHover: l,
    colorWarningBorderHover: s
  } = e;
  return {
    [`&-status-error:not(${t}-disabled):not(${t}-borderless)${t}`]: {
      borderColor: o,
      "&:hover": {
        borderColor: l
      },
      "&:focus, &-focused": I({}, Cl(_t(e, {
        inputBorderActiveColor: o,
        inputBorderHoverColor: o,
        controlOutline: r
      }))),
      [`${n}-prefix`]: {
        color: o
      }
    },
    [`&-status-warning:not(${t}-disabled):not(${t}-borderless)${t}`]: {
      borderColor: i,
      "&:hover": {
        borderColor: s
      },
      "&:focus, &-focused": I({}, Cl(_t(e, {
        inputBorderActiveColor: i,
        inputBorderHoverColor: i,
        controlOutline: a
      }))),
      [`${n}-prefix`]: {
        color: i
      }
    }
  };
}, ic = (e) => I(I({
  position: "relative",
  display: "inline-block",
  width: "100%",
  minWidth: 0,
  padding: `${e.inputPaddingVertical}px ${e.inputPaddingHorizontal}px`,
  color: e.colorText,
  fontSize: e.fontSize,
  lineHeight: e.lineHeight,
  backgroundColor: e.colorBgContainer,
  backgroundImage: "none",
  borderWidth: e.lineWidth,
  borderStyle: e.lineType,
  borderColor: e.colorBorder,
  borderRadius: e.borderRadius,
  transition: `all ${e.motionDurationMid}`
}, nP(e.colorTextPlaceholder)), {
  "&:hover": I({}, Ws(e)),
  "&:focus, &-focused": I({}, Cl(e)),
  "&-disabled, &[disabled]": I({}, oP(e)),
  "&-borderless": {
    "&, &:hover, &:focus, &-focused, &-disabled, &[disabled]": {
      backgroundColor: "transparent",
      border: "none",
      boxShadow: "none"
    }
  },
  // Reset height for `textarea`s
  "textarea&": {
    maxWidth: "100%",
    height: "auto",
    minHeight: e.controlHeight,
    lineHeight: e.lineHeight,
    verticalAlign: "bottom",
    transition: `all ${e.motionDurationSlow}, height 0s`,
    resize: "vertical"
  },
  // Size
  "&-lg": I({}, iP(e)),
  "&-sm": I({}, rP(e)),
  // RTL
  "&-rtl": {
    direction: "rtl"
  },
  "&-textarea-rtl": {
    direction: "rtl"
  }
}), aP = (e) => {
  const {
    componentCls: t,
    antCls: n
  } = e;
  return {
    position: "relative",
    display: "table",
    width: "100%",
    borderCollapse: "separate",
    borderSpacing: 0,
    // Undo padding and float of grid classes
    "&[class*='col-']": {
      paddingInlineEnd: e.paddingXS,
      "&:last-child": {
        paddingInlineEnd: 0
      }
    },
    // Sizing options
    [`&-lg ${t}, &-lg > ${t}-group-addon`]: I({}, iP(e)),
    [`&-sm ${t}, &-sm > ${t}-group-addon`]: I({}, rP(e)),
    [`> ${t}`]: {
      display: "table-cell",
      "&:not(:first-child):not(:last-child)": {
        borderRadius: 0
      }
    },
    [`${t}-group`]: {
      "&-addon, &-wrap": {
        display: "table-cell",
        width: 1,
        whiteSpace: "nowrap",
        verticalAlign: "middle",
        "&:not(:first-child):not(:last-child)": {
          borderRadius: 0
        }
      },
      "&-wrap > *": {
        display: "block !important"
      },
      "&-addon": {
        position: "relative",
        padding: `0 ${e.inputPaddingHorizontal}px`,
        color: e.colorText,
        fontWeight: "normal",
        fontSize: e.fontSize,
        textAlign: "center",
        backgroundColor: e.colorFillAlter,
        border: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,
        borderRadius: e.borderRadius,
        transition: `all ${e.motionDurationSlow}`,
        lineHeight: 1,
        // Reset Select's style in addon
        [`${n}-select`]: {
          margin: `-${e.inputPaddingVertical + 1}px -${e.inputPaddingHorizontal}px`,
          [`&${n}-select-single:not(${n}-select-customize-input)`]: {
            [`${n}-select-selector`]: {
              backgroundColor: "inherit",
              border: `${e.lineWidth}px ${e.lineType} transparent`,
              boxShadow: "none"
            }
          },
          "&-open, &-focused": {
            [`${n}-select-selector`]: {
              color: e.colorPrimary
            }
          }
        },
        // https://github.com/ant-design/ant-design/issues/31333
        [`${n}-cascader-picker`]: {
          margin: `-9px -${e.inputPaddingHorizontal}px`,
          backgroundColor: "transparent",
          [`${n}-cascader-input`]: {
            textAlign: "start",
            border: 0,
            boxShadow: "none"
          }
        }
      },
      "&-addon:first-child": {
        borderInlineEnd: 0
      },
      "&-addon:last-child": {
        borderInlineStart: 0
      }
    },
    [`${t}`]: {
      float: "inline-start",
      width: "100%",
      marginBottom: 0,
      textAlign: "inherit",
      "&:focus": {
        zIndex: 1,
        borderInlineEndWidth: 1
      },
      "&:hover": {
        zIndex: 1,
        borderInlineEndWidth: 1,
        [`${t}-search-with-button &`]: {
          zIndex: 0
        }
      }
    },
    // Reset rounded corners
    [`> ${t}:first-child, ${t}-group-addon:first-child`]: {
      borderStartEndRadius: 0,
      borderEndEndRadius: 0,
      // Reset Select's style in addon
      [`${n}-select ${n}-select-selector`]: {
        borderStartEndRadius: 0,
        borderEndEndRadius: 0
      }
    },
    [`> ${t}-affix-wrapper`]: {
      [`&:not(:first-child) ${t}`]: {
        borderStartStartRadius: 0,
        borderEndStartRadius: 0
      },
      [`&:not(:last-child) ${t}`]: {
        borderStartEndRadius: 0,
        borderEndEndRadius: 0
      }
    },
    [`> ${t}:last-child, ${t}-group-addon:last-child`]: {
      borderStartStartRadius: 0,
      borderEndStartRadius: 0,
      // Reset Select's style in addon
      [`${n}-select ${n}-select-selector`]: {
        borderStartStartRadius: 0,
        borderEndStartRadius: 0
      }
    },
    [`${t}-affix-wrapper`]: {
      "&:not(:last-child)": {
        borderStartEndRadius: 0,
        borderEndEndRadius: 0,
        [`${t}-search &`]: {
          borderStartStartRadius: e.borderRadius,
          borderEndStartRadius: e.borderRadius
        }
      },
      [`&:not(:first-child), ${t}-search &:not(:first-child)`]: {
        borderStartStartRadius: 0,
        borderEndStartRadius: 0
      }
    },
    [`&${t}-group-compact`]: I(I({
      display: "block"
    }, Ea()), {
      [`${t}-group-addon, ${t}-group-wrap, > ${t}`]: {
        "&:not(:first-child):not(:last-child)": {
          borderInlineEndWidth: e.lineWidth,
          "&:hover": {
            zIndex: 1
          },
          "&:focus": {
            zIndex: 1
          }
        }
      },
      "& > *": {
        display: "inline-block",
        float: "none",
        verticalAlign: "top",
        borderRadius: 0
      },
      [`& > ${t}-affix-wrapper`]: {
        display: "inline-flex"
      },
      [`& > ${n}-picker-range`]: {
        display: "inline-flex"
      },
      "& > *:not(:last-child)": {
        marginInlineEnd: -e.lineWidth,
        borderInlineEndWidth: e.lineWidth
      },
      // Undo float for .ant-input-group .ant-input
      [`${t}`]: {
        float: "none"
      },
      // reset border for Select, DatePicker, AutoComplete, Cascader, Mention, TimePicker, Input
      [`& > ${n}-select > ${n}-select-selector,
      & > ${n}-select-auto-complete ${t},
      & > ${n}-cascader-picker ${t},
      & > ${t}-group-wrapper ${t}`]: {
        borderInlineEndWidth: e.lineWidth,
        borderRadius: 0,
        "&:hover": {
          zIndex: 1
        },
        "&:focus": {
          zIndex: 1
        }
      },
      [`& > ${n}-select-focused`]: {
        zIndex: 1
      },
      // update z-index for arrow icon
      [`& > ${n}-select > ${n}-select-arrow`]: {
        zIndex: 1
        // https://github.com/ant-design/ant-design/issues/20371
      },
      [`& > *:first-child,
      & > ${n}-select:first-child > ${n}-select-selector,
      & > ${n}-select-auto-complete:first-child ${t},
      & > ${n}-cascader-picker:first-child ${t}`]: {
        borderStartStartRadius: e.borderRadius,
        borderEndStartRadius: e.borderRadius
      },
      [`& > *:last-child,
      & > ${n}-select:last-child > ${n}-select-selector,
      & > ${n}-cascader-picker:last-child ${t},
      & > ${n}-cascader-picker-focused:last-child ${t}`]: {
        borderInlineEndWidth: e.lineWidth,
        borderStartEndRadius: e.borderRadius,
        borderEndEndRadius: e.borderRadius
      },
      // https://github.com/ant-design/ant-design/issues/12493
      [`& > ${n}-select-auto-complete ${t}`]: {
        verticalAlign: "top"
      },
      [`${t}-group-wrapper + ${t}-group-wrapper`]: {
        marginInlineStart: -e.lineWidth,
        [`${t}-affix-wrapper`]: {
          borderRadius: 0
        }
      },
      [`${t}-group-wrapper:not(:last-child)`]: {
        [`&${t}-search > ${t}-group`]: {
          [`& > ${t}-group-addon > ${t}-search-button`]: {
            borderRadius: 0
          },
          [`& > ${t}`]: {
            borderStartStartRadius: e.borderRadius,
            borderStartEndRadius: 0,
            borderEndEndRadius: 0,
            borderEndStartRadius: e.borderRadius
          }
        }
      }
    }),
    [`&&-sm ${n}-btn`]: {
      fontSize: e.fontSizeSM,
      height: e.controlHeightSM,
      lineHeight: "normal"
    },
    [`&&-lg ${n}-btn`]: {
      fontSize: e.fontSizeLG,
      height: e.controlHeightLG,
      lineHeight: "normal"
    },
    // Fix https://github.com/ant-design/ant-design/issues/5754
    [`&&-lg ${n}-select-single ${n}-select-selector`]: {
      height: `${e.controlHeightLG}px`,
      [`${n}-select-selection-item, ${n}-select-selection-placeholder`]: {
        // -2 is for the border size & override default
        lineHeight: `${e.controlHeightLG - 2}px`
      },
      [`${n}-select-selection-search-input`]: {
        height: `${e.controlHeightLG}px`
      }
    },
    [`&&-sm ${n}-select-single ${n}-select-selector`]: {
      height: `${e.controlHeightSM}px`,
      [`${n}-select-selection-item, ${n}-select-selection-placeholder`]: {
        // -2 is for the border size & override default
        lineHeight: `${e.controlHeightSM - 2}px`
      },
      [`${n}-select-selection-search-input`]: {
        height: `${e.controlHeightSM}px`
      }
    }
  };
}, y8 = (e) => {
  const {
    componentCls: t,
    controlHeightSM: n,
    lineWidth: o
  } = e, r = (n - o * 2 - 16) / 2;
  return {
    [t]: I(I(I(I({}, Zt(e)), ic(e)), Af(e, t)), {
      '&[type="color"]': {
        height: e.controlHeight,
        [`&${t}-lg`]: {
          height: e.controlHeightLG
        },
        [`&${t}-sm`]: {
          height: n,
          paddingTop: r,
          paddingBottom: r
        }
      }
    })
  };
}, x8 = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    // ========================= Input =========================
    [`${t}-clear-icon`]: {
      margin: 0,
      color: e.colorTextQuaternary,
      fontSize: e.fontSizeIcon,
      verticalAlign: -1,
      // https://github.com/ant-design/ant-design/pull/18151
      // https://codesandbox.io/s/wizardly-sun-u10br
      cursor: "pointer",
      transition: `color ${e.motionDurationSlow}`,
      "&:hover": {
        color: e.colorTextTertiary
      },
      "&:active": {
        color: e.colorText
      },
      "&-hidden": {
        visibility: "hidden"
      },
      "&-has-suffix": {
        margin: `0 ${e.inputAffixPadding}px`
      }
    },
    // ======================= TextArea ========================
    "&-textarea-with-clear-btn": {
      padding: "0 !important",
      border: "0 !important",
      [`${t}-clear-icon`]: {
        position: "absolute",
        insetBlockStart: e.paddingXS,
        insetInlineEnd: e.paddingXS,
        zIndex: 1
      }
    }
  };
}, w8 = (e) => {
  const {
    componentCls: t,
    inputAffixPadding: n,
    colorTextDescription: o,
    motionDurationSlow: i,
    colorIcon: r,
    colorIconHover: a,
    iconCls: l
  } = e;
  return {
    [`${t}-affix-wrapper`]: I(I(I(I(I({}, ic(e)), {
      display: "inline-flex",
      [`&:not(${t}-affix-wrapper-disabled):hover`]: I(I({}, Ws(e)), {
        zIndex: 1,
        [`${t}-search-with-button &`]: {
          zIndex: 0
        }
      }),
      "&-focused, &:focus": {
        zIndex: 1
      },
      "&-disabled": {
        [`${t}[disabled]`]: {
          background: "transparent"
        }
      },
      [`> input${t}`]: {
        padding: 0,
        fontSize: "inherit",
        border: "none",
        borderRadius: 0,
        outline: "none",
        "&:focus": {
          boxShadow: "none !important"
        }
      },
      "&::before": {
        width: 0,
        visibility: "hidden",
        content: '"\\a0"'
      },
      [`${t}`]: {
        "&-prefix, &-suffix": {
          display: "flex",
          flex: "none",
          alignItems: "center",
          "> *:not(:last-child)": {
            marginInlineEnd: e.paddingXS
          }
        },
        "&-show-count-suffix": {
          color: o
        },
        "&-show-count-has-suffix": {
          marginInlineEnd: e.paddingXXS
        },
        "&-prefix": {
          marginInlineEnd: n
        },
        "&-suffix": {
          marginInlineStart: n
        }
      }
    }), x8(e)), {
      // password
      [`${l}${t}-password-icon`]: {
        color: r,
        cursor: "pointer",
        transition: `all ${i}`,
        "&:hover": {
          color: a
        }
      }
    }), Af(e, `${t}-affix-wrapper`))
  };
}, S8 = (e) => {
  const {
    componentCls: t,
    colorError: n,
    colorSuccess: o,
    borderRadiusLG: i,
    borderRadiusSM: r
  } = e;
  return {
    [`${t}-group`]: I(I(I({}, Zt(e)), aP(e)), {
      "&-rtl": {
        direction: "rtl"
      },
      "&-wrapper": {
        display: "inline-block",
        width: "100%",
        textAlign: "start",
        verticalAlign: "top",
        "&-rtl": {
          direction: "rtl"
        },
        // Size
        "&-lg": {
          [`${t}-group-addon`]: {
            borderRadius: i
          }
        },
        "&-sm": {
          [`${t}-group-addon`]: {
            borderRadius: r
          }
        },
        // Status
        "&-status-error": {
          [`${t}-group-addon`]: {
            color: n,
            borderColor: n
          }
        },
        "&-status-warning": {
          [`${t}-group-addon:last-child`]: {
            color: o,
            borderColor: o
          }
        }
      }
    })
  };
}, C8 = (e) => {
  const {
    componentCls: t,
    antCls: n
  } = e, o = `${t}-search`;
  return {
    [o]: {
      [`${t}`]: {
        "&:hover, &:focus": {
          borderColor: e.colorPrimaryHover,
          [`+ ${t}-group-addon ${o}-button:not(${n}-btn-primary)`]: {
            borderInlineStartColor: e.colorPrimaryHover
          }
        }
      },
      [`${t}-affix-wrapper`]: {
        borderRadius: 0
      },
      // fix slight height diff in Firefox:
      // https://ant.design/components/auto-complete-cn/#components-auto-complete-demo-certain-category
      [`${t}-lg`]: {
        lineHeight: e.lineHeightLG - 2e-4
      },
      [`> ${t}-group`]: {
        [`> ${t}-group-addon:last-child`]: {
          insetInlineStart: -1,
          padding: 0,
          border: 0,
          [`${o}-button`]: {
            paddingTop: 0,
            paddingBottom: 0,
            borderStartStartRadius: 0,
            borderStartEndRadius: e.borderRadius,
            borderEndEndRadius: e.borderRadius,
            borderEndStartRadius: 0
          },
          [`${o}-button:not(${n}-btn-primary)`]: {
            color: e.colorTextDescription,
            "&:hover": {
              color: e.colorPrimaryHover
            },
            "&:active": {
              color: e.colorPrimaryActive
            },
            [`&${n}-btn-loading::before`]: {
              insetInlineStart: 0,
              insetInlineEnd: 0,
              insetBlockStart: 0,
              insetBlockEnd: 0
            }
          }
        }
      },
      [`${o}-button`]: {
        height: e.controlHeight,
        "&:hover, &:focus": {
          zIndex: 1
        }
      },
      [`&-large ${o}-button`]: {
        height: e.controlHeightLG
      },
      [`&-small ${o}-button`]: {
        height: e.controlHeightSM
      },
      "&-rtl": {
        direction: "rtl"
      },
      // ===================== Compact Item Customized Styles =====================
      [`&${t}-compact-item`]: {
        [`&:not(${t}-compact-last-item)`]: {
          [`${t}-group-addon`]: {
            [`${t}-search-button`]: {
              marginInlineEnd: -e.lineWidth,
              borderRadius: 0
            }
          }
        },
        [`&:not(${t}-compact-first-item)`]: {
          [`${t},${t}-affix-wrapper`]: {
            borderRadius: 0
          }
        },
        [`> ${t}-group-addon ${t}-search-button,
        > ${t},
        ${t}-affix-wrapper`]: {
          "&:hover,&:focus,&:active": {
            zIndex: 2
          }
        },
        [`> ${t}-affix-wrapper-focused`]: {
          zIndex: 2
        }
      }
    }
  };
};
function Om(e) {
  return _t(e, {
    inputAffixPadding: e.paddingXXS,
    inputPaddingVertical: Math.max(Math.round((e.controlHeight - e.fontSize * e.lineHeight) / 2 * 10) / 10 - e.lineWidth, 3),
    inputPaddingVerticalLG: Math.ceil((e.controlHeightLG - e.fontSizeLG * e.lineHeightLG) / 2 * 10) / 10 - e.lineWidth,
    inputPaddingVerticalSM: Math.max(Math.round((e.controlHeightSM - e.fontSize * e.lineHeight) / 2 * 10) / 10 - e.lineWidth, 0),
    inputPaddingHorizontal: e.paddingSM - e.lineWidth,
    inputPaddingHorizontalSM: e.paddingXS - e.lineWidth,
    inputPaddingHorizontalLG: e.controlPaddingHorizontal - e.lineWidth,
    inputBorderHoverColor: e.colorPrimaryHover,
    inputBorderActiveColor: e.colorPrimaryHover
  });
}
const $8 = (e) => {
  const {
    componentCls: t,
    inputPaddingHorizontal: n,
    paddingLG: o
  } = e, i = `${t}-textarea`;
  return {
    [i]: {
      position: "relative",
      [`${i}-suffix`]: {
        position: "absolute",
        top: 0,
        insetInlineEnd: n,
        bottom: 0,
        zIndex: 1,
        display: "inline-flex",
        alignItems: "center",
        margin: "auto"
      },
      "&-status-error,\n        &-status-warning,\n        &-status-success,\n        &-status-validating": {
        [`&${i}-has-feedback`]: {
          [`${t}`]: {
            paddingInlineEnd: o
          }
        }
      },
      "&-show-count": {
        // https://github.com/ant-design/ant-design/issues/33049
        [`> ${t}`]: {
          height: "100%"
        },
        "&::after": {
          color: e.colorTextDescription,
          whiteSpace: "nowrap",
          content: "attr(data-count)",
          pointerEvents: "none",
          float: "right"
        }
      },
      "&-rtl": {
        "&::after": {
          float: "left"
        }
      }
    }
  };
}, Im = nn("Input", (e) => {
  const t = Om(e);
  return [
    y8(t),
    $8(t),
    w8(t),
    S8(t),
    C8(t),
    // =====================================================
    // ==             Space Compact                       ==
    // =====================================================
    ec(t)
  ];
}), Np = (e, t, n, o) => {
  const {
    lineHeight: i
  } = e, r = Math.floor(n * i) + 2, a = Math.max((t - r) / 2, 0), l = Math.max(t - r - a, 0);
  return {
    padding: `${a}px ${o}px ${l}px`
  };
}, P8 = (e) => {
  const {
    componentCls: t,
    pickerCellCls: n,
    pickerCellInnerCls: o,
    pickerPanelCellHeight: i,
    motionDurationSlow: r,
    borderRadiusSM: a,
    motionDurationMid: l,
    controlItemBgHover: s,
    lineWidth: u,
    lineType: c,
    colorPrimary: d,
    controlItemBgActive: f,
    colorTextLightSolid: p,
    controlHeightSM: m,
    pickerDateHoverRangeBorderColor: b,
    pickerCellBorderGap: y,
    pickerBasicCellHoverWithRangeColor: S,
    pickerPanelCellWidth: C,
    colorTextDisabled: O,
    colorBgContainerDisabled: $
  } = e;
  return {
    "&::before": {
      position: "absolute",
      top: "50%",
      insetInlineStart: 0,
      insetInlineEnd: 0,
      zIndex: 1,
      height: i,
      transform: "translateY(-50%)",
      transition: `all ${r}`,
      content: '""'
    },
    // >>> Default
    [o]: {
      position: "relative",
      zIndex: 2,
      display: "inline-block",
      minWidth: i,
      height: i,
      lineHeight: `${i}px`,
      borderRadius: a,
      transition: `background ${l}, border ${l}`
    },
    // >>> Hover
    [`&:hover:not(${n}-in-view),
    &:hover:not(${n}-selected):not(${n}-range-start):not(${n}-range-end):not(${n}-range-hover-start):not(${n}-range-hover-end)`]: {
      [o]: {
        background: s
      }
    },
    // >>> Today
    [`&-in-view${n}-today ${o}`]: {
      "&::before": {
        position: "absolute",
        top: 0,
        insetInlineEnd: 0,
        bottom: 0,
        insetInlineStart: 0,
        zIndex: 1,
        border: `${u}px ${c} ${d}`,
        borderRadius: a,
        content: '""'
      }
    },
    // >>> In Range
    [`&-in-view${n}-in-range`]: {
      position: "relative",
      "&::before": {
        background: f
      }
    },
    // >>> Selected
    [`&-in-view${n}-selected ${o},
      &-in-view${n}-range-start ${o},
      &-in-view${n}-range-end ${o}`]: {
      color: p,
      background: d
    },
    [`&-in-view${n}-range-start:not(${n}-range-start-single),
      &-in-view${n}-range-end:not(${n}-range-end-single)`]: {
      "&::before": {
        background: f
      }
    },
    [`&-in-view${n}-range-start::before`]: {
      insetInlineStart: "50%"
    },
    [`&-in-view${n}-range-end::before`]: {
      insetInlineEnd: "50%"
    },
    // >>> Range Hover
    [`&-in-view${n}-range-hover-start:not(${n}-in-range):not(${n}-range-start):not(${n}-range-end),
      &-in-view${n}-range-hover-end:not(${n}-in-range):not(${n}-range-start):not(${n}-range-end),
      &-in-view${n}-range-hover-start${n}-range-start-single,
      &-in-view${n}-range-hover-start${n}-range-start${n}-range-end${n}-range-end-near-hover,
      &-in-view${n}-range-hover-end${n}-range-start${n}-range-end${n}-range-start-near-hover,
      &-in-view${n}-range-hover-end${n}-range-end-single,
      &-in-view${n}-range-hover:not(${n}-in-range)`]: {
      "&::after": {
        position: "absolute",
        top: "50%",
        zIndex: 0,
        height: m,
        borderTop: `${u}px dashed ${b}`,
        borderBottom: `${u}px dashed ${b}`,
        transform: "translateY(-50%)",
        transition: `all ${r}`,
        content: '""'
      }
    },
    // Add space for stash
    "&-range-hover-start::after,\n      &-range-hover-end::after,\n      &-range-hover::after": {
      insetInlineEnd: 0,
      insetInlineStart: y
    },
    // Hover with in range
    [`&-in-view${n}-in-range${n}-range-hover::before,
      &-in-view${n}-range-start${n}-range-hover::before,
      &-in-view${n}-range-end${n}-range-hover::before,
      &-in-view${n}-range-start:not(${n}-range-start-single)${n}-range-hover-start::before,
      &-in-view${n}-range-end:not(${n}-range-end-single)${n}-range-hover-end::before,
      ${t}-panel
      > :not(${t}-date-panel)
      &-in-view${n}-in-range${n}-range-hover-start::before,
      ${t}-panel
      > :not(${t}-date-panel)
      &-in-view${n}-in-range${n}-range-hover-end::before`]: {
      background: S
    },
    // range start border-radius
    [`&-in-view${n}-range-start:not(${n}-range-start-single):not(${n}-range-end) ${o}`]: {
      borderStartStartRadius: a,
      borderEndStartRadius: a,
      borderStartEndRadius: 0,
      borderEndEndRadius: 0
    },
    // range end border-radius
    [`&-in-view${n}-range-end:not(${n}-range-end-single):not(${n}-range-start) ${o}`]: {
      borderStartStartRadius: 0,
      borderEndStartRadius: 0,
      borderStartEndRadius: a,
      borderEndEndRadius: a
    },
    [`&-range-hover${n}-range-end::after`]: {
      insetInlineStart: "50%"
    },
    // Edge start
    [`tr > &-in-view${n}-range-hover:first-child::after,
      tr > &-in-view${n}-range-hover-end:first-child::after,
      &-in-view${n}-start${n}-range-hover-edge-start${n}-range-hover-edge-start-near-range::after,
      &-in-view${n}-range-hover-edge-start:not(${n}-range-hover-edge-start-near-range)::after,
      &-in-view${n}-range-hover-start::after`]: {
      insetInlineStart: (C - i) / 2,
      borderInlineStart: `${u}px dashed ${b}`,
      borderStartStartRadius: u,
      borderEndStartRadius: u
    },
    // Edge end
    [`tr > &-in-view${n}-range-hover:last-child::after,
      tr > &-in-view${n}-range-hover-start:last-child::after,
      &-in-view${n}-end${n}-range-hover-edge-end${n}-range-hover-edge-end-near-range::after,
      &-in-view${n}-range-hover-edge-end:not(${n}-range-hover-edge-end-near-range)::after,
      &-in-view${n}-range-hover-end::after`]: {
      insetInlineEnd: (C - i) / 2,
      borderInlineEnd: `${u}px dashed ${b}`,
      borderStartEndRadius: u,
      borderEndEndRadius: u
    },
    // >>> Disabled
    "&-disabled": {
      color: O,
      pointerEvents: "none",
      [o]: {
        background: "transparent"
      },
      "&::before": {
        background: $
      }
    },
    [`&-disabled${n}-today ${o}::before`]: {
      borderColor: O
    }
  };
}, O8 = (e) => {
  const {
    componentCls: t,
    pickerCellInnerCls: n,
    pickerYearMonthCellWidth: o,
    pickerControlIconSize: i,
    pickerPanelCellWidth: r,
    paddingSM: a,
    paddingXS: l,
    paddingXXS: s,
    colorBgContainer: u,
    lineWidth: c,
    lineType: d,
    borderRadiusLG: f,
    colorPrimary: p,
    colorTextHeading: m,
    colorSplit: b,
    pickerControlIconBorderWidth: y,
    colorIcon: S,
    pickerTextHeight: C,
    motionDurationMid: O,
    colorIconHover: $,
    fontWeightStrong: P,
    pickerPanelCellHeight: k,
    pickerCellPaddingVertical: x,
    colorTextDisabled: E,
    colorText: z,
    fontSize: N,
    pickerBasicCellHoverWithRangeColor: D,
    motionDurationSlow: W,
    pickerPanelWithoutTimeCellHeight: H,
    pickerQuarterPanelContentHeight: L,
    colorLink: A,
    colorLinkActive: U,
    colorLinkHover: j,
    pickerDateHoverRangeBorderColor: re,
    borderRadiusSM: G,
    colorTextLightSolid: Y,
    borderRadius: K,
    controlItemBgHover: J,
    pickerTimePanelColumnHeight: be,
    pickerTimePanelColumnWidth: xe,
    pickerTimePanelCellHeight: ge,
    controlItemBgActive: de,
    marginXXS: ne
  } = e, we = r * 7 + a * 2 + 4, ae = (we - l * 2) / 3 - o - a;
  return {
    [t]: {
      "&-panel": {
        display: "inline-flex",
        flexDirection: "column",
        textAlign: "center",
        background: u,
        border: `${c}px ${d} ${b}`,
        borderRadius: f,
        outline: "none",
        "&-focused": {
          borderColor: p
        },
        "&-rtl": {
          direction: "rtl",
          [`${t}-prev-icon,
              ${t}-super-prev-icon`]: {
            transform: "rotate(45deg)"
          },
          [`${t}-next-icon,
              ${t}-super-next-icon`]: {
            transform: "rotate(-135deg)"
          }
        }
      },
      // ========================================================
      // =                     Shared Panel                     =
      // ========================================================
      "&-decade-panel,\n        &-year-panel,\n        &-quarter-panel,\n        &-month-panel,\n        &-week-panel,\n        &-date-panel,\n        &-time-panel": {
        display: "flex",
        flexDirection: "column",
        width: we
      },
      // ======================= Header =======================
      "&-header": {
        display: "flex",
        padding: `0 ${l}px`,
        color: m,
        borderBottom: `${c}px ${d} ${b}`,
        "> *": {
          flex: "none"
        },
        button: {
          padding: 0,
          color: S,
          lineHeight: `${C}px`,
          background: "transparent",
          border: 0,
          cursor: "pointer",
          transition: `color ${O}`
        },
        "> button": {
          minWidth: "1.6em",
          fontSize: N,
          "&:hover": {
            color: $
          }
        },
        "&-view": {
          flex: "auto",
          fontWeight: P,
          lineHeight: `${C}px`,
          button: {
            color: "inherit",
            fontWeight: "inherit",
            verticalAlign: "top",
            "&:not(:first-child)": {
              marginInlineStart: l
            },
            "&:hover": {
              color: p
            }
          }
        }
      },
      // Arrow button
      "&-prev-icon,\n        &-next-icon,\n        &-super-prev-icon,\n        &-super-next-icon": {
        position: "relative",
        display: "inline-block",
        width: i,
        height: i,
        "&::before": {
          position: "absolute",
          top: 0,
          insetInlineStart: 0,
          display: "inline-block",
          width: i,
          height: i,
          border: "0 solid currentcolor",
          borderBlockStartWidth: y,
          borderBlockEndWidth: 0,
          borderInlineStartWidth: y,
          borderInlineEndWidth: 0,
          content: '""'
        }
      },
      "&-super-prev-icon,\n        &-super-next-icon": {
        "&::after": {
          position: "absolute",
          top: Math.ceil(i / 2),
          insetInlineStart: Math.ceil(i / 2),
          display: "inline-block",
          width: i,
          height: i,
          border: "0 solid currentcolor",
          borderBlockStartWidth: y,
          borderBlockEndWidth: 0,
          borderInlineStartWidth: y,
          borderInlineEndWidth: 0,
          content: '""'
        }
      },
      "&-prev-icon,\n        &-super-prev-icon": {
        transform: "rotate(-45deg)"
      },
      "&-next-icon,\n        &-super-next-icon": {
        transform: "rotate(135deg)"
      },
      // ======================== Body ========================
      "&-content": {
        width: "100%",
        tableLayout: "fixed",
        borderCollapse: "collapse",
        "th, td": {
          position: "relative",
          minWidth: k,
          fontWeight: "normal"
        },
        th: {
          height: k + x * 2,
          color: z,
          verticalAlign: "middle"
        }
      },
      "&-cell": I({
        padding: `${x}px 0`,
        color: E,
        cursor: "pointer",
        // In view
        "&-in-view": {
          color: z
        }
      }, P8(e)),
      // DatePanel only
      [`&-date-panel ${t}-cell-in-view${t}-cell-in-range${t}-cell-range-hover-start ${n},
        &-date-panel ${t}-cell-in-view${t}-cell-in-range${t}-cell-range-hover-end ${n}`]: {
        "&::after": {
          position: "absolute",
          top: 0,
          bottom: 0,
          zIndex: -1,
          background: D,
          transition: `all ${W}`,
          content: '""'
        }
      },
      [`&-date-panel
        ${t}-cell-in-view${t}-cell-in-range${t}-cell-range-hover-start
        ${n}::after`]: {
        insetInlineEnd: -(r - k) / 2,
        insetInlineStart: 0
      },
      [`&-date-panel ${t}-cell-in-view${t}-cell-in-range${t}-cell-range-hover-end ${n}::after`]: {
        insetInlineEnd: 0,
        insetInlineStart: -(r - k) / 2
      },
      // Hover with range start & end
      [`&-range-hover${t}-range-start::after`]: {
        insetInlineEnd: "50%"
      },
      "&-decade-panel,\n        &-year-panel,\n        &-quarter-panel,\n        &-month-panel": {
        [`${t}-content`]: {
          height: H * 4
        },
        [n]: {
          padding: `0 ${l}px`
        }
      },
      "&-quarter-panel": {
        [`${t}-content`]: {
          height: L
        }
      },
      // ======================== Footer ========================
      [`&-panel ${t}-footer`]: {
        borderTop: `${c}px ${d} ${b}`
      },
      "&-footer": {
        width: "min-content",
        minWidth: "100%",
        lineHeight: `${C - 2 * c}px`,
        textAlign: "center",
        "&-extra": {
          padding: `0 ${a}`,
          lineHeight: `${C - 2 * c}px`,
          textAlign: "start",
          "&:not(:last-child)": {
            borderBottom: `${c}px ${d} ${b}`
          }
        }
      },
      "&-now": {
        textAlign: "start"
      },
      "&-today-btn": {
        color: A,
        "&:hover": {
          color: j
        },
        "&:active": {
          color: U
        },
        [`&${t}-today-btn-disabled`]: {
          color: E,
          cursor: "not-allowed"
        }
      },
      // ========================================================
      // =                       Special                        =
      // ========================================================
      // ===================== Decade Panel =====================
      "&-decade-panel": {
        [n]: {
          padding: `0 ${l / 2}px`
        },
        [`${t}-cell::before`]: {
          display: "none"
        }
      },
      // ============= Year & Quarter & Month Panel =============
      "&-year-panel,\n        &-quarter-panel,\n        &-month-panel": {
        [`${t}-body`]: {
          padding: `0 ${l}px`
        },
        [n]: {
          width: o
        },
        [`${t}-cell-range-hover-start::after`]: {
          insetInlineStart: ae,
          borderInlineStart: `${c}px dashed ${re}`,
          borderStartStartRadius: G,
          borderBottomStartRadius: G,
          borderStartEndRadius: 0,
          borderBottomEndRadius: 0,
          [`${t}-panel-rtl &`]: {
            insetInlineEnd: ae,
            borderInlineEnd: `${c}px dashed ${re}`,
            borderStartStartRadius: 0,
            borderBottomStartRadius: 0,
            borderStartEndRadius: G,
            borderBottomEndRadius: G
          }
        },
        [`${t}-cell-range-hover-end::after`]: {
          insetInlineEnd: ae,
          borderInlineEnd: `${c}px dashed ${re}`,
          borderStartStartRadius: 0,
          borderEndStartRadius: 0,
          borderStartEndRadius: K,
          borderEndEndRadius: K,
          [`${t}-panel-rtl &`]: {
            insetInlineStart: ae,
            borderInlineStart: `${c}px dashed ${re}`,
            borderStartStartRadius: K,
            borderEndStartRadius: K,
            borderStartEndRadius: 0,
            borderEndEndRadius: 0
          }
        }
      },
      // ====================== Week Panel ======================
      "&-week-panel": {
        [`${t}-body`]: {
          padding: `${l}px ${a}px`
        },
        // Clear cell style
        [`${t}-cell`]: {
          [`&:hover ${n},
            &-selected ${n},
            ${n}`]: {
            background: "transparent !important"
          }
        },
        "&-row": {
          td: {
            transition: `background ${O}`,
            "&:first-child": {
              borderStartStartRadius: G,
              borderEndStartRadius: G
            },
            "&:last-child": {
              borderStartEndRadius: G,
              borderEndEndRadius: G
            }
          },
          "&:hover td": {
            background: J
          },
          "&-selected td,\n            &-selected:hover td": {
            background: p,
            [`&${t}-cell-week`]: {
              color: new In(Y).setAlpha(0.5).toHexString()
            },
            [`&${t}-cell-today ${n}::before`]: {
              borderColor: Y
            },
            [n]: {
              color: Y
            }
          }
        }
      },
      // ====================== Date Panel ======================
      "&-date-panel": {
        [`${t}-body`]: {
          padding: `${l}px ${a}px`
        },
        [`${t}-content`]: {
          width: r * 7,
          th: {
            width: r
          }
        }
      },
      // ==================== Datetime Panel ====================
      "&-datetime-panel": {
        display: "flex",
        [`${t}-time-panel`]: {
          borderInlineStart: `${c}px ${d} ${b}`
        },
        [`${t}-date-panel,
          ${t}-time-panel`]: {
          transition: `opacity ${W}`
        },
        // Keyboard
        "&-active": {
          [`${t}-date-panel,
            ${t}-time-panel`]: {
            opacity: 0.3,
            "&-active": {
              opacity: 1
            }
          }
        }
      },
      // ====================== Time Panel ======================
      "&-time-panel": {
        width: "auto",
        minWidth: "auto",
        direction: "ltr",
        [`${t}-content`]: {
          display: "flex",
          flex: "auto",
          height: be
        },
        "&-column": {
          flex: "1 0 auto",
          width: xe,
          margin: `${s}px 0`,
          padding: 0,
          overflowY: "hidden",
          textAlign: "start",
          listStyle: "none",
          transition: `background ${O}`,
          overflowX: "hidden",
          "&::after": {
            display: "block",
            height: be - ge,
            content: '""'
          },
          "&:not(:first-child)": {
            borderInlineStart: `${c}px ${d} ${b}`
          },
          "&-active": {
            background: new In(de).setAlpha(0.2).toHexString()
          },
          "&:hover": {
            overflowY: "auto"
          },
          "> li": {
            margin: 0,
            padding: 0,
            [`&${t}-time-panel-cell`]: {
              marginInline: ne,
              [`${t}-time-panel-cell-inner`]: {
                display: "block",
                width: xe - 2 * ne,
                height: ge,
                margin: 0,
                paddingBlock: 0,
                paddingInlineEnd: 0,
                paddingInlineStart: (xe - ge) / 2,
                color: z,
                lineHeight: `${ge}px`,
                borderRadius: G,
                cursor: "pointer",
                transition: `background ${O}`,
                "&:hover": {
                  background: J
                }
              },
              "&-selected": {
                [`${t}-time-panel-cell-inner`]: {
                  background: de
                }
              },
              "&-disabled": {
                [`${t}-time-panel-cell-inner`]: {
                  color: E,
                  background: "transparent",
                  cursor: "not-allowed"
                }
              }
            }
          }
        }
      },
      // https://github.com/ant-design/ant-design/issues/39227
      [`&-datetime-panel ${t}-time-panel-column:after`]: {
        height: be - ge + s * 2
      }
    }
  };
}, I8 = (e) => {
  const {
    componentCls: t,
    colorBgContainer: n,
    colorError: o,
    colorErrorOutline: i,
    colorWarning: r,
    colorWarningOutline: a
  } = e;
  return {
    [t]: {
      [`&-status-error${t}`]: {
        "&, &:not([disabled]):hover": {
          backgroundColor: n,
          borderColor: o
        },
        "&-focused, &:focus": I({}, Cl(_t(e, {
          inputBorderActiveColor: o,
          inputBorderHoverColor: o,
          controlOutline: i
        }))),
        [`${t}-active-bar`]: {
          background: o
        }
      },
      [`&-status-warning${t}`]: {
        "&, &:not([disabled]):hover": {
          backgroundColor: n,
          borderColor: r
        },
        "&-focused, &:focus": I({}, Cl(_t(e, {
          inputBorderActiveColor: r,
          inputBorderHoverColor: r,
          controlOutline: a
        }))),
        [`${t}-active-bar`]: {
          background: r
        }
      }
    }
  };
}, M8 = (e) => {
  const {
    componentCls: t,
    antCls: n,
    boxShadowPopoverArrow: o,
    controlHeight: i,
    fontSize: r,
    inputPaddingHorizontal: a,
    colorBgContainer: l,
    lineWidth: s,
    lineType: u,
    colorBorder: c,
    borderRadius: d,
    motionDurationMid: f,
    colorBgContainerDisabled: p,
    colorTextDisabled: m,
    colorTextPlaceholder: b,
    controlHeightLG: y,
    fontSizeLG: S,
    controlHeightSM: C,
    inputPaddingHorizontalSM: O,
    paddingXS: $,
    marginXS: P,
    colorTextDescription: k,
    lineWidthBold: x,
    lineHeight: E,
    colorPrimary: z,
    motionDurationSlow: N,
    zIndexPopup: D,
    paddingXXS: W,
    paddingSM: H,
    pickerTextHeight: L,
    controlItemBgActive: A,
    colorPrimaryBorder: U,
    sizePopupArrow: j,
    borderRadiusXS: re,
    borderRadiusOuter: G,
    colorBgElevated: Y,
    borderRadiusLG: K,
    boxShadowSecondary: J,
    borderRadiusSM: be,
    colorSplit: xe,
    controlItemBgHover: ge,
    presetsWidth: de,
    presetsMaxWidth: ne
  } = e;
  return [
    {
      [t]: I(I(I({}, Zt(e)), Np(e, i, r, a)), {
        position: "relative",
        display: "inline-flex",
        alignItems: "center",
        background: l,
        lineHeight: 1,
        border: `${s}px ${u} ${c}`,
        borderRadius: d,
        transition: `border ${f}, box-shadow ${f}`,
        "&:hover, &-focused": I({}, Ws(e)),
        "&-focused": I({}, Cl(e)),
        [`&${t}-disabled`]: {
          background: p,
          borderColor: c,
          cursor: "not-allowed",
          [`${t}-suffix`]: {
            color: m
          }
        },
        [`&${t}-borderless`]: {
          backgroundColor: "transparent !important",
          borderColor: "transparent !important",
          boxShadow: "none !important"
        },
        // ======================== Input =========================
        [`${t}-input`]: {
          position: "relative",
          display: "inline-flex",
          alignItems: "center",
          width: "100%",
          "> input": I(I({}, ic(e)), {
            flex: "auto",
            // Fix Firefox flex not correct:
            // https://github.com/ant-design/ant-design/pull/20023#issuecomment-564389553
            minWidth: 1,
            height: "auto",
            padding: 0,
            background: "transparent",
            border: 0,
            "&:focus": {
              boxShadow: "none"
            },
            "&[disabled]": {
              background: "transparent"
            }
          }),
          "&:hover": {
            [`${t}-clear`]: {
              opacity: 1
            }
          },
          "&-placeholder": {
            "> input": {
              color: b
            }
          }
        },
        // Size
        "&-large": I(I({}, Np(e, y, S, a)), {
          [`${t}-input > input`]: {
            fontSize: S
          }
        }),
        "&-small": I({}, Np(e, C, r, O)),
        [`${t}-suffix`]: {
          display: "flex",
          flex: "none",
          alignSelf: "center",
          marginInlineStart: $ / 2,
          color: m,
          lineHeight: 1,
          pointerEvents: "none",
          "> *": {
            verticalAlign: "top",
            "&:not(:last-child)": {
              marginInlineEnd: P
            }
          }
        },
        [`${t}-clear`]: {
          position: "absolute",
          top: "50%",
          insetInlineEnd: 0,
          color: m,
          lineHeight: 1,
          background: l,
          transform: "translateY(-50%)",
          cursor: "pointer",
          opacity: 0,
          transition: `opacity ${f}, color ${f}`,
          "> *": {
            verticalAlign: "top"
          },
          "&:hover": {
            color: k
          }
        },
        [`${t}-separator`]: {
          position: "relative",
          display: "inline-block",
          width: "1em",
          height: S,
          color: m,
          fontSize: S,
          verticalAlign: "top",
          cursor: "default",
          [`${t}-focused &`]: {
            color: k
          },
          [`${t}-range-separator &`]: {
            [`${t}-disabled &`]: {
              cursor: "not-allowed"
            }
          }
        },
        // ======================== Range =========================
        "&-range": {
          position: "relative",
          display: "inline-flex",
          // Clear
          [`${t}-clear`]: {
            insetInlineEnd: a
          },
          "&:hover": {
            [`${t}-clear`]: {
              opacity: 1
            }
          },
          // Active bar
          [`${t}-active-bar`]: {
            bottom: -s,
            height: x,
            marginInlineStart: a,
            background: z,
            opacity: 0,
            transition: `all ${N} ease-out`,
            pointerEvents: "none"
          },
          [`&${t}-focused`]: {
            [`${t}-active-bar`]: {
              opacity: 1
            }
          },
          [`${t}-range-separator`]: {
            alignItems: "center",
            padding: `0 ${$}px`,
            lineHeight: 1
          },
          [`&${t}-small`]: {
            [`${t}-clear`]: {
              insetInlineEnd: O
            },
            [`${t}-active-bar`]: {
              marginInlineStart: O
            }
          }
        },
        // ======================= Dropdown =======================
        "&-dropdown": I(I(I({}, Zt(e)), O8(e)), {
          position: "absolute",
          // Fix incorrect position of picker popup
          // https://github.com/ant-design/ant-design/issues/35590
          top: -9999,
          left: {
            _skip_check_: !0,
            value: -9999
          },
          zIndex: D,
          [`&${t}-dropdown-hidden`]: {
            display: "none"
          },
          [`&${t}-dropdown-placement-bottomLeft`]: {
            [`${t}-range-arrow`]: {
              top: 0,
              display: "block",
              transform: "translateY(-100%)"
            }
          },
          [`&${t}-dropdown-placement-topLeft`]: {
            [`${t}-range-arrow`]: {
              bottom: 0,
              display: "block",
              transform: "translateY(100%) rotate(180deg)"
            }
          },
          [`&${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-topLeft,
          &${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-topRight,
          &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-topLeft,
          &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-topRight`]: {
            animationName: If
          },
          [`&${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-bottomLeft,
          &${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-bottomRight,
          &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-bottomLeft,
          &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-bottomRight`]: {
            animationName: Pf
          },
          [`&${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-topLeft,
          &${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-topRight`]: {
            animationName: Mf
          },
          [`&${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-bottomLeft,
          &${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-bottomRight`]: {
            animationName: Of
          },
          // Time picker with additional style
          [`${t}-panel > ${t}-time-panel`]: {
            paddingTop: W
          },
          // ======================== Ranges ========================
          [`${t}-ranges`]: {
            marginBottom: 0,
            padding: `${W}px ${H}px`,
            overflow: "hidden",
            lineHeight: `${L - 2 * s - $ / 2}px`,
            textAlign: "start",
            listStyle: "none",
            display: "flex",
            justifyContent: "space-between",
            "> li": {
              display: "inline-block"
            },
            // https://github.com/ant-design/ant-design/issues/23687
            [`${t}-preset > ${n}-tag-blue`]: {
              color: z,
              background: A,
              borderColor: U,
              cursor: "pointer"
            },
            [`${t}-ok`]: {
              marginInlineStart: "auto"
            }
          },
          [`${t}-range-wrapper`]: {
            display: "flex",
            position: "relative"
          },
          [`${t}-range-arrow`]: I({
            position: "absolute",
            zIndex: 1,
            display: "none",
            marginInlineStart: a * 1.5,
            transition: `left ${N} ease-out`
          }, yv(j, re, G, Y, o)),
          [`${t}-panel-container`]: {
            overflow: "hidden",
            verticalAlign: "top",
            background: Y,
            borderRadius: K,
            boxShadow: J,
            transition: `margin ${N}`,
            // ======================== Layout ========================
            [`${t}-panel-layout`]: {
              display: "flex",
              flexWrap: "nowrap",
              alignItems: "stretch"
            },
            // ======================== Preset ========================
            [`${t}-presets`]: {
              display: "flex",
              flexDirection: "column",
              minWidth: de,
              maxWidth: ne,
              ul: {
                height: 0,
                flex: "auto",
                listStyle: "none",
                overflow: "auto",
                margin: 0,
                padding: $,
                borderInlineEnd: `${s}px ${u} ${xe}`,
                li: I(I({}, ka), {
                  borderRadius: be,
                  paddingInline: $,
                  paddingBlock: (C - Math.round(r * E)) / 2,
                  cursor: "pointer",
                  transition: `all ${N}`,
                  "+ li": {
                    marginTop: P
                  },
                  "&:hover": {
                    background: ge
                  }
                })
              }
            },
            // ======================== Panels ========================
            [`${t}-panels`]: {
              display: "inline-flex",
              flexWrap: "nowrap",
              direction: "ltr",
              [`${t}-panel`]: {
                borderWidth: `0 0 ${s}px`
              },
              "&:last-child": {
                [`${t}-panel`]: {
                  borderWidth: 0
                }
              }
            },
            [`${t}-panel`]: {
              verticalAlign: "top",
              background: "transparent",
              borderRadius: 0,
              borderWidth: 0,
              [`${t}-content,
            table`]: {
                textAlign: "center"
              },
              "&-focused": {
                borderColor: c
              }
            }
          }
        }),
        "&-dropdown-range": {
          padding: `${j * 2 / 3}px 0`,
          "&-hidden": {
            display: "none"
          }
        },
        "&-rtl": {
          direction: "rtl",
          [`${t}-separator`]: {
            transform: "rotate(180deg)"
          },
          [`${t}-footer`]: {
            "&-extra": {
              direction: "rtl"
            }
          }
        }
      })
    },
    // Follow code may reuse in other components
    xr(e, "slide-up"),
    xr(e, "slide-down"),
    Ts(e, "move-up"),
    Ts(e, "move-down")
  ];
}, T8 = (e) => {
  const {
    componentCls: n,
    controlHeightLG: o,
    controlHeightSM: i,
    colorPrimary: r,
    paddingXXS: a
  } = e;
  return {
    pickerCellCls: `${n}-cell`,
    pickerCellInnerCls: `${n}-cell-inner`,
    pickerTextHeight: o,
    pickerPanelCellWidth: i * 1.5,
    pickerPanelCellHeight: i,
    pickerDateHoverRangeBorderColor: new In(r).lighten(20).toHexString(),
    pickerBasicCellHoverWithRangeColor: new In(r).lighten(35).toHexString(),
    pickerPanelWithoutTimeCellHeight: o * 1.65,
    pickerYearMonthCellWidth: o * 1.5,
    pickerTimePanelColumnHeight: 224,
    pickerTimePanelColumnWidth: o * 1.4,
    pickerTimePanelCellHeight: 28,
    pickerQuarterPanelContentHeight: o * 1.4,
    pickerCellPaddingVertical: a,
    pickerCellBorderGap: 2,
    pickerControlIconSize: 7,
    pickerControlIconBorderWidth: 1.5
  };
}, lP = nn("DatePicker", (e) => {
  const t = _t(Om(e), T8(e));
  return [
    M8(t),
    I8(t),
    // =====================================================
    // ==             Space Compact                       ==
    // =====================================================
    ec(e, {
      focusElCls: `${e.componentCls}-focused`
    })
  ];
}, (e) => ({
  presetsWidth: 120,
  presetsMaxWidth: 200,
  zIndexPopup: e.zIndexPopupBase + 50
}));
function k8(e) {
  const t = Pe(), n = Pe(!1);
  function o() {
    for (var i = arguments.length, r = new Array(i), a = 0; a < i; a++)
      r[a] = arguments[a];
    n.value || (Mt.cancel(t.value), t.value = Mt(() => {
      e(...r);
    }));
  }
  return At(() => {
    n.value = !0, Mt.cancel(t.value);
  }), o;
}
function E8(e) {
  const t = Pe([]), n = Pe(typeof e == "function" ? e() : e), o = k8(() => {
    let r = n.value;
    t.value.forEach((a) => {
      r = a(r);
    }), t.value = [], n.value = r;
  });
  function i(r) {
    t.value.push(r), o();
  }
  return [n, i];
}
const _8 = ye({
  compatConfig: {
    MODE: 3
  },
  name: "TabNode",
  props: {
    id: {
      type: String
    },
    prefixCls: {
      type: String
    },
    tab: {
      type: Object
    },
    active: {
      type: Boolean
    },
    closable: {
      type: Boolean
    },
    editable: {
      type: Object
    },
    onClick: {
      type: Function
    },
    onResize: {
      type: Function
    },
    renderWrapper: {
      type: Function
    },
    removeAriaLabel: {
      type: String
    },
    // onRemove: { type: Function as PropType<() => void> },
    onFocus: {
      type: Function
    }
  },
  emits: ["click", "resize", "remove", "focus"],
  setup(e, t) {
    let {
      expose: n,
      attrs: o
    } = t;
    const i = le();
    function r(s) {
      var u;
      !((u = e.tab) === null || u === void 0) && u.disabled || e.onClick(s);
    }
    n({
      domRef: i
    });
    function a(s) {
      var u;
      s.preventDefault(), s.stopPropagation(), e.editable.onEdit("remove", {
        key: (u = e.tab) === null || u === void 0 ? void 0 : u.key,
        event: s
      });
    }
    const l = R(() => {
      var s;
      return e.editable && e.closable !== !1 && !(!((s = e.tab) === null || s === void 0) && s.disabled);
    });
    return () => {
      var s;
      const {
        prefixCls: u,
        id: c,
        active: d,
        tab: {
          key: f,
          tab: p,
          disabled: m,
          closeIcon: b
        },
        renderWrapper: y,
        removeAriaLabel: S,
        editable: C,
        onFocus: O
      } = e, $ = `${u}-tab`, P = v("div", {
        key: f,
        ref: i,
        class: Te($, {
          [`${$}-with-remove`]: l.value,
          [`${$}-active`]: d,
          [`${$}-disabled`]: m
        }),
        style: o.style,
        onClick: r
      }, [v("div", {
        role: "tab",
        "aria-selected": d,
        id: c && `${c}-tab-${f}`,
        class: `${$}-btn`,
        "aria-controls": c && `${c}-panel-${f}`,
        "aria-disabled": m,
        tabindex: m ? null : 0,
        onClick: (k) => {
          k.stopPropagation(), r(k);
        },
        onKeydown: (k) => {
          [Xe.SPACE, Xe.ENTER].includes(k.which) && (k.preventDefault(), r(k));
        },
        onFocus: O
      }, [typeof p == "function" ? p() : p]), l.value && v("button", {
        type: "button",
        "aria-label": S || "remove",
        tabindex: 0,
        class: `${$}-remove`,
        onClick: (k) => {
          k.stopPropagation(), a(k);
        }
      }, [b?.() || ((s = C.removeIcon) === null || s === void 0 ? void 0 : s.call(C)) || "×"])]);
      return y ? y(P) : P;
    };
  }
}), ix = {
  width: 0,
  height: 0,
  left: 0,
  top: 0
};
function A8(e, t) {
  const n = le(/* @__PURE__ */ new Map());
  return Lt(() => {
    var o, i;
    const r = /* @__PURE__ */ new Map(), a = e.value, l = t.value.get((o = a[0]) === null || o === void 0 ? void 0 : o.key) || ix, s = l.left + l.width;
    for (let u = 0; u < a.length; u += 1) {
      const {
        key: c
      } = a[u];
      let d = t.value.get(c);
      d || (d = t.value.get((i = a[u - 1]) === null || i === void 0 ? void 0 : i.key) || ix);
      const f = r.get(c) || I({}, d);
      f.right = s - f.left - f.width, r.set(c, f);
    }
    n.value = new Map(r);
  }), n;
}
const sP = ye({
  compatConfig: {
    MODE: 3
  },
  name: "AddButton",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    editable: {
      type: Object
    },
    locale: {
      type: Object,
      default: void 0
    }
  },
  setup(e, t) {
    let {
      expose: n,
      attrs: o
    } = t;
    const i = le();
    return n({
      domRef: i
    }), () => {
      const {
        prefixCls: r,
        editable: a,
        locale: l
      } = e;
      return !a || a.showAdd === !1 ? null : v("button", {
        ref: i,
        type: "button",
        class: `${r}-nav-add`,
        style: o.style,
        "aria-label": l?.addAriaLabel || "Add tab",
        onClick: (s) => {
          a.onEdit("add", {
            event: s
          });
        }
      }, [a.addIcon ? a.addIcon() : "+"]);
    };
  }
}), D8 = {
  prefixCls: {
    type: String
  },
  id: {
    type: String
  },
  tabs: {
    type: Object
  },
  rtl: {
    type: Boolean
  },
  tabBarGutter: {
    type: Number
  },
  activeKey: {
    type: [String, Number]
  },
  mobile: {
    type: Boolean
  },
  moreIcon: ue.any,
  moreTransitionName: {
    type: String
  },
  editable: {
    type: Object
  },
  locale: {
    type: Object,
    default: void 0
  },
  removeAriaLabel: String,
  onTabClick: {
    type: Function
  },
  popupClassName: String,
  getPopupContainer: Qe()
}, z8 = ye({
  compatConfig: {
    MODE: 3
  },
  name: "OperationNode",
  inheritAttrs: !1,
  props: D8,
  emits: ["tabClick"],
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const [i, r] = On(!1), [a, l] = On(null), s = (p) => {
      const m = e.tabs.filter((S) => !S.disabled);
      let b = m.findIndex((S) => S.key === a.value) || 0;
      const y = m.length;
      for (let S = 0; S < y; S += 1) {
        b = (b + p + y) % y;
        const C = m[b];
        if (!C.disabled) {
          l(C.key);
          return;
        }
      }
    }, u = (p) => {
      const {
        which: m
      } = p;
      if (!i.value) {
        [Xe.DOWN, Xe.SPACE, Xe.ENTER].includes(m) && (r(!0), p.preventDefault());
        return;
      }
      switch (m) {
        case Xe.UP:
          s(-1), p.preventDefault();
          break;
        case Xe.DOWN:
          s(1), p.preventDefault();
          break;
        case Xe.ESC:
          r(!1);
          break;
        case Xe.SPACE:
        case Xe.ENTER:
          a.value !== null && e.onTabClick(a.value, p);
          break;
      }
    }, c = R(() => `${e.id}-more-popup`), d = R(() => a.value !== null ? `${c.value}-${a.value}` : null), f = (p, m) => {
      p.preventDefault(), p.stopPropagation(), e.editable.onEdit("remove", {
        key: m,
        event: p
      });
    };
    return Pt(() => {
      Ie(a, () => {
        const p = document.getElementById(d.value);
        p && p.scrollIntoView && p.scrollIntoView(!1);
      }, {
        flush: "post",
        immediate: !0
      });
    }), Ie(i, () => {
      i.value || l(null);
    }), v$({}), () => {
      var p;
      const {
        prefixCls: m,
        id: b,
        tabs: y,
        locale: S,
        mobile: C,
        moreIcon: O = ((p = o.moreIcon) === null || p === void 0 ? void 0 : p.call(o)) || v(tc, null, null),
        moreTransitionName: $,
        editable: P,
        tabBarGutter: k,
        rtl: x,
        onTabClick: E,
        popupClassName: z
      } = e;
      if (!y.length) return null;
      const N = `${m}-dropdown`, D = S?.dropdownAriaLabel, W = {
        [x ? "marginRight" : "marginLeft"]: k
      };
      y.length || (W.visibility = "hidden", W.order = 1);
      const H = Te({
        [`${N}-rtl`]: x,
        [`${z}`]: !0
      }), L = C ? null : v(a$, {
        prefixCls: N,
        trigger: ["hover"],
        visible: i.value,
        transitionName: $,
        onVisibleChange: r,
        overlayClassName: H,
        mouseEnterDelay: 0.1,
        mouseLeaveDelay: 0.1,
        getPopupContainer: e.getPopupContainer
      }, {
        overlay: () => v(lo, {
          onClick: (A) => {
            let {
              key: U,
              domEvent: j
            } = A;
            E(U, j), r(!1);
          },
          id: c.value,
          tabindex: -1,
          role: "listbox",
          "aria-activedescendant": d.value,
          selectedKeys: [a.value],
          "aria-label": D !== void 0 ? D : "expanded dropdown"
        }, {
          default: () => [y.map((A) => {
            var U, j;
            const re = P && A.closable !== !1 && !A.disabled;
            return v(ks, {
              key: A.key,
              id: `${c.value}-${A.key}`,
              role: "option",
              "aria-controls": b && `${b}-panel-${A.key}`,
              disabled: A.disabled
            }, {
              default: () => [v("span", null, [typeof A.tab == "function" ? A.tab() : A.tab]), re && v("button", {
                type: "button",
                "aria-label": e.removeAriaLabel || "remove",
                tabindex: 0,
                class: `${N}-menu-item-remove`,
                onClick: (G) => {
                  G.stopPropagation(), f(G, A.key);
                }
              }, [((U = A.closeIcon) === null || U === void 0 ? void 0 : U.call(A)) || ((j = P.removeIcon) === null || j === void 0 ? void 0 : j.call(P)) || "×"])]
            });
          })]
        }),
        default: () => v("button", {
          type: "button",
          class: `${m}-nav-more`,
          style: W,
          tabindex: -1,
          "aria-hidden": "true",
          "aria-haspopup": "listbox",
          "aria-controls": c.value,
          id: `${b}-more`,
          "aria-expanded": i.value,
          onKeydown: u
        }, [O])
      });
      return v("div", {
        class: Te(`${m}-nav-operations`, n.class),
        style: n.style
      }, [L, v(sP, {
        prefixCls: m,
        locale: S,
        editable: P
      }, null)]);
    };
  }
}), uP = Symbol("tabsContextKey"), cP = (e) => {
  kt(uP, e);
}, dP = () => Tt(uP, {
  tabs: le([]),
  prefixCls: le()
});
ye({
  compatConfig: {
    MODE: 3
  },
  name: "TabsContextProvider",
  inheritAttrs: !1,
  props: {
    tabs: {
      type: Object,
      default: void 0
    },
    prefixCls: {
      type: String,
      default: void 0
    }
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    return cP(Sd(e)), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
});
const R8 = 0.1, rx = 0.01, gd = 20, ax = Math.pow(0.995, gd);
function N8(e, t) {
  const [n, o] = On(), [i, r] = On(0), [a, l] = On(0), [s, u] = On(), c = le();
  function d(P) {
    const {
      screenX: k,
      screenY: x
    } = P.touches[0];
    o({
      x: k,
      y: x
    }), clearInterval(c.value);
  }
  function f(P) {
    if (!n.value) return;
    P.preventDefault();
    const {
      screenX: k,
      screenY: x
    } = P.touches[0], E = k - n.value.x, z = x - n.value.y;
    t(E, z), o({
      x: k,
      y: x
    });
    const N = Date.now();
    l(N - i.value), r(N), u({
      x: E,
      y: z
    });
  }
  function p() {
    if (!n.value) return;
    const P = s.value;
    if (o(null), u(null), P) {
      const k = P.x / a.value, x = P.y / a.value, E = Math.abs(k), z = Math.abs(x);
      if (Math.max(E, z) < R8) return;
      let N = k, D = x;
      c.value = setInterval(() => {
        if (Math.abs(N) < rx && Math.abs(D) < rx) {
          clearInterval(c.value);
          return;
        }
        N *= ax, D *= ax, t(N * gd, D * gd);
      }, gd);
    }
  }
  const m = le();
  function b(P) {
    const {
      deltaX: k,
      deltaY: x
    } = P;
    let E = 0;
    const z = Math.abs(k), N = Math.abs(x);
    z === N ? E = m.value === "x" ? k : x : z > N ? (E = k, m.value = "x") : (E = x, m.value = "y"), t(-E, -E) && P.preventDefault();
  }
  const y = le({
    onTouchStart: d,
    onTouchMove: f,
    onTouchEnd: p,
    onWheel: b
  });
  function S(P) {
    y.value.onTouchStart(P);
  }
  function C(P) {
    y.value.onTouchMove(P);
  }
  function O(P) {
    y.value.onTouchEnd(P);
  }
  function $(P) {
    y.value.onWheel(P);
  }
  Pt(() => {
    var P, k;
    document.addEventListener("touchmove", C, {
      passive: !1
    }), document.addEventListener("touchend", O, {
      passive: !1
    }), (P = e.value) === null || P === void 0 || P.addEventListener("touchstart", S, {
      passive: !1
    }), (k = e.value) === null || k === void 0 || k.addEventListener("wheel", $, {
      passive: !1
    });
  }), At(() => {
    document.removeEventListener("touchmove", C), document.removeEventListener("touchend", O);
  });
}
function lx(e, t) {
  const n = le(e);
  function o(i) {
    const r = typeof i == "function" ? i(n.value) : i;
    r !== n.value && t(r, n.value), n.value = r;
  }
  return [n, o];
}
const B8 = () => {
  const e = le(/* @__PURE__ */ new Map()), t = (n) => (o) => {
    e.value.set(n, o);
  };
  return Gh(() => {
    e.value = /* @__PURE__ */ new Map();
  }), [t, e];
}, sx = {
  width: 0,
  height: 0,
  left: 0,
  top: 0,
  right: 0
}, L8 = () => ({
  id: {
    type: String
  },
  tabPosition: {
    type: String
  },
  activeKey: {
    type: [String, Number]
  },
  rtl: {
    type: Boolean
  },
  animated: Ct(),
  editable: Ct(),
  moreIcon: ue.any,
  moreTransitionName: {
    type: String
  },
  mobile: {
    type: Boolean
  },
  tabBarGutter: {
    type: Number
  },
  renderTabBar: {
    type: Function
  },
  locale: Ct(),
  popupClassName: String,
  getPopupContainer: Qe(),
  onTabClick: {
    type: Function
  },
  onTabScroll: {
    type: Function
  }
}), F8 = (e, t) => {
  const {
    offsetWidth: n,
    offsetHeight: o,
    offsetTop: i,
    offsetLeft: r
  } = e, {
    width: a,
    height: l,
    x: s,
    y: u
  } = e.getBoundingClientRect();
  return Math.abs(a - n) < 1 ? [a, l, s - t.x, u - t.y] : [n, o, r, i];
}, ux = ye({
  compatConfig: {
    MODE: 3
  },
  name: "TabNavList",
  inheritAttrs: !1,
  props: L8(),
  slots: Object,
  emits: ["tabClick", "tabScroll"],
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const {
      tabs: i,
      prefixCls: r
    } = dP(), a = Pe(), l = Pe(), s = Pe(), u = Pe(), [c, d] = B8(), f = R(() => e.tabPosition === "top" || e.tabPosition === "bottom"), [p, m] = lx(0, (Fe, Ne) => {
      f.value && e.onTabScroll && e.onTabScroll({
        direction: Fe > Ne ? "left" : "right"
      });
    }), [b, y] = lx(0, (Fe, Ne) => {
      !f.value && e.onTabScroll && e.onTabScroll({
        direction: Fe > Ne ? "top" : "bottom"
      });
    }), [S, C] = On(0), [O, $] = On(0), [P, k] = On(null), [x, E] = On(null), [z, N] = On(0), [D, W] = On(0), [H, L] = E8(/* @__PURE__ */ new Map()), A = A8(i, H), U = R(() => `${r.value}-nav-operations-hidden`), j = Pe(0), re = Pe(0);
    Lt(() => {
      f.value ? e.rtl ? (j.value = 0, re.value = Math.max(0, S.value - P.value)) : (j.value = Math.min(0, P.value - S.value), re.value = 0) : (j.value = Math.min(0, x.value - O.value), re.value = 0);
    });
    const G = (Fe) => Fe < j.value ? j.value : Fe > re.value ? re.value : Fe, Y = Pe(), [K, J] = On(), be = () => {
      J(Date.now());
    }, xe = () => {
      clearTimeout(Y.value);
    }, ge = (Fe, Ne) => {
      Fe((Ge) => G(Ge + Ne));
    };
    N8(a, (Fe, Ne) => {
      if (f.value) {
        if (P.value >= S.value)
          return !1;
        ge(m, Fe);
      } else {
        if (x.value >= O.value)
          return !1;
        ge(y, Ne);
      }
      return xe(), be(), !0;
    }), Ie(K, () => {
      xe(), K.value && (Y.value = setTimeout(() => {
        J(0);
      }, 100));
    });
    const de = function() {
      let Fe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : e.activeKey;
      const Ne = A.value.get(Fe) || {
        width: 0,
        height: 0,
        left: 0,
        right: 0,
        top: 0
      };
      if (f.value) {
        let Ge = p.value;
        e.rtl ? Ne.right < p.value ? Ge = Ne.right : Ne.right + Ne.width > p.value + P.value && (Ge = Ne.right + Ne.width - P.value) : Ne.left < -p.value ? Ge = -Ne.left : Ne.left + Ne.width > -p.value + P.value && (Ge = -(Ne.left + Ne.width - P.value)), y(0), m(G(Ge));
      } else {
        let Ge = b.value;
        Ne.top < -b.value ? Ge = -Ne.top : Ne.top + Ne.height > -b.value + x.value && (Ge = -(Ne.top + Ne.height - x.value)), m(0), y(G(Ge));
      }
    }, ne = Pe(0), we = Pe(0);
    Lt(() => {
      let Fe, Ne, Ge, it, Ke, Oe;
      const je = A.value;
      ["top", "bottom"].includes(e.tabPosition) ? (Fe = "width", it = P.value, Ke = S.value, Oe = z.value, Ne = e.rtl ? "right" : "left", Ge = Math.abs(p.value)) : (Fe = "height", it = x.value, Ke = S.value, Oe = D.value, Ne = "top", Ge = -b.value);
      let De = it;
      Ke + Oe > it && Ke < it && (De = it - Oe);
      const Je = i.value;
      if (!Je.length)
        return [ne.value, we.value] = [0, 0];
      const wt = Je.length;
      let lt = wt;
      for (let rt = 0; rt < wt; rt += 1) {
        const dt = je.get(Je[rt].key) || sx;
        if (dt[Ne] + dt[Fe] > Ge + De) {
          lt = rt - 1;
          break;
        }
      }
      let qe = 0;
      for (let rt = wt - 1; rt >= 0; rt -= 1)
        if ((je.get(Je[rt].key) || sx)[Ne] < Ge) {
          qe = rt + 1;
          break;
        }
      return [ne.value, we.value] = [qe, lt];
    });
    const ae = () => {
      L(() => {
        var Fe;
        const Ne = /* @__PURE__ */ new Map(), Ge = (Fe = l.value) === null || Fe === void 0 ? void 0 : Fe.getBoundingClientRect();
        return i.value.forEach((it) => {
          let {
            key: Ke
          } = it;
          const Oe = d.value.get(Ke), je = Oe?.$el || Oe;
          if (je) {
            const [De, Je, wt, lt] = F8(je, Ge);
            Ne.set(Ke, {
              width: De,
              height: Je,
              left: wt,
              top: lt
            });
          }
        }), Ne;
      });
    };
    Ie(() => i.value.map((Fe) => Fe.key).join("%%"), () => {
      ae();
    }, {
      flush: "post"
    });
    const se = () => {
      var Fe, Ne, Ge, it, Ke;
      const Oe = ((Fe = a.value) === null || Fe === void 0 ? void 0 : Fe.offsetWidth) || 0, je = ((Ne = a.value) === null || Ne === void 0 ? void 0 : Ne.offsetHeight) || 0, De = ((Ge = u.value) === null || Ge === void 0 ? void 0 : Ge.$el) || {}, Je = De.offsetWidth || 0, wt = De.offsetHeight || 0;
      k(Oe), E(je), N(Je), W(wt);
      const lt = (((it = l.value) === null || it === void 0 ? void 0 : it.offsetWidth) || 0) - Je, qe = (((Ke = l.value) === null || Ke === void 0 ? void 0 : Ke.offsetHeight) || 0) - wt;
      C(lt), $(qe), ae();
    }, he = R(() => [...i.value.slice(0, ne.value), ...i.value.slice(we.value + 1)]), [Me, ke] = On(), Le = R(() => A.value.get(e.activeKey)), Re = Pe(), We = () => {
      Mt.cancel(Re.value);
    };
    Ie([Le, f, () => e.rtl], () => {
      const Fe = {};
      Le.value && (f.value ? (e.rtl ? Fe.right = nu(Le.value.right) : Fe.left = nu(Le.value.left), Fe.width = nu(Le.value.width)) : (Fe.top = nu(Le.value.top), Fe.height = nu(Le.value.height))), We(), Re.value = Mt(() => {
        ke(Fe);
      });
    }), Ie([() => e.activeKey, Le, A, f], () => {
      de();
    }, {
      flush: "post"
    }), Ie([() => e.rtl, () => e.tabBarGutter, () => e.activeKey, () => i.value], () => {
      se();
    }, {
      flush: "post"
    });
    const et = (Fe) => {
      let {
        position: Ne,
        prefixCls: Ge,
        extra: it
      } = Fe;
      if (!it) return null;
      const Ke = it?.({
        position: Ne
      });
      return Ke ? v("div", {
        class: `${Ge}-extra-content`
      }, [Ke]) : null;
    };
    return At(() => {
      xe(), We();
    }), () => {
      const {
        id: Fe,
        animated: Ne,
        activeKey: Ge,
        rtl: it,
        editable: Ke,
        locale: Oe,
        tabPosition: je,
        tabBarGutter: De,
        onTabClick: Je
      } = e, {
        class: wt,
        style: lt
      } = n, qe = r.value, rt = !!he.value.length, dt = `${qe}-nav-wrap`;
      let vt, Rt, Xt, vn;
      f.value ? it ? (Rt = p.value > 0, vt = p.value + P.value < S.value) : (vt = p.value < 0, Rt = -p.value + P.value < S.value) : (Xt = b.value < 0, vn = -b.value + x.value < O.value);
      const Dt = {};
      je === "top" || je === "bottom" ? Dt[it ? "marginRight" : "marginLeft"] = typeof De == "number" ? `${De}px` : De : Dt.marginTop = typeof De == "number" ? `${De}px` : De;
      const zn = i.value.map((on, Qt) => {
        const {
          key: mn
        } = on;
        return v(_8, {
          id: Fe,
          prefixCls: qe,
          key: mn,
          tab: on,
          style: Qt === 0 ? void 0 : Dt,
          closable: on.closable,
          editable: Ke,
          active: mn === Ge,
          removeAriaLabel: Oe?.removeAriaLabel,
          ref: c(mn),
          onClick: (Kt) => {
            Je(mn, Kt);
          },
          onFocus: () => {
            de(mn), be(), a.value && (it || (a.value.scrollLeft = 0), a.value.scrollTop = 0);
          }
        }, o);
      });
      return v("div", {
        role: "tablist",
        class: Te(`${qe}-nav`, wt),
        style: lt,
        onKeydown: () => {
          be();
        }
      }, [v(et, {
        position: "left",
        prefixCls: qe,
        extra: o.leftExtra
      }, null), v(Ss, {
        onResize: se
      }, {
        default: () => [v("div", {
          class: Te(dt, {
            [`${dt}-ping-left`]: vt,
            [`${dt}-ping-right`]: Rt,
            [`${dt}-ping-top`]: Xt,
            [`${dt}-ping-bottom`]: vn
          }),
          ref: a
        }, [v(Ss, {
          onResize: se
        }, {
          default: () => [v("div", {
            ref: l,
            class: `${qe}-nav-list`,
            style: {
              transform: `translate(${p.value}px, ${b.value}px)`,
              transition: K.value ? "none" : void 0
            }
          }, [zn, v(sP, {
            ref: u,
            prefixCls: qe,
            locale: Oe,
            editable: Ke,
            style: I(I({}, zn.length === 0 ? void 0 : Dt), {
              visibility: rt ? "hidden" : null
            })
          }, null), v("div", {
            class: Te(`${qe}-ink-bar`, {
              [`${qe}-ink-bar-animated`]: Ne.inkBar
            }),
            style: Me.value
          }, null)])]
        })])]
      }), v(z8, Z(Z({}, e), {}, {
        removeAriaLabel: Oe?.removeAriaLabel,
        ref: s,
        prefixCls: qe,
        tabs: he.value,
        class: !rt && U.value
      }), fw(o, ["moreIcon"])), v(et, {
        position: "right",
        prefixCls: qe,
        extra: o.rightExtra
      }, null), v(et, {
        position: "right",
        prefixCls: qe,
        extra: o.tabBarExtraContent
      }, null)]);
    };
  }
}), H8 = ye({
  compatConfig: {
    MODE: 3
  },
  name: "TabPanelList",
  inheritAttrs: !1,
  props: {
    activeKey: {
      type: [String, Number]
    },
    id: {
      type: String
    },
    rtl: {
      type: Boolean
    },
    animated: {
      type: Object,
      default: void 0
    },
    tabPosition: {
      type: String
    },
    destroyInactiveTabPane: {
      type: Boolean
    }
  },
  setup(e) {
    const {
      tabs: t,
      prefixCls: n
    } = dP();
    return () => {
      const {
        id: o,
        activeKey: i,
        animated: r,
        tabPosition: a,
        rtl: l,
        destroyInactiveTabPane: s
      } = e, u = r.tabPane, c = n.value, d = t.value.findIndex((f) => f.key === i);
      return v("div", {
        class: `${c}-content-holder`
      }, [v("div", {
        class: [`${c}-content`, `${c}-content-${a}`, {
          [`${c}-content-animated`]: u
        }],
        style: d && u ? {
          [l ? "marginRight" : "marginLeft"]: `-${d}00%`
        } : null
      }, [t.value.map((f) => An(f.node, {
        key: f.key,
        prefixCls: c,
        tabKey: f.key,
        id: o,
        animated: u,
        active: f.key === i,
        destroyInactiveTabPane: s
      }))])]);
    };
  }
});
var V8 = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z" } }, { tag: "path", attrs: { d: "M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z" } }] }, name: "plus", theme: "outlined" };
function cx(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      j8(e, i, n[i]);
    });
  }
  return e;
}
function j8(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Mm = function(t, n) {
  var o = cx({}, t, n.attrs);
  return v(pn, cx({}, o, {
    icon: V8
  }), null);
};
Mm.displayName = "PlusOutlined";
Mm.inheritAttrs = !1;
const W8 = (e) => {
  const {
    componentCls: t,
    motionDurationSlow: n
  } = e;
  return [
    {
      [t]: {
        [`${t}-switch`]: {
          "&-appear, &-enter": {
            transition: "none",
            "&-start": {
              opacity: 0
            },
            "&-active": {
              opacity: 1,
              transition: `opacity ${n}`
            }
          },
          "&-leave": {
            position: "absolute",
            transition: "none",
            inset: 0,
            "&-start": {
              opacity: 1
            },
            "&-active": {
              opacity: 0,
              transition: `opacity ${n}`
            }
          }
        }
      }
    },
    // Follow code may reuse in other components
    [xr(e, "slide-up"), xr(e, "slide-down")]
  ];
}, q8 = (e) => {
  const {
    componentCls: t,
    tabsCardHorizontalPadding: n,
    tabsCardHeadBackground: o,
    tabsCardGutter: i,
    colorSplit: r
  } = e;
  return {
    [`${t}-card`]: {
      [`> ${t}-nav, > div > ${t}-nav`]: {
        [`${t}-tab`]: {
          margin: 0,
          padding: n,
          background: o,
          border: `${e.lineWidth}px ${e.lineType} ${r}`,
          transition: `all ${e.motionDurationSlow} ${e.motionEaseInOut}`
        },
        [`${t}-tab-active`]: {
          color: e.colorPrimary,
          background: e.colorBgContainer
        },
        [`${t}-ink-bar`]: {
          visibility: "hidden"
        }
      },
      // ========================== Top & Bottom ==========================
      [`&${t}-top, &${t}-bottom`]: {
        [`> ${t}-nav, > div > ${t}-nav`]: {
          [`${t}-tab + ${t}-tab`]: {
            marginLeft: {
              _skip_check_: !0,
              value: `${i}px`
            }
          }
        }
      },
      [`&${t}-top`]: {
        [`> ${t}-nav, > div > ${t}-nav`]: {
          [`${t}-tab`]: {
            borderRadius: `${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`
          },
          [`${t}-tab-active`]: {
            borderBottomColor: e.colorBgContainer
          }
        }
      },
      [`&${t}-bottom`]: {
        [`> ${t}-nav, > div > ${t}-nav`]: {
          [`${t}-tab`]: {
            borderRadius: `0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`
          },
          [`${t}-tab-active`]: {
            borderTopColor: e.colorBgContainer
          }
        }
      },
      // ========================== Left & Right ==========================
      [`&${t}-left, &${t}-right`]: {
        [`> ${t}-nav, > div > ${t}-nav`]: {
          [`${t}-tab + ${t}-tab`]: {
            marginTop: `${i}px`
          }
        }
      },
      [`&${t}-left`]: {
        [`> ${t}-nav, > div > ${t}-nav`]: {
          [`${t}-tab`]: {
            borderRadius: {
              _skip_check_: !0,
              value: `${e.borderRadiusLG}px 0 0 ${e.borderRadiusLG}px`
            }
          },
          [`${t}-tab-active`]: {
            borderRightColor: {
              _skip_check_: !0,
              value: e.colorBgContainer
            }
          }
        }
      },
      [`&${t}-right`]: {
        [`> ${t}-nav, > div > ${t}-nav`]: {
          [`${t}-tab`]: {
            borderRadius: {
              _skip_check_: !0,
              value: `0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px 0`
            }
          },
          [`${t}-tab-active`]: {
            borderLeftColor: {
              _skip_check_: !0,
              value: e.colorBgContainer
            }
          }
        }
      }
    }
  };
}, G8 = (e) => {
  const {
    componentCls: t,
    tabsHoverColor: n,
    dropdownEdgeChildVerticalPadding: o
  } = e;
  return {
    [`${t}-dropdown`]: I(I({}, Zt(e)), {
      position: "absolute",
      top: -9999,
      left: {
        _skip_check_: !0,
        value: -9999
      },
      zIndex: e.zIndexPopup,
      display: "block",
      "&-hidden": {
        display: "none"
      },
      [`${t}-dropdown-menu`]: {
        maxHeight: e.tabsDropdownHeight,
        margin: 0,
        padding: `${o}px 0`,
        overflowX: "hidden",
        overflowY: "auto",
        textAlign: {
          _skip_check_: !0,
          value: "left"
        },
        listStyleType: "none",
        backgroundColor: e.colorBgContainer,
        backgroundClip: "padding-box",
        borderRadius: e.borderRadiusLG,
        outline: "none",
        boxShadow: e.boxShadowSecondary,
        "&-item": I(I({}, ka), {
          display: "flex",
          alignItems: "center",
          minWidth: e.tabsDropdownWidth,
          margin: 0,
          padding: `${e.paddingXXS}px ${e.paddingSM}px`,
          color: e.colorText,
          fontWeight: "normal",
          fontSize: e.fontSize,
          lineHeight: e.lineHeight,
          cursor: "pointer",
          transition: `all ${e.motionDurationSlow}`,
          "> span": {
            flex: 1,
            whiteSpace: "nowrap"
          },
          "&-remove": {
            flex: "none",
            marginLeft: {
              _skip_check_: !0,
              value: e.marginSM
            },
            color: e.colorTextDescription,
            fontSize: e.fontSizeSM,
            background: "transparent",
            border: 0,
            cursor: "pointer",
            "&:hover": {
              color: n
            }
          },
          "&:hover": {
            background: e.controlItemBgHover
          },
          "&-disabled": {
            "&, &:hover": {
              color: e.colorTextDisabled,
              background: "transparent",
              cursor: "not-allowed"
            }
          }
        })
      }
    })
  };
}, K8 = (e) => {
  const {
    componentCls: t,
    margin: n,
    colorSplit: o
  } = e;
  return {
    // ========================== Top & Bottom ==========================
    [`${t}-top, ${t}-bottom`]: {
      flexDirection: "column",
      [`> ${t}-nav, > div > ${t}-nav`]: {
        margin: `0 0 ${n}px 0`,
        "&::before": {
          position: "absolute",
          right: {
            _skip_check_: !0,
            value: 0
          },
          left: {
            _skip_check_: !0,
            value: 0
          },
          borderBottom: `${e.lineWidth}px ${e.lineType} ${o}`,
          content: "''"
        },
        [`${t}-ink-bar`]: {
          height: e.lineWidthBold,
          "&-animated": {
            transition: `width ${e.motionDurationSlow}, left ${e.motionDurationSlow},
            right ${e.motionDurationSlow}`
          }
        },
        [`${t}-nav-wrap`]: {
          "&::before, &::after": {
            top: 0,
            bottom: 0,
            width: e.controlHeight
          },
          "&::before": {
            left: {
              _skip_check_: !0,
              value: 0
            },
            boxShadow: e.boxShadowTabsOverflowLeft
          },
          "&::after": {
            right: {
              _skip_check_: !0,
              value: 0
            },
            boxShadow: e.boxShadowTabsOverflowRight
          },
          [`&${t}-nav-wrap-ping-left::before`]: {
            opacity: 1
          },
          [`&${t}-nav-wrap-ping-right::after`]: {
            opacity: 1
          }
        }
      }
    },
    [`${t}-top`]: {
      [`> ${t}-nav,
        > div > ${t}-nav`]: {
        "&::before": {
          bottom: 0
        },
        [`${t}-ink-bar`]: {
          bottom: 0
        }
      }
    },
    [`${t}-bottom`]: {
      [`> ${t}-nav, > div > ${t}-nav`]: {
        order: 1,
        marginTop: `${n}px`,
        marginBottom: 0,
        "&::before": {
          top: 0
        },
        [`${t}-ink-bar`]: {
          top: 0
        }
      },
      [`> ${t}-content-holder, > div > ${t}-content-holder`]: {
        order: 0
      }
    },
    // ========================== Left & Right ==========================
    [`${t}-left, ${t}-right`]: {
      [`> ${t}-nav, > div > ${t}-nav`]: {
        flexDirection: "column",
        minWidth: e.controlHeight * 1.25,
        // >>>>>>>>>>> Tab
        [`${t}-tab`]: {
          padding: `${e.paddingXS}px ${e.paddingLG}px`,
          textAlign: "center"
        },
        [`${t}-tab + ${t}-tab`]: {
          margin: `${e.margin}px 0 0 0`
        },
        // >>>>>>>>>>> Nav
        [`${t}-nav-wrap`]: {
          flexDirection: "column",
          "&::before, &::after": {
            right: {
              _skip_check_: !0,
              value: 0
            },
            left: {
              _skip_check_: !0,
              value: 0
            },
            height: e.controlHeight
          },
          "&::before": {
            top: 0,
            boxShadow: e.boxShadowTabsOverflowTop
          },
          "&::after": {
            bottom: 0,
            boxShadow: e.boxShadowTabsOverflowBottom
          },
          [`&${t}-nav-wrap-ping-top::before`]: {
            opacity: 1
          },
          [`&${t}-nav-wrap-ping-bottom::after`]: {
            opacity: 1
          }
        },
        // >>>>>>>>>>> Ink Bar
        [`${t}-ink-bar`]: {
          width: e.lineWidthBold,
          "&-animated": {
            transition: `height ${e.motionDurationSlow}, top ${e.motionDurationSlow}`
          }
        },
        [`${t}-nav-list, ${t}-nav-operations`]: {
          flex: "1 0 auto",
          flexDirection: "column"
        }
      }
    },
    [`${t}-left`]: {
      [`> ${t}-nav, > div > ${t}-nav`]: {
        [`${t}-ink-bar`]: {
          right: {
            _skip_check_: !0,
            value: 0
          }
        }
      },
      [`> ${t}-content-holder, > div > ${t}-content-holder`]: {
        marginLeft: {
          _skip_check_: !0,
          value: `-${e.lineWidth}px`
        },
        borderLeft: {
          _skip_check_: !0,
          value: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`
        },
        [`> ${t}-content > ${t}-tabpane`]: {
          paddingLeft: {
            _skip_check_: !0,
            value: e.paddingLG
          }
        }
      }
    },
    [`${t}-right`]: {
      [`> ${t}-nav, > div > ${t}-nav`]: {
        order: 1,
        [`${t}-ink-bar`]: {
          left: {
            _skip_check_: !0,
            value: 0
          }
        }
      },
      [`> ${t}-content-holder, > div > ${t}-content-holder`]: {
        order: 0,
        marginRight: {
          _skip_check_: !0,
          value: -e.lineWidth
        },
        borderRight: {
          _skip_check_: !0,
          value: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`
        },
        [`> ${t}-content > ${t}-tabpane`]: {
          paddingRight: {
            _skip_check_: !0,
            value: e.paddingLG
          }
        }
      }
    }
  };
}, Y8 = (e) => {
  const {
    componentCls: t,
    padding: n
  } = e;
  return {
    [t]: {
      "&-small": {
        [`> ${t}-nav`]: {
          [`${t}-tab`]: {
            padding: `${e.paddingXS}px 0`,
            fontSize: e.fontSize
          }
        }
      },
      "&-large": {
        [`> ${t}-nav`]: {
          [`${t}-tab`]: {
            padding: `${n}px 0`,
            fontSize: e.fontSizeLG
          }
        }
      }
    },
    [`${t}-card`]: {
      [`&${t}-small`]: {
        [`> ${t}-nav`]: {
          [`${t}-tab`]: {
            padding: `${e.paddingXXS * 1.5}px ${n}px`
          }
        },
        [`&${t}-bottom`]: {
          [`> ${t}-nav ${t}-tab`]: {
            borderRadius: `0 0 ${e.borderRadius}px ${e.borderRadius}px`
          }
        },
        [`&${t}-top`]: {
          [`> ${t}-nav ${t}-tab`]: {
            borderRadius: `${e.borderRadius}px ${e.borderRadius}px 0 0`
          }
        },
        [`&${t}-right`]: {
          [`> ${t}-nav ${t}-tab`]: {
            borderRadius: {
              _skip_check_: !0,
              value: `0 ${e.borderRadius}px ${e.borderRadius}px 0`
            }
          }
        },
        [`&${t}-left`]: {
          [`> ${t}-nav ${t}-tab`]: {
            borderRadius: {
              _skip_check_: !0,
              value: `${e.borderRadius}px 0 0 ${e.borderRadius}px`
            }
          }
        }
      },
      [`&${t}-large`]: {
        [`> ${t}-nav`]: {
          [`${t}-tab`]: {
            padding: `${e.paddingXS}px ${n}px ${e.paddingXXS * 1.5}px`
          }
        }
      }
    }
  };
}, U8 = (e) => {
  const {
    componentCls: t,
    tabsActiveColor: n,
    tabsHoverColor: o,
    iconCls: i,
    tabsHorizontalGutter: r
  } = e, a = `${t}-tab`;
  return {
    [a]: {
      position: "relative",
      display: "inline-flex",
      alignItems: "center",
      padding: `${e.paddingSM}px 0`,
      fontSize: `${e.fontSize}px`,
      background: "transparent",
      border: 0,
      outline: "none",
      cursor: "pointer",
      "&-btn, &-remove": I({
        "&:focus:not(:focus-visible), &:active": {
          color: n
        }
      }, bl(e)),
      "&-btn": {
        outline: "none",
        transition: "all 0.3s"
      },
      "&-remove": {
        flex: "none",
        marginRight: {
          _skip_check_: !0,
          value: -e.marginXXS
        },
        marginLeft: {
          _skip_check_: !0,
          value: e.marginXS
        },
        color: e.colorTextDescription,
        fontSize: e.fontSizeSM,
        background: "transparent",
        border: "none",
        outline: "none",
        cursor: "pointer",
        transition: `all ${e.motionDurationSlow}`,
        "&:hover": {
          color: e.colorTextHeading
        }
      },
      "&:hover": {
        color: o
      },
      [`&${a}-active ${a}-btn`]: {
        color: e.colorPrimary,
        textShadow: e.tabsActiveTextShadow
      },
      [`&${a}-disabled`]: {
        color: e.colorTextDisabled,
        cursor: "not-allowed"
      },
      [`&${a}-disabled ${a}-btn, &${a}-disabled ${t}-remove`]: {
        "&:focus, &:active": {
          color: e.colorTextDisabled
        }
      },
      [`& ${a}-remove ${i}`]: {
        margin: 0
      },
      [i]: {
        marginRight: {
          _skip_check_: !0,
          value: e.marginSM
        }
      }
    },
    [`${a} + ${a}`]: {
      margin: {
        _skip_check_: !0,
        value: `0 0 0 ${r}px`
      }
    }
  };
}, X8 = (e) => {
  const {
    componentCls: t,
    tabsHorizontalGutter: n,
    iconCls: o,
    tabsCardGutter: i
  } = e;
  return {
    [`${t}-rtl`]: {
      direction: "rtl",
      [`${t}-nav`]: {
        [`${t}-tab`]: {
          margin: {
            _skip_check_: !0,
            value: `0 0 0 ${n}px`
          },
          [`${t}-tab:last-of-type`]: {
            marginLeft: {
              _skip_check_: !0,
              value: 0
            }
          },
          [o]: {
            marginRight: {
              _skip_check_: !0,
              value: 0
            },
            marginLeft: {
              _skip_check_: !0,
              value: `${e.marginSM}px`
            }
          },
          [`${t}-tab-remove`]: {
            marginRight: {
              _skip_check_: !0,
              value: `${e.marginXS}px`
            },
            marginLeft: {
              _skip_check_: !0,
              value: `-${e.marginXXS}px`
            },
            [o]: {
              margin: 0
            }
          }
        }
      },
      [`&${t}-left`]: {
        [`> ${t}-nav`]: {
          order: 1
        },
        [`> ${t}-content-holder`]: {
          order: 0
        }
      },
      [`&${t}-right`]: {
        [`> ${t}-nav`]: {
          order: 0
        },
        [`> ${t}-content-holder`]: {
          order: 1
        }
      },
      // ====================== Card ======================
      [`&${t}-card${t}-top, &${t}-card${t}-bottom`]: {
        [`> ${t}-nav, > div > ${t}-nav`]: {
          [`${t}-tab + ${t}-tab`]: {
            marginRight: {
              _skip_check_: !0,
              value: `${i}px`
            },
            marginLeft: {
              _skip_check_: !0,
              value: 0
            }
          }
        }
      }
    },
    [`${t}-dropdown-rtl`]: {
      direction: "rtl"
    },
    [`${t}-menu-item`]: {
      [`${t}-dropdown-rtl`]: {
        textAlign: {
          _skip_check_: !0,
          value: "right"
        }
      }
    }
  };
}, Q8 = (e) => {
  const {
    componentCls: t,
    tabsCardHorizontalPadding: n,
    tabsCardHeight: o,
    tabsCardGutter: i,
    tabsHoverColor: r,
    tabsActiveColor: a,
    colorSplit: l
  } = e;
  return {
    [t]: I(I(I(I({}, Zt(e)), {
      display: "flex",
      // ========================== Navigation ==========================
      [`> ${t}-nav, > div > ${t}-nav`]: {
        position: "relative",
        display: "flex",
        flex: "none",
        alignItems: "center",
        [`${t}-nav-wrap`]: {
          position: "relative",
          display: "flex",
          flex: "auto",
          alignSelf: "stretch",
          overflow: "hidden",
          whiteSpace: "nowrap",
          transform: "translate(0)",
          // >>>>> Ping shadow
          "&::before, &::after": {
            position: "absolute",
            zIndex: 1,
            opacity: 0,
            transition: `opacity ${e.motionDurationSlow}`,
            content: "''",
            pointerEvents: "none"
          }
        },
        [`${t}-nav-list`]: {
          position: "relative",
          display: "flex",
          transition: `opacity ${e.motionDurationSlow}`
        },
        // >>>>>>>> Operations
        [`${t}-nav-operations`]: {
          display: "flex",
          alignSelf: "stretch"
        },
        [`${t}-nav-operations-hidden`]: {
          position: "absolute",
          visibility: "hidden",
          pointerEvents: "none"
        },
        [`${t}-nav-more`]: {
          position: "relative",
          padding: n,
          background: "transparent",
          border: 0,
          "&::after": {
            position: "absolute",
            right: {
              _skip_check_: !0,
              value: 0
            },
            bottom: 0,
            left: {
              _skip_check_: !0,
              value: 0
            },
            height: e.controlHeightLG / 8,
            transform: "translateY(100%)",
            content: "''"
          }
        },
        [`${t}-nav-add`]: I({
          minWidth: `${o}px`,
          marginLeft: {
            _skip_check_: !0,
            value: `${i}px`
          },
          padding: `0 ${e.paddingXS}px`,
          background: "transparent",
          border: `${e.lineWidth}px ${e.lineType} ${l}`,
          borderRadius: `${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`,
          outline: "none",
          cursor: "pointer",
          color: e.colorText,
          transition: `all ${e.motionDurationSlow} ${e.motionEaseInOut}`,
          "&:hover": {
            color: r
          },
          "&:active, &:focus:not(:focus-visible)": {
            color: a
          }
        }, bl(e))
      },
      [`${t}-extra-content`]: {
        flex: "none"
      },
      // ============================ InkBar ============================
      [`${t}-ink-bar`]: {
        position: "absolute",
        background: e.colorPrimary,
        pointerEvents: "none"
      }
    }), U8(e)), {
      // =========================== TabPanes ===========================
      [`${t}-content`]: {
        position: "relative",
        display: "flex",
        width: "100%",
        "&-animated": {
          transition: "margin 0.3s"
        }
      },
      [`${t}-content-holder`]: {
        flex: "auto",
        minWidth: 0,
        minHeight: 0
      },
      [`${t}-tabpane`]: {
        outline: "none",
        flex: "none",
        width: "100%"
      }
    }),
    [`${t}-centered`]: {
      [`> ${t}-nav, > div > ${t}-nav`]: {
        [`${t}-nav-wrap`]: {
          [`&:not([class*='${t}-nav-wrap-ping'])`]: {
            justifyContent: "center"
          }
        }
      }
    }
  };
}, Z8 = nn("Tabs", (e) => {
  const t = e.controlHeightLG, n = _t(e, {
    tabsHoverColor: e.colorPrimaryHover,
    tabsActiveColor: e.colorPrimaryActive,
    tabsCardHorizontalPadding: `${(t - Math.round(e.fontSize * e.lineHeight)) / 2 - e.lineWidth}px ${e.padding}px`,
    tabsCardHeight: t,
    tabsCardGutter: e.marginXXS / 2,
    tabsHorizontalGutter: 32,
    tabsCardHeadBackground: e.colorFillAlter,
    dropdownEdgeChildVerticalPadding: e.paddingXXS,
    tabsActiveTextShadow: "0 0 0.25px currentcolor",
    tabsDropdownHeight: 200,
    tabsDropdownWidth: 120
  });
  return [Y8(n), X8(n), K8(n), G8(n), q8(n), Q8(n), W8(n)];
}, (e) => ({
  zIndexPopup: e.zIndexPopupBase + 50
}));
let dx = 0;
const fP = () => ({
  prefixCls: {
    type: String
  },
  id: {
    type: String
  },
  popupClassName: String,
  getPopupContainer: Qe(),
  activeKey: {
    type: [String, Number]
  },
  defaultActiveKey: {
    type: [String, Number]
  },
  direction: dn(),
  animated: tn([Boolean, Object]),
  renderTabBar: Qe(),
  tabBarGutter: {
    type: Number
  },
  tabBarStyle: Ct(),
  tabPosition: dn(),
  destroyInactiveTabPane: st(),
  hideAdd: Boolean,
  type: dn(),
  size: dn(),
  centered: Boolean,
  onEdit: Qe(),
  onChange: Qe(),
  onTabClick: Qe(),
  onTabScroll: Qe(),
  "onUpdate:activeKey": Qe(),
  // Accessibility
  locale: Ct(),
  onPrevClick: Qe(),
  onNextClick: Qe(),
  tabBarExtraContent: ue.any
});
function J8(e) {
  return e.map((t) => {
    if (Bo(t)) {
      const n = I({}, t.props || {});
      for (const [f, p] of Object.entries(n))
        delete n[f], n[dv(f)] = p;
      const o = t.children || {}, i = t.key !== void 0 ? t.key : void 0, {
        tab: r = o.tab,
        disabled: a,
        forceRender: l,
        closable: s,
        animated: u,
        active: c,
        destroyInactiveTabPane: d
      } = n;
      return I(I({
        key: i
      }, n), {
        node: t,
        closeIcon: o.closeIcon,
        tab: r,
        disabled: a === "" || a,
        forceRender: l === "" || l,
        closable: s === "" || s,
        animated: u === "" || u,
        active: c === "" || c,
        destroyInactiveTabPane: d === "" || d
      });
    }
    return null;
  }).filter((t) => t);
}
const e3 = ye({
  compatConfig: {
    MODE: 3
  },
  name: "InternalTabs",
  inheritAttrs: !1,
  props: I(I({}, wn(fP(), {
    tabPosition: "top",
    animated: {
      inkBar: !0,
      tabPane: !1
    }
  })), {
    tabs: Po()
  }),
  slots: Object,
  // emits: ['tabClick', 'tabScroll', 'change', 'update:activeKey'],
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    Fn(e.onPrevClick === void 0 && e.onNextClick === void 0, "Tabs", "`onPrevClick / @prevClick` and `onNextClick / @nextClick` has been removed. Please use `onTabScroll / @tabScroll` instead."), Fn(e.tabBarExtraContent === void 0, "Tabs", "`tabBarExtraContent` prop has been removed. Please use `rightExtra` slot instead."), Fn(o.tabBarExtraContent === void 0, "Tabs", "`tabBarExtraContent` slot is deprecated. Please use `rightExtra` slot instead.");
    const {
      prefixCls: i,
      direction: r,
      size: a,
      rootPrefixCls: l,
      getPopupContainer: s
    } = yt("tabs", e), [u, c] = Z8(i), d = R(() => r.value === "rtl"), f = R(() => {
      const {
        animated: x,
        tabPosition: E
      } = e;
      return x === !1 || ["left", "right"].includes(E) ? {
        inkBar: !1,
        tabPane: !1
      } : x === !0 ? {
        inkBar: !0,
        tabPane: !0
      } : I({
        inkBar: !0,
        tabPane: !1
      }, typeof x == "object" ? x : {});
    }), [p, m] = On(!1);
    Pt(() => {
      m(Lv());
    });
    const [b, y] = Wo(() => {
      var x;
      return (x = e.tabs[0]) === null || x === void 0 ? void 0 : x.key;
    }, {
      value: R(() => e.activeKey),
      defaultValue: e.defaultActiveKey
    }), [S, C] = On(() => e.tabs.findIndex((x) => x.key === b.value));
    Lt(() => {
      var x;
      let E = e.tabs.findIndex((z) => z.key === b.value);
      E === -1 && (E = Math.max(0, Math.min(S.value, e.tabs.length - 1)), y((x = e.tabs[E]) === null || x === void 0 ? void 0 : x.key)), C(E);
    });
    const [O, $] = Wo(null, {
      value: R(() => e.id)
    }), P = R(() => p.value && !["left", "right"].includes(e.tabPosition) ? "top" : e.tabPosition);
    Pt(() => {
      e.id || ($(`rc-tabs-${process.env.NODE_ENV === "test" ? "test" : dx}`), dx += 1);
    });
    const k = (x, E) => {
      var z, N;
      (z = e.onTabClick) === null || z === void 0 || z.call(e, x, E);
      const D = x !== b.value;
      y(x), D && ((N = e.onChange) === null || N === void 0 || N.call(e, x));
    };
    return cP({
      tabs: R(() => e.tabs),
      prefixCls: i
    }), () => {
      const {
        id: x,
        type: E,
        tabBarGutter: z,
        tabBarStyle: N,
        locale: D,
        destroyInactiveTabPane: W,
        renderTabBar: H = o.renderTabBar,
        onTabScroll: L,
        hideAdd: A,
        centered: U
      } = e, j = {
        id: O.value,
        activeKey: b.value,
        animated: f.value,
        tabPosition: P.value,
        rtl: d.value,
        mobile: p.value
      };
      let re;
      E === "editable-card" && (re = {
        onEdit: (J, be) => {
          let {
            key: xe,
            event: ge
          } = be;
          var de;
          (de = e.onEdit) === null || de === void 0 || de.call(e, J === "add" ? ge : xe, J);
        },
        removeIcon: () => v(Sr, null, null),
        addIcon: o.addIcon ? o.addIcon : () => v(Mm, null, null),
        showAdd: A !== !0
      });
      let G;
      const Y = I(I({}, j), {
        moreTransitionName: `${l.value}-slide-up`,
        editable: re,
        locale: D,
        tabBarGutter: z,
        onTabClick: k,
        onTabScroll: L,
        style: N,
        getPopupContainer: s.value,
        popupClassName: Te(e.popupClassName, c.value)
      });
      H ? G = H(I(I({}, Y), {
        DefaultTabBar: ux
      })) : G = v(ux, Y, fw(o, ["moreIcon", "leftExtra", "rightExtra", "tabBarExtraContent"]));
      const K = i.value;
      return u(v("div", Z(Z({}, n), {}, {
        id: x,
        class: Te(K, `${K}-${P.value}`, {
          [c.value]: !0,
          [`${K}-${a.value}`]: a.value,
          [`${K}-card`]: ["card", "editable-card"].includes(E),
          [`${K}-editable-card`]: E === "editable-card",
          [`${K}-centered`]: U,
          [`${K}-mobile`]: p.value,
          [`${K}-editable`]: E === "editable-card",
          [`${K}-rtl`]: d.value
        }, n.class)
      }), [G, v(H8, Z(Z({
        destroyInactiveTabPane: W
      }, j), {}, {
        animated: f.value
      }), null)]));
    };
  }
}), us = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ATabs",
  inheritAttrs: !1,
  props: wn(fP(), {
    tabPosition: "top",
    animated: {
      inkBar: !0,
      tabPane: !1
    }
  }),
  slots: Object,
  // emits: ['tabClick', 'tabScroll', 'change', 'update:activeKey'],
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      emit: i
    } = t;
    const r = (a) => {
      i("update:activeKey", a), i("change", a);
    };
    return () => {
      var a;
      const l = J8(no((a = o.default) === null || a === void 0 ? void 0 : a.call(o)));
      return v(e3, Z(Z(Z({}, Tn(e, ["onUpdate:activeKey"])), n), {}, {
        onChange: r,
        tabs: l
      }), o);
    };
  }
}), t3 = () => ({
  tab: ue.any,
  disabled: {
    type: Boolean
  },
  forceRender: {
    type: Boolean
  },
  closable: {
    type: Boolean
  },
  animated: {
    type: Boolean
  },
  active: {
    type: Boolean
  },
  destroyInactiveTabPane: {
    type: Boolean
  },
  // Pass by TabPaneList
  prefixCls: {
    type: String
  },
  tabKey: {
    type: [String, Number]
  },
  id: {
    type: String
  }
  // closeIcon: PropTypes.any,
}), wh = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ATabPane",
  inheritAttrs: !1,
  __ANT_TAB_PANE: !0,
  props: t3(),
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const i = le(e.forceRender);
    Ie([() => e.active, () => e.destroyInactiveTabPane], () => {
      e.active ? i.value = !0 : e.destroyInactiveTabPane && (i.value = !1);
    }, {
      immediate: !0
    });
    const r = R(() => e.active ? {} : e.animated ? {
      visibility: "hidden",
      height: 0,
      overflowY: "hidden"
    } : {
      display: "none"
    });
    return () => {
      var a;
      const {
        prefixCls: l,
        forceRender: s,
        id: u,
        active: c,
        tabKey: d
      } = e;
      return v("div", {
        id: u && `${u}-panel-${d}`,
        role: "tabpanel",
        tabindex: c ? 0 : -1,
        "aria-labelledby": u && `${u}-tab-${d}`,
        "aria-hidden": !c,
        style: [r.value, n.style],
        class: [`${l}-tabpane`, c && `${l}-tabpane-active`, n.class]
      }, [(c || i.value || s) && ((a = o.default) === null || a === void 0 ? void 0 : a.call(o))]);
    };
  }
});
us.TabPane = wh;
us.install = function(e) {
  return e.component(us.name, us), e.component(wh.name, wh), e;
};
const n3 = (e) => {
  const {
    antCls: t,
    componentCls: n,
    cardHeadHeight: o,
    cardPaddingBase: i,
    cardHeadTabsMarginBottom: r
  } = e;
  return I(I({
    display: "flex",
    justifyContent: "center",
    flexDirection: "column",
    minHeight: o,
    marginBottom: -1,
    padding: `0 ${i}px`,
    color: e.colorTextHeading,
    fontWeight: e.fontWeightStrong,
    fontSize: e.fontSizeLG,
    background: "transparent",
    borderBottom: `${e.lineWidth}px ${e.lineType} ${e.colorBorderSecondary}`,
    borderRadius: `${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`
  }, Ea()), {
    "&-wrapper": {
      width: "100%",
      display: "flex",
      alignItems: "center"
    },
    "&-title": I(I({
      display: "inline-block",
      flex: 1
    }, ka), {
      [`
          > ${n}-typography,
          > ${n}-typography-edit-content
        `]: {
        insetInlineStart: 0,
        marginTop: 0,
        marginBottom: 0
      }
    }),
    [`${t}-tabs-top`]: {
      clear: "both",
      marginBottom: r,
      color: e.colorText,
      fontWeight: "normal",
      fontSize: e.fontSize,
      "&-bar": {
        borderBottom: `${e.lineWidth}px ${e.lineType} ${e.colorBorderSecondary}`
      }
    }
  });
}, o3 = (e) => {
  const {
    cardPaddingBase: t,
    colorBorderSecondary: n,
    cardShadow: o,
    lineWidth: i
  } = e;
  return {
    width: "33.33%",
    padding: t,
    border: 0,
    borderRadius: 0,
    boxShadow: `
      ${i}px 0 0 0 ${n},
      0 ${i}px 0 0 ${n},
      ${i}px ${i}px 0 0 ${n},
      ${i}px 0 0 0 ${n} inset,
      0 ${i}px 0 0 ${n} inset;
    `,
    transition: `all ${e.motionDurationMid}`,
    "&-hoverable:hover": {
      position: "relative",
      zIndex: 1,
      boxShadow: o
    }
  };
}, i3 = (e) => {
  const {
    componentCls: t,
    iconCls: n,
    cardActionsLiMargin: o,
    cardActionsIconSize: i,
    colorBorderSecondary: r
  } = e;
  return I(I({
    margin: 0,
    padding: 0,
    listStyle: "none",
    background: e.colorBgContainer,
    borderTop: `${e.lineWidth}px ${e.lineType} ${r}`,
    display: "flex",
    borderRadius: `0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px `
  }, Ea()), {
    "& > li": {
      margin: o,
      color: e.colorTextDescription,
      textAlign: "center",
      "> span": {
        position: "relative",
        display: "block",
        minWidth: e.cardActionsIconSize * 2,
        fontSize: e.fontSize,
        lineHeight: e.lineHeight,
        cursor: "pointer",
        "&:hover": {
          color: e.colorPrimary,
          transition: `color ${e.motionDurationMid}`
        },
        [`a:not(${t}-btn), > ${n}`]: {
          display: "inline-block",
          width: "100%",
          color: e.colorTextDescription,
          lineHeight: `${e.fontSize * e.lineHeight}px`,
          transition: `color ${e.motionDurationMid}`,
          "&:hover": {
            color: e.colorPrimary
          }
        },
        [`> ${n}`]: {
          fontSize: i,
          lineHeight: `${i * e.lineHeight}px`
        }
      },
      "&:not(:last-child)": {
        borderInlineEnd: `${e.lineWidth}px ${e.lineType} ${r}`
      }
    }
  });
}, r3 = (e) => I(I({
  margin: `-${e.marginXXS}px 0`,
  display: "flex"
}, Ea()), {
  "&-avatar": {
    paddingInlineEnd: e.padding
  },
  "&-detail": {
    overflow: "hidden",
    flex: 1,
    "> div:not(:last-child)": {
      marginBottom: e.marginXS
    }
  },
  "&-title": I({
    color: e.colorTextHeading,
    fontWeight: e.fontWeightStrong,
    fontSize: e.fontSizeLG
  }, ka),
  "&-description": {
    color: e.colorTextDescription
  }
}), a3 = (e) => {
  const {
    componentCls: t,
    cardPaddingBase: n,
    colorFillAlter: o
  } = e;
  return {
    [`${t}-head`]: {
      padding: `0 ${n}px`,
      background: o,
      "&-title": {
        fontSize: e.fontSize
      }
    },
    [`${t}-body`]: {
      padding: `${e.padding}px ${n}px`
    }
  };
}, l3 = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    overflow: "hidden",
    [`${t}-body`]: {
      userSelect: "none"
    }
  };
}, s3 = (e) => {
  const {
    componentCls: t,
    cardShadow: n,
    cardHeadPadding: o,
    colorBorderSecondary: i,
    boxShadow: r,
    cardPaddingBase: a
  } = e;
  return {
    [t]: I(I({}, Zt(e)), {
      position: "relative",
      background: e.colorBgContainer,
      borderRadius: e.borderRadiusLG,
      [`&:not(${t}-bordered)`]: {
        boxShadow: r
      },
      [`${t}-head`]: n3(e),
      [`${t}-extra`]: {
        // https://stackoverflow.com/a/22429853/3040605
        marginInlineStart: "auto",
        color: "",
        fontWeight: "normal",
        fontSize: e.fontSize
      },
      [`${t}-body`]: I({
        padding: a,
        borderRadius: ` 0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`
      }, Ea()),
      [`${t}-grid`]: o3(e),
      [`${t}-cover`]: {
        "> *": {
          display: "block",
          width: "100%"
        },
        img: {
          borderRadius: `${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`
        }
      },
      [`${t}-actions`]: i3(e),
      [`${t}-meta`]: r3(e)
    }),
    [`${t}-bordered`]: {
      border: `${e.lineWidth}px ${e.lineType} ${i}`,
      [`${t}-cover`]: {
        marginTop: -1,
        marginInlineStart: -1,
        marginInlineEnd: -1
      }
    },
    [`${t}-hoverable`]: {
      cursor: "pointer",
      transition: `box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,
      "&:hover": {
        borderColor: "transparent",
        boxShadow: n
      }
    },
    [`${t}-contain-grid`]: {
      [`${t}-body`]: {
        display: "flex",
        flexWrap: "wrap"
      },
      [`&:not(${t}-loading) ${t}-body`]: {
        marginBlockStart: -e.lineWidth,
        marginInlineStart: -e.lineWidth,
        padding: 0
      }
    },
    [`${t}-contain-tabs`]: {
      [`> ${t}-head`]: {
        [`${t}-head-title, ${t}-extra`]: {
          paddingTop: o
        }
      }
    },
    [`${t}-type-inner`]: a3(e),
    [`${t}-loading`]: l3(e),
    [`${t}-rtl`]: {
      direction: "rtl"
    }
  };
}, u3 = (e) => {
  const {
    componentCls: t,
    cardPaddingSM: n,
    cardHeadHeightSM: o
  } = e;
  return {
    [`${t}-small`]: {
      [`> ${t}-head`]: {
        minHeight: o,
        padding: `0 ${n}px`,
        fontSize: e.fontSize,
        [`> ${t}-head-wrapper`]: {
          [`> ${t}-extra`]: {
            fontSize: e.fontSize
          }
        }
      },
      [`> ${t}-body`]: {
        padding: n
      }
    },
    [`${t}-small${t}-contain-tabs`]: {
      [`> ${t}-head`]: {
        [`${t}-head-title, ${t}-extra`]: {
          minHeight: o,
          paddingTop: 0,
          display: "flex",
          alignItems: "center"
        }
      }
    }
  };
}, c3 = nn("Card", (e) => {
  const t = _t(e, {
    cardShadow: e.boxShadowCard,
    cardHeadHeight: e.fontSizeLG * e.lineHeightLG + e.padding * 2,
    cardHeadHeightSM: e.fontSize * e.lineHeight + e.paddingXS * 2,
    cardHeadPadding: e.padding,
    cardPaddingBase: e.paddingLG,
    cardHeadTabsMarginBottom: -e.padding - e.lineWidth,
    cardActionsLiMargin: `${e.paddingSM}px 0`,
    cardActionsIconSize: e.fontSize,
    cardPaddingSM: 12
    // Fixed padding.
  });
  return [
    // Style
    s3(t),
    // Size
    u3(t)
  ];
}), d3 = () => ({
  prefixCls: String,
  width: {
    type: [Number, String]
  }
}), Tm = ye({
  compatConfig: {
    MODE: 3
  },
  name: "SkeletonTitle",
  props: d3(),
  setup(e) {
    return () => {
      const {
        prefixCls: t,
        width: n
      } = e, o = typeof n == "number" ? `${n}px` : n;
      return v("h3", {
        class: t,
        style: {
          width: o
        }
      }, null);
    };
  }
}), f3 = () => ({
  prefixCls: String,
  width: {
    type: [Number, String, Array]
  },
  rows: Number
}), p3 = ye({
  compatConfig: {
    MODE: 3
  },
  name: "SkeletonParagraph",
  props: f3(),
  setup(e) {
    const t = (n) => {
      const {
        width: o,
        rows: i = 2
      } = e;
      if (Array.isArray(o))
        return o[n];
      if (i - 1 === n)
        return o;
    };
    return () => {
      const {
        prefixCls: n,
        rows: o
      } = e, i = [...Array(o)].map((r, a) => {
        const l = t(a);
        return v("li", {
          key: a,
          style: {
            width: typeof l == "number" ? `${l}px` : l
          }
        }, null);
      });
      return v("ul", {
        class: n
      }, [i]);
    };
  }
}), Df = () => ({
  prefixCls: String,
  size: [String, Number],
  shape: String,
  active: {
    type: Boolean,
    default: void 0
  }
}), rc = (e) => {
  const {
    prefixCls: t,
    size: n,
    shape: o
  } = e, i = Te({
    [`${t}-lg`]: n === "large",
    [`${t}-sm`]: n === "small"
  }), r = Te({
    [`${t}-circle`]: o === "circle",
    [`${t}-square`]: o === "square",
    [`${t}-round`]: o === "round"
  }), a = typeof n == "number" ? {
    width: `${n}px`,
    height: `${n}px`,
    lineHeight: `${n}px`
  } : {};
  return v("span", {
    class: Te(t, i, r),
    style: a
  }, null);
};
rc.displayName = "SkeletonElement";
const g3 = new Bt("ant-skeleton-loading", {
  "0%": {
    transform: "translateX(-37.5%)"
  },
  "100%": {
    transform: "translateX(37.5%)"
  }
}), zf = (e) => ({
  height: e,
  lineHeight: `${e}px`
}), cs = (e) => I({
  width: e
}, zf(e)), h3 = (e) => ({
  position: "relative",
  // fix https://github.com/ant-design/ant-design/issues/36444
  // https://monshin.github.io/202109/css/safari-border-radius-overflow-hidden/
  /* stylelint-disable-next-line property-no-vendor-prefix,value-no-vendor-prefix */
  zIndex: 0,
  overflow: "hidden",
  background: "transparent",
  "&::after": {
    position: "absolute",
    top: 0,
    insetInlineEnd: "-150%",
    bottom: 0,
    insetInlineStart: "-150%",
    background: e.skeletonLoadingBackground,
    animationName: g3,
    animationDuration: e.skeletonLoadingMotionDuration,
    animationTimingFunction: "ease",
    animationIterationCount: "infinite",
    content: '""'
  }
}), Bp = (e) => I({
  width: e * 5,
  minWidth: e * 5
}, zf(e)), v3 = (e) => {
  const {
    skeletonAvatarCls: t,
    color: n,
    controlHeight: o,
    controlHeightLG: i,
    controlHeightSM: r
  } = e;
  return {
    [`${t}`]: I({
      display: "inline-block",
      verticalAlign: "top",
      background: n
    }, cs(o)),
    [`${t}${t}-circle`]: {
      borderRadius: "50%"
    },
    [`${t}${t}-lg`]: I({}, cs(i)),
    [`${t}${t}-sm`]: I({}, cs(r))
  };
}, m3 = (e) => {
  const {
    controlHeight: t,
    borderRadiusSM: n,
    skeletonInputCls: o,
    controlHeightLG: i,
    controlHeightSM: r,
    color: a
  } = e;
  return {
    [`${o}`]: I({
      display: "inline-block",
      verticalAlign: "top",
      background: a,
      borderRadius: n
    }, Bp(t)),
    [`${o}-lg`]: I({}, Bp(i)),
    [`${o}-sm`]: I({}, Bp(r))
  };
}, fx = (e) => I({
  width: e
}, zf(e)), b3 = (e) => {
  const {
    skeletonImageCls: t,
    imageSizeBase: n,
    color: o,
    borderRadiusSM: i
  } = e;
  return {
    [`${t}`]: I(I({
      display: "flex",
      alignItems: "center",
      justifyContent: "center",
      verticalAlign: "top",
      background: o,
      borderRadius: i
    }, fx(n * 2)), {
      [`${t}-path`]: {
        fill: "#bfbfbf"
      },
      [`${t}-svg`]: I(I({}, fx(n)), {
        maxWidth: n * 4,
        maxHeight: n * 4
      }),
      [`${t}-svg${t}-svg-circle`]: {
        borderRadius: "50%"
      }
    }),
    [`${t}${t}-circle`]: {
      borderRadius: "50%"
    }
  };
}, Lp = (e, t, n) => {
  const {
    skeletonButtonCls: o
  } = e;
  return {
    [`${n}${o}-circle`]: {
      width: t,
      minWidth: t,
      borderRadius: "50%"
    },
    [`${n}${o}-round`]: {
      borderRadius: t
    }
  };
}, Fp = (e) => I({
  width: e * 2,
  minWidth: e * 2
}, zf(e)), y3 = (e) => {
  const {
    borderRadiusSM: t,
    skeletonButtonCls: n,
    controlHeight: o,
    controlHeightLG: i,
    controlHeightSM: r,
    color: a
  } = e;
  return I(I(I(I(I({
    [`${n}`]: I({
      display: "inline-block",
      verticalAlign: "top",
      background: a,
      borderRadius: t,
      width: o * 2,
      minWidth: o * 2
    }, Fp(o))
  }, Lp(e, o, n)), {
    [`${n}-lg`]: I({}, Fp(i))
  }), Lp(e, i, `${n}-lg`)), {
    [`${n}-sm`]: I({}, Fp(r))
  }), Lp(e, r, `${n}-sm`));
}, x3 = (e) => {
  const {
    componentCls: t,
    skeletonAvatarCls: n,
    skeletonTitleCls: o,
    skeletonParagraphCls: i,
    skeletonButtonCls: r,
    skeletonInputCls: a,
    skeletonImageCls: l,
    controlHeight: s,
    controlHeightLG: u,
    controlHeightSM: c,
    color: d,
    padding: f,
    marginSM: p,
    borderRadius: m,
    skeletonTitleHeight: b,
    skeletonBlockRadius: y,
    skeletonParagraphLineHeight: S,
    controlHeightXS: C,
    skeletonParagraphMarginTop: O
  } = e;
  return {
    [`${t}`]: {
      display: "table",
      width: "100%",
      [`${t}-header`]: {
        display: "table-cell",
        paddingInlineEnd: f,
        verticalAlign: "top",
        // Avatar
        [`${n}`]: I({
          display: "inline-block",
          verticalAlign: "top",
          background: d
        }, cs(s)),
        [`${n}-circle`]: {
          borderRadius: "50%"
        },
        [`${n}-lg`]: I({}, cs(u)),
        [`${n}-sm`]: I({}, cs(c))
      },
      [`${t}-content`]: {
        display: "table-cell",
        width: "100%",
        verticalAlign: "top",
        // Title
        [`${o}`]: {
          width: "100%",
          height: b,
          background: d,
          borderRadius: y,
          [`+ ${i}`]: {
            marginBlockStart: c
          }
        },
        // paragraph
        [`${i}`]: {
          padding: 0,
          "> li": {
            width: "100%",
            height: S,
            listStyle: "none",
            background: d,
            borderRadius: y,
            "+ li": {
              marginBlockStart: C
            }
          }
        },
        [`${i}> li:last-child:not(:first-child):not(:nth-child(2))`]: {
          width: "61%"
        }
      },
      [`&-round ${t}-content`]: {
        [`${o}, ${i} > li`]: {
          borderRadius: m
        }
      }
    },
    [`${t}-with-avatar ${t}-content`]: {
      // Title
      [`${o}`]: {
        marginBlockStart: p,
        [`+ ${i}`]: {
          marginBlockStart: O
        }
      }
    },
    // Skeleton element
    [`${t}${t}-element`]: I(I(I(I({
      display: "inline-block",
      width: "auto"
    }, y3(e)), v3(e)), m3(e)), b3(e)),
    // Skeleton Block Button, Input
    [`${t}${t}-block`]: {
      width: "100%",
      [`${r}`]: {
        width: "100%"
      },
      [`${a}`]: {
        width: "100%"
      }
    },
    // With active animation
    [`${t}${t}-active`]: {
      [`
        ${o},
        ${i} > li,
        ${n},
        ${r},
        ${a},
        ${l}
      `]: I({}, h3(e))
    }
  };
}, ac = nn("Skeleton", (e) => {
  const {
    componentCls: t
  } = e, n = _t(e, {
    skeletonAvatarCls: `${t}-avatar`,
    skeletonTitleCls: `${t}-title`,
    skeletonParagraphCls: `${t}-paragraph`,
    skeletonButtonCls: `${t}-button`,
    skeletonInputCls: `${t}-input`,
    skeletonImageCls: `${t}-image`,
    imageSizeBase: e.controlHeight * 1.5,
    skeletonTitleHeight: e.controlHeight / 2,
    skeletonBlockRadius: e.borderRadiusSM,
    skeletonParagraphLineHeight: e.controlHeight / 2,
    skeletonParagraphMarginTop: e.marginLG + e.marginXXS,
    borderRadius: 100,
    skeletonLoadingBackground: `linear-gradient(90deg, ${e.color} 25%, ${e.colorGradientEnd} 37%, ${e.color} 63%)`,
    skeletonLoadingMotionDuration: "1.4s"
  });
  return [x3(n)];
}, (e) => {
  const {
    colorFillContent: t,
    colorFill: n
  } = e;
  return {
    color: t,
    colorGradientEnd: n
  };
}), w3 = () => ({
  active: {
    type: Boolean,
    default: void 0
  },
  loading: {
    type: Boolean,
    default: void 0
  },
  prefixCls: String,
  avatar: {
    type: [Boolean, Object],
    default: void 0
  },
  title: {
    type: [Boolean, Object],
    default: void 0
  },
  paragraph: {
    type: [Boolean, Object],
    default: void 0
  },
  round: {
    type: Boolean,
    default: void 0
  }
});
function Hp(e) {
  return e && typeof e == "object" ? e : {};
}
function S3(e, t) {
  return e && !t ? {
    size: "large",
    shape: "square"
  } : {
    size: "large",
    shape: "circle"
  };
}
function C3(e, t) {
  return !e && t ? {
    width: "38%"
  } : e && t ? {
    width: "50%"
  } : {};
}
function $3(e, t) {
  const n = {};
  return (!e || !t) && (n.width = "61%"), !e && t ? n.rows = 3 : n.rows = 2, n;
}
const jo = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ASkeleton",
  props: wn(w3(), {
    avatar: !1,
    title: !0,
    paragraph: !0
  }),
  setup(e, t) {
    let {
      slots: n
    } = t;
    const {
      prefixCls: o,
      direction: i
    } = yt("skeleton", e), [r, a] = ac(o);
    return () => {
      var l;
      const {
        loading: s,
        avatar: u,
        title: c,
        paragraph: d,
        active: f,
        round: p
      } = e, m = o.value;
      if (s || e.loading === void 0) {
        const b = !!u || u === "", y = !!c || c === "", S = !!d || d === "";
        let C;
        if (b) {
          const P = I(I({
            prefixCls: `${m}-avatar`
          }, S3(y, S)), Hp(u));
          C = v("div", {
            class: `${m}-header`
          }, [v(rc, P, null)]);
        }
        let O;
        if (y || S) {
          let P;
          if (y) {
            const x = I(I({
              prefixCls: `${m}-title`
            }, C3(b, S)), Hp(c));
            P = v(Tm, x, null);
          }
          let k;
          if (S) {
            const x = I(I({
              prefixCls: `${m}-paragraph`
            }, $3(b, y)), Hp(d));
            k = v(p3, x, null);
          }
          O = v("div", {
            class: `${m}-content`
          }, [P, k]);
        }
        const $ = Te(m, {
          [`${m}-with-avatar`]: b,
          [`${m}-active`]: f,
          [`${m}-rtl`]: i.value === "rtl",
          [`${m}-round`]: p,
          [a.value]: !0
        });
        return r(v("div", {
          class: $
        }, [C, O]));
      }
      return (l = n.default) === null || l === void 0 ? void 0 : l.call(n);
    };
  }
}), P3 = () => I(I({}, Df()), {
  size: String,
  block: Boolean
}), pP = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ASkeletonButton",
  props: wn(P3(), {
    size: "default"
  }),
  setup(e) {
    const {
      prefixCls: t
    } = yt("skeleton", e), [n, o] = ac(t), i = R(() => Te(t.value, `${t.value}-element`, {
      [`${t.value}-active`]: e.active,
      [`${t.value}-block`]: e.block
    }, o.value));
    return () => n(v("div", {
      class: i.value
    }, [v(rc, Z(Z({}, e), {}, {
      prefixCls: `${t.value}-button`
    }), null)]));
  }
}), gP = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ASkeletonInput",
  props: I(I({}, Tn(Df(), ["shape"])), {
    size: String,
    block: Boolean
  }),
  setup(e) {
    const {
      prefixCls: t
    } = yt("skeleton", e), [n, o] = ac(t), i = R(() => Te(t.value, `${t.value}-element`, {
      [`${t.value}-active`]: e.active,
      [`${t.value}-block`]: e.block
    }, o.value));
    return () => n(v("div", {
      class: i.value
    }, [v(rc, Z(Z({}, e), {}, {
      prefixCls: `${t.value}-input`
    }), null)]));
  }
}), O3 = "M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z", hP = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ASkeletonImage",
  props: Tn(Df(), ["size", "shape", "active"]),
  setup(e) {
    const {
      prefixCls: t
    } = yt("skeleton", e), [n, o] = ac(t), i = R(() => Te(t.value, `${t.value}-element`, o.value));
    return () => n(v("div", {
      class: i.value
    }, [v("div", {
      class: `${t.value}-image`
    }, [v("svg", {
      viewBox: "0 0 1098 1024",
      xmlns: "http://www.w3.org/2000/svg",
      class: `${t.value}-image-svg`
    }, [v("path", {
      d: O3,
      class: `${t.value}-image-path`
    }, null)])])]));
  }
}), I3 = () => I(I({}, Df()), {
  shape: String
}), vP = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ASkeletonAvatar",
  props: wn(I3(), {
    size: "default",
    shape: "circle"
  }),
  setup(e) {
    const {
      prefixCls: t
    } = yt("skeleton", e), [n, o] = ac(t), i = R(() => Te(t.value, `${t.value}-element`, {
      [`${t.value}-active`]: e.active
    }, o.value));
    return () => n(v("div", {
      class: i.value
    }, [v(rc, Z(Z({}, e), {}, {
      prefixCls: `${t.value}-avatar`
    }), null)]));
  }
});
jo.Button = pP;
jo.Avatar = vP;
jo.Input = gP;
jo.Image = hP;
jo.Title = Tm;
jo.install = function(e) {
  return e.component(jo.name, jo), e.component(jo.Button.name, pP), e.component(jo.Avatar.name, vP), e.component(jo.Input.name, gP), e.component(jo.Image.name, hP), e.component(jo.Title.name, Tm), e;
};
const {
  TabPane: M3
} = us, T3 = () => ({
  prefixCls: String,
  title: ue.any,
  extra: ue.any,
  bordered: {
    type: Boolean,
    default: !0
  },
  bodyStyle: {
    type: Object,
    default: void 0
  },
  headStyle: {
    type: Object,
    default: void 0
  },
  loading: {
    type: Boolean,
    default: !1
  },
  hoverable: {
    type: Boolean,
    default: !1
  },
  type: {
    type: String
  },
  size: {
    type: String
  },
  actions: ue.any,
  tabList: {
    type: Array
  },
  tabBarExtraContent: ue.any,
  activeTabKey: String,
  defaultActiveTabKey: String,
  cover: ue.any,
  onTabChange: {
    type: Function
  }
}), ds = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ACard",
  inheritAttrs: !1,
  props: T3(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: i,
      direction: r,
      size: a
    } = yt("card", e), [l, s] = c3(i), u = (f) => f.map((m, b) => Qi(m) && !uf(m) || !Qi(m) ? v("li", {
      style: {
        width: `${100 / f.length}%`
      },
      key: `action-${b}`
    }, [v("span", null, [m])]) : null), c = (f) => {
      var p;
      (p = e.onTabChange) === null || p === void 0 || p.call(e, f);
    }, d = function() {
      let f = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], p;
      return f.forEach((m) => {
        m && dw(m.type) && m.type.__ANT_CARD_GRID && (p = !0);
      }), p;
    };
    return () => {
      var f, p, m, b, y, S;
      const {
        headStyle: C = {},
        bodyStyle: O = {},
        loading: $,
        bordered: P = !0,
        type: k,
        tabList: x,
        hoverable: E,
        activeTabKey: z,
        defaultActiveTabKey: N,
        tabBarExtraContent: D = ou((f = n.tabBarExtraContent) === null || f === void 0 ? void 0 : f.call(n)),
        title: W = ou((p = n.title) === null || p === void 0 ? void 0 : p.call(n)),
        extra: H = ou((m = n.extra) === null || m === void 0 ? void 0 : m.call(n)),
        actions: L = ou((b = n.actions) === null || b === void 0 ? void 0 : b.call(n)),
        cover: A = ou((y = n.cover) === null || y === void 0 ? void 0 : y.call(n))
      } = e, U = no((S = n.default) === null || S === void 0 ? void 0 : S.call(n)), j = i.value, re = {
        [`${j}`]: !0,
        [s.value]: !0,
        [`${j}-loading`]: $,
        [`${j}-bordered`]: P,
        [`${j}-hoverable`]: !!E,
        [`${j}-contain-grid`]: d(U),
        [`${j}-contain-tabs`]: x && x.length,
        [`${j}-${a.value}`]: a.value,
        [`${j}-type-${k}`]: !!k,
        [`${j}-rtl`]: r.value === "rtl"
      }, G = v(jo, {
        loading: !0,
        active: !0,
        paragraph: {
          rows: 4
        },
        title: !1
      }, {
        default: () => [U]
      }), Y = z !== void 0, K = {
        size: "large",
        [Y ? "activeKey" : "defaultActiveKey"]: Y ? z : N,
        onChange: c,
        class: `${j}-head-tabs`
      };
      let J;
      const be = x && x.length ? v(us, K, {
        default: () => [x.map((ne) => {
          const {
            tab: we,
            slots: ae
          } = ne, se = ae?.tab;
          Fn(!ae, "Card", "tabList slots is deprecated, Please use `customTab` instead.");
          let he = we !== void 0 ? we : n[se] ? n[se](ne) : null;
          return he = pD(n, "customTab", ne, () => [he]), v(M3, {
            tab: he,
            key: ne.key,
            disabled: ne.disabled
          }, null);
        })],
        rightExtra: D ? () => D : null
      }) : null;
      (W || H || be) && (J = v("div", {
        class: `${j}-head`,
        style: C
      }, [v("div", {
        class: `${j}-head-wrapper`
      }, [W && v("div", {
        class: `${j}-head-title`
      }, [W]), H && v("div", {
        class: `${j}-extra`
      }, [H])]), be]));
      const xe = A ? v("div", {
        class: `${j}-cover`
      }, [A]) : null, ge = v("div", {
        class: `${j}-body`,
        style: O
      }, [$ ? G : U]), de = L && L.length ? v("ul", {
        class: `${j}-actions`
      }, [u(L)]) : null;
      return l(v("div", Z(Z({
        ref: "cardContainerRef"
      }, o), {}, {
        class: [re, o.class]
      }), [J, xe, U && U.length ? ge : null, de]));
    };
  }
}), k3 = () => ({
  prefixCls: String,
  title: dp(),
  description: dp(),
  avatar: dp()
}), Sh = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ACardMeta",
  props: k3(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n
    } = t;
    const {
      prefixCls: o
    } = yt("card", e);
    return () => {
      const i = {
        [`${o.value}-meta`]: !0
      }, r = Mi(n, e, "avatar"), a = Mi(n, e, "title"), l = Mi(n, e, "description"), s = r ? v("div", {
        class: `${o.value}-meta-avatar`
      }, [r]) : null, u = a ? v("div", {
        class: `${o.value}-meta-title`
      }, [a]) : null, c = l ? v("div", {
        class: `${o.value}-meta-description`
      }, [l]) : null, d = u || c ? v("div", {
        class: `${o.value}-meta-detail`
      }, [u, c]) : null;
      return v("div", {
        class: i
      }, [s, d]);
    };
  }
}), E3 = () => ({
  prefixCls: String,
  hoverable: {
    type: Boolean,
    default: !0
  }
}), Ch = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ACardGrid",
  __ANT_CARD_GRID: !0,
  props: E3(),
  setup(e, t) {
    let {
      slots: n
    } = t;
    const {
      prefixCls: o
    } = yt("card", e), i = R(() => ({
      [`${o.value}-grid`]: !0,
      [`${o.value}-grid-hoverable`]: e.hoverable
    }));
    return () => {
      var r;
      return v("div", {
        class: i.value
      }, [(r = n.default) === null || r === void 0 ? void 0 : r.call(n)]);
    };
  }
});
ds.Meta = Sh;
ds.Grid = Ch;
ds.install = function(e) {
  return e.component(ds.name, ds), e.component(Sh.name, Sh), e.component(Ch.name, Ch), e;
};
const _3 = () => ({
  prefixCls: String,
  activeKey: tn([Array, Number, String]),
  defaultActiveKey: tn([Array, Number, String]),
  accordion: st(),
  destroyInactivePanel: st(),
  bordered: st(),
  expandIcon: Qe(),
  openAnimation: ue.object,
  expandIconPosition: dn(),
  collapsible: dn(),
  ghost: st(),
  onChange: Qe(),
  "onUpdate:activeKey": Qe()
}), mP = () => ({
  openAnimation: ue.object,
  prefixCls: String,
  header: ue.any,
  headerClass: String,
  showArrow: st(),
  isActive: st(),
  destroyInactivePanel: st(),
  /** @deprecated Use `collapsible="disabled"` instead */
  disabled: st(),
  accordion: st(),
  forceRender: st(),
  expandIcon: Qe(),
  extra: ue.any,
  panelKey: tn(),
  collapsible: dn(),
  role: String,
  onItemClick: Qe()
}), A3 = (e) => {
  const {
    componentCls: t,
    collapseContentBg: n,
    padding: o,
    collapseContentPaddingHorizontal: i,
    collapseHeaderBg: r,
    collapseHeaderPadding: a,
    collapsePanelBorderRadius: l,
    lineWidth: s,
    lineType: u,
    colorBorder: c,
    colorText: d,
    colorTextHeading: f,
    colorTextDisabled: p,
    fontSize: m,
    lineHeight: b,
    marginSM: y,
    paddingSM: S,
    motionDurationSlow: C,
    fontSizeIcon: O
  } = e, $ = `${s}px ${u} ${c}`;
  return {
    [t]: I(I({}, Zt(e)), {
      backgroundColor: r,
      border: $,
      borderBottom: 0,
      borderRadius: `${l}px`,
      "&-rtl": {
        direction: "rtl"
      },
      [`& > ${t}-item`]: {
        borderBottom: $,
        "&:last-child": {
          [`
            &,
            & > ${t}-header`]: {
            borderRadius: `0 0 ${l}px ${l}px`
          }
        },
        [`> ${t}-header`]: {
          position: "relative",
          display: "flex",
          flexWrap: "nowrap",
          alignItems: "flex-start",
          padding: a,
          color: f,
          lineHeight: b,
          cursor: "pointer",
          transition: `all ${C}, visibility 0s`,
          [`> ${t}-header-text`]: {
            flex: "auto"
          },
          "&:focus": {
            outline: "none"
          },
          // >>>>> Arrow
          [`${t}-expand-icon`]: {
            height: m * b,
            display: "flex",
            alignItems: "center",
            paddingInlineEnd: y
          },
          [`${t}-arrow`]: I(I({}, Fs()), {
            fontSize: O,
            svg: {
              transition: `transform ${C}`
            }
          }),
          // >>>>> Text
          [`${t}-header-text`]: {
            marginInlineEnd: "auto"
          }
        },
        [`${t}-header-collapsible-only`]: {
          cursor: "default",
          [`${t}-header-text`]: {
            flex: "none",
            cursor: "pointer"
          },
          [`${t}-expand-icon`]: {
            cursor: "pointer"
          }
        },
        [`${t}-icon-collapsible-only`]: {
          cursor: "default",
          [`${t}-expand-icon`]: {
            cursor: "pointer"
          }
        },
        [`&${t}-no-arrow`]: {
          [`> ${t}-header`]: {
            paddingInlineStart: S
          }
        }
      },
      [`${t}-content`]: {
        color: d,
        backgroundColor: n,
        borderTop: $,
        [`& > ${t}-content-box`]: {
          padding: `${o}px ${i}px`
        },
        "&-hidden": {
          display: "none"
        }
      },
      [`${t}-item:last-child`]: {
        [`> ${t}-content`]: {
          borderRadius: `0 0 ${l}px ${l}px`
        }
      },
      [`& ${t}-item-disabled > ${t}-header`]: {
        "\n          &,\n          & > .arrow\n        ": {
          color: p,
          cursor: "not-allowed"
        }
      },
      // ========================== Icon Position ==========================
      [`&${t}-icon-position-end`]: {
        [`& > ${t}-item`]: {
          [`> ${t}-header`]: {
            [`${t}-expand-icon`]: {
              order: 1,
              paddingInlineEnd: 0,
              paddingInlineStart: y
            }
          }
        }
      }
    })
  };
}, D3 = (e) => {
  const {
    componentCls: t
  } = e, n = `> ${t}-item > ${t}-header ${t}-arrow svg`;
  return {
    [`${t}-rtl`]: {
      [n]: {
        transform: "rotate(180deg)"
      }
    }
  };
}, z3 = (e) => {
  const {
    componentCls: t,
    collapseHeaderBg: n,
    paddingXXS: o,
    colorBorder: i
  } = e;
  return {
    [`${t}-borderless`]: {
      backgroundColor: n,
      border: 0,
      [`> ${t}-item`]: {
        borderBottom: `1px solid ${i}`
      },
      [`
        > ${t}-item:last-child,
        > ${t}-item:last-child ${t}-header
      `]: {
        borderRadius: 0
      },
      [`> ${t}-item:last-child`]: {
        borderBottom: 0
      },
      [`> ${t}-item > ${t}-content`]: {
        backgroundColor: "transparent",
        borderTop: 0
      },
      [`> ${t}-item > ${t}-content > ${t}-content-box`]: {
        paddingTop: o
      }
    }
  };
}, R3 = (e) => {
  const {
    componentCls: t,
    paddingSM: n
  } = e;
  return {
    [`${t}-ghost`]: {
      backgroundColor: "transparent",
      border: 0,
      [`> ${t}-item`]: {
        borderBottom: 0,
        [`> ${t}-content`]: {
          backgroundColor: "transparent",
          border: 0,
          [`> ${t}-content-box`]: {
            paddingBlock: n
          }
        }
      }
    }
  };
}, N3 = nn("Collapse", (e) => {
  const t = _t(e, {
    collapseContentBg: e.colorBgContainer,
    collapseHeaderBg: e.colorFillAlter,
    collapseHeaderPadding: `${e.paddingSM}px ${e.padding}px`,
    collapsePanelBorderRadius: e.borderRadiusLG,
    collapseContentPaddingHorizontal: 16
    // Fixed value
  });
  return [A3(t), z3(t), R3(t), D3(t), Xv(t)];
});
function px(e) {
  let t = e;
  if (!Array.isArray(t)) {
    const n = typeof t;
    t = n === "number" || n === "string" ? [t] : [];
  }
  return t.map((n) => String(n));
}
const Pa = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ACollapse",
  inheritAttrs: !1,
  props: wn(_3(), {
    accordion: !1,
    destroyInactivePanel: !1,
    bordered: !0,
    expandIconPosition: "start"
  }),
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      emit: i
    } = t;
    const r = le(px(e$([e.activeKey, e.defaultActiveKey])));
    Ie(() => e.activeKey, () => {
      r.value = px(e.activeKey);
    }, {
      deep: !0
    });
    const {
      prefixCls: a,
      direction: l,
      rootPrefixCls: s
    } = yt("collapse", e), [u, c] = N3(a), d = R(() => {
      const {
        expandIconPosition: S
      } = e;
      return S !== void 0 ? S : l.value === "rtl" ? "end" : "start";
    }), f = (S) => {
      const {
        expandIcon: C = o.expandIcon
      } = e, O = C ? C(S) : v(Sl, {
        rotate: S.isActive ? 90 : void 0
      }, null);
      return v("div", {
        class: [`${a.value}-expand-icon`, c.value],
        onClick: () => ["header", "icon"].includes(e.collapsible) && m(S.panelKey)
      }, [Bo(Array.isArray(C) ? O[0] : O) ? An(O, {
        class: `${a.value}-arrow`
      }, !1) : O]);
    }, p = (S) => {
      e.activeKey === void 0 && (r.value = S);
      const C = e.accordion ? S[0] : S;
      i("update:activeKey", C), i("change", C);
    }, m = (S) => {
      let C = r.value;
      if (e.accordion)
        C = C[0] === S ? [] : [S];
      else {
        C = [...C];
        const O = C.indexOf(S);
        O > -1 ? C.splice(O, 1) : C.push(S);
      }
      p(C);
    }, b = (S, C) => {
      var O, $, P;
      if (uf(S)) return;
      const k = r.value, {
        accordion: x,
        destroyInactivePanel: E,
        collapsible: z,
        openAnimation: N
      } = e, D = N || lm(`${s.value}-motion-collapse`), W = String((O = S.key) !== null && O !== void 0 ? O : C), {
        header: H = (P = ($ = S.children) === null || $ === void 0 ? void 0 : $.header) === null || P === void 0 ? void 0 : P.call($),
        headerClass: L,
        collapsible: A,
        disabled: U
      } = S.props || {};
      let j = !1;
      x ? j = k[0] === W : j = k.indexOf(W) > -1;
      let re = A ?? z;
      (U || U === "") && (re = "disabled");
      const G = {
        key: W,
        panelKey: W,
        header: H,
        headerClass: L,
        isActive: j,
        prefixCls: a.value,
        destroyInactivePanel: E,
        openAnimation: D,
        accordion: x,
        onItemClick: re === "disabled" ? null : m,
        expandIcon: f,
        collapsible: re
      };
      return An(S, G);
    }, y = () => {
      var S;
      return no((S = o.default) === null || S === void 0 ? void 0 : S.call(o)).map(b);
    };
    return () => {
      const {
        accordion: S,
        bordered: C,
        ghost: O
      } = e, $ = Te(a.value, {
        [`${a.value}-borderless`]: !C,
        [`${a.value}-icon-position-${d.value}`]: !0,
        [`${a.value}-rtl`]: l.value === "rtl",
        [`${a.value}-ghost`]: !!O,
        [n.class]: !!n.class
      }, c.value);
      return u(v("div", Z(Z({
        class: $
      }, Hk(n)), {}, {
        style: n.style,
        role: S ? "tablist" : null
      }), [y()]));
    };
  }
}), B3 = ye({
  compatConfig: {
    MODE: 3
  },
  name: "PanelContent",
  props: mP(),
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = Pe(!1);
    return Lt(() => {
      (e.isActive || e.forceRender) && (o.value = !0);
    }), () => {
      var i;
      if (!o.value) return null;
      const {
        prefixCls: r,
        isActive: a,
        role: l
      } = e;
      return v("div", {
        class: Te(`${r}-content`, {
          [`${r}-content-active`]: a,
          [`${r}-content-inactive`]: !a
        }),
        role: l
      }, [v("div", {
        class: `${r}-content-box`
      }, [(i = n.default) === null || i === void 0 ? void 0 : i.call(n)])]);
    };
  }
}), $h = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ACollapsePanel",
  inheritAttrs: !1,
  props: wn(mP(), {
    showArrow: !0,
    isActive: !1,
    onItemClick() {
    },
    headerClass: "",
    forceRender: !1
  }),
  slots: Object,
  // emits: ['itemClick'],
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      attrs: i
    } = t;
    Fn(e.disabled === void 0, "Collapse.Panel", '`disabled` is deprecated. Please use `collapsible="disabled"` instead.');
    const {
      prefixCls: r
    } = yt("collapse", e), a = () => {
      o("itemClick", e.panelKey);
    }, l = (s) => {
      (s.key === "Enter" || s.keyCode === 13 || s.which === 13) && a();
    };
    return () => {
      var s, u;
      const {
        header: c = (s = n.header) === null || s === void 0 ? void 0 : s.call(n),
        headerClass: d,
        isActive: f,
        showArrow: p,
        destroyInactivePanel: m,
        accordion: b,
        forceRender: y,
        openAnimation: S,
        expandIcon: C = n.expandIcon,
        extra: O = (u = n.extra) === null || u === void 0 ? void 0 : u.call(n),
        collapsible: $
      } = e, P = $ === "disabled", k = r.value, x = Te(`${k}-header`, {
        [d]: d,
        [`${k}-header-collapsible-only`]: $ === "header",
        [`${k}-icon-collapsible-only`]: $ === "icon"
      }), E = Te({
        [`${k}-item`]: !0,
        [`${k}-item-active`]: f,
        [`${k}-item-disabled`]: P,
        [`${k}-no-arrow`]: !p,
        [`${i.class}`]: !!i.class
      });
      let z = v("i", {
        class: "arrow"
      }, null);
      p && typeof C == "function" && (z = C(e));
      const N = Zi(v(B3, {
        prefixCls: k,
        isActive: f,
        forceRender: y,
        role: b ? "tabpanel" : null
      }, {
        default: n.default
      }), [[mr, f]]), D = I({
        appear: !1,
        css: !1
      }, S);
      return v("div", Z(Z({}, i), {}, {
        class: E
      }), [v("div", {
        class: x,
        onClick: () => !["header", "icon"].includes($) && a(),
        role: b ? "tab" : "button",
        tabindex: P ? -1 : 0,
        "aria-expanded": f,
        onKeypress: l
      }, [p && z, v("span", {
        onClick: () => $ === "header" && a(),
        class: `${k}-header-text`
      }, [c]), O && v("div", {
        class: `${k}-extra`
      }, [O])]), v(Ti, D, {
        default: () => [!m || f ? N : null]
      })]);
    };
  }
});
Pa.Panel = $h;
Pa.install = function(e) {
  return e.component(Pa.name, Pa), e.component($h.name, $h), e;
};
var L3 = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z" } }] }, name: "left", theme: "outlined" };
function gx(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      F3(e, i, n[i]);
    });
  }
  return e;
}
function F3(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var qd = function(t, n) {
  var o = gx({}, t, n.attrs);
  return v(pn, gx({}, o, {
    icon: L3
  }), null);
};
qd.displayName = "LeftOutlined";
qd.inheritAttrs = !1;
const bP = () => ki() && window.document.documentElement;
let qc;
const H3 = () => {
  if (!bP())
    return !1;
  if (qc !== void 0)
    return qc;
  const e = document.createElement("div");
  return e.style.display = "flex", e.style.flexDirection = "column", e.style.rowGap = "1px", e.appendChild(document.createElement("div")), e.appendChild(document.createElement("div")), document.body.appendChild(e), qc = e.scrollHeight === 1, document.body.removeChild(e), qc;
}, yP = (() => {
  const e = Pe(!1);
  return Pt(() => {
    e.value = H3();
  }), e;
}), xP = Symbol("rowContextKey"), V3 = (e) => {
  kt(xP, e);
}, j3 = () => Tt(xP, {
  gutter: R(() => {
  }),
  wrap: R(() => {
  }),
  supportFlexGap: R(() => {
  })
}), W3 = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    // Grid system
    [t]: {
      display: "flex",
      flexFlow: "row wrap",
      minWidth: 0,
      "&::before, &::after": {
        display: "flex"
      },
      "&-no-wrap": {
        flexWrap: "nowrap"
      },
      // The origin of the X-axis
      "&-start": {
        justifyContent: "flex-start"
      },
      // The center of the X-axis
      "&-center": {
        justifyContent: "center"
      },
      // The opposite of the X-axis
      "&-end": {
        justifyContent: "flex-end"
      },
      "&-space-between": {
        justifyContent: "space-between"
      },
      "&-space-around ": {
        justifyContent: "space-around"
      },
      "&-space-evenly ": {
        justifyContent: "space-evenly"
      },
      // Align at the top
      "&-top": {
        alignItems: "flex-start"
      },
      // Align at the center
      "&-middle": {
        alignItems: "center"
      },
      "&-bottom": {
        alignItems: "flex-end"
      }
    }
  };
}, q3 = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    // Grid system
    [t]: {
      position: "relative",
      maxWidth: "100%",
      // Prevent columns from collapsing when empty
      minHeight: 1
    }
  };
}, G3 = (e, t) => {
  const {
    componentCls: n,
    gridColumns: o
  } = e, i = {};
  for (let r = o; r >= 0; r--)
    r === 0 ? (i[`${n}${t}-${r}`] = {
      display: "none"
    }, i[`${n}-push-${r}`] = {
      insetInlineStart: "auto"
    }, i[`${n}-pull-${r}`] = {
      insetInlineEnd: "auto"
    }, i[`${n}${t}-push-${r}`] = {
      insetInlineStart: "auto"
    }, i[`${n}${t}-pull-${r}`] = {
      insetInlineEnd: "auto"
    }, i[`${n}${t}-offset-${r}`] = {
      marginInlineEnd: 0
    }, i[`${n}${t}-order-${r}`] = {
      order: 0
    }) : (i[`${n}${t}-${r}`] = {
      display: "block",
      flex: `0 0 ${r / o * 100}%`,
      maxWidth: `${r / o * 100}%`
    }, i[`${n}${t}-push-${r}`] = {
      insetInlineStart: `${r / o * 100}%`
    }, i[`${n}${t}-pull-${r}`] = {
      insetInlineEnd: `${r / o * 100}%`
    }, i[`${n}${t}-offset-${r}`] = {
      marginInlineStart: `${r / o * 100}%`
    }, i[`${n}${t}-order-${r}`] = {
      order: r
    });
  return i;
}, Ph = (e, t) => G3(e, t), K3 = (e, t, n) => ({
  [`@media (min-width: ${t}px)`]: I({}, Ph(e, n))
}), Y3 = nn("Grid", (e) => [W3(e)]), U3 = nn("Grid", (e) => {
  const t = _t(e, {
    gridColumns: 24
    // Row is divided into 24 parts in Grid
  }), n = {
    "-sm": t.screenSMMin,
    "-md": t.screenMDMin,
    "-lg": t.screenLGMin,
    "-xl": t.screenXLMin,
    "-xxl": t.screenXXLMin
  };
  return [q3(t), Ph(t, ""), Ph(t, "-xs"), Object.keys(n).map((o) => K3(t, n[o], o)).reduce((o, i) => I(I({}, o), i), {})];
}), X3 = () => ({
  align: tn([String, Object]),
  justify: tn([String, Object]),
  prefixCls: String,
  gutter: tn([Number, Array, Object], 0),
  wrap: {
    type: Boolean,
    default: void 0
  }
}), wP = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ARow",
  inheritAttrs: !1,
  props: X3(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: i,
      direction: r
    } = yt("row", e), [a, l] = Y3(i);
    let s;
    const u = HN(), c = le({
      xs: !0,
      sm: !0,
      md: !0,
      lg: !0,
      xl: !0,
      xxl: !0
    }), d = le({
      xs: !1,
      sm: !1,
      md: !1,
      lg: !1,
      xl: !1,
      xxl: !1
    }), f = (O) => R(() => {
      if (typeof e[O] == "string")
        return e[O];
      if (typeof e[O] != "object")
        return "";
      for (let $ = 0; $ < Rc.length; $++) {
        const P = Rc[$];
        if (!d.value[P]) continue;
        const k = e[O][P];
        if (k !== void 0)
          return k;
      }
      return "";
    }), p = f("align"), m = f("justify"), b = yP();
    Pt(() => {
      s = u.value.subscribe((O) => {
        d.value = O;
        const $ = e.gutter || 0;
        (!Array.isArray($) && typeof $ == "object" || Array.isArray($) && (typeof $[0] == "object" || typeof $[1] == "object")) && (c.value = O);
      });
    }), At(() => {
      u.value.unsubscribe(s);
    });
    const y = R(() => {
      const O = [void 0, void 0], {
        gutter: $ = 0
      } = e;
      return (Array.isArray($) ? $ : [$, void 0]).forEach((k, x) => {
        if (typeof k == "object")
          for (let E = 0; E < Rc.length; E++) {
            const z = Rc[E];
            if (c.value[z] && k[z] !== void 0) {
              O[x] = k[z];
              break;
            }
          }
        else
          O[x] = k;
      }), O;
    });
    V3({
      gutter: y,
      supportFlexGap: b,
      wrap: R(() => e.wrap)
    });
    const S = R(() => Te(i.value, {
      [`${i.value}-no-wrap`]: e.wrap === !1,
      [`${i.value}-${m.value}`]: m.value,
      [`${i.value}-${p.value}`]: p.value,
      [`${i.value}-rtl`]: r.value === "rtl"
    }, o.class, l.value)), C = R(() => {
      const O = y.value, $ = {}, P = O[0] != null && O[0] > 0 ? `${O[0] / -2}px` : void 0, k = O[1] != null && O[1] > 0 ? `${O[1] / -2}px` : void 0;
      return P && ($.marginLeft = P, $.marginRight = P), b.value ? $.rowGap = `${O[1]}px` : k && ($.marginTop = k, $.marginBottom = k), $;
    });
    return () => {
      var O;
      return a(v("div", Z(Z({}, o), {}, {
        class: S.value,
        style: I(I({}, C.value), o.style)
      }), [(O = n.default) === null || O === void 0 ? void 0 : O.call(n)]));
    };
  }
});
function ll() {
  return ll = Object.assign ? Object.assign.bind() : function(e) {
    for (var t = 1; t < arguments.length; t++) {
      var n = arguments[t];
      for (var o in n)
        Object.prototype.hasOwnProperty.call(n, o) && (e[o] = n[o]);
    }
    return e;
  }, ll.apply(this, arguments);
}
function Q3(e, t) {
  e.prototype = Object.create(t.prototype), e.prototype.constructor = e, qu(e, t);
}
function Oh(e) {
  return Oh = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(n) {
    return n.__proto__ || Object.getPrototypeOf(n);
  }, Oh(e);
}
function qu(e, t) {
  return qu = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(o, i) {
    return o.__proto__ = i, o;
  }, qu(e, t);
}
function Z3() {
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
  if (typeof Proxy == "function") return !0;
  try {
    return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
    })), !0;
  } catch {
    return !1;
  }
}
function hd(e, t, n) {
  return Z3() ? hd = Reflect.construct.bind() : hd = function(i, r, a) {
    var l = [null];
    l.push.apply(l, r);
    var s = Function.bind.apply(i, l), u = new s();
    return a && qu(u, a.prototype), u;
  }, hd.apply(null, arguments);
}
function J3(e) {
  return Function.toString.call(e).indexOf("[native code]") !== -1;
}
function Ih(e) {
  var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
  return Ih = function(o) {
    if (o === null || !J3(o)) return o;
    if (typeof o != "function")
      throw new TypeError("Super expression must either be null or a function");
    if (typeof t < "u") {
      if (t.has(o)) return t.get(o);
      t.set(o, i);
    }
    function i() {
      return hd(o, arguments, Oh(this).constructor);
    }
    return i.prototype = Object.create(o.prototype, {
      constructor: {
        value: i,
        enumerable: !1,
        writable: !0,
        configurable: !0
      }
    }), qu(i, o);
  }, Ih(e);
}
var eB = /%[sdj%]/g, SP = function() {
};
typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (SP = function(t, n) {
  typeof console < "u" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING > "u" && n.every(function(o) {
    return typeof o == "string";
  }) && console.warn(t, n);
});
function Mh(e) {
  if (!e || !e.length) return null;
  var t = {};
  return e.forEach(function(n) {
    var o = n.field;
    t[o] = t[o] || [], t[o].push(n);
  }), t;
}
function oi(e) {
  for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), o = 1; o < t; o++)
    n[o - 1] = arguments[o];
  var i = 0, r = n.length;
  if (typeof e == "function")
    return e.apply(null, n);
  if (typeof e == "string") {
    var a = e.replace(eB, function(l) {
      if (l === "%%")
        return "%";
      if (i >= r)
        return l;
      switch (l) {
        case "%s":
          return String(n[i++]);
        case "%d":
          return Number(n[i++]);
        case "%j":
          try {
            return JSON.stringify(n[i++]);
          } catch {
            return "[Circular]";
          }
          break;
        default:
          return l;
      }
    });
    return a;
  }
  return e;
}
function tB(e) {
  return e === "string" || e === "url" || e === "hex" || e === "email" || e === "date" || e === "pattern";
}
function so(e, t) {
  return !!(e == null || t === "array" && Array.isArray(e) && !e.length || tB(t) && typeof e == "string" && !e);
}
function nB(e, t, n) {
  var o = [], i = 0, r = e.length;
  function a(l) {
    o.push.apply(o, l || []), i++, i === r && n(o);
  }
  e.forEach(function(l) {
    t(l, a);
  });
}
function hx(e, t, n) {
  var o = 0, i = e.length;
  function r(a) {
    if (a && a.length) {
      n(a);
      return;
    }
    var l = o;
    o = o + 1, l < i ? t(e[l], r) : n([]);
  }
  r([]);
}
function oB(e) {
  var t = [];
  return Object.keys(e).forEach(function(n) {
    t.push.apply(t, e[n] || []);
  }), t;
}
var vx = /* @__PURE__ */ (function(e) {
  Q3(t, e);
  function t(n, o) {
    var i;
    return i = e.call(this, "Async Validation Error") || this, i.errors = n, i.fields = o, i;
  }
  return t;
})(/* @__PURE__ */ Ih(Error));
function iB(e, t, n, o, i) {
  if (t.first) {
    var r = new Promise(function(f, p) {
      var m = function(S) {
        return o(S), S.length ? p(new vx(S, Mh(S))) : f(i);
      }, b = oB(e);
      hx(b, n, m);
    });
    return r.catch(function(f) {
      return f;
    }), r;
  }
  var a = t.firstFields === !0 ? Object.keys(e) : t.firstFields || [], l = Object.keys(e), s = l.length, u = 0, c = [], d = new Promise(function(f, p) {
    var m = function(y) {
      if (c.push.apply(c, y), u++, u === s)
        return o(c), c.length ? p(new vx(c, Mh(c))) : f(i);
    };
    l.length || (o(c), f(i)), l.forEach(function(b) {
      var y = e[b];
      a.indexOf(b) !== -1 ? hx(y, n, m) : nB(y, n, m);
    });
  });
  return d.catch(function(f) {
    return f;
  }), d;
}
function rB(e) {
  return !!(e && e.message !== void 0);
}
function aB(e, t) {
  for (var n = e, o = 0; o < t.length; o++) {
    if (n == null)
      return n;
    n = n[t[o]];
  }
  return n;
}
function mx(e, t) {
  return function(n) {
    var o;
    return e.fullFields ? o = aB(t, e.fullFields) : o = t[n.field || e.fullField], rB(n) ? (n.field = n.field || e.fullField, n.fieldValue = o, n) : {
      message: typeof n == "function" ? n() : n,
      fieldValue: o,
      field: n.field || e.fullField
    };
  };
}
function bx(e, t) {
  if (t) {
    for (var n in t)
      if (t.hasOwnProperty(n)) {
        var o = t[n];
        typeof o == "object" && typeof e[n] == "object" ? e[n] = ll({}, e[n], o) : e[n] = o;
      }
  }
  return e;
}
var CP = function(t, n, o, i, r, a) {
  t.required && (!o.hasOwnProperty(t.field) || so(n, a || t.type)) && i.push(oi(r.messages.required, t.fullField));
}, lB = function(t, n, o, i, r) {
  (/^\s+$/.test(n) || n === "") && i.push(oi(r.messages.whitespace, t.fullField));
}, Gc, sB = (function() {
  if (Gc)
    return Gc;
  var e = "[a-fA-F\\d:]", t = function($) {
    return $ && $.includeBoundaries ? "(?:(?<=\\s|^)(?=" + e + ")|(?<=" + e + ")(?=\\s|$))" : "";
  }, n = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}", o = "[a-fA-F\\d]{1,4}", i = (`
(?:
(?:` + o + ":){7}(?:" + o + `|:)|                                    // 1:2:3:4:5:6:7::  1:2:3:4:5:6:7:8
(?:` + o + ":){6}(?:" + n + "|:" + o + `|:)|                             // 1:2:3:4:5:6::    1:2:3:4:5:6::8   1:2:3:4:5:6::8  1:2:3:4:5:6::1.2.3.4
(?:` + o + ":){5}(?::" + n + "|(?::" + o + `){1,2}|:)|                   // 1:2:3:4:5::      1:2:3:4:5::7:8   1:2:3:4:5::8    1:2:3:4:5::7:1.2.3.4
(?:` + o + ":){4}(?:(?::" + o + "){0,1}:" + n + "|(?::" + o + `){1,3}|:)| // 1:2:3:4::        1:2:3:4::6:7:8   1:2:3:4::8      1:2:3:4::6:7:1.2.3.4
(?:` + o + ":){3}(?:(?::" + o + "){0,2}:" + n + "|(?::" + o + `){1,4}|:)| // 1:2:3::          1:2:3::5:6:7:8   1:2:3::8        1:2:3::5:6:7:1.2.3.4
(?:` + o + ":){2}(?:(?::" + o + "){0,3}:" + n + "|(?::" + o + `){1,5}|:)| // 1:2::            1:2::4:5:6:7:8   1:2::8          1:2::4:5:6:7:1.2.3.4
(?:` + o + ":){1}(?:(?::" + o + "){0,4}:" + n + "|(?::" + o + `){1,6}|:)| // 1::              1::3:4:5:6:7:8   1::8            1::3:4:5:6:7:1.2.3.4
(?::(?:(?::` + o + "){0,5}:" + n + "|(?::" + o + `){1,7}|:))             // ::2:3:4:5:6:7:8  ::2:3:4:5:6:7:8  ::8             ::1.2.3.4
)(?:%[0-9a-zA-Z]{1,})?                                             // %eth0            %1
`).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), r = new RegExp("(?:^" + n + "$)|(?:^" + i + "$)"), a = new RegExp("^" + n + "$"), l = new RegExp("^" + i + "$"), s = function($) {
    return $ && $.exact ? r : new RegExp("(?:" + t($) + n + t($) + ")|(?:" + t($) + i + t($) + ")", "g");
  };
  s.v4 = function(O) {
    return O && O.exact ? a : new RegExp("" + t(O) + n + t(O), "g");
  }, s.v6 = function(O) {
    return O && O.exact ? l : new RegExp("" + t(O) + i + t(O), "g");
  };
  var u = "(?:(?:[a-z]+:)?//)", c = "(?:\\S+(?::\\S*)?@)?", d = s.v4().source, f = s.v6().source, p = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", m = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", b = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", y = "(?::\\d{2,5})?", S = '(?:[/?#][^\\s"]*)?', C = "(?:" + u + "|www\\.)" + c + "(?:localhost|" + d + "|" + f + "|" + p + m + b + ")" + y + S;
  return Gc = new RegExp("(?:^" + C + "$)", "i"), Gc;
}), yx = {
  // http://emailregex.com/
  email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,
  // url: new RegExp(
  //   '^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$',
  //   'i',
  // ),
  hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
}, bu = {
  integer: function(t) {
    return bu.number(t) && parseInt(t, 10) === t;
  },
  float: function(t) {
    return bu.number(t) && !bu.integer(t);
  },
  array: function(t) {
    return Array.isArray(t);
  },
  regexp: function(t) {
    if (t instanceof RegExp)
      return !0;
    try {
      return !!new RegExp(t);
    } catch {
      return !1;
    }
  },
  date: function(t) {
    return typeof t.getTime == "function" && typeof t.getMonth == "function" && typeof t.getYear == "function" && !isNaN(t.getTime());
  },
  number: function(t) {
    return isNaN(t) ? !1 : typeof t == "number";
  },
  object: function(t) {
    return typeof t == "object" && !bu.array(t);
  },
  method: function(t) {
    return typeof t == "function";
  },
  email: function(t) {
    return typeof t == "string" && t.length <= 320 && !!t.match(yx.email);
  },
  url: function(t) {
    return typeof t == "string" && t.length <= 2048 && !!t.match(sB());
  },
  hex: function(t) {
    return typeof t == "string" && !!t.match(yx.hex);
  }
}, uB = function(t, n, o, i, r) {
  if (t.required && n === void 0) {
    CP(t, n, o, i, r);
    return;
  }
  var a = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], l = t.type;
  a.indexOf(l) > -1 ? bu[l](n) || i.push(oi(r.messages.types[l], t.fullField, t.type)) : l && typeof n !== t.type && i.push(oi(r.messages.types[l], t.fullField, t.type));
}, cB = function(t, n, o, i, r) {
  var a = typeof t.len == "number", l = typeof t.min == "number", s = typeof t.max == "number", u = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, c = n, d = null, f = typeof n == "number", p = typeof n == "string", m = Array.isArray(n);
  if (f ? d = "number" : p ? d = "string" : m && (d = "array"), !d)
    return !1;
  m && (c = n.length), p && (c = n.replace(u, "_").length), a ? c !== t.len && i.push(oi(r.messages[d].len, t.fullField, t.len)) : l && !s && c < t.min ? i.push(oi(r.messages[d].min, t.fullField, t.min)) : s && !l && c > t.max ? i.push(oi(r.messages[d].max, t.fullField, t.max)) : l && s && (c < t.min || c > t.max) && i.push(oi(r.messages[d].range, t.fullField, t.min, t.max));
}, Gl = "enum", dB = function(t, n, o, i, r) {
  t[Gl] = Array.isArray(t[Gl]) ? t[Gl] : [], t[Gl].indexOf(n) === -1 && i.push(oi(r.messages[Gl], t.fullField, t[Gl].join(", ")));
}, fB = function(t, n, o, i, r) {
  if (t.pattern) {
    if (t.pattern instanceof RegExp)
      t.pattern.lastIndex = 0, t.pattern.test(n) || i.push(oi(r.messages.pattern.mismatch, t.fullField, n, t.pattern));
    else if (typeof t.pattern == "string") {
      var a = new RegExp(t.pattern);
      a.test(n) || i.push(oi(r.messages.pattern.mismatch, t.fullField, n, t.pattern));
    }
  }
}, Gt = {
  required: CP,
  whitespace: lB,
  type: uB,
  range: cB,
  enum: dB,
  pattern: fB
}, pB = function(t, n, o, i, r) {
  var a = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (so(n, "string") && !t.required)
      return o();
    Gt.required(t, n, i, a, r, "string"), so(n, "string") || (Gt.type(t, n, i, a, r), Gt.range(t, n, i, a, r), Gt.pattern(t, n, i, a, r), t.whitespace === !0 && Gt.whitespace(t, n, i, a, r));
  }
  o(a);
}, gB = function(t, n, o, i, r) {
  var a = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (so(n) && !t.required)
      return o();
    Gt.required(t, n, i, a, r), n !== void 0 && Gt.type(t, n, i, a, r);
  }
  o(a);
}, hB = function(t, n, o, i, r) {
  var a = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (n === "" && (n = void 0), so(n) && !t.required)
      return o();
    Gt.required(t, n, i, a, r), n !== void 0 && (Gt.type(t, n, i, a, r), Gt.range(t, n, i, a, r));
  }
  o(a);
}, vB = function(t, n, o, i, r) {
  var a = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (so(n) && !t.required)
      return o();
    Gt.required(t, n, i, a, r), n !== void 0 && Gt.type(t, n, i, a, r);
  }
  o(a);
}, mB = function(t, n, o, i, r) {
  var a = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (so(n) && !t.required)
      return o();
    Gt.required(t, n, i, a, r), so(n) || Gt.type(t, n, i, a, r);
  }
  o(a);
}, bB = function(t, n, o, i, r) {
  var a = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (so(n) && !t.required)
      return o();
    Gt.required(t, n, i, a, r), n !== void 0 && (Gt.type(t, n, i, a, r), Gt.range(t, n, i, a, r));
  }
  o(a);
}, yB = function(t, n, o, i, r) {
  var a = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (so(n) && !t.required)
      return o();
    Gt.required(t, n, i, a, r), n !== void 0 && (Gt.type(t, n, i, a, r), Gt.range(t, n, i, a, r));
  }
  o(a);
}, xB = function(t, n, o, i, r) {
  var a = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (n == null && !t.required)
      return o();
    Gt.required(t, n, i, a, r, "array"), n != null && (Gt.type(t, n, i, a, r), Gt.range(t, n, i, a, r));
  }
  o(a);
}, wB = function(t, n, o, i, r) {
  var a = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (so(n) && !t.required)
      return o();
    Gt.required(t, n, i, a, r), n !== void 0 && Gt.type(t, n, i, a, r);
  }
  o(a);
}, SB = "enum", CB = function(t, n, o, i, r) {
  var a = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (so(n) && !t.required)
      return o();
    Gt.required(t, n, i, a, r), n !== void 0 && Gt[SB](t, n, i, a, r);
  }
  o(a);
}, $B = function(t, n, o, i, r) {
  var a = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (so(n, "string") && !t.required)
      return o();
    Gt.required(t, n, i, a, r), so(n, "string") || Gt.pattern(t, n, i, a, r);
  }
  o(a);
}, PB = function(t, n, o, i, r) {
  var a = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (so(n, "date") && !t.required)
      return o();
    if (Gt.required(t, n, i, a, r), !so(n, "date")) {
      var s;
      n instanceof Date ? s = n : s = new Date(n), Gt.type(t, s, i, a, r), s && Gt.range(t, s.getTime(), i, a, r);
    }
  }
  o(a);
}, OB = function(t, n, o, i, r) {
  var a = [], l = Array.isArray(n) ? "array" : typeof n;
  Gt.required(t, n, i, a, r, l), o(a);
}, Vp = function(t, n, o, i, r) {
  var a = t.type, l = [], s = t.required || !t.required && i.hasOwnProperty(t.field);
  if (s) {
    if (so(n, a) && !t.required)
      return o();
    Gt.required(t, n, i, l, r, a), so(n, a) || Gt.type(t, n, i, l, r);
  }
  o(l);
}, IB = function(t, n, o, i, r) {
  var a = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (so(n) && !t.required)
      return o();
    Gt.required(t, n, i, a, r);
  }
  o(a);
}, Iu = {
  string: pB,
  method: gB,
  number: hB,
  boolean: vB,
  regexp: mB,
  integer: bB,
  float: yB,
  array: xB,
  object: wB,
  enum: CB,
  pattern: $B,
  date: PB,
  url: Vp,
  hex: Vp,
  email: Vp,
  required: OB,
  any: IB
};
function Th() {
  return {
    default: "Validation error on field %s",
    required: "%s is required",
    enum: "%s must be one of %s",
    whitespace: "%s cannot be empty",
    date: {
      format: "%s date %s is invalid for format %s",
      parse: "%s date could not be parsed, %s is invalid ",
      invalid: "%s date %s is invalid"
    },
    types: {
      string: "%s is not a %s",
      method: "%s is not a %s (function)",
      array: "%s is not an %s",
      object: "%s is not an %s",
      number: "%s is not a %s",
      date: "%s is not a %s",
      boolean: "%s is not a %s",
      integer: "%s is not an %s",
      float: "%s is not a %s",
      regexp: "%s is not a valid %s",
      email: "%s is not a valid %s",
      url: "%s is not a valid %s",
      hex: "%s is not a valid %s"
    },
    string: {
      len: "%s must be exactly %s characters",
      min: "%s must be at least %s characters",
      max: "%s cannot be longer than %s characters",
      range: "%s must be between %s and %s characters"
    },
    number: {
      len: "%s must equal %s",
      min: "%s cannot be less than %s",
      max: "%s cannot be greater than %s",
      range: "%s must be between %s and %s"
    },
    array: {
      len: "%s must be exactly %s in length",
      min: "%s cannot be less than %s in length",
      max: "%s cannot be greater than %s in length",
      range: "%s must be between %s and %s in length"
    },
    pattern: {
      mismatch: "%s value %s does not match pattern %s"
    },
    clone: function() {
      var t = JSON.parse(JSON.stringify(this));
      return t.clone = this.clone, t;
    }
  };
}
var kh = Th(), lc = /* @__PURE__ */ (function() {
  function e(n) {
    this.rules = null, this._messages = kh, this.define(n);
  }
  var t = e.prototype;
  return t.define = function(o) {
    var i = this;
    if (!o)
      throw new Error("Cannot configure a schema with no rules");
    if (typeof o != "object" || Array.isArray(o))
      throw new Error("Rules must be an object");
    this.rules = {}, Object.keys(o).forEach(function(r) {
      var a = o[r];
      i.rules[r] = Array.isArray(a) ? a : [a];
    });
  }, t.messages = function(o) {
    return o && (this._messages = bx(Th(), o)), this._messages;
  }, t.validate = function(o, i, r) {
    var a = this;
    i === void 0 && (i = {}), r === void 0 && (r = function() {
    });
    var l = o, s = i, u = r;
    if (typeof s == "function" && (u = s, s = {}), !this.rules || Object.keys(this.rules).length === 0)
      return u && u(null, l), Promise.resolve(l);
    function c(b) {
      var y = [], S = {};
      function C($) {
        if (Array.isArray($)) {
          var P;
          y = (P = y).concat.apply(P, $);
        } else
          y.push($);
      }
      for (var O = 0; O < b.length; O++)
        C(b[O]);
      y.length ? (S = Mh(y), u(y, S)) : u(null, l);
    }
    if (s.messages) {
      var d = this.messages();
      d === kh && (d = Th()), bx(d, s.messages), s.messages = d;
    } else
      s.messages = this.messages();
    var f = {}, p = s.keys || Object.keys(this.rules);
    p.forEach(function(b) {
      var y = a.rules[b], S = l[b];
      y.forEach(function(C) {
        var O = C;
        typeof O.transform == "function" && (l === o && (l = ll({}, l)), S = l[b] = O.transform(S)), typeof O == "function" ? O = {
          validator: O
        } : O = ll({}, O), O.validator = a.getValidationMethod(O), O.validator && (O.field = b, O.fullField = O.fullField || b, O.type = a.getType(O), f[b] = f[b] || [], f[b].push({
          rule: O,
          value: S,
          source: l,
          field: b
        }));
      });
    });
    var m = {};
    return iB(f, s, function(b, y) {
      var S = b.rule, C = (S.type === "object" || S.type === "array") && (typeof S.fields == "object" || typeof S.defaultField == "object");
      C = C && (S.required || !S.required && b.value), S.field = b.field;
      function O(k, x) {
        return ll({}, x, {
          fullField: S.fullField + "." + k,
          fullFields: S.fullFields ? [].concat(S.fullFields, [k]) : [k]
        });
      }
      function $(k) {
        k === void 0 && (k = []);
        var x = Array.isArray(k) ? k : [k];
        !s.suppressWarning && x.length && e.warning("async-validator:", x), x.length && S.message !== void 0 && (x = [].concat(S.message));
        var E = x.map(mx(S, l));
        if (s.first && E.length)
          return m[S.field] = 1, y(E);
        if (!C)
          y(E);
        else {
          if (S.required && !b.value)
            return S.message !== void 0 ? E = [].concat(S.message).map(mx(S, l)) : s.error && (E = [s.error(S, oi(s.messages.required, S.field))]), y(E);
          var z = {};
          S.defaultField && Object.keys(b.value).map(function(W) {
            z[W] = S.defaultField;
          }), z = ll({}, z, b.rule.fields);
          var N = {};
          Object.keys(z).forEach(function(W) {
            var H = z[W], L = Array.isArray(H) ? H : [H];
            N[W] = L.map(O.bind(null, W));
          });
          var D = new e(N);
          D.messages(s.messages), b.rule.options && (b.rule.options.messages = s.messages, b.rule.options.error = s.error), D.validate(b.value, b.rule.options || s, function(W) {
            var H = [];
            E && E.length && H.push.apply(H, E), W && W.length && H.push.apply(H, W), y(H.length ? H : null);
          });
        }
      }
      var P;
      if (S.asyncValidator)
        P = S.asyncValidator(S, b.value, $, b.source, s);
      else if (S.validator) {
        try {
          P = S.validator(S, b.value, $, b.source, s);
        } catch (k) {
          console.error?.(k), s.suppressValidatorError || setTimeout(function() {
            throw k;
          }, 0), $(k.message);
        }
        P === !0 ? $() : P === !1 ? $(typeof S.message == "function" ? S.message(S.fullField || S.field) : S.message || (S.fullField || S.field) + " fails") : P instanceof Array ? $(P) : P instanceof Error && $(P.message);
      }
      P && P.then && P.then(function() {
        return $();
      }, function(k) {
        return $(k);
      });
    }, function(b) {
      c(b);
    }, l);
  }, t.getType = function(o) {
    if (o.type === void 0 && o.pattern instanceof RegExp && (o.type = "pattern"), typeof o.validator != "function" && o.type && !Iu.hasOwnProperty(o.type))
      throw new Error(oi("Unknown rule type %s", o.type));
    return o.type || "string";
  }, t.getValidationMethod = function(o) {
    if (typeof o.validator == "function")
      return o.validator;
    var i = Object.keys(o), r = i.indexOf("message");
    return r !== -1 && i.splice(r, 1), i.length === 1 && i[0] === "required" ? Iu.required : Iu[this.getType(o)] || void 0;
  }, e;
})();
lc.register = function(t, n) {
  if (typeof n != "function")
    throw new Error("Cannot register a validator by type, validator is not a function");
  Iu[t] = n;
};
lc.warning = SP;
lc.messages = kh;
lc.validators = Iu;
function Oa(e) {
  return e == null ? [] : Array.isArray(e) ? e : [e];
}
function $P(e, t) {
  let n = e;
  for (let o = 0; o < t.length; o += 1) {
    if (n == null)
      return;
    n = n[t[o]];
  }
  return n;
}
function PP(e, t, n, o) {
  if (!t.length)
    return n;
  const [i, ...r] = t;
  let a;
  return !e && typeof i == "number" ? a = [] : Array.isArray(e) ? a = [...e] : a = I({}, e), o && n === void 0 && r.length === 1 ? delete a[i][r[0]] : a[i] = PP(a[i], r, n, o), a;
}
function MB(e, t, n) {
  let o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
  return t.length && o && n === void 0 && !$P(e, t.slice(0, -1)) ? e : PP(e, t, n, o);
}
function Eh(e) {
  return Oa(e);
}
function TB(e, t) {
  return $P(e, t);
}
function kB(e, t, n) {
  let o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
  return MB(e, t, n, o);
}
function EB(e, t) {
  return e && e.some((n) => AB(n, t));
}
function xx(e) {
  return typeof e == "object" && e !== null && Object.getPrototypeOf(e) === Object.prototype;
}
function OP(e, t) {
  const n = Array.isArray(e) ? [...e] : I({}, e);
  return t && Object.keys(t).forEach((o) => {
    const i = n[o], r = t[o], a = xx(i) && xx(r);
    n[o] = a ? OP(i, r || {}) : r;
  }), n;
}
function _B(e) {
  for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), o = 1; o < t; o++)
    n[o - 1] = arguments[o];
  return n.reduce((i, r) => OP(i, r), e);
}
function wx(e, t) {
  let n = {};
  return t.forEach((o) => {
    const i = TB(e, o);
    n = kB(n, o, i);
  }), n;
}
function AB(e, t) {
  return !e || !t || e.length !== t.length ? !1 : e.every((n, o) => t[o] === n);
}
const Xo = "'${name}' is not a valid ${type}", Rf = {
  default: "Validation error on field '${name}'",
  required: "'${name}' is required",
  enum: "'${name}' must be one of [${enum}]",
  whitespace: "'${name}' cannot be empty",
  date: {
    format: "'${name}' is invalid for format date",
    parse: "'${name}' could not be parsed as date",
    invalid: "'${name}' is invalid date"
  },
  types: {
    string: Xo,
    method: Xo,
    array: Xo,
    object: Xo,
    number: Xo,
    date: Xo,
    boolean: Xo,
    integer: Xo,
    float: Xo,
    regexp: Xo,
    email: Xo,
    url: Xo,
    hex: Xo
  },
  string: {
    len: "'${name}' must be exactly ${len} characters",
    min: "'${name}' must be at least ${min} characters",
    max: "'${name}' cannot be longer than ${max} characters",
    range: "'${name}' must be between ${min} and ${max} characters"
  },
  number: {
    len: "'${name}' must equal ${len}",
    min: "'${name}' cannot be less than ${min}",
    max: "'${name}' cannot be greater than ${max}",
    range: "'${name}' must be between ${min} and ${max}"
  },
  array: {
    len: "'${name}' must be exactly ${len} in length",
    min: "'${name}' cannot be less than ${min} in length",
    max: "'${name}' cannot be greater than ${max} in length",
    range: "'${name}' must be between ${min} and ${max} in length"
  },
  pattern: {
    mismatch: "'${name}' does not match pattern ${pattern}"
  }
};
var Nf = function(e, t, n, o) {
  function i(r) {
    return r instanceof n ? r : new n(function(a) {
      a(r);
    });
  }
  return new (n || (n = Promise))(function(r, a) {
    function l(c) {
      try {
        u(o.next(c));
      } catch (d) {
        a(d);
      }
    }
    function s(c) {
      try {
        u(o.throw(c));
      } catch (d) {
        a(d);
      }
    }
    function u(c) {
      c.done ? r(c.value) : i(c.value).then(l, s);
    }
    u((o = o.apply(e, t || [])).next());
  });
};
const DB = lc;
function zB(e, t) {
  return e.replace(/\$\{\w+\}/g, (n) => {
    const o = n.slice(2, -1);
    return t[o];
  });
}
function _h(e, t, n, o, i) {
  return Nf(this, void 0, void 0, function* () {
    const r = I({}, n);
    delete r.ruleIndex, delete r.trigger;
    let a = null;
    r && r.type === "array" && r.defaultField && (a = r.defaultField, delete r.defaultField);
    const l = new DB({
      [e]: [r]
    }), s = _B({}, Rf, o.validateMessages);
    l.messages(s);
    let u = [];
    try {
      yield Promise.resolve(l.validate({
        [e]: t
      }, I({}, o)));
    } catch (f) {
      f.errors ? u = f.errors.map((p, m) => {
        let {
          message: b
        } = p;
        return (
          // Wrap VueNode with `key`
          Bo(b) ? vl(b, {
            key: `error_${m}`
          }) : b
        );
      }) : (console.error(f), u = [s.default()]);
    }
    if (!u.length && a)
      return (yield Promise.all(t.map((p, m) => _h(`${e}.${m}`, p, a, o, i)))).reduce((p, m) => [...p, ...m], []);
    const c = I(I(I({}, n), {
      name: e,
      enum: (n.enum || []).join(", ")
    }), i);
    return u.map((f) => typeof f == "string" ? zB(f, c) : f);
  });
}
function IP(e, t, n, o, i, r) {
  const a = e.join("."), l = n.map((u, c) => {
    const d = u.validator, f = I(I({}, u), {
      ruleIndex: c
    });
    return d && (f.validator = (p, m, b) => {
      let y = !1;
      const C = d(p, m, function() {
        for (var O = arguments.length, $ = new Array(O), P = 0; P < O; P++)
          $[P] = arguments[P];
        Promise.resolve().then(() => {
          yo(!y, "Your validator function has already return a promise. `callback` will be ignored."), y || b(...$);
        });
      });
      y = C && typeof C.then == "function" && typeof C.catch == "function", yo(y, "`callback` is deprecated. Please return a promise instead."), y && C.then(() => {
        b();
      }).catch((O) => {
        b(O || " ");
      });
    }), f;
  }).sort((u, c) => {
    let {
      warningOnly: d,
      ruleIndex: f
    } = u, {
      warningOnly: p,
      ruleIndex: m
    } = c;
    return !!d == !!p ? f - m : d ? 1 : -1;
  });
  let s;
  if (i === !0)
    s = new Promise((u, c) => Nf(this, void 0, void 0, function* () {
      for (let d = 0; d < l.length; d += 1) {
        const f = l[d], p = yield _h(a, t, f, o, r);
        if (p.length) {
          c([{
            errors: p,
            rule: f
          }]);
          return;
        }
      }
      u([]);
    }));
  else {
    const u = l.map((c) => _h(a, t, c, o, r).then((d) => ({
      errors: d,
      rule: c
    })));
    s = (i ? NB(u) : RB(u)).then((c) => Promise.reject(c));
  }
  return s.catch((u) => u), s;
}
function RB(e) {
  return Nf(this, void 0, void 0, function* () {
    return Promise.all(e).then((t) => [].concat(...t));
  });
}
function NB(e) {
  return Nf(this, void 0, void 0, function* () {
    let t = 0;
    return new Promise((n) => {
      e.forEach((o) => {
        o.then((i) => {
          i.errors.length && n([i]), t += 1, t === e.length && n([]);
        });
      });
    });
  });
}
const MP = Symbol("formContextKey"), TP = (e) => {
  kt(MP, e);
}, km = () => Tt(MP, {
  name: R(() => {
  }),
  labelAlign: R(() => "right"),
  vertical: R(() => !1),
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
  addField: (e, t) => {
  },
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
  removeField: (e) => {
  },
  model: R(() => {
  }),
  rules: R(() => {
  }),
  colon: R(() => {
  }),
  labelWrap: R(() => {
  }),
  labelCol: R(() => {
  }),
  requiredMark: R(() => !1),
  validateTrigger: R(() => {
  }),
  onValidate: () => {
  },
  validateMessages: R(() => Rf)
}), kP = Symbol("formItemPrefixContextKey"), BB = (e) => {
  kt(kP, e);
}, LB = () => Tt(kP, {
  prefixCls: R(() => "")
});
function FB(e) {
  return typeof e == "number" ? `${e} ${e} auto` : /^\d+(\.\d+)?(px|em|rem|%)$/.test(e) ? `0 0 ${e}` : e;
}
const HB = () => ({
  span: [String, Number],
  order: [String, Number],
  offset: [String, Number],
  push: [String, Number],
  pull: [String, Number],
  xs: {
    type: [String, Number, Object],
    default: void 0
  },
  sm: {
    type: [String, Number, Object],
    default: void 0
  },
  md: {
    type: [String, Number, Object],
    default: void 0
  },
  lg: {
    type: [String, Number, Object],
    default: void 0
  },
  xl: {
    type: [String, Number, Object],
    default: void 0
  },
  xxl: {
    type: [String, Number, Object],
    default: void 0
  },
  prefixCls: String,
  flex: [String, Number]
}), VB = ["xs", "sm", "md", "lg", "xl", "xxl"], Em = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ACol",
  inheritAttrs: !1,
  props: HB(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      gutter: i,
      supportFlexGap: r,
      wrap: a
    } = j3(), {
      prefixCls: l,
      direction: s
    } = yt("col", e), [u, c] = U3(l), d = R(() => {
      const {
        span: p,
        order: m,
        offset: b,
        push: y,
        pull: S
      } = e, C = l.value;
      let O = {};
      return VB.forEach(($) => {
        let P = {};
        const k = e[$];
        typeof k == "number" ? P.span = k : typeof k == "object" && (P = k || {}), O = I(I({}, O), {
          [`${C}-${$}-${P.span}`]: P.span !== void 0,
          [`${C}-${$}-order-${P.order}`]: P.order || P.order === 0,
          [`${C}-${$}-offset-${P.offset}`]: P.offset || P.offset === 0,
          [`${C}-${$}-push-${P.push}`]: P.push || P.push === 0,
          [`${C}-${$}-pull-${P.pull}`]: P.pull || P.pull === 0,
          [`${C}-rtl`]: s.value === "rtl"
        });
      }), Te(C, {
        [`${C}-${p}`]: p !== void 0,
        [`${C}-order-${m}`]: m,
        [`${C}-offset-${b}`]: b,
        [`${C}-push-${y}`]: y,
        [`${C}-pull-${S}`]: S
      }, O, o.class, c.value);
    }), f = R(() => {
      const {
        flex: p
      } = e, m = i.value, b = {};
      if (m && m[0] > 0) {
        const y = `${m[0] / 2}px`;
        b.paddingLeft = y, b.paddingRight = y;
      }
      if (m && m[1] > 0 && !r.value) {
        const y = `${m[1] / 2}px`;
        b.paddingTop = y, b.paddingBottom = y;
      }
      return p && (b.flex = FB(p), a.value === !1 && !b.minWidth && (b.minWidth = 0)), b;
    });
    return () => {
      var p;
      return u(v("div", Z(Z({}, o), {}, {
        class: d.value,
        style: [f.value, o.style]
      }), [(p = n.default) === null || p === void 0 ? void 0 : p.call(n)]));
    };
  }
});
var jB = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { tag: "path", attrs: { d: "M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z" } }] }, name: "question-circle", theme: "outlined" };
function Sx(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      WB(e, i, n[i]);
    });
  }
  return e;
}
function WB(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var _m = function(t, n) {
  var o = Sx({}, t, n.attrs);
  return v(pn, Sx({}, o, {
    icon: jB
  }), null);
};
_m.displayName = "QuestionCircleOutlined";
_m.inheritAttrs = !1;
const Am = (e, t) => {
  let {
    slots: n,
    emit: o,
    attrs: i
  } = t;
  var r, a, l, s, u;
  const {
    prefixCls: c,
    htmlFor: d,
    labelCol: f,
    labelAlign: p,
    colon: m,
    required: b,
    requiredMark: y
  } = I(I({}, e), i), [S] = Bs("Form"), C = (r = e.label) !== null && r !== void 0 ? r : (a = n.label) === null || a === void 0 ? void 0 : a.call(n);
  if (!C) return null;
  const {
    vertical: O,
    labelAlign: $,
    labelCol: P,
    labelWrap: k,
    colon: x
  } = km(), E = f || P?.value || {}, z = p || $?.value, N = `${c}-item-label`, D = Te(N, z === "left" && `${N}-left`, E.class, {
    [`${N}-wrap`]: !!k.value
  });
  let W = C;
  const H = m === !0 || x?.value !== !1 && m !== !1;
  if (H && !O.value && typeof C == "string" && C.trim() !== "" && (W = C.replace(/[:|：]\s*$/, "")), e.tooltip || n.tooltip) {
    const U = v("span", {
      class: `${c}-item-tooltip`
    }, [v(xo, {
      title: e.tooltip
    }, {
      default: () => [v(_m, null, null)]
    })]);
    W = v(Ve, null, [W, n.tooltip ? (l = n.tooltip) === null || l === void 0 ? void 0 : l.call(n, {
      class: `${c}-item-tooltip`
    }) : U]);
  }
  y === "optional" && !b && (W = v(Ve, null, [W, v("span", {
    class: `${c}-item-optional`
  }, [((s = S.value) === null || s === void 0 ? void 0 : s.optional) || ((u = Ta.Form) === null || u === void 0 ? void 0 : u.optional)])]));
  const A = Te({
    [`${c}-item-required`]: b,
    [`${c}-item-required-mark-optional`]: y === "optional",
    [`${c}-item-no-colon`]: !H
  });
  return v(Em, Z(Z({}, E), {}, {
    class: D
  }), {
    default: () => [v("label", {
      for: d,
      class: A,
      title: typeof C == "string" ? C : "",
      onClick: (U) => o("click", U)
    }, [W])]
  });
};
Am.displayName = "FormItemLabel";
Am.inheritAttrs = !1;
const qB = (e) => {
  const {
    componentCls: t
  } = e, n = `${t}-show-help`, o = `${t}-show-help-item`;
  return {
    [n]: {
      // Explain holder
      transition: `opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`,
      "&-appear, &-enter": {
        opacity: 0,
        "&-active": {
          opacity: 1
        }
      },
      "&-leave": {
        opacity: 1,
        "&-active": {
          opacity: 0
        }
      },
      // Explain
      [o]: {
        overflow: "hidden",
        transition: `height ${e.motionDurationSlow} ${e.motionEaseInOut},
                     opacity ${e.motionDurationSlow} ${e.motionEaseInOut},
                     transform ${e.motionDurationSlow} ${e.motionEaseInOut} !important`,
        [`&${o}-appear, &${o}-enter`]: {
          transform: "translateY(-5px)",
          opacity: 0,
          "&-active": {
            transform: "translateY(0)",
            opacity: 1
          }
        },
        [`&${o}-leave-active`]: {
          transform: "translateY(-5px)"
        }
      }
    }
  };
}, GB = (e) => ({
  legend: {
    display: "block",
    width: "100%",
    marginBottom: e.marginLG,
    padding: 0,
    color: e.colorTextDescription,
    fontSize: e.fontSizeLG,
    lineHeight: "inherit",
    border: 0,
    borderBottom: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`
  },
  label: {
    fontSize: e.fontSize
  },
  'input[type="search"]': {
    boxSizing: "border-box"
  },
  // Position radios and checkboxes better
  'input[type="radio"], input[type="checkbox"]': {
    lineHeight: "normal"
  },
  'input[type="file"]': {
    display: "block"
  },
  // Make range inputs behave like textual form controls
  'input[type="range"]': {
    display: "block",
    width: "100%"
  },
  // Make multiple select elements height not fixed
  "select[multiple], select[size]": {
    height: "auto"
  },
  // Focus for file, radio, and checkbox
  "input[type='file']:focus,\n  input[type='radio']:focus,\n  input[type='checkbox']:focus": {
    outline: 0,
    boxShadow: `0 0 0 ${e.controlOutlineWidth}px ${e.controlOutline}`
  },
  // Adjust output element
  output: {
    display: "block",
    paddingTop: 15,
    color: e.colorText,
    fontSize: e.fontSize,
    lineHeight: e.lineHeight
  }
}), Cx = (e, t) => {
  const {
    formItemCls: n
  } = e;
  return {
    [n]: {
      [`${n}-label > label`]: {
        height: t
      },
      [`${n}-control-input`]: {
        minHeight: t
      }
    }
  };
}, KB = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [e.componentCls]: I(I(I({}, Zt(e)), GB(e)), {
      [`${t}-text`]: {
        display: "inline-block",
        paddingInlineEnd: e.paddingSM
      },
      // ================================================================
      // =                             Size                             =
      // ================================================================
      "&-small": I({}, Cx(e, e.controlHeightSM)),
      "&-large": I({}, Cx(e, e.controlHeightLG))
    })
  };
}, YB = (e) => {
  const {
    formItemCls: t,
    iconCls: n,
    componentCls: o,
    rootPrefixCls: i
  } = e;
  return {
    [t]: I(I({}, Zt(e)), {
      marginBottom: e.marginLG,
      verticalAlign: "top",
      "&-with-help": {
        transition: "none"
      },
      [`&-hidden,
        &-hidden.${i}-row`]: {
        // https://github.com/ant-design/ant-design/issues/26141
        display: "none"
      },
      "&-has-warning": {
        [`${t}-split`]: {
          color: e.colorError
        }
      },
      "&-has-error": {
        [`${t}-split`]: {
          color: e.colorWarning
        }
      },
      // ==============================================================
      // =                            Label                           =
      // ==============================================================
      [`${t}-label`]: {
        display: "inline-block",
        flexGrow: 0,
        overflow: "hidden",
        whiteSpace: "nowrap",
        textAlign: "end",
        verticalAlign: "middle",
        "&-left": {
          textAlign: "start"
        },
        "&-wrap": {
          overflow: "unset",
          lineHeight: `${e.lineHeight} - 0.25em`,
          whiteSpace: "unset"
        },
        "> label": {
          position: "relative",
          display: "inline-flex",
          alignItems: "center",
          maxWidth: "100%",
          height: e.controlHeight,
          color: e.colorTextHeading,
          fontSize: e.fontSize,
          [`> ${n}`]: {
            fontSize: e.fontSize,
            verticalAlign: "top"
          },
          // Required mark
          [`&${t}-required:not(${t}-required-mark-optional)::before`]: {
            display: "inline-block",
            marginInlineEnd: e.marginXXS,
            color: e.colorError,
            fontSize: e.fontSize,
            fontFamily: "SimSun, sans-serif",
            lineHeight: 1,
            content: '"*"',
            [`${o}-hide-required-mark &`]: {
              display: "none"
            }
          },
          // Optional mark
          [`${t}-optional`]: {
            display: "inline-block",
            marginInlineStart: e.marginXXS,
            color: e.colorTextDescription,
            [`${o}-hide-required-mark &`]: {
              display: "none"
            }
          },
          // Optional mark
          [`${t}-tooltip`]: {
            color: e.colorTextDescription,
            cursor: "help",
            writingMode: "horizontal-tb",
            marginInlineStart: e.marginXXS
          },
          "&::after": {
            content: '":"',
            position: "relative",
            marginBlock: 0,
            marginInlineStart: e.marginXXS / 2,
            marginInlineEnd: e.marginXS
          },
          [`&${t}-no-colon::after`]: {
            content: '" "'
          }
        }
      },
      // ==============================================================
      // =                            Input                           =
      // ==============================================================
      [`${t}-control`]: {
        display: "flex",
        flexDirection: "column",
        flexGrow: 1,
        [`&:first-child:not([class^="'${i}-col-'"]):not([class*="' ${i}-col-'"])`]: {
          width: "100%"
        },
        "&-input": {
          position: "relative",
          display: "flex",
          alignItems: "center",
          minHeight: e.controlHeight,
          "&-content": {
            flex: "auto",
            maxWidth: "100%"
          }
        }
      },
      // ==============================================================
      // =                           Explain                          =
      // ==============================================================
      [t]: {
        "&-explain, &-extra": {
          clear: "both",
          color: e.colorTextDescription,
          fontSize: e.fontSize,
          lineHeight: e.lineHeight
        },
        "&-explain-connected": {
          width: "100%"
        },
        "&-extra": {
          minHeight: e.controlHeightSM,
          transition: `color ${e.motionDurationMid} ${e.motionEaseOut}`
          // sync input color transition
        },
        "&-explain": {
          "&-error": {
            color: e.colorError
          },
          "&-warning": {
            color: e.colorWarning
          }
        }
      },
      [`&-with-help ${t}-explain`]: {
        height: "auto",
        opacity: 1
      },
      // ==============================================================
      // =                        Feedback Icon                       =
      // ==============================================================
      [`${t}-feedback-icon`]: {
        fontSize: e.fontSize,
        textAlign: "center",
        visibility: "visible",
        animationName: Uv,
        animationDuration: e.motionDurationMid,
        animationTimingFunction: e.motionEaseOutBack,
        pointerEvents: "none",
        "&-success": {
          color: e.colorSuccess
        },
        "&-error": {
          color: e.colorError
        },
        "&-warning": {
          color: e.colorWarning
        },
        "&-validating": {
          color: e.colorPrimary
        }
      }
    })
  };
}, UB = (e) => {
  const {
    componentCls: t,
    formItemCls: n,
    rootPrefixCls: o
  } = e;
  return {
    [`${t}-horizontal`]: {
      [`${n}-label`]: {
        flexGrow: 0
      },
      [`${n}-control`]: {
        flex: "1 1 0",
        // https://github.com/ant-design/ant-design/issues/32777
        // https://github.com/ant-design/ant-design/issues/33773
        minWidth: 0
      },
      // https://github.com/ant-design/ant-design/issues/32980
      [`${n}-label.${o}-col-24 + ${n}-control`]: {
        minWidth: "unset"
      }
    }
  };
}, XB = (e) => {
  const {
    componentCls: t,
    formItemCls: n
  } = e;
  return {
    [`${t}-inline`]: {
      display: "flex",
      flexWrap: "wrap",
      [n]: {
        flex: "none",
        flexWrap: "nowrap",
        marginInlineEnd: e.margin,
        marginBottom: 0,
        "&-with-help": {
          marginBottom: e.marginLG
        },
        [`> ${n}-label,
        > ${n}-control`]: {
          display: "inline-block",
          verticalAlign: "top"
        },
        [`> ${n}-label`]: {
          flex: "none"
        },
        [`${t}-text`]: {
          display: "inline-block"
        },
        [`${n}-has-feedback`]: {
          display: "inline-block"
        }
      }
    }
  };
}, es = (e) => ({
  margin: 0,
  padding: `0 0 ${e.paddingXS}px`,
  whiteSpace: "initial",
  textAlign: "start",
  "> label": {
    margin: 0,
    "&::after": {
      display: "none"
    }
  }
}), QB = (e) => {
  const {
    componentCls: t,
    formItemCls: n
  } = e;
  return {
    [`${n} ${n}-label`]: es(e),
    [t]: {
      [n]: {
        flexWrap: "wrap",
        [`${n}-label,
          ${n}-control`]: {
          flex: "0 0 100%",
          maxWidth: "100%"
        }
      }
    }
  };
}, ZB = (e) => {
  const {
    componentCls: t,
    formItemCls: n,
    rootPrefixCls: o
  } = e;
  return {
    [`${t}-vertical`]: {
      [n]: {
        "&-row": {
          flexDirection: "column"
        },
        "&-label > label": {
          height: "auto"
        },
        [`${t}-item-control`]: {
          width: "100%"
        }
      }
    },
    [`${t}-vertical ${n}-label,
      .${o}-col-24${n}-label,
      .${o}-col-xl-24${n}-label`]: es(e),
    [`@media (max-width: ${e.screenXSMax}px)`]: [QB(e), {
      [t]: {
        [`.${o}-col-xs-24${n}-label`]: es(e)
      }
    }],
    [`@media (max-width: ${e.screenSMMax}px)`]: {
      [t]: {
        [`.${o}-col-sm-24${n}-label`]: es(e)
      }
    },
    [`@media (max-width: ${e.screenMDMax}px)`]: {
      [t]: {
        [`.${o}-col-md-24${n}-label`]: es(e)
      }
    },
    [`@media (max-width: ${e.screenLGMax}px)`]: {
      [t]: {
        [`.${o}-col-lg-24${n}-label`]: es(e)
      }
    }
  };
}, Dm = nn("Form", (e, t) => {
  let {
    rootPrefixCls: n
  } = t;
  const o = _t(e, {
    formItemCls: `${e.componentCls}-item`,
    rootPrefixCls: n
  });
  return [KB(o), YB(o), qB(o), UB(o), XB(o), ZB(o), Xv(o), Uv];
}), JB = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ErrorList",
  inheritAttrs: !1,
  props: ["errors", "help", "onErrorVisibleChanged", "helpStatus", "warnings"],
  setup(e, t) {
    let {
      attrs: n
    } = t;
    const {
      prefixCls: o,
      status: i
    } = LB(), r = R(() => `${o.value}-item-explain`), a = R(() => !!(e.errors && e.errors.length)), l = le(i.value), [, s] = Dm(o);
    return Ie([a, i], () => {
      a.value && (l.value = i.value);
    }), () => {
      var u, c;
      const d = lm(`${o.value}-show-help-item`), f = Av(`${o.value}-show-help-item`, d);
      return f.role = "alert", f.class = [s.value, r.value, n.class, `${o.value}-show-help`], v(Ti, Z(Z({}, xl(`${o.value}-show-help`)), {}, {
        onAfterEnter: () => e.onErrorVisibleChanged(!0),
        onAfterLeave: () => e.onErrorVisibleChanged(!1)
      }), {
        default: () => [Zi(v(Kh, Z(Z({}, f), {}, {
          tag: "div"
        }), {
          default: () => [(c = e.errors) === null || c === void 0 ? void 0 : c.map((p, m) => v("div", {
            key: m,
            class: l.value ? `${r.value}-${l.value}` : ""
          }, [p]))]
        }), [[mr, !!(!((u = e.errors) === null || u === void 0) && u.length)]])]
      });
    };
  }
}), e6 = ye({
  compatConfig: {
    MODE: 3
  },
  slots: Object,
  inheritAttrs: !1,
  props: ["prefixCls", "errors", "hasFeedback", "onDomErrorVisibleChange", "wrapperCol", "help", "extra", "status", "marginBottom", "onErrorVisibleChanged"],
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = km(), {
      wrapperCol: i
    } = o, r = I({}, o);
    return delete r.labelCol, delete r.wrapperCol, TP(r), BB({
      prefixCls: R(() => e.prefixCls),
      status: R(() => e.status)
    }), () => {
      var a, l, s;
      const {
        prefixCls: u,
        wrapperCol: c,
        marginBottom: d,
        onErrorVisibleChanged: f,
        help: p = (a = n.help) === null || a === void 0 ? void 0 : a.call(n),
        errors: m = Ko((l = n.errors) === null || l === void 0 ? void 0 : l.call(n)),
        // hasFeedback,
        // status,
        extra: b = (s = n.extra) === null || s === void 0 ? void 0 : s.call(n)
      } = e, y = `${u}-item`, S = c || i?.value || {}, C = Te(`${y}-control`, S.class);
      return v(Em, Z(Z({}, S), {}, {
        class: C
      }), {
        default: () => {
          var O;
          return v(Ve, null, [v("div", {
            class: `${y}-control-input`
          }, [v("div", {
            class: `${y}-control-input-content`
          }, [(O = n.default) === null || O === void 0 ? void 0 : O.call(n)])]), d !== null || m.length ? v("div", {
            style: {
              display: "flex",
              flexWrap: "nowrap"
            }
          }, [v(JB, {
            errors: m,
            help: p,
            class: `${y}-explain-connected`,
            onErrorVisibleChanged: f
          }, null), !!d && v("div", {
            style: {
              width: 0,
              height: `${d}px`
            }
          }, null)]) : null, b ? v("div", {
            class: `${y}-extra`
          }, [b]) : null]);
        }
      });
    };
  }
});
function t6(e) {
  const t = Pe(e.value.slice());
  let n = null;
  return Lt(() => {
    clearTimeout(n), n = setTimeout(() => {
      t.value = e.value;
    }, e.value.length ? 0 : 10);
  }), t;
}
li("success", "warning", "error", "validating", "");
const n6 = {
  success: Da,
  warning: za,
  error: fi,
  validating: yr
};
function jp(e, t, n) {
  let o = e;
  const i = t;
  let r = 0;
  try {
    for (let a = i.length; r < a - 1 && !(!o && !n); ++r) {
      const l = i[r];
      if (l in o)
        o = o[l];
      else {
        if (n)
          throw Error("please transfer a valid name path to form item!");
        break;
      }
    }
    if (n && !o)
      throw Error("please transfer a valid name path to form item!");
  } catch {
    console.error("please transfer a valid name path to form item!");
  }
  return {
    o,
    k: i[r],
    v: o ? o[i[r]] : void 0
  };
}
const o6 = () => ({
  htmlFor: String,
  prefixCls: String,
  label: ue.any,
  help: ue.any,
  extra: ue.any,
  labelCol: {
    type: Object
  },
  wrapperCol: {
    type: Object
  },
  hasFeedback: {
    type: Boolean,
    default: !1
  },
  colon: {
    type: Boolean,
    default: void 0
  },
  labelAlign: String,
  prop: {
    type: [String, Number, Array]
  },
  name: {
    type: [String, Number, Array]
  },
  rules: [Array, Object],
  autoLink: {
    type: Boolean,
    default: !0
  },
  required: {
    type: Boolean,
    default: void 0
  },
  validateFirst: {
    type: Boolean,
    default: void 0
  },
  validateStatus: ue.oneOf(li("", "success", "warning", "error", "validating")),
  validateTrigger: {
    type: [String, Array]
  },
  messageVariables: {
    type: Object
  },
  hidden: Boolean,
  noStyle: Boolean,
  tooltip: String
});
let i6 = 0;
const r6 = "form_item", a6 = ye({
  compatConfig: {
    MODE: 3
  },
  name: "AFormItem",
  inheritAttrs: !1,
  __ANT_NEW_FORM_ITEM: !0,
  props: o6(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      expose: i
    } = t;
    yo(e.prop === void 0, "`prop` is deprecated. Please use `name` instead.");
    const r = `form-item-${++i6}`, {
      prefixCls: a
    } = yt("form", e), [l, s] = Dm(a), u = Pe(), c = km(), d = R(() => e.name || e.prop), f = Pe([]), p = Pe(!1), m = Pe(), b = R(() => {
      const ge = d.value;
      return Eh(ge);
    }), y = R(() => {
      if (b.value.length) {
        const ge = c.name.value, de = b.value.join("_");
        return ge ? `${ge}_${de}` : `${r6}_${de}`;
      } else
        return;
    }), S = () => {
      const ge = c.model.value;
      if (!(!ge || !d.value))
        return jp(ge, b.value, !0).v;
    }, C = R(() => S()), O = Pe(td(C.value)), $ = R(() => {
      let ge = e.validateTrigger !== void 0 ? e.validateTrigger : c.validateTrigger.value;
      return ge = ge === void 0 ? "change" : ge, Oa(ge);
    }), P = R(() => {
      let ge = c.rules.value;
      const de = e.rules, ne = e.required !== void 0 ? {
        required: !!e.required,
        trigger: $.value
      } : [], we = jp(ge, b.value);
      ge = ge ? we.o[we.k] || we.v : [];
      const ae = [].concat(de || ge || []);
      return TO(ae, (se) => se.required) ? ae : ae.concat(ne);
    }), k = R(() => {
      const ge = P.value;
      let de = !1;
      return ge && ge.length && ge.every((ne) => ne.required ? (de = !0, !1) : !0), de || e.required;
    }), x = Pe();
    Lt(() => {
      x.value = e.validateStatus;
    });
    const E = R(() => {
      let ge = {};
      return typeof e.label == "string" ? ge.label = e.label : e.name && (ge.label = String(e.name)), e.messageVariables && (ge = I(I({}, ge), e.messageVariables)), ge;
    }), z = (ge) => {
      if (b.value.length === 0)
        return;
      const {
        validateFirst: de = !1
      } = e, {
        triggerName: ne
      } = ge || {};
      let we = P.value;
      if (ne && (we = we.filter((se) => {
        const {
          trigger: he
        } = se;
        return !he && !$.value.length ? !0 : Oa(he || $.value).includes(ne);
      })), !we.length)
        return Promise.resolve();
      const ae = IP(b.value, C.value, we, I({
        validateMessages: c.validateMessages.value
      }, ge), de, E.value);
      return x.value = "validating", f.value = [], ae.catch((se) => se).then(function() {
        let se = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
        if (x.value === "validating") {
          const he = se.filter((Me) => Me && Me.errors.length);
          x.value = he.length ? "error" : "success", f.value = he.map((Me) => Me.errors), c.onValidate(d.value, !f.value.length, f.value.length ? ii(f.value[0]) : null);
        }
      }), ae;
    }, N = () => {
      z({
        triggerName: "blur"
      });
    }, D = () => {
      if (p.value) {
        p.value = !1;
        return;
      }
      z({
        triggerName: "change"
      });
    }, W = () => {
      x.value = e.validateStatus, p.value = !1, f.value = [];
    }, H = () => {
      var ge;
      x.value = e.validateStatus, p.value = !0, f.value = [];
      const de = c.model.value || {}, ne = C.value, we = jp(de, b.value, !0);
      Array.isArray(ne) ? we.o[we.k] = [].concat((ge = O.value) !== null && ge !== void 0 ? ge : []) : we.o[we.k] = O.value, Nt(() => {
        p.value = !1;
      });
    }, L = R(() => e.htmlFor === void 0 ? y.value : e.htmlFor), A = () => {
      const ge = L.value;
      if (!ge || !m.value)
        return;
      const de = m.value.$el.querySelector(`[id="${ge}"]`);
      de && de.focus && de.focus();
    };
    i({
      onFieldBlur: N,
      onFieldChange: D,
      clearValidate: W,
      resetField: H
    }), DR({
      id: y,
      onFieldBlur: () => {
        e.autoLink && N();
      },
      onFieldChange: () => {
        e.autoLink && D();
      },
      clearValidate: W
    }, R(() => !!(e.autoLink && c.model.value && d.value)));
    let U = !1;
    Ie(d, (ge) => {
      ge ? U || (U = !0, c.addField(r, {
        fieldValue: C,
        fieldId: y,
        fieldName: d,
        resetField: H,
        clearValidate: W,
        namePath: b,
        validateRules: z,
        rules: P
      })) : (U = !1, c.removeField(r));
    }, {
      immediate: !0
    }), At(() => {
      c.removeField(r);
    });
    const j = t6(f), re = R(() => e.validateStatus !== void 0 ? e.validateStatus : j.value.length ? "error" : x.value), G = R(() => ({
      [`${a.value}-item`]: !0,
      [s.value]: !0,
      // Status
      [`${a.value}-item-has-feedback`]: re.value && e.hasFeedback,
      [`${a.value}-item-has-success`]: re.value === "success",
      [`${a.value}-item-has-warning`]: re.value === "warning",
      [`${a.value}-item-has-error`]: re.value === "error",
      [`${a.value}-item-is-validating`]: re.value === "validating",
      [`${a.value}-item-hidden`]: e.hidden
    })), Y = Dn({});
    ui.useProvide(Y), Lt(() => {
      let ge;
      if (e.hasFeedback) {
        const de = re.value && n6[re.value];
        ge = de ? v("span", {
          class: Te(`${a.value}-item-feedback-icon`, `${a.value}-item-feedback-icon-${re.value}`)
        }, [v(de, null, null)]) : null;
      }
      I(Y, {
        status: re.value,
        hasFeedback: e.hasFeedback,
        feedbackIcon: ge,
        isFormItemInput: !0
      });
    });
    const K = Pe(null), J = Pe(!1), be = () => {
      if (u.value) {
        const ge = getComputedStyle(u.value);
        K.value = parseInt(ge.marginBottom, 10);
      }
    };
    Pt(() => {
      Ie(J, () => {
        J.value && be();
      }, {
        flush: "post",
        immediate: !0
      });
    });
    const xe = (ge) => {
      ge || (K.value = null);
    };
    return () => {
      var ge, de;
      if (e.noStyle) return (ge = n.default) === null || ge === void 0 ? void 0 : ge.call(n);
      const ne = (de = e.help) !== null && de !== void 0 ? de : n.help ? Ko(n.help()) : null, we = !!(ne != null && Array.isArray(ne) && ne.length || j.value.length);
      return J.value = we, l(v("div", {
        class: [G.value, we ? `${a.value}-item-with-help` : "", o.class],
        ref: u
      }, [v(wP, Z(Z({}, o), {}, {
        class: `${a.value}-item-row`,
        key: "row"
      }), {
        default: () => {
          var ae, se;
          return v(Ve, null, [v(Am, Z(Z({}, e), {}, {
            htmlFor: L.value,
            required: k.value,
            requiredMark: c.requiredMark.value,
            prefixCls: a.value,
            onClick: A,
            label: e.label
          }), {
            label: n.label,
            tooltip: n.tooltip
          }), v(e6, Z(Z({}, e), {}, {
            errors: ne != null ? Oa(ne) : j.value,
            marginBottom: K.value,
            prefixCls: a.value,
            status: re.value,
            ref: m,
            help: ne,
            extra: (ae = e.extra) !== null && ae !== void 0 ? ae : (se = n.extra) === null || se === void 0 ? void 0 : se.call(n),
            onErrorVisibleChanged: xe
          }), {
            default: n.default
          })]);
        }
      }), !!K.value && v("div", {
        class: `${a.value}-margin-offset`,
        style: {
          marginBottom: `-${K.value}px`
        }
      }, null)]));
    };
  }
});
function EP(e) {
  let t = !1, n = e.length;
  const o = [];
  return e.length ? new Promise((i, r) => {
    e.forEach((a, l) => {
      a.catch((s) => (t = !0, s)).then((s) => {
        n -= 1, o[l] = s, !(n > 0) && (t && r(o), i(o));
      });
    });
  }) : Promise.resolve([]);
}
function $x(e) {
  let t = !1;
  return e && e.length && e.every((n) => n.required ? (t = !0, !1) : !0), t;
}
function Px(e) {
  return e == null ? [] : Array.isArray(e) ? e : [e];
}
function Wp(e, t, n) {
  let o = e;
  t = t.replace(/\[(\w+)\]/g, ".$1"), t = t.replace(/^\./, "");
  const i = t.split(".");
  let r = 0;
  for (let a = i.length; r < a - 1 && !(!o && !n); ++r) {
    const l = i[r];
    if (l in o)
      o = o[l];
    else {
      if (n)
        throw new Error("please transfer a valid name path to validate!");
      break;
    }
  }
  return {
    o,
    k: i[r],
    v: o ? o[i[r]] : null,
    isValid: o && i[r] in o
  };
}
function l6(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : le({}), n = arguments.length > 2 ? arguments[2] : void 0;
  const o = td(M(e)), i = Dn({}), r = Pe([]), a = (O) => {
    I(M(e), I(I({}, td(o)), O)), Nt(() => {
      Object.keys(i).forEach(($) => {
        i[$] = {
          autoLink: !1,
          required: $x(M(t)[$])
        };
      });
    });
  }, l = function() {
    let O = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], $ = arguments.length > 1 ? arguments[1] : void 0;
    return $.length ? O.filter((P) => {
      const k = Px(P.trigger || "change");
      return kO(k, $).length;
    }) : O;
  };
  let s = null;
  const u = function(O) {
    let $ = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, P = arguments.length > 2 ? arguments[2] : void 0;
    const k = [], x = {};
    for (let N = 0; N < O.length; N++) {
      const D = O[N], W = Wp(M(e), D, P);
      if (!W.isValid) continue;
      x[D] = W.v;
      const H = l(M(t)[D], Px($ && $.trigger));
      H.length && k.push(c(D, W.v, H, $ || {}).then(() => ({
        name: D,
        errors: [],
        warnings: []
      })).catch((L) => {
        const A = [], U = [];
        return L.forEach((j) => {
          let {
            rule: {
              warningOnly: re
            },
            errors: G
          } = j;
          re ? U.push(...G) : A.push(...G);
        }), A.length ? Promise.reject({
          name: D,
          errors: A,
          warnings: U
        }) : {
          name: D,
          errors: A,
          warnings: U
        };
      }));
    }
    const E = EP(k);
    s = E;
    const z = E.then(() => s === E ? Promise.resolve(x) : Promise.reject([])).catch((N) => {
      const D = N.filter((W) => W && W.errors.length);
      return D.length ? Promise.reject({
        values: x,
        errorFields: D,
        outOfDate: s !== E
      }) : Promise.resolve(x);
    });
    return z.catch((N) => N), z;
  }, c = function(O, $, P) {
    let k = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
    const x = IP([O], $, P, I({
      validateMessages: Rf
    }, k), !!k.validateFirst);
    return i[O] ? (i[O].validateStatus = "validating", x.catch((E) => E).then(function() {
      let E = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
      var z;
      if (i[O].validateStatus === "validating") {
        const N = E.filter((D) => D && D.errors.length);
        i[O].validateStatus = N.length ? "error" : "success", i[O].help = N.length ? N.map((D) => D.errors) : null, (z = n?.onValidate) === null || z === void 0 || z.call(n, O, !N.length, N.length ? ii(i[O].help[0]) : null);
      }
    }), x) : x.catch((E) => E);
  }, d = (O, $) => {
    let P = [], k = !0;
    O ? Array.isArray(O) ? P = O : P = [O] : (k = !1, P = r.value);
    const x = u(P, $ || {}, k);
    return x.catch((E) => E), x;
  }, f = (O) => {
    let $ = [];
    O ? Array.isArray(O) ? $ = O : $ = [O] : $ = r.value, $.forEach((P) => {
      i[P] && I(i[P], {
        validateStatus: "",
        help: null
      });
    });
  }, p = (O) => {
    const $ = {
      autoLink: !1
    }, P = [], k = Array.isArray(O) ? O : [O];
    for (let x = 0; x < k.length; x++) {
      const E = k[x];
      E?.validateStatus === "error" && ($.validateStatus = "error", E.help && P.push(E.help)), $.required = $.required || E?.required;
    }
    return $.help = P, $;
  };
  let m = o, b = !0;
  const y = (O) => {
    const $ = [];
    r.value.forEach((P) => {
      const k = Wp(O, P, !1), x = Wp(m, P, !1);
      (b && n?.immediate && k.isValid || !Uh(k.v, x.v)) && $.push(P);
    }), d($, {
      trigger: "change"
    }), b = !1, m = td(ii(O));
  }, S = n?.debounce;
  let C = !0;
  return Ie(t, () => {
    r.value = t ? Object.keys(M(t)) : [], !C && n && n.validateOnRuleChange && d(), C = !1;
  }, {
    deep: !0,
    immediate: !0
  }), Ie(r, () => {
    const O = {};
    r.value.forEach(($) => {
      O[$] = I({}, i[$], {
        autoLink: !1,
        required: $x(M(t)[$])
      }), delete i[$];
    });
    for (const $ in i)
      Object.prototype.hasOwnProperty.call(i, $) && delete i[$];
    I(i, O);
  }, {
    immediate: !0
  }), Ie(e, S && S.wait ? EO(y, S.wait, _O(S, ["wait"])) : y, {
    immediate: n && !!n.immediate,
    deep: !0
  }), {
    modelRef: e,
    rulesRef: t,
    initialModel: o,
    validateInfos: i,
    resetFields: a,
    validate: d,
    validateField: c,
    mergeValidateInfo: p,
    clearValidate: f
  };
}
const s6 = () => ({
  layout: ue.oneOf(li("horizontal", "inline", "vertical")),
  labelCol: Ct(),
  wrapperCol: Ct(),
  colon: st(),
  labelAlign: dn(),
  labelWrap: st(),
  prefixCls: String,
  requiredMark: tn([String, Boolean]),
  /** @deprecated Will warning in future branch. Pls use `requiredMark` instead. */
  hideRequiredMark: st(),
  model: ue.object,
  rules: Ct(),
  validateMessages: Ct(),
  validateOnRuleChange: st(),
  // 提交失败自动滚动到第一个错误字段
  scrollToFirstError: ni(),
  onSubmit: Qe(),
  name: String,
  validateTrigger: tn([String, Array]),
  size: dn(),
  disabled: st(),
  onValuesChange: Qe(),
  onFieldsChange: Qe(),
  onFinish: Qe(),
  onFinishFailed: Qe(),
  onValidate: Qe()
});
function u6(e, t) {
  return Uh(Oa(e), Oa(t));
}
const ba = ye({
  compatConfig: {
    MODE: 3
  },
  name: "AForm",
  inheritAttrs: !1,
  props: wn(s6(), {
    layout: "horizontal",
    hideRequiredMark: !1,
    colon: !0
  }),
  Item: a6,
  useForm: l6,
  // emits: ['finishFailed', 'submit', 'finish', 'validate'],
  setup(e, t) {
    let {
      emit: n,
      slots: o,
      expose: i,
      attrs: r
    } = t;
    const {
      prefixCls: a,
      direction: l,
      form: s,
      size: u,
      disabled: c
    } = yt("form", e), d = R(() => e.requiredMark === "" || e.requiredMark), f = R(() => {
      var j;
      return d.value !== void 0 ? d.value : s && ((j = s.value) === null || j === void 0 ? void 0 : j.requiredMark) !== void 0 ? s.value.requiredMark : !e.hideRequiredMark;
    });
    oC(u), CS(c);
    const p = R(() => {
      var j, re;
      return (j = e.colon) !== null && j !== void 0 ? j : (re = s.value) === null || re === void 0 ? void 0 : re.colon;
    }), {
      validateMessages: m
    } = pE(), b = R(() => I(I(I({}, Rf), m.value), e.validateMessages)), [y, S] = Dm(a), C = R(() => Te(a.value, {
      [`${a.value}-${e.layout}`]: !0,
      [`${a.value}-hide-required-mark`]: f.value === !1,
      [`${a.value}-rtl`]: l.value === "rtl",
      [`${a.value}-${u.value}`]: u.value
    }, S.value)), O = le(), $ = {}, P = (j, re) => {
      $[j] = re;
    }, k = (j) => {
      delete $[j];
    }, x = (j) => {
      const re = !!j, G = re ? Oa(j).map(Eh) : [];
      return re ? Object.values($).filter((Y) => G.findIndex((K) => u6(K, Y.fieldName.value)) > -1) : Object.values($);
    }, E = (j) => {
      if (!e.model) {
        Zn(!1, "Form", "model is required for resetFields to work.");
        return;
      }
      x(j).forEach((re) => {
        re.resetField();
      });
    }, z = (j) => {
      x(j).forEach((re) => {
        re.clearValidate();
      });
    }, N = (j) => {
      const {
        scrollToFirstError: re
      } = e;
      if (n("finishFailed", j), re && j.errorFields.length) {
        let G = {};
        typeof re == "object" && (G = re), W(j.errorFields[0].name, G);
      }
    }, D = function() {
      return A(...arguments);
    }, W = function(j) {
      let re = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      const G = x(j ? [j] : void 0);
      if (G.length) {
        const Y = G[0].fieldId.value, K = Y ? document.getElementById(Y) : null;
        K && aA(K, I({
          scrollMode: "if-needed",
          block: "nearest"
        }, re));
      }
    }, H = function() {
      let j = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
      if (j === !0) {
        const re = [];
        return Object.values($).forEach((G) => {
          let {
            namePath: Y
          } = G;
          re.push(Y.value);
        }), wx(e.model, re);
      } else
        return wx(e.model, j);
    }, L = (j, re) => {
      if (Zn(!(j instanceof Function), "Form", "validateFields/validateField/validate not support callback, please use promise instead"), !e.model)
        return Zn(!1, "Form", "model is required for validateFields to work."), Promise.reject("Form `model` is required for validateFields to work.");
      const G = !!j, Y = G ? Oa(j).map(Eh) : [], K = [];
      Object.values($).forEach((xe) => {
        var ge;
        if (G || Y.push(xe.namePath.value), !(!((ge = xe.rules) === null || ge === void 0) && ge.value.length))
          return;
        const de = xe.namePath.value;
        if (!G || EB(Y, de)) {
          const ne = xe.validateRules(I({
            validateMessages: b.value
          }, re));
          K.push(ne.then(() => ({
            name: de,
            errors: [],
            warnings: []
          })).catch((we) => {
            const ae = [], se = [];
            return we.forEach((he) => {
              let {
                rule: {
                  warningOnly: Me
                },
                errors: ke
              } = he;
              Me ? se.push(...ke) : ae.push(...ke);
            }), ae.length ? Promise.reject({
              name: de,
              errors: ae,
              warnings: se
            }) : {
              name: de,
              errors: ae,
              warnings: se
            };
          }));
        }
      });
      const J = EP(K);
      O.value = J;
      const be = J.then(() => O.value === J ? Promise.resolve(H(Y)) : Promise.reject([])).catch((xe) => {
        const ge = xe.filter((de) => de && de.errors.length);
        return Promise.reject({
          values: H(Y),
          errorFields: ge,
          outOfDate: O.value !== J
        });
      });
      return be.catch((xe) => xe), be;
    }, A = function() {
      return L(...arguments);
    }, U = (j) => {
      j.preventDefault(), j.stopPropagation(), n("submit", j), e.model && L().then((G) => {
        n("finish", G);
      }).catch((G) => {
        N(G);
      });
    };
    return i({
      resetFields: E,
      clearValidate: z,
      validateFields: L,
      getFieldsValue: H,
      validate: D,
      scrollToField: W
    }), TP({
      model: R(() => e.model),
      name: R(() => e.name),
      labelAlign: R(() => e.labelAlign),
      labelCol: R(() => e.labelCol),
      labelWrap: R(() => e.labelWrap),
      wrapperCol: R(() => e.wrapperCol),
      vertical: R(() => e.layout === "vertical"),
      colon: p,
      requiredMark: f,
      validateTrigger: R(() => e.validateTrigger),
      rules: R(() => e.rules),
      addField: P,
      removeField: k,
      onValidate: (j, re, G) => {
        n("validate", j, re, G);
      },
      validateMessages: b
    }), Ie(() => e.rules, () => {
      e.validateOnRuleChange && L();
    }), () => {
      var j;
      return y(v("form", Z(Z({}, r), {}, {
        onSubmit: U,
        class: [C.value, r.class]
      }), [(j = o.default) === null || j === void 0 ? void 0 : j.call(o)]));
    };
  }
});
ba.useInjectFormItemContext = pi;
ba.ItemRest = lh;
ba.install = function(e) {
  return e.component(ba.name, ba), e.component(ba.Item.name, ba.Item), e.component(lh.name, lh), e;
};
const c6 = new Bt("antCheckboxEffect", {
  "0%": {
    transform: "scale(1)",
    opacity: 0.5
  },
  "100%": {
    transform: "scale(1.6)",
    opacity: 0
  }
}), d6 = (e) => {
  const {
    checkboxCls: t
  } = e, n = `${t}-wrapper`;
  return [
    // ===================== Basic =====================
    {
      // Group
      [`${t}-group`]: I(I({}, Zt(e)), {
        display: "inline-flex",
        flexWrap: "wrap",
        columnGap: e.marginXS,
        // Group > Grid
        [`> ${e.antCls}-row`]: {
          flex: 1
        }
      }),
      // Wrapper
      [n]: I(I({}, Zt(e)), {
        display: "inline-flex",
        alignItems: "baseline",
        cursor: "pointer",
        // Fix checkbox & radio in flex align #30260
        "&:after": {
          display: "inline-block",
          width: 0,
          overflow: "hidden",
          content: "'\\a0'"
        },
        // Checkbox near checkbox
        [`& + ${n}`]: {
          marginInlineStart: 0
        },
        [`&${n}-in-form-item`]: {
          'input[type="checkbox"]': {
            width: 14,
            height: 14
            // FIXME: magic
          }
        }
      }),
      // Wrapper > Checkbox
      [t]: I(I({}, Zt(e)), {
        position: "relative",
        whiteSpace: "nowrap",
        lineHeight: 1,
        cursor: "pointer",
        // To make alignment right when `controlHeight` is changed
        // Ref: https://github.com/ant-design/ant-design/issues/41564
        alignSelf: "center",
        // Wrapper > Checkbox > input
        [`${t}-input`]: {
          position: "absolute",
          // Since baseline align will get additional space offset,
          // we need to move input to top to make it align with text.
          // Ref: https://github.com/ant-design/ant-design/issues/38926#issuecomment-1486137799
          inset: 0,
          zIndex: 1,
          cursor: "pointer",
          opacity: 0,
          margin: 0,
          [`&:focus-visible + ${t}-inner`]: I({}, Xu(e))
        },
        // Wrapper > Checkbox > inner
        [`${t}-inner`]: {
          boxSizing: "border-box",
          position: "relative",
          top: 0,
          insetInlineStart: 0,
          display: "block",
          width: e.checkboxSize,
          height: e.checkboxSize,
          direction: "ltr",
          backgroundColor: e.colorBgContainer,
          border: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,
          borderRadius: e.borderRadiusSM,
          borderCollapse: "separate",
          transition: `all ${e.motionDurationSlow}`,
          "&:after": {
            boxSizing: "border-box",
            position: "absolute",
            top: "50%",
            insetInlineStart: "21.5%",
            display: "table",
            width: e.checkboxSize / 14 * 5,
            height: e.checkboxSize / 14 * 8,
            border: `${e.lineWidthBold}px solid ${e.colorWhite}`,
            borderTop: 0,
            borderInlineStart: 0,
            transform: "rotate(45deg) scale(0) translate(-50%,-50%)",
            opacity: 0,
            content: '""',
            transition: `all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`
          }
        },
        // Wrapper > Checkbox + Text
        "& + span": {
          paddingInlineStart: e.paddingXS,
          paddingInlineEnd: e.paddingXS
        }
      })
    },
    // ================= Indeterminate =================
    {
      [t]: {
        "&-indeterminate": {
          // Wrapper > Checkbox > inner
          [`${t}-inner`]: {
            "&:after": {
              top: "50%",
              insetInlineStart: "50%",
              width: e.fontSizeLG / 2,
              height: e.fontSizeLG / 2,
              backgroundColor: e.colorPrimary,
              border: 0,
              transform: "translate(-50%, -50%) scale(1)",
              opacity: 1,
              content: '""'
            }
          }
        }
      }
    },
    // ===================== Hover =====================
    {
      // Wrapper
      [`${n}:hover ${t}:after`]: {
        visibility: "visible"
      },
      // Wrapper & Wrapper > Checkbox
      [`
        ${n}:not(${n}-disabled),
        ${t}:not(${t}-disabled)
      `]: {
        [`&:hover ${t}-inner`]: {
          borderColor: e.colorPrimary
        }
      },
      [`${n}:not(${n}-disabled)`]: {
        [`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]: {
          backgroundColor: e.colorPrimaryHover,
          borderColor: "transparent"
        },
        [`&:hover ${t}-checked:not(${t}-disabled):after`]: {
          borderColor: e.colorPrimaryHover
        }
      }
    },
    // ==================== Checked ====================
    {
      // Wrapper > Checkbox
      [`${t}-checked`]: {
        [`${t}-inner`]: {
          backgroundColor: e.colorPrimary,
          borderColor: e.colorPrimary,
          "&:after": {
            opacity: 1,
            transform: "rotate(45deg) scale(1) translate(-50%,-50%)",
            transition: `all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`
          }
        },
        // Checked Effect
        "&:after": {
          position: "absolute",
          top: 0,
          insetInlineStart: 0,
          width: "100%",
          height: "100%",
          borderRadius: e.borderRadiusSM,
          visibility: "hidden",
          border: `${e.lineWidthBold}px solid ${e.colorPrimary}`,
          animationName: c6,
          animationDuration: e.motionDurationSlow,
          animationTimingFunction: "ease-in-out",
          animationFillMode: "backwards",
          content: '""',
          transition: `all ${e.motionDurationSlow}`
        }
      },
      [`
        ${n}-checked:not(${n}-disabled),
        ${t}-checked:not(${t}-disabled)
      `]: {
        [`&:hover ${t}-inner`]: {
          backgroundColor: e.colorPrimaryHover,
          borderColor: "transparent"
        },
        [`&:hover ${t}:after`]: {
          borderColor: e.colorPrimaryHover
        }
      }
    },
    // ==================== Disable ====================
    {
      // Wrapper
      [`${n}-disabled`]: {
        cursor: "not-allowed"
      },
      // Wrapper > Checkbox
      [`${t}-disabled`]: {
        // Wrapper > Checkbox > input
        [`&, ${t}-input`]: {
          cursor: "not-allowed",
          // Disabled for native input to enable Tooltip event handler
          // ref: https://github.com/ant-design/ant-design/issues/39822#issuecomment-1365075901
          pointerEvents: "none"
        },
        // Wrapper > Checkbox > inner
        [`${t}-inner`]: {
          background: e.colorBgContainerDisabled,
          borderColor: e.colorBorder,
          "&:after": {
            borderColor: e.colorTextDisabled
          }
        },
        "&:after": {
          display: "none"
        },
        "& + span": {
          color: e.colorTextDisabled
        },
        [`&${t}-indeterminate ${t}-inner::after`]: {
          background: e.colorTextDisabled
        }
      }
    }
  ];
};
function f6(e, t) {
  const n = _t(t, {
    checkboxCls: `.${e}`,
    checkboxSize: t.controlInteractiveSize
  });
  return [d6(n)];
}
const _P = nn("Checkbox", (e, t) => {
  let {
    prefixCls: n
  } = t;
  return [f6(n, e)];
}), p6 = () => ({
  name: String,
  prefixCls: String,
  options: Po([]),
  disabled: Boolean,
  id: String
}), g6 = () => I(I({}, p6()), {
  defaultValue: Po(),
  value: Po(),
  onChange: Qe(),
  "onUpdate:value": Qe()
}), h6 = () => ({
  prefixCls: String,
  defaultChecked: st(),
  checked: st(),
  disabled: st(),
  isGroup: st(),
  value: ue.any,
  name: String,
  id: String,
  indeterminate: st(),
  type: dn("checkbox"),
  autofocus: st(),
  onChange: Qe(),
  "onUpdate:checked": Qe(),
  onClick: Qe(),
  skipGroup: st(!1)
}), v6 = () => I(I({}, h6()), {
  indeterminate: st(!1)
}), AP = Symbol("CheckboxGroupContext");
var Ox = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const ai = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ACheckbox",
  inheritAttrs: !1,
  __ANT_CHECKBOX: !0,
  props: v6(),
  // emits: ['change', 'update:checked'],
  setup(e, t) {
    let {
      emit: n,
      attrs: o,
      slots: i,
      expose: r
    } = t;
    const a = pi(), l = ui.useInject(), {
      prefixCls: s,
      direction: u,
      disabled: c
    } = yt("checkbox", e), d = Ji(), [f, p] = _P(s), m = Tt(AP, void 0), b = Symbol("checkboxUniId"), y = R(() => m?.disabled.value || c.value);
    Lt(() => {
      !e.skipGroup && m && m.registerValue(b, e.value);
    }), At(() => {
      m && m.cancelValue(b);
    }), Pt(() => {
      Zn(!!(e.checked !== void 0 || m || e.value === void 0), "Checkbox", "`value` is not validate prop, do you mean `checked`?");
    });
    const S = (P) => {
      const k = P.target.checked;
      n("update:checked", k), n("change", P), a.onFieldChange();
    }, C = le();
    return r({
      focus: () => {
        var P;
        (P = C.value) === null || P === void 0 || P.focus();
      },
      blur: () => {
        var P;
        (P = C.value) === null || P === void 0 || P.blur();
      }
    }), () => {
      var P;
      const k = no((P = i.default) === null || P === void 0 ? void 0 : P.call(i)), {
        indeterminate: x,
        skipGroup: E,
        id: z = a.id.value
      } = e, N = Ox(e, ["indeterminate", "skipGroup", "id"]), {
        onMouseenter: D,
        onMouseleave: W,
        onInput: H,
        class: L,
        style: A
      } = o, U = Ox(o, ["onMouseenter", "onMouseleave", "onInput", "class", "style"]), j = I(I(I(I({}, N), {
        id: z,
        prefixCls: s.value
      }), U), {
        disabled: y.value
      });
      m && !E ? (j.onChange = function() {
        for (var K = arguments.length, J = new Array(K), be = 0; be < K; be++)
          J[be] = arguments[be];
        n("change", ...J), m.toggleOption({
          label: k,
          value: e.value
        });
      }, j.name = m.name.value, j.checked = m.mergedValue.value.includes(e.value), j.disabled = y.value || d.value, j.indeterminate = x) : j.onChange = S;
      const re = Te({
        [`${s.value}-wrapper`]: !0,
        [`${s.value}-rtl`]: u.value === "rtl",
        [`${s.value}-wrapper-checked`]: j.checked,
        [`${s.value}-wrapper-disabled`]: j.disabled,
        [`${s.value}-wrapper-in-form-item`]: l.isFormItemInput
      }, L, p.value), G = Te({
        [`${s.value}-indeterminate`]: x
      }, p.value);
      return f(v("label", {
        class: re,
        style: A,
        onMouseenter: D,
        onMouseleave: W
      }, [v(Q$, Z(Z({
        "aria-checked": x ? "mixed" : void 0
      }, j), {}, {
        class: G,
        ref: C
      }), null), k.length ? v("span", null, [k]) : null]));
    };
  }
}), Ah = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ACheckboxGroup",
  inheritAttrs: !1,
  props: g6(),
  // emits: ['change', 'update:value'],
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      emit: i,
      expose: r
    } = t;
    const a = pi(), {
      prefixCls: l,
      direction: s
    } = yt("checkbox", e), u = R(() => `${l.value}-group`), [c, d] = _P(u), f = le((e.value === void 0 ? e.defaultValue : e.value) || []);
    Ie(() => e.value, () => {
      f.value = e.value || [];
    });
    const p = R(() => e.options.map(($) => typeof $ == "string" || typeof $ == "number" ? {
      label: $,
      value: $
    } : $)), m = le(Symbol()), b = le(/* @__PURE__ */ new Map()), y = ($) => {
      b.value.delete($), m.value = Symbol();
    }, S = ($, P) => {
      b.value.set($, P), m.value = Symbol();
    }, C = le(/* @__PURE__ */ new Map());
    return Ie(m, () => {
      const $ = /* @__PURE__ */ new Map();
      for (const P of b.value.values())
        $.set(P, !0);
      C.value = $;
    }), kt(AP, {
      cancelValue: y,
      registerValue: S,
      toggleOption: ($) => {
        const P = f.value.indexOf($.value), k = [...f.value];
        P === -1 ? k.push($.value) : k.splice(P, 1), e.value === void 0 && (f.value = k);
        const x = k.filter((E) => C.value.has(E)).sort((E, z) => {
          const N = p.value.findIndex((W) => W.value === E), D = p.value.findIndex((W) => W.value === z);
          return N - D;
        });
        i("update:value", x), i("change", x), a.onFieldChange();
      },
      mergedValue: f,
      name: R(() => e.name),
      disabled: R(() => e.disabled)
    }), r({
      mergedValue: f
    }), () => {
      var $;
      const {
        id: P = a.id.value
      } = e;
      let k = null;
      return p.value && p.value.length > 0 && (k = p.value.map((x) => {
        var E;
        return v(ai, {
          prefixCls: l.value,
          key: x.value.toString(),
          disabled: "disabled" in x ? x.disabled : e.disabled,
          indeterminate: x.indeterminate,
          value: x.value,
          checked: f.value.indexOf(x.value) !== -1,
          onChange: x.onChange,
          class: `${u.value}-item`
        }, {
          default: () => [n.label !== void 0 ? (E = n.label) === null || E === void 0 ? void 0 : E.call(n, x) : x.label]
        });
      })), c(v("div", Z(Z({}, o), {}, {
        class: [u.value, {
          [`${u.value}-rtl`]: s.value === "rtl"
        }, o.class, d.value],
        id: P
      }), [k || (($ = n.default) === null || $ === void 0 ? void 0 : $.call(n))]));
    };
  }
});
ai.Group = Ah;
ai.install = function(e) {
  return e.component(ai.name, ai), e.component(Ah.name, Ah), e;
};
const m6 = er(Em);
let vd = I({}, Ta.Modal);
function b6(e) {
  e ? vd = I(I({}, vd), e) : vd = I({}, Ta.Modal);
}
function y6() {
  return vd;
}
const Dh = "internalMark", md = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ALocaleProvider",
  props: {
    locale: {
      type: Object
    },
    ANT_MARK__: String
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    Zn(e.ANT_MARK__ === Dh, "LocaleProvider", "`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead");
    const o = Dn({
      antLocale: I(I({}, e.locale), {
        exist: !0
      }),
      ANT_MARK__: Dh
    });
    return kt("localeData", o), Ie(() => e.locale, (i) => {
      b6(i && i.Modal), o.antLocale = I(I({}, i), {
        exist: !0
      });
    }, {
      immediate: !0
    }), () => {
      var i;
      return (i = n.default) === null || i === void 0 ? void 0 : i.call(n);
    };
  }
});
md.install = function(e) {
  return e.component(md.name, md), e;
};
const x6 = er(md), Bf = ye({
  name: "Notice",
  inheritAttrs: !1,
  props: ["prefixCls", "duration", "updateMark", "noticeKey", "closeIcon", "closable", "props", "onClick", "onClose", "holder", "visible"],
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t, i, r = !1;
    const a = R(() => e.duration === void 0 ? 4.5 : e.duration), l = () => {
      a.value && !r && (i = setTimeout(() => {
        u();
      }, a.value * 1e3));
    }, s = () => {
      i && (clearTimeout(i), i = null);
    }, u = (d) => {
      d && d.stopPropagation(), s();
      const {
        onClose: f,
        noticeKey: p
      } = e;
      f && f(p);
    }, c = () => {
      s(), l();
    };
    return Pt(() => {
      l();
    }), Lo(() => {
      r = !0, s();
    }), Ie([a, () => e.updateMark, () => e.visible], (d, f) => {
      let [p, m, b] = d, [y, S, C] = f;
      (p !== y || m !== S || b !== C && C) && c();
    }, {
      flush: "post"
    }), () => {
      var d, f;
      const {
        prefixCls: p,
        closable: m,
        closeIcon: b = (d = o.closeIcon) === null || d === void 0 ? void 0 : d.call(o),
        onClick: y,
        holder: S
      } = e, {
        class: C,
        style: O
      } = n, $ = `${p}-notice`, P = Object.keys(n).reduce((x, E) => ((E.startsWith("data-") || E.startsWith("aria-") || E === "role") && (x[E] = n[E]), x), {}), k = v("div", Z({
        class: Te($, C, {
          [`${$}-closable`]: m
        }),
        style: O,
        onMouseenter: s,
        onMouseleave: l,
        onClick: y
      }, P), [v("div", {
        class: `${$}-content`
      }, [(f = o.default) === null || f === void 0 ? void 0 : f.call(o)]), m ? v("a", {
        tabindex: 0,
        onClick: u,
        class: `${$}-close`
      }, [b || v("span", {
        class: `${$}-close-x`
      }, null)]) : null]);
      return S ? v(Qd, {
        to: S
      }, {
        default: () => k
      }) : k;
    };
  }
});
var w6 = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
let Ix = 0;
const S6 = Date.now();
function Mx() {
  const e = Ix;
  return Ix += 1, `rcNotification_${S6}_${e}`;
}
const Gd = ye({
  name: "Notification",
  inheritAttrs: !1,
  props: ["prefixCls", "transitionName", "animation", "maxCount", "closeIcon", "hashId"],
  setup(e, t) {
    let {
      attrs: n,
      expose: o,
      slots: i
    } = t;
    const r = /* @__PURE__ */ new Map(), a = le([]), l = R(() => {
      const {
        prefixCls: c,
        animation: d = "fade"
      } = e;
      let f = e.transitionName;
      return !f && d && (f = `${c}-${d}`), Av(f);
    }), s = (c, d) => {
      const f = c.key || Mx(), p = I(I({}, c), {
        key: f
      }), {
        maxCount: m
      } = e, b = a.value.map((S) => S.notice.key).indexOf(f), y = a.value.concat();
      b !== -1 ? y.splice(b, 1, {
        notice: p,
        holderCallback: d
      }) : (m && a.value.length >= m && (p.key = y[0].notice.key, p.updateMark = Mx(), p.userPassKey = f, y.shift()), y.push({
        notice: p,
        holderCallback: d
      })), a.value = y;
    }, u = (c) => {
      a.value = ii(a.value).filter((d) => {
        let {
          notice: {
            key: f,
            userPassKey: p
          }
        } = d;
        return (p || f) !== c;
      });
    };
    return o({
      add: s,
      remove: u,
      notices: a
    }), () => {
      var c;
      const {
        prefixCls: d,
        closeIcon: f = (c = i.closeIcon) === null || c === void 0 ? void 0 : c.call(i, {
          prefixCls: d
        })
      } = e, p = a.value.map((b, y) => {
        let {
          notice: S,
          holderCallback: C
        } = b;
        const O = y === a.value.length - 1 ? S.updateMark : void 0, {
          key: $,
          userPassKey: P
        } = S, {
          content: k
        } = S, x = I(I(I({
          prefixCls: d,
          closeIcon: typeof f == "function" ? f({
            prefixCls: d
          }) : f
        }, S), S.props), {
          key: $,
          noticeKey: P || $,
          updateMark: O,
          onClose: (E) => {
            var z;
            u(E), (z = S.onClose) === null || z === void 0 || z.call(S);
          },
          onClick: S.onClick
        });
        return C ? v("div", {
          key: $,
          class: `${d}-hook-holder`,
          ref: (E) => {
            typeof $ > "u" || (E ? (r.set($, E), C(E, x)) : r.delete($));
          }
        }, null) : v(Bf, Z(Z({}, x), {}, {
          class: Te(x.class, e.hashId)
        }), {
          default: () => [typeof k == "function" ? k({
            prefixCls: d
          }) : k]
        });
      }), m = {
        [d]: 1,
        [n.class]: !!n.class,
        [e.hashId]: !0
      };
      return v("div", {
        class: m,
        style: n.style || {
          top: "65px",
          left: "50%"
        }
      }, [v(Kh, Z({
        tag: "div"
      }, l.value), {
        default: () => [p]
      })]);
    };
  }
});
Gd.newInstance = function(t, n) {
  const o = t || {}, {
    name: i = "notification",
    getContainer: r,
    appContext: a,
    prefixCls: l,
    rootPrefixCls: s,
    transitionName: u,
    hasTransitionName: c,
    useStyle: d
  } = o, f = w6(o, ["name", "getContainer", "appContext", "prefixCls", "rootPrefixCls", "transitionName", "hasTransitionName", "useStyle"]), p = document.createElement("div");
  r ? r().appendChild(p) : document.body.appendChild(p);
  const m = ye({
    compatConfig: {
      MODE: 3
    },
    name: "NotificationWrapper",
    setup(y, S) {
      let {
        attrs: C
      } = S;
      const O = Pe(), $ = R(() => mo.getPrefixCls(i, l)), [, P] = d($);
      return Pt(() => {
        n({
          notice(k) {
            var x;
            (x = O.value) === null || x === void 0 || x.add(k);
          },
          removeNotice(k) {
            var x;
            (x = O.value) === null || x === void 0 || x.remove(k);
          },
          destroy() {
            Ia(null, p), p.parentNode && p.parentNode.removeChild(p);
          },
          component: O
        });
      }), () => {
        const k = mo, x = k.getRootPrefixCls(s, $.value), E = c ? u : `${$.value}-${u}`;
        return v(pl, Z(Z({}, k), {}, {
          prefixCls: x
        }), {
          default: () => [v(Gd, Z(Z({
            ref: O
          }, C), {}, {
            prefixCls: $.value,
            transitionName: E,
            hashId: P.value
          }), null)]
        });
      };
    }
  }), b = v(m, f);
  b.appContext = a || b.appContext, Ia(b, p);
};
let Tx = 0;
const C6 = Date.now();
function kx() {
  const e = Tx;
  return Tx += 1, `rcNotification_${C6}_${e}`;
}
const $6 = ye({
  name: "HookNotification",
  inheritAttrs: !1,
  props: ["prefixCls", "transitionName", "animation", "maxCount", "closeIcon", "hashId", "remove", "notices", "getStyles", "getClassName", "onAllRemoved", "getContainer"],
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const i = /* @__PURE__ */ new Map(), r = R(() => e.notices), a = R(() => {
      let c = e.transitionName;
      if (!c && e.animation)
        switch (typeof e.animation) {
          case "string":
            c = e.animation;
            break;
          case "function":
            c = e.animation().name;
            break;
          case "object":
            c = e.animation.name;
            break;
          default:
            c = `${e.prefixCls}-fade`;
            break;
        }
      return Av(c);
    }), l = (c) => e.remove(c), s = le({});
    Ie(r, () => {
      const c = {};
      Object.keys(s.value).forEach((d) => {
        c[d] = [];
      }), e.notices.forEach((d) => {
        const {
          placement: f = "topRight"
        } = d.notice;
        f && (c[f] = c[f] || [], c[f].push(d));
      }), s.value = c;
    });
    const u = R(() => Object.keys(s.value));
    return () => {
      var c;
      const {
        prefixCls: d,
        closeIcon: f = (c = o.closeIcon) === null || c === void 0 ? void 0 : c.call(o, {
          prefixCls: d
        })
      } = e, p = u.value.map((m) => {
        var b, y;
        const S = s.value[m], C = (b = e.getClassName) === null || b === void 0 ? void 0 : b.call(e, m), O = (y = e.getStyles) === null || y === void 0 ? void 0 : y.call(e, m), $ = S.map((x, E) => {
          let {
            notice: z,
            holderCallback: N
          } = x;
          const D = E === r.value.length - 1 ? z.updateMark : void 0, {
            key: W,
            userPassKey: H
          } = z, {
            content: L
          } = z, A = I(I(I({
            prefixCls: d,
            closeIcon: typeof f == "function" ? f({
              prefixCls: d
            }) : f
          }, z), z.props), {
            key: W,
            noticeKey: H || W,
            updateMark: D,
            onClose: (U) => {
              var j;
              l(U), (j = z.onClose) === null || j === void 0 || j.call(z);
            },
            onClick: z.onClick
          });
          return N ? v("div", {
            key: W,
            class: `${d}-hook-holder`,
            ref: (U) => {
              typeof W > "u" || (U ? (i.set(W, U), N(U, A)) : i.delete(W));
            }
          }, null) : v(Bf, Z(Z({}, A), {}, {
            class: Te(A.class, e.hashId)
          }), {
            default: () => [typeof L == "function" ? L({
              prefixCls: d
            }) : L]
          });
        }), P = {
          [d]: 1,
          [`${d}-${m}`]: 1,
          [n.class]: !!n.class,
          [e.hashId]: !0,
          [C]: !!C
        };
        function k() {
          var x;
          S.length > 0 || (Reflect.deleteProperty(s.value, m), (x = e.onAllRemoved) === null || x === void 0 || x.call(e));
        }
        return v("div", {
          key: m,
          class: P,
          style: n.style || O || {
            top: "65px",
            left: "50%"
          }
        }, [v(Kh, Z(Z({
          tag: "div"
        }, a.value), {}, {
          onAfterLeave: k
        }), {
          default: () => [$]
        })]);
      });
      return v(IC, {
        getContainer: e.getContainer
      }, {
        default: () => [p]
      });
    };
  }
});
var P6 = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const O6 = () => document.body;
let Ex = 0;
function I6() {
  const e = {};
  for (var t = arguments.length, n = new Array(t), o = 0; o < t; o++)
    n[o] = arguments[o];
  return n.forEach((i) => {
    i && Object.keys(i).forEach((r) => {
      const a = i[r];
      a !== void 0 && (e[r] = a);
    });
  }), e;
}
function DP() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
  const {
    getContainer: t = O6,
    motion: n,
    prefixCls: o,
    maxCount: i,
    getClassName: r,
    getStyles: a,
    onAllRemoved: l
  } = e, s = P6(e, ["getContainer", "motion", "prefixCls", "maxCount", "getClassName", "getStyles", "onAllRemoved"]), u = Pe([]), c = Pe(), d = (S, C) => {
    const O = S.key || kx(), $ = I(I({}, S), {
      key: O
    }), P = u.value.map((x) => x.notice.key).indexOf(O), k = u.value.concat();
    P !== -1 ? k.splice(P, 1, {
      notice: $,
      holderCallback: C
    }) : (i && u.value.length >= i && ($.key = k[0].notice.key, $.updateMark = kx(), $.userPassKey = O, k.shift()), k.push({
      notice: $,
      holderCallback: C
    })), u.value = k;
  }, f = (S) => {
    u.value = u.value.filter((C) => {
      let {
        notice: {
          key: O,
          userPassKey: $
        }
      } = C;
      return ($ || O) !== S;
    });
  }, p = () => {
    u.value = [];
  }, m = () => v($6, {
    ref: c,
    prefixCls: o,
    maxCount: i,
    notices: u.value,
    remove: f,
    getClassName: r,
    getStyles: a,
    animation: n,
    hashId: e.hashId,
    onAllRemoved: l,
    getContainer: t
  }, null), b = Pe([]), y = {
    open: (S) => {
      const C = I6(s, S);
      (C.key === null || C.key === void 0) && (C.key = `vc-notification-${Ex}`, Ex += 1), b.value = [...b.value, {
        type: "open",
        config: C
      }];
    },
    close: (S) => {
      b.value = [...b.value, {
        type: "close",
        key: S
      }];
    },
    destroy: () => {
      b.value = [...b.value, {
        type: "destroy"
      }];
    }
  };
  return Ie(b, () => {
    b.value.length && (b.value.forEach((S) => {
      switch (S.type) {
        case "open":
          d(S.config);
          break;
        case "close":
          f(S.key);
          break;
        case "destroy":
          p();
          break;
      }
    }), b.value = []);
  }), [y, m];
}
const M6 = (e) => {
  const {
    componentCls: t,
    iconCls: n,
    boxShadowSecondary: o,
    colorBgElevated: i,
    colorSuccess: r,
    colorError: a,
    colorWarning: l,
    colorInfo: s,
    fontSizeLG: u,
    motionEaseInOutCirc: c,
    motionDurationSlow: d,
    marginXS: f,
    paddingXS: p,
    borderRadiusLG: m,
    zIndexPopup: b,
    // Custom token
    messageNoticeContentPadding: y
  } = e, S = new Bt("MessageMoveIn", {
    "0%": {
      padding: 0,
      transform: "translateY(-100%)",
      opacity: 0
    },
    "100%": {
      padding: p,
      transform: "translateY(0)",
      opacity: 1
    }
  }), C = new Bt("MessageMoveOut", {
    "0%": {
      maxHeight: e.height,
      padding: p,
      opacity: 1
    },
    "100%": {
      maxHeight: 0,
      padding: 0,
      opacity: 0
    }
  });
  return [
    // ============================ Holder ============================
    {
      [t]: I(I({}, Zt(e)), {
        position: "fixed",
        top: f,
        left: "50%",
        transform: "translateX(-50%)",
        width: "100%",
        pointerEvents: "none",
        zIndex: b,
        [`${t}-move-up`]: {
          animationFillMode: "forwards"
        },
        [`
        ${t}-move-up-appear,
        ${t}-move-up-enter
      `]: {
          animationName: S,
          animationDuration: d,
          animationPlayState: "paused",
          animationTimingFunction: c
        },
        [`
        ${t}-move-up-appear${t}-move-up-appear-active,
        ${t}-move-up-enter${t}-move-up-enter-active
      `]: {
          animationPlayState: "running"
        },
        [`${t}-move-up-leave`]: {
          animationName: C,
          animationDuration: d,
          animationPlayState: "paused",
          animationTimingFunction: c
        },
        [`${t}-move-up-leave${t}-move-up-leave-active`]: {
          animationPlayState: "running"
        },
        "&-rtl": {
          direction: "rtl",
          span: {
            direction: "rtl"
          }
        }
      })
    },
    // ============================ Notice ============================
    {
      [`${t}-notice`]: {
        padding: p,
        textAlign: "center",
        [n]: {
          verticalAlign: "text-bottom",
          marginInlineEnd: f,
          fontSize: u
        },
        [`${t}-notice-content`]: {
          display: "inline-block",
          padding: y,
          background: i,
          borderRadius: m,
          boxShadow: o,
          pointerEvents: "all"
        },
        [`${t}-success ${n}`]: {
          color: r
        },
        [`${t}-error ${n}`]: {
          color: a
        },
        [`${t}-warning ${n}`]: {
          color: l
        },
        [`
        ${t}-info ${n},
        ${t}-loading ${n}`]: {
          color: s
        }
      }
    },
    // ============================= Pure =============================
    {
      [`${t}-notice-pure-panel`]: {
        padding: 0,
        textAlign: "start"
      }
    }
  ];
}, zm = nn("Message", (e) => {
  const t = _t(e, {
    messageNoticeContentPadding: `${(e.controlHeightLG - e.fontSize * e.lineHeight) / 2}px ${e.paddingSM}px`
  });
  return [M6(t)];
}, (e) => ({
  height: 150,
  zIndexPopup: e.zIndexPopupBase + 10
})), T6 = {
  info: v(Il, null, null),
  success: v(Da, null, null),
  error: v(fi, null, null),
  warning: v(za, null, null),
  loading: v(yr, null, null)
}, zP = ye({
  name: "PureContent",
  inheritAttrs: !1,
  props: ["prefixCls", "type", "icon"],
  setup(e, t) {
    let {
      slots: n
    } = t;
    return () => {
      var o;
      return v("div", {
        class: Te(`${e.prefixCls}-custom-content`, `${e.prefixCls}-${e.type}`)
      }, [e.icon || T6[e.type], v("span", null, [(o = n.default) === null || o === void 0 ? void 0 : o.call(n)])]);
    };
  }
});
ye({
  name: "PurePanel",
  inheritAttrs: !1,
  props: ["prefixCls", "class", "type", "icon", "content"],
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    var i;
    const {
      getPrefixCls: r
    } = cf(), a = R(() => e.prefixCls || r("message")), [, l] = zm(a);
    return v(Bf, Z(Z({}, o), {}, {
      prefixCls: a.value,
      class: Te(l.value, `${a.value}-notice-pure-panel`),
      noticeKey: "pure",
      duration: null
    }), {
      default: () => [v(zP, {
        prefixCls: a.value,
        type: e.type,
        icon: e.icon
      }, {
        default: () => [(i = n.default) === null || i === void 0 ? void 0 : i.call(n)]
      })]
    });
  }
});
var k6 = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const E6 = 8, _6 = 3, A6 = ye({
  name: "Holder",
  inheritAttrs: !1,
  props: ["top", "prefixCls", "getContainer", "maxCount", "duration", "rtl", "transitionName", "onAllRemoved", "animation", "staticGetContainer"],
  setup(e, t) {
    let {
      expose: n
    } = t;
    var o, i;
    const {
      getPrefixCls: r,
      getPopupContainer: a
    } = yt("message", e), l = R(() => r("message", e.prefixCls)), [, s] = zm(l), u = () => {
      var b;
      const y = (b = e.top) !== null && b !== void 0 ? b : E6;
      return {
        left: "50%",
        transform: "translateX(-50%)",
        top: typeof y == "number" ? `${y}px` : y
      };
    }, c = () => Te(s.value, e.rtl ? `${l.value}-rtl` : ""), d = () => {
      var b;
      return Ov({
        prefixCls: l.value,
        animation: (b = e.animation) !== null && b !== void 0 ? b : "move-up",
        transitionName: e.transitionName
      });
    }, f = v("span", {
      class: `${l.value}-close-x`
    }, [v(Sr, {
      class: `${l.value}-close-icon`
    }, null)]), [p, m] = DP({
      //@ts-ignore
      getStyles: u,
      prefixCls: l.value,
      getClassName: c,
      motion: d,
      closable: !1,
      closeIcon: f,
      duration: (o = e.duration) !== null && o !== void 0 ? o : _6,
      getContainer: (i = e.staticGetContainer) !== null && i !== void 0 ? i : a.value,
      maxCount: e.maxCount,
      onAllRemoved: e.onAllRemoved
    });
    return n(I(I({}, p), {
      prefixCls: l,
      hashId: s
    })), m;
  }
});
let _x = 0;
function D6(e) {
  const t = Pe(null), n = Symbol("messageHolderKey"), o = (s) => {
    var u;
    (u = t.value) === null || u === void 0 || u.close(s);
  }, i = (s) => {
    if (!t.value) {
      const P = () => {
      };
      return P.then = () => {
      }, P;
    }
    const {
      open: u,
      prefixCls: c,
      hashId: d
    } = t.value, f = `${c}-notice`, {
      content: p,
      icon: m,
      type: b,
      key: y,
      class: S,
      onClose: C
    } = s, O = k6(s, ["content", "icon", "type", "key", "class", "onClose"]);
    let $ = y;
    return $ == null && (_x += 1, $ = `antd-message-${_x}`), Vk((P) => (u(I(I({}, O), {
      key: $,
      content: () => v(zP, {
        prefixCls: c,
        type: b,
        icon: typeof m == "function" ? m() : m
      }, {
        default: () => [typeof p == "function" ? p() : p]
      }),
      placement: "top",
      // @ts-ignore
      class: Te(b && `${f}-${b}`, d, S),
      onClose: () => {
        C?.(), P();
      }
    })), () => {
      o($);
    }));
  }, a = {
    open: i,
    destroy: (s) => {
      var u;
      s !== void 0 ? o(s) : (u = t.value) === null || u === void 0 || u.destroy();
    }
  };
  return ["info", "success", "warning", "error", "loading"].forEach((s) => {
    const u = (c, d, f) => {
      let p;
      c && typeof c == "object" && "content" in c ? p = c : p = {
        content: c
      };
      let m, b;
      typeof d == "function" ? b = d : (m = d, b = f);
      const y = I(I({
        onClose: b,
        duration: m
      }, p), {
        type: s
      });
      return i(y);
    };
    a[s] = u;
  }), [a, () => v(A6, Z(Z({
    key: n
  }, e), {}, {
    ref: t
  }), null)];
}
function RP(e) {
  return D6(e);
}
let NP = 3, BP, Ro, z6 = 1, LP = "", FP = "move-up", HP = !1, VP = () => document.body, jP, WP = !1;
function R6() {
  return z6++;
}
function N6(e) {
  e.top !== void 0 && (BP = e.top, Ro = null), e.duration !== void 0 && (NP = e.duration), e.prefixCls !== void 0 && (LP = e.prefixCls), e.getContainer !== void 0 && (VP = e.getContainer, Ro = null), e.transitionName !== void 0 && (FP = e.transitionName, Ro = null, HP = !0), e.maxCount !== void 0 && (jP = e.maxCount, Ro = null), e.rtl !== void 0 && (WP = e.rtl);
}
function B6(e, t) {
  if (Ro) {
    t(Ro);
    return;
  }
  Gd.newInstance({
    appContext: e.appContext,
    prefixCls: e.prefixCls || LP,
    rootPrefixCls: e.rootPrefixCls,
    transitionName: FP,
    hasTransitionName: HP,
    style: {
      top: BP
    },
    getContainer: VP || e.getPopupContainer,
    maxCount: jP,
    name: "message",
    useStyle: zm
  }, (n) => {
    if (Ro) {
      t(Ro);
      return;
    }
    Ro = n, t(n);
  });
}
const qP = {
  info: Il,
  success: Da,
  error: fi,
  warning: za,
  loading: yr
}, L6 = Object.keys(qP);
function F6(e) {
  const t = e.duration !== void 0 ? e.duration : NP, n = e.key || R6(), o = new Promise((r) => {
    const a = () => (typeof e.onClose == "function" && e.onClose(), r(!0));
    B6(e, (l) => {
      l.notice({
        key: n,
        duration: t,
        style: e.style || {},
        class: e.class,
        content: (s) => {
          let {
            prefixCls: u
          } = s;
          const c = qP[e.type], d = c ? v(c, null, null) : "", f = Te(`${u}-custom-content`, {
            [`${u}-${e.type}`]: e.type,
            [`${u}-rtl`]: WP === !0
          });
          return v("div", {
            class: f
          }, [typeof e.icon == "function" ? e.icon() : e.icon || d, v("span", null, [typeof e.content == "function" ? e.content() : e.content])]);
        },
        onClose: a,
        onClick: e.onClick
      });
    });
  }), i = () => {
    Ro && Ro.removeNotice(n);
  };
  return i.then = (r, a) => o.then(r, a), i.promise = o, i;
}
function H6(e) {
  return Object.prototype.toString.call(e) === "[object Object]" && !!e.content;
}
const Gu = {
  open: F6,
  config: N6,
  destroy(e) {
    if (Ro)
      if (e) {
        const {
          removeNotice: t
        } = Ro;
        t(e);
      } else {
        const {
          destroy: t
        } = Ro;
        t(), Ro = null;
      }
  }
};
function V6(e, t) {
  e[t] = (n, o, i) => H6(n) ? e.open(I(I({}, n), {
    type: t
  })) : (typeof o == "function" && (i = o, o = void 0), e.open({
    content: n,
    duration: o,
    type: t,
    onClose: i
  }));
}
L6.forEach((e) => V6(Gu, e));
Gu.warn = Gu.warning;
Gu.useMessage = RP;
const j6 = (e) => {
  const {
    componentCls: t,
    width: n,
    notificationMarginEdge: o
  } = e, i = new Bt("antNotificationTopFadeIn", {
    "0%": {
      marginTop: "-100%",
      opacity: 0
    },
    "100%": {
      marginTop: 0,
      opacity: 1
    }
  }), r = new Bt("antNotificationBottomFadeIn", {
    "0%": {
      marginBottom: "-100%",
      opacity: 0
    },
    "100%": {
      marginBottom: 0,
      opacity: 1
    }
  }), a = new Bt("antNotificationLeftFadeIn", {
    "0%": {
      right: {
        _skip_check_: !0,
        value: n
      },
      opacity: 0
    },
    "100%": {
      right: {
        _skip_check_: !0,
        value: 0
      },
      opacity: 1
    }
  });
  return {
    [`&${t}-top, &${t}-bottom`]: {
      marginInline: 0
    },
    [`&${t}-top`]: {
      [`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]: {
        animationName: i
      }
    },
    [`&${t}-bottom`]: {
      [`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]: {
        animationName: r
      }
    },
    [`&${t}-topLeft, &${t}-bottomLeft`]: {
      marginInlineEnd: 0,
      marginInlineStart: o,
      [`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]: {
        animationName: a
      }
    }
  };
}, W6 = (e) => {
  const {
    iconCls: t,
    componentCls: n,
    // .ant-notification
    boxShadowSecondary: o,
    fontSizeLG: i,
    notificationMarginBottom: r,
    borderRadiusLG: a,
    colorSuccess: l,
    colorInfo: s,
    colorWarning: u,
    colorError: c,
    colorTextHeading: d,
    notificationBg: f,
    notificationPadding: p,
    notificationMarginEdge: m,
    motionDurationMid: b,
    motionEaseInOut: y,
    fontSize: S,
    lineHeight: C,
    width: O,
    notificationIconSize: $
  } = e, P = `${n}-notice`, k = new Bt("antNotificationFadeIn", {
    "0%": {
      left: {
        _skip_check_: !0,
        value: O
      },
      opacity: 0
    },
    "100%": {
      left: {
        _skip_check_: !0,
        value: 0
      },
      opacity: 1
    }
  }), x = new Bt("antNotificationFadeOut", {
    "0%": {
      maxHeight: e.animationMaxHeight,
      marginBottom: r,
      opacity: 1
    },
    "100%": {
      maxHeight: 0,
      marginBottom: 0,
      paddingTop: 0,
      paddingBottom: 0,
      opacity: 0
    }
  });
  return [
    // ============================ Holder ============================
    {
      [n]: I(I(I(I({}, Zt(e)), {
        position: "fixed",
        zIndex: e.zIndexPopup,
        marginInlineEnd: m,
        [`${n}-hook-holder`]: {
          position: "relative"
        },
        [`&${n}-top, &${n}-bottom`]: {
          [`${n}-notice`]: {
            marginInline: "auto auto"
          }
        },
        [`&${n}-topLeft, &${n}-bottomLeft`]: {
          [`${n}-notice`]: {
            marginInlineEnd: "auto",
            marginInlineStart: 0
          }
        },
        //  animation
        [`${n}-fade-enter, ${n}-fade-appear`]: {
          animationDuration: e.motionDurationMid,
          animationTimingFunction: y,
          animationFillMode: "both",
          opacity: 0,
          animationPlayState: "paused"
        },
        [`${n}-fade-leave`]: {
          animationTimingFunction: y,
          animationFillMode: "both",
          animationDuration: b,
          animationPlayState: "paused"
        },
        [`${n}-fade-enter${n}-fade-enter-active, ${n}-fade-appear${n}-fade-appear-active`]: {
          animationName: k,
          animationPlayState: "running"
        },
        [`${n}-fade-leave${n}-fade-leave-active`]: {
          animationName: x,
          animationPlayState: "running"
        }
      }), j6(e)), {
        // RTL
        "&-rtl": {
          direction: "rtl",
          [`${n}-notice-btn`]: {
            float: "left"
          }
        }
      })
    },
    // ============================ Notice ============================
    {
      [P]: {
        position: "relative",
        width: O,
        maxWidth: `calc(100vw - ${m * 2}px)`,
        marginBottom: r,
        marginInlineStart: "auto",
        padding: p,
        overflow: "hidden",
        lineHeight: C,
        wordWrap: "break-word",
        background: f,
        borderRadius: a,
        boxShadow: o,
        [`${n}-close-icon`]: {
          fontSize: S,
          cursor: "pointer"
        },
        [`${P}-message`]: {
          marginBottom: e.marginXS,
          color: d,
          fontSize: i,
          lineHeight: e.lineHeightLG
        },
        [`${P}-description`]: {
          fontSize: S
        },
        [`&${P}-closable ${P}-message`]: {
          paddingInlineEnd: e.paddingLG
        },
        [`${P}-with-icon ${P}-message`]: {
          marginBottom: e.marginXS,
          marginInlineStart: e.marginSM + $,
          fontSize: i
        },
        [`${P}-with-icon ${P}-description`]: {
          marginInlineStart: e.marginSM + $,
          fontSize: S
        },
        // Icon & color style in different selector level
        // https://github.com/ant-design/ant-design/issues/16503
        // https://github.com/ant-design/ant-design/issues/15512
        [`${P}-icon`]: {
          position: "absolute",
          fontSize: $,
          lineHeight: 0,
          // icon-font
          [`&-success${t}`]: {
            color: l
          },
          [`&-info${t}`]: {
            color: s
          },
          [`&-warning${t}`]: {
            color: u
          },
          [`&-error${t}`]: {
            color: c
          }
        },
        [`${P}-close`]: {
          position: "absolute",
          top: e.notificationPaddingVertical,
          insetInlineEnd: e.notificationPaddingHorizontal,
          color: e.colorIcon,
          outline: "none",
          width: e.notificationCloseButtonSize,
          height: e.notificationCloseButtonSize,
          borderRadius: e.borderRadiusSM,
          transition: `background-color ${e.motionDurationMid}, color ${e.motionDurationMid}`,
          display: "flex",
          alignItems: "center",
          justifyContent: "center",
          "&:hover": {
            color: e.colorIconHover,
            backgroundColor: e.wireframe ? "transparent" : e.colorFillContent
          }
        },
        [`${P}-btn`]: {
          float: "right",
          marginTop: e.marginSM
        }
      }
    },
    // ============================= Pure =============================
    {
      [`${P}-pure-panel`]: {
        margin: 0
      }
    }
  ];
}, Rm = nn("Notification", (e) => {
  const t = e.paddingMD, n = e.paddingLG, o = _t(e, {
    // default.less variables
    notificationBg: e.colorBgElevated,
    notificationPaddingVertical: t,
    notificationPaddingHorizontal: n,
    // index.less variables
    notificationPadding: `${e.paddingMD}px ${e.paddingContentHorizontalLG}px`,
    notificationMarginBottom: e.margin,
    notificationMarginEdge: e.marginLG,
    animationMaxHeight: 150,
    notificationIconSize: e.fontSizeLG * e.lineHeightLG,
    notificationCloseButtonSize: e.controlHeightLG * 0.55
  });
  return [W6(o)];
}, (e) => ({
  zIndexPopup: e.zIndexPopupBase + 50,
  width: 384
}));
function GP(e, t) {
  return t || v("span", {
    class: `${e}-close-x`
  }, [v(Sr, {
    class: `${e}-close-icon`
  }, null)]);
}
v(Il, null, null), v(Da, null, null), v(fi, null, null), v(za, null, null), v(yr, null, null);
const q6 = {
  success: Da,
  info: Il,
  error: fi,
  warning: za
};
function KP(e) {
  let {
    prefixCls: t,
    icon: n,
    type: o,
    message: i,
    description: r,
    btn: a
  } = e, l = null;
  if (n)
    l = v("span", {
      class: `${t}-icon`
    }, [ns(n)]);
  else if (o) {
    const s = q6[o];
    l = v(s, {
      class: `${t}-icon ${t}-icon-${o}`
    }, null);
  }
  return v("div", {
    class: Te({
      [`${t}-with-icon`]: l
    }),
    role: "alert"
  }, [l, v("div", {
    class: `${t}-message`
  }, [i]), v("div", {
    class: `${t}-description`
  }, [r]), a && v("div", {
    class: `${t}-btn`
  }, [a])]);
}
ye({
  name: "PurePanel",
  inheritAttrs: !1,
  props: ["prefixCls", "icon", "type", "message", "description", "btn", "closeIcon"],
  setup(e) {
    const {
      getPrefixCls: t
    } = yt("notification", e), n = R(() => e.prefixCls || t("notification")), o = R(() => `${n.value}-notice`), [, i] = Rm(n);
    return () => v(Bf, Z(Z({}, e), {}, {
      prefixCls: n.value,
      class: Te(i.value, `${o.value}-pure-panel`),
      noticeKey: "pure",
      duration: null,
      closable: e.closable,
      closeIcon: GP(n.value, e.closeIcon)
    }), {
      default: () => [v(KP, {
        prefixCls: o.value,
        icon: e.icon,
        type: e.type,
        message: e.message,
        description: e.description,
        btn: e.btn
      }, null)]
    });
  }
});
function YP(e, t, n) {
  let o;
  switch (t = typeof t == "number" ? `${t}px` : t, n = typeof n == "number" ? `${n}px` : n, e) {
    case "top":
      o = {
        left: "50%",
        transform: "translateX(-50%)",
        right: "auto",
        top: t,
        bottom: "auto"
      };
      break;
    case "topLeft":
      o = {
        left: 0,
        top: t,
        bottom: "auto"
      };
      break;
    case "topRight":
      o = {
        right: 0,
        top: t,
        bottom: "auto"
      };
      break;
    case "bottom":
      o = {
        left: "50%",
        transform: "translateX(-50%)",
        right: "auto",
        top: "auto",
        bottom: n
      };
      break;
    case "bottomLeft":
      o = {
        left: 0,
        top: "auto",
        bottom: n
      };
      break;
    default:
      o = {
        right: 0,
        top: "auto",
        bottom: n
      };
      break;
  }
  return o;
}
function G6(e) {
  return {
    name: `${e}-fade`
  };
}
var K6 = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const Ax = 24, Y6 = 4.5, U6 = ye({
  name: "Holder",
  inheritAttrs: !1,
  props: ["prefixCls", "class", "type", "icon", "content", "onAllRemoved"],
  setup(e, t) {
    let {
      expose: n
    } = t;
    const {
      getPrefixCls: o,
      getPopupContainer: i
    } = yt("notification", e), r = R(() => e.prefixCls || o("notification")), a = (f) => {
      var p, m;
      return YP(f, (p = e.top) !== null && p !== void 0 ? p : Ax, (m = e.bottom) !== null && m !== void 0 ? m : Ax);
    }, [, l] = Rm(r), s = () => Te(l.value, {
      [`${r.value}-rtl`]: e.rtl
    }), u = () => G6(r.value), [c, d] = DP({
      prefixCls: r.value,
      getStyles: a,
      getClassName: s,
      motion: u,
      closable: !0,
      closeIcon: GP(r.value),
      duration: Y6,
      getContainer: () => {
        var f, p;
        return ((f = e.getPopupContainer) === null || f === void 0 ? void 0 : f.call(e)) || ((p = i.value) === null || p === void 0 ? void 0 : p.call(i)) || document.body;
      },
      maxCount: e.maxCount,
      hashId: l.value,
      onAllRemoved: e.onAllRemoved
    });
    return n(I(I({}, c), {
      prefixCls: r.value,
      hashId: l
    })), d;
  }
});
function X6(e) {
  const t = Pe(null), n = Symbol("notificationHolderKey"), o = (l) => {
    if (!t.value)
      return;
    const {
      open: s,
      prefixCls: u,
      hashId: c
    } = t.value, d = `${u}-notice`, {
      message: f,
      description: p,
      icon: m,
      type: b,
      btn: y,
      class: S
    } = l, C = K6(l, ["message", "description", "icon", "type", "btn", "class"]);
    return s(I(I({
      placement: "topRight"
    }, C), {
      content: () => v(KP, {
        prefixCls: d,
        icon: typeof m == "function" ? m() : m,
        type: b,
        message: typeof f == "function" ? f() : f,
        description: typeof p == "function" ? p() : p,
        btn: typeof y == "function" ? y() : y
      }, null),
      // @ts-ignore
      class: Te(b && `${d}-${b}`, c, S)
    }));
  }, r = {
    open: o,
    destroy: (l) => {
      var s, u;
      l !== void 0 ? (s = t.value) === null || s === void 0 || s.close(l) : (u = t.value) === null || u === void 0 || u.destroy();
    }
  };
  return ["success", "info", "warning", "error"].forEach((l) => {
    r[l] = (s) => o(I(I({}, s), {
      type: l
    }));
  }), [r, () => v(U6, Z(Z({
    key: n
  }, e), {}, {
    ref: t
  }), null)];
}
function UP(e) {
  return X6(e);
}
const il = {};
let XP = 4.5, QP = "24px", ZP = "24px", zh = "", JP = "topRight", e2 = () => document.body, t2 = null, Rh = !1, n2;
function Q6(e) {
  const {
    duration: t,
    placement: n,
    bottom: o,
    top: i,
    getContainer: r,
    closeIcon: a,
    prefixCls: l
  } = e;
  l !== void 0 && (zh = l), t !== void 0 && (XP = t), n !== void 0 && (JP = n), o !== void 0 && (ZP = typeof o == "number" ? `${o}px` : o), i !== void 0 && (QP = typeof i == "number" ? `${i}px` : i), r !== void 0 && (e2 = r), a !== void 0 && (t2 = a), e.rtl !== void 0 && (Rh = e.rtl), e.maxCount !== void 0 && (n2 = e.maxCount);
}
function Z6(e, t) {
  let {
    prefixCls: n,
    placement: o = JP,
    getContainer: i = e2,
    top: r,
    bottom: a,
    closeIcon: l = t2,
    appContext: s
  } = e;
  const {
    getPrefixCls: u
  } = cL(), c = u("notification", n || zh), d = `${c}-${o}-${Rh}`, f = il[d];
  if (f) {
    Promise.resolve(f).then((m) => {
      t(m);
    });
    return;
  }
  const p = Te(`${c}-${o}`, {
    [`${c}-rtl`]: Rh === !0
  });
  Gd.newInstance({
    name: "notification",
    prefixCls: n || zh,
    useStyle: Rm,
    class: p,
    style: YP(o, r ?? QP, a ?? ZP),
    appContext: s,
    getContainer: i,
    closeIcon: (m) => {
      let {
        prefixCls: b
      } = m;
      return v("span", {
        class: `${b}-close-x`
      }, [ns(l, {}, v(Sr, {
        class: `${b}-close-icon`
      }, null))]);
    },
    maxCount: n2,
    hasTransitionName: !0
  }, (m) => {
    il[d] = m, t(m);
  });
}
const J6 = {
  success: Qv,
  info: Jv,
  error: em,
  warning: Zv
};
function eL(e) {
  const {
    icon: t,
    type: n,
    description: o,
    message: i,
    btn: r
  } = e, a = e.duration === void 0 ? XP : e.duration;
  Z6(e, (l) => {
    l.notice({
      content: (s) => {
        let {
          prefixCls: u
        } = s;
        const c = `${u}-notice`;
        let d = null;
        if (t)
          d = () => v("span", {
            class: `${c}-icon`
          }, [ns(t)]);
        else if (n) {
          const f = J6[n];
          d = () => v(f, {
            class: `${c}-icon ${c}-icon-${n}`
          }, null);
        }
        return v("div", {
          class: d ? `${c}-with-icon` : ""
        }, [d && d(), v("div", {
          class: `${c}-message`
        }, [!o && d ? v("span", {
          class: `${c}-message-single-line-auto-margin`
        }, null) : null, ns(i)]), v("div", {
          class: `${c}-description`
        }, [ns(o)]), r ? v("span", {
          class: `${c}-btn`
        }, [ns(r)]) : null]);
      },
      duration: a,
      closable: !0,
      onClose: e.onClose,
      onClick: e.onClick,
      key: e.key,
      style: e.style || {},
      class: e.class
    });
  });
}
const _s = {
  open: eL,
  close(e) {
    Object.keys(il).forEach((t) => Promise.resolve(il[t]).then((n) => {
      n.removeNotice(e);
    }));
  },
  config: Q6,
  destroy() {
    Object.keys(il).forEach((e) => {
      Promise.resolve(il[e]).then((t) => {
        t.destroy();
      }), delete il[e];
    });
  }
}, tL = ["success", "info", "warning", "error"];
tL.forEach((e) => {
  _s[e] = (t) => _s.open(I(I({}, t), {
    type: e
  }));
});
_s.warn = _s.warning;
_s.useNotification = UP;
const nL = `-ant-${Date.now()}-${Math.random()}`;
function oL(e, t) {
  const n = {}, o = (a, l) => {
    let s = a.clone();
    return s = l?.(s) || s, s.toRgbString();
  }, i = (a, l) => {
    const s = new In(a), u = Gr(s.toRgbString());
    n[`${l}-color`] = o(s), n[`${l}-color-disabled`] = u[1], n[`${l}-color-hover`] = u[4], n[`${l}-color-active`] = u[6], n[`${l}-color-outline`] = s.clone().setAlpha(0.2).toRgbString(), n[`${l}-color-deprecated-bg`] = u[0], n[`${l}-color-deprecated-border`] = u[2];
  };
  if (t.primaryColor) {
    i(t.primaryColor, "primary");
    const a = new In(t.primaryColor), l = Gr(a.toRgbString());
    l.forEach((u, c) => {
      n[`primary-${c + 1}`] = u;
    }), n["primary-color-deprecated-l-35"] = o(a, (u) => u.lighten(35)), n["primary-color-deprecated-l-20"] = o(a, (u) => u.lighten(20)), n["primary-color-deprecated-t-20"] = o(a, (u) => u.tint(20)), n["primary-color-deprecated-t-50"] = o(a, (u) => u.tint(50)), n["primary-color-deprecated-f-12"] = o(a, (u) => u.setAlpha(u.getAlpha() * 0.12));
    const s = new In(l[0]);
    n["primary-color-active-deprecated-f-30"] = o(s, (u) => u.setAlpha(u.getAlpha() * 0.3)), n["primary-color-active-deprecated-d-02"] = o(s, (u) => u.darken(2));
  }
  return t.successColor && i(t.successColor, "success"), t.warningColor && i(t.warningColor, "warning"), t.errorColor && i(t.errorColor, "error"), t.infoColor && i(t.infoColor, "info"), `
  :root {
    ${Object.keys(n).map((a) => `--${e}-${a}: ${n[a]};`).join(`
`)}
  }
  `.trim();
}
function iL(e, t) {
  const n = oL(e, t);
  ki() ? Bu(n, `${nL}-dynamic-theme`) : Zn(!1, "ConfigProvider", "SSR do not support dynamic theme with css variables.");
}
const rL = (e) => {
  const [t, n] = Hs();
  return qg(R(() => ({
    theme: t.value,
    token: n.value,
    hashId: "",
    path: ["ant-design-icons", e.value]
  })), () => [{
    [`.${e.value}`]: I(I({}, Fs()), {
      [`.${e.value} .${e.value}-icon`]: {
        display: "block"
      }
    })
  }]);
};
function aL(e, t) {
  const n = R(() => e?.value || {}), o = R(() => n.value.inherit === !1 || !t?.value ? xv : t.value);
  return R(() => {
    if (!e?.value)
      return t?.value;
    const r = I({}, o.value.components);
    return Object.keys(e.value.components || {}).forEach((a) => {
      r[a] = I(I({}, r[a]), e.value.components[a]);
    }), I(I(I({}, o.value), n.value), {
      token: I(I({}, o.value.token), n.value.token),
      components: r
    });
  });
}
var lL = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const sL = "ant";
function fs() {
  return mo.prefixCls || sL;
}
function o2() {
  return mo.iconPrefixCls || pv;
}
const Nm = Dn({}), mo = Dn({});
Lt(() => {
  I(mo, Nm), mo.prefixCls = fs(), mo.iconPrefixCls = o2(), mo.getPrefixCls = (e, t) => t || (e ? `${mo.prefixCls}-${e}` : mo.prefixCls), mo.getRootPrefixCls = () => mo.prefixCls ? mo.prefixCls : fs();
});
let qp;
const uL = (e) => {
  qp && qp(), qp = Lt(() => {
    I(Nm, Dn(e)), I(mo, Dn(e));
  }), e.theme && iL(fs(), e.theme);
}, cL = () => ({
  getPrefixCls: (e, t) => t || (e ? `${fs()}-${e}` : fs()),
  getIconPrefixCls: o2,
  getRootPrefixCls: () => mo.prefixCls ? mo.prefixCls : fs()
}), pl = ye({
  compatConfig: {
    MODE: 3
  },
  name: "AConfigProvider",
  inheritAttrs: !1,
  props: gE(),
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = cf(), i = (A, U) => {
      const {
        prefixCls: j = "ant"
      } = e;
      if (U) return U;
      const re = j || o.getPrefixCls("");
      return A ? `${re}-${A}` : re;
    }, r = R(() => e.iconPrefixCls || o.iconPrefixCls.value || pv), a = R(() => r.value !== o.iconPrefixCls.value), l = R(() => {
      var A;
      return e.csp || ((A = o.csp) === null || A === void 0 ? void 0 : A.value);
    }), s = rL(r), u = aL(R(() => e.theme), R(() => {
      var A;
      return (A = o.theme) === null || A === void 0 ? void 0 : A.value;
    })), c = (A) => (e.renderEmpty || n.renderEmpty || o.renderEmpty || oA)(A), d = R(() => {
      var A, U;
      return (A = e.autoInsertSpaceInButton) !== null && A !== void 0 ? A : (U = o.autoInsertSpaceInButton) === null || U === void 0 ? void 0 : U.value;
    }), f = R(() => {
      var A;
      return e.locale || ((A = o.locale) === null || A === void 0 ? void 0 : A.value);
    });
    Ie(f, () => {
      Nm.locale = f.value;
    }, {
      immediate: !0
    });
    const p = R(() => {
      var A;
      return e.direction || ((A = o.direction) === null || A === void 0 ? void 0 : A.value);
    }), m = R(() => {
      var A, U;
      return (A = e.space) !== null && A !== void 0 ? A : (U = o.space) === null || U === void 0 ? void 0 : U.value;
    }), b = R(() => {
      var A, U;
      return (A = e.virtual) !== null && A !== void 0 ? A : (U = o.virtual) === null || U === void 0 ? void 0 : U.value;
    }), y = R(() => {
      var A, U;
      return (A = e.dropdownMatchSelectWidth) !== null && A !== void 0 ? A : (U = o.dropdownMatchSelectWidth) === null || U === void 0 ? void 0 : U.value;
    }), S = R(() => {
      var A;
      return e.getTargetContainer !== void 0 ? e.getTargetContainer : (A = o.getTargetContainer) === null || A === void 0 ? void 0 : A.value;
    }), C = R(() => {
      var A;
      return e.getPopupContainer !== void 0 ? e.getPopupContainer : (A = o.getPopupContainer) === null || A === void 0 ? void 0 : A.value;
    }), O = R(() => {
      var A;
      return e.pageHeader !== void 0 ? e.pageHeader : (A = o.pageHeader) === null || A === void 0 ? void 0 : A.value;
    }), $ = R(() => {
      var A;
      return e.input !== void 0 ? e.input : (A = o.input) === null || A === void 0 ? void 0 : A.value;
    }), P = R(() => {
      var A;
      return e.pagination !== void 0 ? e.pagination : (A = o.pagination) === null || A === void 0 ? void 0 : A.value;
    }), k = R(() => {
      var A;
      return e.form !== void 0 ? e.form : (A = o.form) === null || A === void 0 ? void 0 : A.value;
    }), x = R(() => {
      var A;
      return e.select !== void 0 ? e.select : (A = o.select) === null || A === void 0 ? void 0 : A.value;
    }), E = R(() => e.componentSize), z = R(() => e.componentDisabled), N = R(() => {
      var A, U;
      return (A = e.wave) !== null && A !== void 0 ? A : (U = o.wave) === null || U === void 0 ? void 0 : U.value;
    }), D = {
      csp: l,
      autoInsertSpaceInButton: d,
      locale: f,
      direction: p,
      space: m,
      virtual: b,
      dropdownMatchSelectWidth: y,
      getPrefixCls: i,
      iconPrefixCls: r,
      theme: R(() => {
        var A, U;
        return (A = u.value) !== null && A !== void 0 ? A : (U = o.theme) === null || U === void 0 ? void 0 : U.value;
      }),
      renderEmpty: c,
      getTargetContainer: S,
      getPopupContainer: C,
      pageHeader: O,
      input: $,
      pagination: P,
      form: k,
      select: x,
      componentSize: E,
      componentDisabled: z,
      transformCellText: R(() => e.transformCellText),
      wave: N
    }, W = R(() => {
      const A = u.value || {}, {
        algorithm: U,
        token: j
      } = A, re = lL(A, ["algorithm", "token"]), G = U && (!Array.isArray(U) || U.length > 0) ? RS(U) : void 0;
      return I(I({}, re), {
        theme: G,
        token: I(I({}, hf), j)
      });
    }), H = R(() => {
      var A, U;
      let j = {};
      return f.value && (j = ((A = f.value.Form) === null || A === void 0 ? void 0 : A.defaultValidateMessages) || ((U = Ta.Form) === null || U === void 0 ? void 0 : U.defaultValidateMessages) || {}), e.form && e.form.validateMessages && (j = I(I({}, j), e.form.validateMessages)), j;
    });
    hE(D), fE({
      validateMessages: H
    }), oC(E), CS(z);
    const L = (A) => {
      var U, j;
      let re = a.value ? s((U = n.default) === null || U === void 0 ? void 0 : U.call(n)) : (j = n.default) === null || j === void 0 ? void 0 : j.call(n);
      if (e.theme) {
        const G = /* @__PURE__ */ (function() {
          return re;
        })();
        re = v(Z_, {
          value: W.value
        }, {
          default: () => [G]
        });
      }
      return v(x6, {
        locale: f.value || A,
        ANT_MARK__: Dh
      }, {
        default: () => [re]
      });
    };
    return Lt(() => {
      p.value && (Gu.config({
        rtl: p.value === "rtl"
      }), _s.config({
        rtl: p.value === "rtl"
      }));
    }), () => v(PS, {
      children: (A, U, j) => L(j)
    }, null);
  }
});
pl.config = uL;
pl.install = function(e) {
  e.component(pl.name, pl);
};
const dL = (e, t) => {
  let {
    attrs: n,
    slots: o
  } = t;
  return v($t, Z(Z({
    size: "small",
    type: "primary"
  }, e), n), o);
}, Kc = (e, t, n) => {
  const o = Bk(n);
  return {
    [`${e.componentCls}-${t}`]: {
      color: e[`color${n}`],
      background: e[`color${o}Bg`],
      borderColor: e[`color${o}Border`],
      [`&${e.componentCls}-borderless`]: {
        borderColor: "transparent"
      }
    }
  };
}, fL = (e) => QS(e, (t, n) => {
  let {
    textColor: o,
    lightBorderColor: i,
    lightColor: r,
    darkColor: a
  } = n;
  return {
    [`${e.componentCls}-${t}`]: {
      color: o,
      background: r,
      borderColor: i,
      // Inverse color
      "&-inverse": {
        color: e.colorTextLightSolid,
        background: a,
        borderColor: a
      },
      [`&${e.componentCls}-borderless`]: {
        borderColor: "transparent"
      }
    }
  };
}), pL = (e) => {
  const {
    paddingXXS: t,
    lineWidth: n,
    tagPaddingHorizontal: o,
    componentCls: i
  } = e, r = o - n, a = t - n;
  return {
    // Result
    [i]: I(I({}, Zt(e)), {
      display: "inline-block",
      height: "auto",
      marginInlineEnd: e.marginXS,
      paddingInline: r,
      fontSize: e.tagFontSize,
      lineHeight: `${e.tagLineHeight}px`,
      whiteSpace: "nowrap",
      background: e.tagDefaultBg,
      border: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,
      borderRadius: e.borderRadiusSM,
      opacity: 1,
      transition: `all ${e.motionDurationMid}`,
      textAlign: "start",
      // RTL
      [`&${i}-rtl`]: {
        direction: "rtl"
      },
      "&, a, a:hover": {
        color: e.tagDefaultColor
      },
      [`${i}-close-icon`]: {
        marginInlineStart: a,
        color: e.colorTextDescription,
        fontSize: e.tagIconSize,
        cursor: "pointer",
        transition: `all ${e.motionDurationMid}`,
        "&:hover": {
          color: e.colorTextHeading
        }
      },
      [`&${i}-has-color`]: {
        borderColor: "transparent",
        [`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]: {
          color: e.colorTextLightSolid
        }
      },
      "&-checkable": {
        backgroundColor: "transparent",
        borderColor: "transparent",
        cursor: "pointer",
        [`&:not(${i}-checkable-checked):hover`]: {
          color: e.colorPrimary,
          backgroundColor: e.colorFillSecondary
        },
        "&:active, &-checked": {
          color: e.colorTextLightSolid
        },
        "&-checked": {
          backgroundColor: e.colorPrimary,
          "&:hover": {
            backgroundColor: e.colorPrimaryHover
          }
        },
        "&:active": {
          backgroundColor: e.colorPrimaryActive
        }
      },
      "&-hidden": {
        display: "none"
      },
      // To ensure that a space will be placed between character and `Icon`.
      [`> ${e.iconCls} + span, > span + ${e.iconCls}`]: {
        marginInlineStart: r
      }
    }),
    [`${i}-borderless`]: {
      borderColor: "transparent",
      background: e.tagBorderlessBg
    }
  };
}, i2 = nn("Tag", (e) => {
  const {
    fontSize: t,
    lineHeight: n,
    lineWidth: o,
    fontSizeIcon: i
  } = e, r = Math.round(t * n), a = e.fontSizeSM, l = r - o * 2, s = e.colorFillAlter, u = e.colorText, c = _t(e, {
    tagFontSize: a,
    tagLineHeight: l,
    tagDefaultBg: s,
    tagDefaultColor: u,
    tagIconSize: i - 2 * o,
    tagPaddingHorizontal: 8,
    tagBorderlessBg: e.colorFillTertiary
  });
  return [pL(c), fL(c), Kc(c, "success", "Success"), Kc(c, "processing", "Info"), Kc(c, "error", "Error"), Kc(c, "warning", "Warning")];
}), gL = () => ({
  prefixCls: String,
  checked: {
    type: Boolean,
    default: void 0
  },
  onChange: {
    type: Function
  },
  onClick: {
    type: Function
  },
  "onUpdate:checked": Function
}), Nh = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ACheckableTag",
  inheritAttrs: !1,
  props: gL(),
  // emits: ['update:checked', 'change', 'click'],
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      attrs: i
    } = t;
    const {
      prefixCls: r
    } = yt("tag", e), [a, l] = i2(r), s = (c) => {
      const {
        checked: d
      } = e;
      o("update:checked", !d), o("change", !d), o("click", c);
    }, u = R(() => Te(r.value, l.value, {
      [`${r.value}-checkable`]: !0,
      [`${r.value}-checkable-checked`]: e.checked
    }));
    return () => {
      var c;
      return a(v("span", Z(Z({}, i), {}, {
        class: [u.value, i.class],
        onClick: s
      }), [(c = n.default) === null || c === void 0 ? void 0 : c.call(n)]));
    };
  }
}), hL = () => ({
  prefixCls: String,
  color: {
    type: String
  },
  closable: {
    type: Boolean,
    default: !1
  },
  closeIcon: ue.any,
  /** @deprecated `visible` will be removed in next major version. */
  visible: {
    type: Boolean,
    default: void 0
  },
  onClose: {
    type: Function
  },
  onClick: Cs(),
  "onUpdate:visible": Function,
  icon: ue.any,
  bordered: {
    type: Boolean,
    default: !0
  }
}), Xi = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ATag",
  inheritAttrs: !1,
  props: hL(),
  // emits: ['update:visible', 'close'],
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      attrs: i
    } = t;
    const {
      prefixCls: r,
      direction: a
    } = yt("tag", e), [l, s] = i2(r), u = Pe(!0);
    process.env.NODE_ENV !== "production" && Zn(e.visible === void 0, "Tag", '`visible` is deprecated, please use `<Tag v-show="visible" />` instead.'), Lt(() => {
      e.visible !== void 0 && (u.value = e.visible);
    });
    const c = (m) => {
      m.stopPropagation(), o("update:visible", !1), o("close", m), !m.defaultPrevented && e.visible === void 0 && (u.value = !1);
    }, d = R(() => t$(e.color) || XN(e.color)), f = R(() => Te(r.value, s.value, {
      [`${r.value}-${e.color}`]: d.value,
      [`${r.value}-has-color`]: e.color && !d.value,
      [`${r.value}-hidden`]: !u.value,
      [`${r.value}-rtl`]: a.value === "rtl",
      [`${r.value}-borderless`]: !e.bordered
    })), p = (m) => {
      o("click", m);
    };
    return () => {
      var m, b, y;
      const {
        icon: S = (m = n.icon) === null || m === void 0 ? void 0 : m.call(n),
        color: C,
        closeIcon: O = (b = n.closeIcon) === null || b === void 0 ? void 0 : b.call(n),
        closable: $ = !1
      } = e, P = () => $ ? O ? v("span", {
        class: `${r.value}-close-icon`,
        onClick: c
      }, [O]) : v(Sr, {
        class: `${r.value}-close-icon`,
        onClick: c
      }, null) : null, k = {
        backgroundColor: C && !d.value ? C : void 0
      }, x = S || null, E = (y = n.default) === null || y === void 0 ? void 0 : y.call(n), z = x ? v(Ve, null, [x, v("span", null, [E])]) : E, N = e.onClick !== void 0, D = v("span", Z(Z({}, i), {}, {
        onClick: p,
        class: [f.value, i.class],
        style: [k, i.style]
      }), [z, P()]);
      return l(N ? v(tm, null, {
        default: () => [D]
      }) : D);
    };
  }
});
Xi.CheckableTag = Nh;
Xi.install = function(e) {
  return e.component(Xi.name, Xi), e.component(Nh.name, Nh), e;
};
function vL(e, t) {
  let {
    slots: n,
    attrs: o
  } = t;
  return v(Xi, Z(Z({
    color: "blue"
  }, e), o), n);
}
var mL = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z" } }] }, name: "calendar", theme: "outlined" };
function Dx(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      bL(e, i, n[i]);
    });
  }
  return e;
}
function bL(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Lf = function(t, n) {
  var o = Dx({}, t, n.attrs);
  return v(pn, Dx({}, o, {
    icon: mL
  }), null);
};
Lf.displayName = "CalendarOutlined";
Lf.inheritAttrs = !1;
var yL = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { tag: "path", attrs: { d: "M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z" } }] }, name: "clock-circle", theme: "outlined" };
function zx(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      xL(e, i, n[i]);
    });
  }
  return e;
}
function xL(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Ff = function(t, n) {
  var o = zx({}, t, n.attrs);
  return v(pn, zx({}, o, {
    icon: yL
  }), null);
};
Ff.displayName = "ClockCircleOutlined";
Ff.inheritAttrs = !1;
function wL(e, t, n) {
  return n !== void 0 ? n : t === "year" && e.lang.yearPlaceholder ? e.lang.yearPlaceholder : t === "quarter" && e.lang.quarterPlaceholder ? e.lang.quarterPlaceholder : t === "month" && e.lang.monthPlaceholder ? e.lang.monthPlaceholder : t === "week" && e.lang.weekPlaceholder ? e.lang.weekPlaceholder : t === "time" && e.timePickerLocale.placeholder ? e.timePickerLocale.placeholder : e.lang.placeholder;
}
function SL(e, t, n) {
  return n !== void 0 ? n : t === "year" && e.lang.yearPlaceholder ? e.lang.rangeYearPlaceholder : t === "month" && e.lang.monthPlaceholder ? e.lang.rangeMonthPlaceholder : t === "week" && e.lang.weekPlaceholder ? e.lang.rangeWeekPlaceholder : t === "time" && e.timePickerLocale.placeholder ? e.timePickerLocale.rangePlaceholder : e.lang.rangePlaceholder;
}
function r2(e, t) {
  const n = {
    adjustX: 1,
    adjustY: 1
  };
  switch (t) {
    case "bottomLeft":
      return {
        points: ["tl", "bl"],
        offset: [0, 4],
        overflow: n
      };
    case "bottomRight":
      return {
        points: ["tr", "br"],
        offset: [0, 4],
        overflow: n
      };
    case "topLeft":
      return {
        points: ["bl", "tl"],
        offset: [0, -4],
        overflow: n
      };
    case "topRight":
      return {
        points: ["br", "tr"],
        offset: [0, -4],
        overflow: n
      };
    default:
      return {
        points: e === "rtl" ? ["tr", "br"] : ["tl", "bl"],
        offset: [0, 4],
        overflow: n
      };
  }
}
function a2() {
  return {
    id: String,
    /**
     * @deprecated `dropdownClassName` is deprecated which will be removed in next major
     *   version.Please use `popupClassName` instead.
     */
    dropdownClassName: String,
    popupClassName: String,
    popupStyle: Ct(),
    transitionName: String,
    placeholder: String,
    allowClear: st(),
    autofocus: st(),
    disabled: st(),
    tabindex: Number,
    open: st(),
    defaultOpen: st(),
    /** Make input readOnly to avoid popup keyboard in mobile */
    inputReadOnly: st(),
    format: tn([String, Function, Array]),
    // Value
    // format:  string | CustomFormat<DateType> | (string | CustomFormat<DateType>)[];
    // Render
    // suffixIcon?: VueNode;
    // clearIcon?: VueNode;
    // prevIcon?: VueNode;
    // nextIcon?: VueNode;
    // superPrevIcon?: VueNode;
    // superNextIcon?: VueNode;
    getPopupContainer: Qe(),
    panelRender: Qe(),
    // // Events
    onChange: Qe(),
    "onUpdate:value": Qe(),
    onOk: Qe(),
    onOpenChange: Qe(),
    "onUpdate:open": Qe(),
    onFocus: Qe(),
    onBlur: Qe(),
    onMousedown: Qe(),
    onMouseup: Qe(),
    onMouseenter: Qe(),
    onMouseleave: Qe(),
    onClick: Qe(),
    onContextmenu: Qe(),
    onKeydown: Qe(),
    // WAI-ARIA
    role: String,
    name: String,
    autocomplete: String,
    direction: dn(),
    showToday: st(),
    showTime: tn([Boolean, Object]),
    locale: Ct(),
    size: dn(),
    bordered: st(),
    dateRender: Qe(),
    disabledDate: Qe(),
    mode: dn(),
    picker: dn(),
    valueFormat: String,
    placement: dn(),
    status: dn(),
    /** @deprecated Please use `disabledTime` instead. */
    disabledHours: Qe(),
    /** @deprecated Please use `disabledTime` instead. */
    disabledMinutes: Qe(),
    /** @deprecated Please use `disabledTime` instead. */
    disabledSeconds: Qe()
  };
}
function CL() {
  return {
    defaultPickerValue: tn([Object, String]),
    defaultValue: tn([Object, String]),
    value: tn([Object, String]),
    presets: Po(),
    disabledTime: Qe(),
    renderExtraFooter: Qe(),
    showNow: st(),
    monthCellRender: Qe(),
    // deprecated  Please use `monthCellRender"` instead.',
    monthCellContentRender: Qe()
  };
}
function $L() {
  return {
    allowEmpty: Po(),
    dateRender: Qe(),
    defaultPickerValue: Po(),
    defaultValue: Po(),
    value: Po(),
    presets: Po(),
    disabledTime: Qe(),
    disabled: tn([Boolean, Array]),
    renderExtraFooter: Qe(),
    separator: {
      type: String
    },
    showTime: tn([Boolean, Object]),
    ranges: Ct(),
    placeholder: Po(),
    mode: Po(),
    onChange: Qe(),
    "onUpdate:value": Qe(),
    onCalendarChange: Qe(),
    onPanelChange: Qe(),
    onOk: Qe()
  };
}
var PL = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
function OL(e, t) {
  function n(u, c) {
    const d = I(I(I({}, a2()), CL()), t);
    return ye({
      compatConfig: {
        MODE: 3
      },
      name: c,
      inheritAttrs: !1,
      props: d,
      slots: Object,
      setup(f, p) {
        let {
          slots: m,
          expose: b,
          attrs: y,
          emit: S
        } = p;
        const C = f, O = pi(), $ = ui.useInject();
        process.env.NODE_ENV !== "production" && (Fn(u !== "quarter", c || "DatePicker", `DatePicker.${c} is legacy usage. Please use DatePicker[picker='${u}'] directly.`), Fn(!C.dropdownClassName, c || "DatePicker", "`dropdownClassName` is deprecated. Please use `popupClassName` instead."), Fn(!(C.monthCellContentRender || m.monthCellContentRender), c || "DatePicker", '`monthCellContentRender` is deprecated. Please use `monthCellRender"` instead.'), Fn(!y.getCalendarContainer, c || "DatePicker", '`getCalendarContainer` is deprecated. Please use `getPopupContainer"` instead.'));
        const {
          prefixCls: P,
          direction: k,
          getPopupContainer: x,
          size: E,
          rootPrefixCls: z,
          disabled: N
        } = yt("picker", C), {
          compactSize: D,
          compactItemClassnames: W
        } = Vs(P, k), H = R(() => D.value || E.value), [L, A] = lP(P), U = le();
        b({
          focus: () => {
            var we;
            (we = U.value) === null || we === void 0 || we.focus();
          },
          blur: () => {
            var we;
            (we = U.value) === null || we === void 0 || we.blur();
          }
        });
        const j = (we) => C.valueFormat ? e.toString(we, C.valueFormat) : we, re = (we, ae) => {
          const se = j(we);
          S("update:value", se), S("change", se, ae), O.onFieldChange();
        }, G = (we) => {
          S("update:open", we), S("openChange", we);
        }, Y = (we) => {
          S("focus", we);
        }, K = (we) => {
          S("blur", we), O.onFieldBlur();
        }, J = (we, ae) => {
          const se = j(we);
          S("panelChange", se, ae);
        }, be = (we) => {
          const ae = j(we);
          S("ok", ae);
        }, [xe] = Bs("DatePicker", kd), ge = R(() => C.value ? C.valueFormat ? e.toDate(C.value, C.valueFormat) : C.value : C.value === "" ? void 0 : C.value), de = R(() => C.defaultValue ? C.valueFormat ? e.toDate(C.defaultValue, C.valueFormat) : C.defaultValue : C.defaultValue === "" ? void 0 : C.defaultValue), ne = R(() => C.defaultPickerValue ? C.valueFormat ? e.toDate(C.defaultPickerValue, C.valueFormat) : C.defaultPickerValue : C.defaultPickerValue === "" ? void 0 : C.defaultPickerValue);
        return () => {
          var we, ae, se, he, Me, ke;
          const Le = I(I({}, xe.value), C.locale), Re = I(I({}, C), y), {
            bordered: We = !0,
            placeholder: et,
            suffixIcon: Fe = (we = m.suffixIcon) === null || we === void 0 ? void 0 : we.call(m),
            showToday: Ne = !0,
            transitionName: Ge,
            allowClear: it = !0,
            dateRender: Ke = m.dateRender,
            renderExtraFooter: Oe = m.renderExtraFooter,
            monthCellRender: je = m.monthCellRender || C.monthCellContentRender || m.monthCellContentRender,
            clearIcon: De = (ae = m.clearIcon) === null || ae === void 0 ? void 0 : ae.call(m),
            id: Je = O.id.value
          } = Re, wt = PL(Re, ["bordered", "placeholder", "suffixIcon", "showToday", "transitionName", "allowClear", "dateRender", "renderExtraFooter", "monthCellRender", "clearIcon", "id"]), lt = Re.showTime === "" ? !0 : Re.showTime, {
            format: qe
          } = Re;
          let rt = {};
          u && (rt.picker = u);
          const dt = u || Re.picker || "date";
          rt = I(I(I({}, rt), lt ? Kd(I({
            format: qe,
            picker: dt
          }, typeof lt == "object" ? lt : {})) : {}), dt === "time" ? Kd(I(I({
            format: qe
          }, wt), {
            picker: dt
          })) : {});
          const vt = P.value, Rt = v(Ve, null, [Fe || (u === "time" ? v(Ff, null, null) : v(Lf, null, null)), $.hasFeedback && $.feedbackIcon]);
          return L(v(q5, Z(Z(Z({
            monthCellRender: je,
            dateRender: Ke,
            renderExtraFooter: Oe,
            ref: U,
            placeholder: wL(Le, dt, et),
            suffixIcon: Rt,
            dropdownAlign: r2(k.value, C.placement),
            clearIcon: De || v(fi, null, null),
            allowClear: it,
            transitionName: Ge || `${z.value}-slide-up`
          }, wt), rt), {}, {
            id: Je,
            picker: dt,
            value: ge.value,
            defaultValue: de.value,
            defaultPickerValue: ne.value,
            showToday: Ne,
            locale: Le.lang,
            class: Te({
              [`${vt}-${H.value}`]: H.value,
              [`${vt}-borderless`]: !We
            }, Yi(vt, Ol($.status, C.status), $.hasFeedback), y.class, A.value, W.value),
            disabled: N.value,
            prefixCls: vt,
            getPopupContainer: y.getCalendarContainer || x.value,
            generateConfig: e,
            prevIcon: ((se = m.prevIcon) === null || se === void 0 ? void 0 : se.call(m)) || v("span", {
              class: `${vt}-prev-icon`
            }, null),
            nextIcon: ((he = m.nextIcon) === null || he === void 0 ? void 0 : he.call(m)) || v("span", {
              class: `${vt}-next-icon`
            }, null),
            superPrevIcon: ((Me = m.superPrevIcon) === null || Me === void 0 ? void 0 : Me.call(m)) || v("span", {
              class: `${vt}-super-prev-icon`
            }, null),
            superNextIcon: ((ke = m.superNextIcon) === null || ke === void 0 ? void 0 : ke.call(m)) || v("span", {
              class: `${vt}-super-next-icon`
            }, null),
            components: l2,
            direction: k.value,
            dropdownClassName: Te(A.value, C.popupClassName, C.dropdownClassName),
            onChange: re,
            onOpenChange: G,
            onFocus: Y,
            onBlur: K,
            onPanelChange: J,
            onOk: be
          }), null));
        };
      }
    });
  }
  const o = n(void 0, "ADatePicker"), i = n("week", "AWeekPicker"), r = n("month", "AMonthPicker"), a = n("year", "AYearPicker"), l = n("time", "TimePicker"), s = n("quarter", "AQuarterPicker");
  return {
    DatePicker: o,
    WeekPicker: i,
    MonthPicker: r,
    YearPicker: a,
    TimePicker: l,
    QuarterPicker: s
  };
}
var IL = { icon: { tag: "svg", attrs: { viewBox: "0 0 1024 1024", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z" } }] }, name: "swap-right", theme: "outlined" };
function Rx(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      ML(e, i, n[i]);
    });
  }
  return e;
}
function ML(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Bm = function(t, n) {
  var o = Rx({}, t, n.attrs);
  return v(pn, Rx({}, o, {
    icon: IL
  }), null);
};
Bm.displayName = "SwapRightOutlined";
Bm.inheritAttrs = !1;
var TL = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
function kL(e, t) {
  return ye({
    compatConfig: {
      MODE: 3
    },
    name: "ARangePicker",
    inheritAttrs: !1,
    props: I(I(I({}, a2()), $L()), t),
    slots: Object,
    setup(o, i) {
      let {
        expose: r,
        slots: a,
        attrs: l,
        emit: s
      } = i;
      const u = o, c = pi(), d = ui.useInject();
      process.env.NODE_ENV !== "production" && (Fn(!u.dropdownClassName, "RangePicker", "`dropdownClassName` is deprecated. Please use `popupClassName` instead."), Fn(!l.getCalendarContainer, "DatePicker", '`getCalendarContainer` is deprecated. Please use `getPopupContainer"` instead.'));
      const {
        prefixCls: f,
        direction: p,
        getPopupContainer: m,
        size: b,
        rootPrefixCls: y,
        disabled: S
      } = yt("picker", u), {
        compactSize: C,
        compactItemClassnames: O
      } = Vs(f, p), $ = R(() => C.value || b.value), [P, k] = lP(f), x = le();
      r({
        focus: () => {
          var Y;
          (Y = x.value) === null || Y === void 0 || Y.focus();
        },
        blur: () => {
          var Y;
          (Y = x.value) === null || Y === void 0 || Y.blur();
        }
      });
      const E = (Y) => u.valueFormat ? e.toString(Y, u.valueFormat) : Y, z = (Y, K) => {
        const J = E(Y);
        s("update:value", J), s("change", J, K), c.onFieldChange();
      }, N = (Y) => {
        s("update:open", Y), s("openChange", Y);
      }, D = (Y) => {
        s("focus", Y);
      }, W = (Y) => {
        s("blur", Y), c.onFieldBlur();
      }, H = (Y, K) => {
        const J = E(Y);
        s("panelChange", J, K);
      }, L = (Y) => {
        const K = E(Y);
        s("ok", K);
      }, A = (Y, K, J) => {
        const be = E(Y);
        s("calendarChange", be, K, J);
      }, [U] = Bs("DatePicker", kd), j = R(() => u.value && u.valueFormat ? e.toDate(u.value, u.valueFormat) : u.value), re = R(() => u.defaultValue && u.valueFormat ? e.toDate(u.defaultValue, u.valueFormat) : u.defaultValue), G = R(() => u.defaultPickerValue && u.valueFormat ? e.toDate(u.defaultPickerValue, u.valueFormat) : u.defaultPickerValue);
      return () => {
        var Y, K, J, be, xe, ge, de;
        const ne = I(I({}, U.value), u.locale), we = I(I({}, u), l), {
          prefixCls: ae,
          bordered: se = !0,
          placeholder: he,
          suffixIcon: Me = (Y = a.suffixIcon) === null || Y === void 0 ? void 0 : Y.call(a),
          picker: ke = "date",
          transitionName: Le,
          allowClear: Re = !0,
          dateRender: We = a.dateRender,
          renderExtraFooter: et = a.renderExtraFooter,
          separator: Fe = (K = a.separator) === null || K === void 0 ? void 0 : K.call(a),
          clearIcon: Ne = (J = a.clearIcon) === null || J === void 0 ? void 0 : J.call(a),
          id: Ge = c.id.value
        } = we, it = TL(we, ["prefixCls", "bordered", "placeholder", "suffixIcon", "picker", "transitionName", "allowClear", "dateRender", "renderExtraFooter", "separator", "clearIcon", "id"]);
        delete it["onUpdate:value"], delete it["onUpdate:open"];
        const {
          format: Ke,
          showTime: Oe
        } = we;
        let je = {};
        je = I(I(I({}, je), Oe ? Kd(I({
          format: Ke,
          picker: ke
        }, Oe)) : {}), ke === "time" ? Kd(I(I({
          format: Ke
        }, Tn(it, ["disabledTime"])), {
          picker: ke
        })) : {});
        const De = f.value, Je = v(Ve, null, [Me || (ke === "time" ? v(Ff, null, null) : v(Lf, null, null)), d.hasFeedback && d.feedbackIcon]);
        return P(v(i8, Z(Z(Z({
          dateRender: We,
          renderExtraFooter: et,
          separator: Fe || v("span", {
            "aria-label": "to",
            class: `${De}-separator`
          }, [v(Bm, null, null)]),
          ref: x,
          dropdownAlign: r2(p.value, u.placement),
          placeholder: SL(ne, ke, he),
          suffixIcon: Je,
          clearIcon: Ne || v(fi, null, null),
          allowClear: Re,
          transitionName: Le || `${y.value}-slide-up`
        }, it), je), {}, {
          disabled: S.value,
          id: Ge,
          value: j.value,
          defaultValue: re.value,
          defaultPickerValue: G.value,
          picker: ke,
          class: Te({
            [`${De}-${$.value}`]: $.value,
            [`${De}-borderless`]: !se
          }, Yi(De, Ol(d.status, u.status), d.hasFeedback), l.class, k.value, O.value),
          locale: ne.lang,
          prefixCls: De,
          getPopupContainer: l.getCalendarContainer || m.value,
          generateConfig: e,
          prevIcon: ((be = a.prevIcon) === null || be === void 0 ? void 0 : be.call(a)) || v("span", {
            class: `${De}-prev-icon`
          }, null),
          nextIcon: ((xe = a.nextIcon) === null || xe === void 0 ? void 0 : xe.call(a)) || v("span", {
            class: `${De}-next-icon`
          }, null),
          superPrevIcon: ((ge = a.superPrevIcon) === null || ge === void 0 ? void 0 : ge.call(a)) || v("span", {
            class: `${De}-super-prev-icon`
          }, null),
          superNextIcon: ((de = a.superNextIcon) === null || de === void 0 ? void 0 : de.call(a)) || v("span", {
            class: `${De}-super-next-icon`
          }, null),
          components: l2,
          direction: p.value,
          dropdownClassName: Te(k.value, u.popupClassName, u.dropdownClassName),
          onChange: z,
          onOpenChange: N,
          onFocus: D,
          onBlur: W,
          onPanelChange: H,
          onOk: L,
          onCalendarChange: A
        }), null));
      };
    }
  });
}
const l2 = {
  button: dL,
  rangeItem: vL
};
function EL(e) {
  return e ? Array.isArray(e) ? e : [e] : [];
}
function Kd(e) {
  const {
    format: t,
    picker: n,
    showHour: o,
    showMinute: i,
    showSecond: r,
    use12Hours: a
  } = e, l = EL(t)[0], s = I({}, e);
  return l && typeof l == "string" && (!l.includes("s") && r === void 0 && (s.showSecond = !1), !l.includes("m") && i === void 0 && (s.showMinute = !1), !l.includes("H") && !l.includes("h") && o === void 0 && (s.showHour = !1), (l.includes("a") || l.includes("A")) && a === void 0 && (s.use12Hours = !0)), n === "time" ? s : (typeof l == "function" && delete s.format, {
    showTime: s
  });
}
function _L(e, t) {
  const {
    DatePicker: n,
    WeekPicker: o,
    MonthPicker: i,
    YearPicker: r,
    TimePicker: a,
    QuarterPicker: l
  } = OL(e, t), s = kL(e, t);
  return {
    DatePicker: n,
    WeekPicker: o,
    MonthPicker: i,
    YearPicker: r,
    TimePicker: a,
    QuarterPicker: l,
    RangePicker: s
  };
}
const {
  DatePicker: Gp,
  WeekPicker: Kp,
  MonthPicker: Yp,
  YearPicker: AL,
  TimePicker: DL,
  QuarterPicker: Up,
  RangePicker: Xp
} = _L(b5), zL = I(Gp, {
  WeekPicker: Kp,
  MonthPicker: Yp,
  YearPicker: AL,
  RangePicker: Xp,
  TimePicker: DL,
  QuarterPicker: Up,
  install: (e) => (e.component(Gp.name, Gp), e.component(Xp.name, Xp), e.component(Yp.name, Yp), e.component(Kp.name, Kp), e.component(Up.name, Up), e)
}), RL = (e) => {
  const {
    componentCls: t,
    sizePaddingEdgeHorizontal: n,
    colorSplit: o,
    lineWidth: i
  } = e;
  return {
    [t]: I(I({}, Zt(e)), {
      borderBlockStart: `${i}px solid ${o}`,
      // vertical
      "&-vertical": {
        position: "relative",
        top: "-0.06em",
        display: "inline-block",
        height: "0.9em",
        margin: `0 ${e.dividerVerticalGutterMargin}px`,
        verticalAlign: "middle",
        borderTop: 0,
        borderInlineStart: `${i}px solid ${o}`
      },
      "&-horizontal": {
        display: "flex",
        clear: "both",
        width: "100%",
        minWidth: "100%",
        margin: `${e.dividerHorizontalGutterMargin}px 0`
      },
      [`&-horizontal${t}-with-text`]: {
        display: "flex",
        alignItems: "center",
        margin: `${e.dividerHorizontalWithTextGutterMargin}px 0`,
        color: e.colorTextHeading,
        fontWeight: 500,
        fontSize: e.fontSizeLG,
        whiteSpace: "nowrap",
        textAlign: "center",
        borderBlockStart: `0 ${o}`,
        "&::before, &::after": {
          position: "relative",
          width: "50%",
          borderBlockStart: `${i}px solid transparent`,
          // Chrome not accept `inherit` in `border-top`
          borderBlockStartColor: "inherit",
          borderBlockEnd: 0,
          transform: "translateY(50%)",
          content: "''"
        }
      },
      [`&-horizontal${t}-with-text-left`]: {
        "&::before": {
          width: "5%"
        },
        "&::after": {
          width: "95%"
        }
      },
      [`&-horizontal${t}-with-text-right`]: {
        "&::before": {
          width: "95%"
        },
        "&::after": {
          width: "5%"
        }
      },
      [`${t}-inner-text`]: {
        display: "inline-block",
        padding: "0 1em"
      },
      "&-dashed": {
        background: "none",
        borderColor: o,
        borderStyle: "dashed",
        borderWidth: `${i}px 0 0`
      },
      [`&-horizontal${t}-with-text${t}-dashed`]: {
        "&::before, &::after": {
          borderStyle: "dashed none none"
        }
      },
      [`&-vertical${t}-dashed`]: {
        borderInlineStartWidth: i,
        borderInlineEnd: 0,
        borderBlockStart: 0,
        borderBlockEnd: 0
      },
      [`&-plain${t}-with-text`]: {
        color: e.colorText,
        fontWeight: "normal",
        fontSize: e.fontSize
      },
      [`&-horizontal${t}-with-text-left${t}-no-default-orientation-margin-left`]: {
        "&::before": {
          width: 0
        },
        "&::after": {
          width: "100%"
        },
        [`${t}-inner-text`]: {
          paddingInlineStart: n
        }
      },
      [`&-horizontal${t}-with-text-right${t}-no-default-orientation-margin-right`]: {
        "&::before": {
          width: "100%"
        },
        "&::after": {
          width: 0
        },
        [`${t}-inner-text`]: {
          paddingInlineEnd: n
        }
      }
    })
  };
}, NL = nn("Divider", (e) => {
  const t = _t(e, {
    dividerVerticalGutterMargin: e.marginXS,
    dividerHorizontalWithTextGutterMargin: e.margin,
    dividerHorizontalGutterMargin: e.marginLG
  });
  return [RL(t)];
}, {
  sizePaddingEdgeHorizontal: 0
}), BL = () => ({
  prefixCls: String,
  type: {
    type: String,
    default: "horizontal"
  },
  dashed: {
    type: Boolean,
    default: !1
  },
  orientation: {
    type: String,
    default: "center"
  },
  plain: {
    type: Boolean,
    default: !1
  },
  orientationMargin: [String, Number]
}), LL = ye({
  name: "ADivider",
  inheritAttrs: !1,
  compatConfig: {
    MODE: 3
  },
  props: BL(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: i,
      direction: r
    } = yt("divider", e), [a, l] = NL(i), s = R(() => e.orientation === "left" && e.orientationMargin != null), u = R(() => e.orientation === "right" && e.orientationMargin != null), c = R(() => {
      const {
        type: p,
        dashed: m,
        plain: b
      } = e, y = i.value;
      return {
        [y]: !0,
        [l.value]: !!l.value,
        [`${y}-${p}`]: !0,
        [`${y}-dashed`]: !!m,
        [`${y}-plain`]: !!b,
        [`${y}-rtl`]: r.value === "rtl",
        [`${y}-no-default-orientation-margin-left`]: s.value,
        [`${y}-no-default-orientation-margin-right`]: u.value
      };
    }), d = R(() => {
      const p = typeof e.orientationMargin == "number" ? `${e.orientationMargin}px` : e.orientationMargin;
      return I(I({}, s.value && {
        marginLeft: p
      }), u.value && {
        marginRight: p
      });
    }), f = R(() => e.orientation.length > 0 ? "-" + e.orientation : e.orientation);
    return () => {
      var p;
      const m = no((p = n.default) === null || p === void 0 ? void 0 : p.call(n));
      return a(v("div", Z(Z({}, o), {}, {
        class: [c.value, m.length ? `${i.value}-with-text ${i.value}-with-text${f.value}` : "", o.class],
        role: "separator"
      }), [m.length ? v("span", {
        class: `${i.value}-inner-text`,
        style: d.value
      }, [m]) : null]));
    };
  }
}), FL = er(LL);
Ui.Button = Fd;
Ui.install = function(e) {
  return e.component(Ui.name, Ui), e.component(Fd.name, Fd), e;
};
const s2 = () => ({
  prefixCls: String,
  width: ue.oneOfType([ue.string, ue.number]),
  height: ue.oneOfType([ue.string, ue.number]),
  style: {
    type: Object,
    default: void 0
  },
  class: String,
  rootClassName: String,
  rootStyle: Ct(),
  placement: {
    type: String
  },
  wrapperClassName: String,
  level: {
    type: [String, Array]
  },
  levelMove: {
    type: [Number, Function, Array]
  },
  duration: String,
  ease: String,
  showMask: {
    type: Boolean,
    default: void 0
  },
  maskClosable: {
    type: Boolean,
    default: void 0
  },
  maskStyle: {
    type: Object,
    default: void 0
  },
  afterVisibleChange: Function,
  keyboard: {
    type: Boolean,
    default: void 0
  },
  contentWrapperStyle: Po(),
  autofocus: {
    type: Boolean,
    default: void 0
  },
  open: {
    type: Boolean,
    default: void 0
  },
  // Motion
  motion: Qe(),
  maskMotion: Ct()
}), HL = () => I(I({}, s2()), {
  forceRender: {
    type: Boolean,
    default: void 0
  },
  getContainer: ue.oneOfType([ue.string, ue.func, ue.object, ue.looseBool])
}), VL = () => I(I({}, s2()), {
  getContainer: Function,
  getOpenCount: Function,
  scrollLocker: ue.any,
  inline: Boolean
});
function jL(e) {
  return Array.isArray(e) ? e : [e];
}
const WL = {
  transition: "transitionend",
  WebkitTransition: "webkitTransitionEnd",
  MozTransition: "transitionend",
  OTransition: "oTransitionEnd otransitionend"
};
Object.keys(WL).filter((e) => {
  if (typeof document > "u")
    return !1;
  const t = document.getElementsByTagName("html")[0];
  return e in (t ? t.style : {});
})[0];
const qL = !(typeof window < "u" && window.document && window.document.createElement);
var GL = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const Nx = ye({
  compatConfig: {
    MODE: 3
  },
  inheritAttrs: !1,
  props: VL(),
  emits: ["close", "handleClick", "change"],
  setup(e, t) {
    let {
      emit: n,
      slots: o
    } = t;
    const i = Pe(), r = Pe(), a = Pe(), l = Pe(), s = Pe();
    let u = [];
    `${Number((Date.now() + Math.random()).toString().replace(".", Math.round(Math.random() * 9).toString())).toString(16)}`, Pt(() => {
      Nt(() => {
        var S;
        const {
          open: C,
          getContainer: O,
          showMask: $,
          autofocus: P
        } = e, k = O?.();
        m(e), C && (k && (k.parentNode, document.body), Nt(() => {
          P && c();
        }), $ && ((S = e.scrollLocker) === null || S === void 0 || S.lock()));
      });
    }), Ie(() => e.level, () => {
      m(e);
    }, {
      flush: "post"
    }), Ie(() => e.open, () => {
      const {
        open: S,
        getContainer: C,
        scrollLocker: O,
        showMask: $,
        autofocus: P
      } = e, k = C?.();
      k && (k.parentNode, document.body), S ? (P && c(), $ && O?.lock()) : O?.unLock();
    }, {
      flush: "post"
    }), Lo(() => {
      var S;
      const {
        open: C
      } = e;
      C && (document.body.style.touchAction = ""), (S = e.scrollLocker) === null || S === void 0 || S.unLock();
    }), Ie(() => e.placement, (S) => {
      S && (s.value = null);
    });
    const c = () => {
      var S, C;
      (C = (S = r.value) === null || S === void 0 ? void 0 : S.focus) === null || C === void 0 || C.call(S);
    }, d = (S) => {
      n("close", S);
    }, f = (S) => {
      S.keyCode === Xe.ESC && (S.stopPropagation(), d(S));
    }, p = () => {
      const {
        open: S,
        afterVisibleChange: C
      } = e;
      C && C(!!S);
    }, m = (S) => {
      let {
        level: C,
        getContainer: O
      } = S;
      if (qL)
        return;
      const $ = O?.(), P = $ ? $.parentNode : null;
      u = [], C === "all" ? (P ? Array.prototype.slice.call(P.children) : []).forEach((x) => {
        x.nodeName !== "SCRIPT" && x.nodeName !== "STYLE" && x.nodeName !== "LINK" && x !== $ && u.push(x);
      }) : C && jL(C).forEach((k) => {
        document.querySelectorAll(k).forEach((x) => {
          u.push(x);
        });
      });
    }, b = (S) => {
      n("handleClick", S);
    }, y = Pe(!1);
    return Ie(r, () => {
      Nt(() => {
        y.value = !0;
      });
    }), () => {
      var S, C;
      const {
        width: O,
        height: $,
        open: P,
        prefixCls: k,
        placement: x,
        level: E,
        levelMove: z,
        ease: N,
        duration: D,
        getContainer: W,
        onChange: H,
        afterVisibleChange: L,
        showMask: A,
        maskClosable: U,
        maskStyle: j,
        keyboard: re,
        getOpenCount: G,
        scrollLocker: Y,
        contentWrapperStyle: K,
        style: J,
        class: be,
        rootClassName: xe,
        rootStyle: ge,
        maskMotion: de,
        motion: ne,
        inline: we
      } = e, ae = GL(e, ["width", "height", "open", "prefixCls", "placement", "level", "levelMove", "ease", "duration", "getContainer", "onChange", "afterVisibleChange", "showMask", "maskClosable", "maskStyle", "keyboard", "getOpenCount", "scrollLocker", "contentWrapperStyle", "style", "class", "rootClassName", "rootStyle", "maskMotion", "motion", "inline"]), se = P && y.value, he = Te(k, {
        [`${k}-${x}`]: !0,
        [`${k}-open`]: se,
        [`${k}-inline`]: we,
        "no-mask": !A,
        [xe]: !0
      }), Me = typeof ne == "function" ? ne(x) : ne;
      return v("div", Z(Z({}, Tn(ae, ["autofocus"])), {}, {
        tabindex: -1,
        class: he,
        style: ge,
        ref: r,
        onKeydown: se && re ? f : void 0
      }), [v(Ti, de, {
        default: () => [A && Zi(v("div", {
          class: `${k}-mask`,
          onClick: U ? d : void 0,
          style: j,
          ref: a
        }, null), [[mr, se]])]
      }), v(Ti, Z(Z({}, Me), {}, {
        onAfterEnter: p,
        onAfterLeave: p
      }), {
        default: () => [Zi(v("div", {
          class: `${k}-content-wrapper`,
          style: [K],
          ref: i
        }, [v("div", {
          class: [`${k}-content`, be],
          style: J,
          ref: s
        }, [(S = o.default) === null || S === void 0 ? void 0 : S.call(o)]), o.handler ? v("div", {
          onClick: b,
          ref: l
        }, [(C = o.handler) === null || C === void 0 ? void 0 : C.call(o)]) : null]), [[mr, se]])]
      })]);
    };
  }
});
var Bx = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const KL = ye({
  compatConfig: {
    MODE: 3
  },
  inheritAttrs: !1,
  props: wn(HL(), {
    prefixCls: "drawer",
    placement: "left",
    getContainer: "body",
    level: "all",
    duration: ".3s",
    ease: "cubic-bezier(0.78, 0.14, 0.15, 0.86)",
    afterVisibleChange: () => {
    },
    showMask: !0,
    maskClosable: !0,
    maskStyle: {},
    wrapperClassName: "",
    keyboard: !0,
    forceRender: !1,
    autofocus: !0
  }),
  emits: ["handleClick", "close"],
  setup(e, t) {
    let {
      emit: n,
      slots: o
    } = t;
    const i = le(null), r = (l) => {
      n("handleClick", l);
    }, a = (l) => {
      n("close", l);
    };
    return () => {
      const {
        getContainer: l,
        wrapperClassName: s,
        rootClassName: u,
        rootStyle: c,
        forceRender: d
      } = e, f = Bx(e, ["getContainer", "wrapperClassName", "rootClassName", "rootStyle", "forceRender"]);
      let p = null;
      if (!l)
        return v(Nx, Z(Z({}, f), {}, {
          rootClassName: u,
          rootStyle: c,
          open: e.open,
          onClose: a,
          onHandleClick: r,
          inline: !0
        }), o);
      const m = !!o.handler || d;
      return (m || e.open || i.value) && (p = v(zv, {
        autoLock: !0,
        visible: e.open,
        forceRender: m,
        getContainer: l,
        wrapperClassName: s
      }, {
        default: (b) => {
          var {
            visible: y,
            afterClose: S
          } = b, C = Bx(b, ["visible", "afterClose"]);
          return v(Nx, Z(Z(Z({
            ref: i
          }, f), C), {}, {
            rootClassName: u,
            rootStyle: c,
            open: y !== void 0 ? y : e.open,
            afterVisibleChange: S !== void 0 ? S : e.afterVisibleChange,
            onClose: a,
            onHandleClick: r
          }), o);
        }
      })), p;
    };
  }
}), YL = (e) => {
  const {
    componentCls: t,
    motionDurationSlow: n
  } = e, o = {
    "&-enter, &-appear, &-leave": {
      "&-start": {
        transition: "none"
      },
      "&-active": {
        transition: `all ${n}`
      }
    }
  };
  return {
    [t]: {
      // ======================== Mask ========================
      [`${t}-mask-motion`]: {
        "&-enter, &-appear, &-leave": {
          "&-active": {
            transition: `all ${n}`
          }
        },
        "&-enter, &-appear": {
          opacity: 0,
          "&-active": {
            opacity: 1
          }
        },
        "&-leave": {
          opacity: 1,
          "&-active": {
            opacity: 0
          }
        }
      },
      // ======================= Panel ========================
      [`${t}-panel-motion`]: {
        // Left
        "&-left": [o, {
          "&-enter, &-appear": {
            "&-start": {
              transform: "translateX(-100%) !important"
            },
            "&-active": {
              transform: "translateX(0)"
            }
          },
          "&-leave": {
            transform: "translateX(0)",
            "&-active": {
              transform: "translateX(-100%)"
            }
          }
        }],
        // Right
        "&-right": [o, {
          "&-enter, &-appear": {
            "&-start": {
              transform: "translateX(100%) !important"
            },
            "&-active": {
              transform: "translateX(0)"
            }
          },
          "&-leave": {
            transform: "translateX(0)",
            "&-active": {
              transform: "translateX(100%)"
            }
          }
        }],
        // Top
        "&-top": [o, {
          "&-enter, &-appear": {
            "&-start": {
              transform: "translateY(-100%) !important"
            },
            "&-active": {
              transform: "translateY(0)"
            }
          },
          "&-leave": {
            transform: "translateY(0)",
            "&-active": {
              transform: "translateY(-100%)"
            }
          }
        }],
        // Bottom
        "&-bottom": [o, {
          "&-enter, &-appear": {
            "&-start": {
              transform: "translateY(100%) !important"
            },
            "&-active": {
              transform: "translateY(0)"
            }
          },
          "&-leave": {
            transform: "translateY(0)",
            "&-active": {
              transform: "translateY(100%)"
            }
          }
        }]
      }
    }
  };
}, UL = (e) => {
  const {
    componentCls: t,
    zIndexPopup: n,
    colorBgMask: o,
    colorBgElevated: i,
    motionDurationSlow: r,
    motionDurationMid: a,
    padding: l,
    paddingLG: s,
    fontSizeLG: u,
    lineHeightLG: c,
    lineWidth: d,
    lineType: f,
    colorSplit: p,
    marginSM: m,
    colorIcon: b,
    colorIconHover: y,
    colorText: S,
    fontWeightStrong: C,
    drawerFooterPaddingVertical: O,
    drawerFooterPaddingHorizontal: $
  } = e, P = `${t}-content-wrapper`;
  return {
    [t]: {
      position: "fixed",
      inset: 0,
      zIndex: n,
      pointerEvents: "none",
      "&-pure": {
        position: "relative",
        background: i,
        [`&${t}-left`]: {
          boxShadow: e.boxShadowDrawerLeft
        },
        [`&${t}-right`]: {
          boxShadow: e.boxShadowDrawerRight
        },
        [`&${t}-top`]: {
          boxShadow: e.boxShadowDrawerUp
        },
        [`&${t}-bottom`]: {
          boxShadow: e.boxShadowDrawerDown
        }
      },
      "&-inline": {
        position: "absolute"
      },
      // ====================== Mask ======================
      [`${t}-mask`]: {
        position: "absolute",
        inset: 0,
        zIndex: n,
        background: o,
        pointerEvents: "auto"
      },
      // ==================== Content =====================
      [P]: {
        position: "absolute",
        zIndex: n,
        transition: `all ${r}`,
        "&-hidden": {
          display: "none"
        }
      },
      // Placement
      [`&-left > ${P}`]: {
        top: 0,
        bottom: 0,
        left: {
          _skip_check_: !0,
          value: 0
        },
        boxShadow: e.boxShadowDrawerLeft
      },
      [`&-right > ${P}`]: {
        top: 0,
        right: {
          _skip_check_: !0,
          value: 0
        },
        bottom: 0,
        boxShadow: e.boxShadowDrawerRight
      },
      [`&-top > ${P}`]: {
        top: 0,
        insetInline: 0,
        boxShadow: e.boxShadowDrawerUp
      },
      [`&-bottom > ${P}`]: {
        bottom: 0,
        insetInline: 0,
        boxShadow: e.boxShadowDrawerDown
      },
      [`${t}-content`]: {
        width: "100%",
        height: "100%",
        overflow: "auto",
        background: i,
        pointerEvents: "auto"
      },
      // ===================== Panel ======================
      [`${t}-wrapper-body`]: {
        display: "flex",
        flexDirection: "column",
        width: "100%",
        height: "100%"
      },
      // Header
      [`${t}-header`]: {
        display: "flex",
        flex: 0,
        alignItems: "center",
        padding: `${l}px ${s}px`,
        fontSize: u,
        lineHeight: c,
        borderBottom: `${d}px ${f} ${p}`,
        "&-title": {
          display: "flex",
          flex: 1,
          alignItems: "center",
          minWidth: 0,
          minHeight: 0
        }
      },
      [`${t}-extra`]: {
        flex: "none"
      },
      [`${t}-close`]: {
        display: "inline-block",
        marginInlineEnd: m,
        color: b,
        fontWeight: C,
        fontSize: u,
        fontStyle: "normal",
        lineHeight: 1,
        textAlign: "center",
        textTransform: "none",
        textDecoration: "none",
        background: "transparent",
        border: 0,
        outline: 0,
        cursor: "pointer",
        transition: `color ${a}`,
        textRendering: "auto",
        "&:focus, &:hover": {
          color: y,
          textDecoration: "none"
        }
      },
      [`${t}-title`]: {
        flex: 1,
        margin: 0,
        color: S,
        fontWeight: e.fontWeightStrong,
        fontSize: u,
        lineHeight: c
      },
      // Body
      [`${t}-body`]: {
        flex: 1,
        minWidth: 0,
        minHeight: 0,
        padding: s,
        overflow: "auto"
      },
      // Footer
      [`${t}-footer`]: {
        flexShrink: 0,
        padding: `${O}px ${$}px`,
        borderTop: `${d}px ${f} ${p}`
      },
      // ====================== RTL =======================
      "&-rtl": {
        direction: "rtl"
      }
    }
  };
}, XL = nn("Drawer", (e) => {
  const t = _t(e, {
    drawerFooterPaddingVertical: e.paddingXS,
    drawerFooterPaddingHorizontal: e.padding
  });
  return [UL(t), YL(t)];
}, (e) => ({
  zIndexPopup: e.zIndexPopupBase
}));
var QL = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const ZL = ["top", "right", "bottom", "left"], Lx = {
  distance: 180
}, JL = () => ({
  autofocus: {
    type: Boolean,
    default: void 0
  },
  closable: {
    type: Boolean,
    default: void 0
  },
  closeIcon: ue.any,
  destroyOnClose: {
    type: Boolean,
    default: void 0
  },
  forceRender: {
    type: Boolean,
    default: void 0
  },
  getContainer: {
    type: [String, Function, Boolean, Object],
    default: void 0
  },
  maskClosable: {
    type: Boolean,
    default: void 0
  },
  mask: {
    type: Boolean,
    default: void 0
  },
  maskStyle: Ct(),
  rootClassName: String,
  rootStyle: Ct(),
  size: {
    type: String
  },
  drawerStyle: Ct(),
  headerStyle: Ct(),
  bodyStyle: Ct(),
  contentWrapperStyle: {
    type: Object,
    default: void 0
  },
  title: ue.any,
  /** @deprecated Please use `open` instead */
  visible: {
    type: Boolean,
    default: void 0
  },
  open: {
    type: Boolean,
    default: void 0
  },
  width: ue.oneOfType([ue.string, ue.number]),
  height: ue.oneOfType([ue.string, ue.number]),
  zIndex: Number,
  prefixCls: String,
  push: ue.oneOfType([ue.looseBool, {
    type: Object
  }]),
  placement: ue.oneOf(ZL),
  keyboard: {
    type: Boolean,
    default: void 0
  },
  extra: ue.any,
  footer: ue.any,
  footerStyle: Ct(),
  level: ue.any,
  levelMove: {
    type: [Number, Array, Function]
  },
  handle: ue.any,
  /** @deprecated Use `@afterVisibleChange` instead */
  afterVisibleChange: Function,
  /** @deprecated Please use `@afterOpenChange` instead */
  onAfterVisibleChange: Function,
  onAfterOpenChange: Function,
  /** @deprecated Please use `onUpdate:open` instead */
  "onUpdate:visible": Function,
  "onUpdate:open": Function,
  onClose: Function
}), eF = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ADrawer",
  inheritAttrs: !1,
  props: wn(JL(), {
    closable: !0,
    placement: "right",
    maskClosable: !0,
    mask: !0,
    level: null,
    keyboard: !0,
    push: Lx
  }),
  slots: Object,
  // emits: ['update:visible', 'close', 'afterVisibleChange'],
  setup(e, t) {
    let {
      emit: n,
      slots: o,
      attrs: i
    } = t;
    const r = Pe(!1), a = Pe(!1), l = Pe(null), s = Pe(!1), u = Pe(!1), c = R(() => {
      var G;
      return (G = e.open) !== null && G !== void 0 ? G : e.visible;
    });
    Ie(c, () => {
      c.value ? s.value = !0 : u.value = !1;
    }, {
      immediate: !0
    }), Ie([c, s], () => {
      c.value && s.value && (u.value = !0);
    }, {
      immediate: !0
    });
    const d = Tt("parentDrawerOpts", null), {
      prefixCls: f,
      getPopupContainer: p,
      direction: m
    } = yt("drawer", e), [b, y] = XL(f), S = R(() => (
      // 有可能为 false，所以不能直接判断
      e.getContainer === void 0 && p?.value ? () => p.value(document.body) : e.getContainer
    ));
    Fn(!e.afterVisibleChange, "Drawer", "`afterVisibleChange` prop is deprecated, please use `@afterVisibleChange` event instead"), process.env.NODE_ENV !== "production" && [["visible", "open"], ["onUpdate:visible", "onUpdate:open"], ["onAfterVisibleChange", "onAfterOpenChange"]].forEach((G) => {
      let [Y, K] = G;
      Fn(!e[Y], "Drawer", `\`${Y}\` is deprecated, please use \`${K}\` instead.`);
    }), kt("parentDrawerOpts", {
      setPush: () => {
        r.value = !0;
      },
      setPull: () => {
        r.value = !1, Nt(() => {
          $();
        });
      }
    }), Pt(() => {
      c.value && d && d.setPush();
    }), Lo(() => {
      d && d.setPull();
    }), Ie(u, () => {
      d && (u.value ? d.setPush() : d.setPull());
    }, {
      flush: "post"
    });
    const $ = () => {
      var G, Y;
      (Y = (G = l.value) === null || G === void 0 ? void 0 : G.domFocus) === null || Y === void 0 || Y.call(G);
    }, P = (G) => {
      n("update:visible", !1), n("update:open", !1), n("close", G);
    }, k = (G) => {
      var Y;
      G || (a.value === !1 && (a.value = !0), e.destroyOnClose && (s.value = !1)), (Y = e.afterVisibleChange) === null || Y === void 0 || Y.call(e, G), n("afterVisibleChange", G), n("afterOpenChange", G);
    }, x = R(() => {
      const {
        push: G,
        placement: Y
      } = e;
      let K;
      return typeof G == "boolean" ? K = G ? Lx.distance : 0 : K = G.distance, K = parseFloat(String(K || 0)), Y === "left" || Y === "right" ? `translateX(${Y === "left" ? K : -K}px)` : Y === "top" || Y === "bottom" ? `translateY(${Y === "top" ? K : -K}px)` : null;
    }), E = R(() => {
      var G;
      return (G = e.width) !== null && G !== void 0 ? G : e.size === "large" ? 736 : 378;
    }), z = R(() => {
      var G;
      return (G = e.height) !== null && G !== void 0 ? G : e.size === "large" ? 736 : 378;
    }), N = R(() => {
      const {
        mask: G,
        placement: Y
      } = e;
      if (!u.value && !G)
        return {};
      const K = {};
      return Y === "left" || Y === "right" ? K.width = uh(E.value) ? `${E.value}px` : E.value : K.height = uh(z.value) ? `${z.value}px` : z.value, K;
    }), D = R(() => {
      const {
        zIndex: G,
        contentWrapperStyle: Y
      } = e, K = N.value;
      return [{
        zIndex: G,
        transform: r.value ? x.value : void 0
      }, I({}, Y), K];
    }), W = (G) => {
      const {
        closable: Y,
        headerStyle: K
      } = e, J = Mi(o, e, "extra"), be = Mi(o, e, "title");
      return !be && !Y ? null : v("div", {
        class: Te(`${G}-header`, {
          [`${G}-header-close-only`]: Y && !be && !J
        }),
        style: K
      }, [v("div", {
        class: `${G}-header-title`
      }, [H(G), be && v("div", {
        class: `${G}-title`
      }, [be])]), J && v("div", {
        class: `${G}-extra`
      }, [J])]);
    }, H = (G) => {
      var Y;
      const {
        closable: K
      } = e, J = o.closeIcon ? (Y = o.closeIcon) === null || Y === void 0 ? void 0 : Y.call(o) : e.closeIcon;
      return K && v("button", {
        key: "closer",
        onClick: P,
        "aria-label": "Close",
        class: `${G}-close`
      }, [J === void 0 ? v(Sr, null, null) : J]);
    }, L = (G) => {
      var Y;
      if (a.value && !e.forceRender && !s.value)
        return null;
      const {
        bodyStyle: K,
        drawerStyle: J
      } = e;
      return v("div", {
        class: `${G}-wrapper-body`,
        style: J
      }, [W(G), v("div", {
        key: "body",
        class: `${G}-body`,
        style: K
      }, [(Y = o.default) === null || Y === void 0 ? void 0 : Y.call(o)]), A(G)]);
    }, A = (G) => {
      const Y = Mi(o, e, "footer");
      if (!Y)
        return null;
      const K = `${G}-footer`;
      return v("div", {
        class: K,
        style: e.footerStyle
      }, [Y]);
    }, U = R(() => Te({
      "no-mask": !e.mask,
      [`${f.value}-rtl`]: m.value === "rtl"
    }, e.rootClassName, y.value)), j = R(() => xl(Kr(f.value, "mask-motion"))), re = (G) => xl(Kr(f.value, `panel-motion-${G}`));
    return () => {
      const {
        width: G,
        height: Y,
        placement: K,
        mask: J,
        forceRender: be
      } = e, xe = QL(e, ["width", "height", "placement", "mask", "forceRender"]), ge = I(I(I({}, i), Tn(xe, ["size", "closeIcon", "closable", "destroyOnClose", "drawerStyle", "headerStyle", "bodyStyle", "title", "push", "onAfterVisibleChange", "onClose", "onUpdate:visible", "onUpdate:open", "visible"])), {
        forceRender: be,
        onClose: P,
        afterVisibleChange: k,
        handler: !1,
        prefixCls: f.value,
        open: u.value,
        showMask: J,
        placement: K,
        ref: l
      });
      return b(v(Wu, null, {
        default: () => [v(KL, Z(Z({}, ge), {}, {
          maskMotion: j.value,
          motion: re,
          width: E.value,
          height: z.value,
          getContainer: S.value,
          rootClassName: U.value,
          rootStyle: e.rootStyle,
          contentWrapperStyle: D.value
        }), {
          handler: e.handle ? () => e.handle : o.handle,
          default: () => L(f.value)
        })]
      }));
    };
  }
}), tF = er(eF), Mu = (e) => e != null && (Array.isArray(e) ? Ko(e).length : !0);
function Lm(e) {
  return Mu(e.prefix) || Mu(e.suffix) || Mu(e.allowClear);
}
function bd(e) {
  return Mu(e.addonBefore) || Mu(e.addonAfter);
}
function Bh(e) {
  return typeof e > "u" || e === null ? "" : String(e);
}
function Tu(e, t, n, o) {
  if (!n)
    return;
  const i = t;
  if (t.type === "click") {
    Object.defineProperty(i, "target", {
      writable: !0
    }), Object.defineProperty(i, "currentTarget", {
      writable: !0
    });
    const r = e.cloneNode(!0);
    i.target = r, i.currentTarget = r, r.value = "", n(i);
    return;
  }
  if (o !== void 0) {
    Object.defineProperty(i, "target", {
      writable: !0
    }), Object.defineProperty(i, "currentTarget", {
      writable: !0
    }), i.target = e, i.currentTarget = e, e.value = o, n(i);
    return;
  }
  n(i);
}
function u2(e, t) {
  if (!e) return;
  e.focus(t);
  const {
    cursor: n
  } = t || {};
  if (n) {
    const o = e.value.length;
    switch (n) {
      case "start":
        e.setSelectionRange(0, 0);
        break;
      case "end":
        e.setSelectionRange(o, o);
        break;
      default:
        e.setSelectionRange(0, o);
    }
  }
}
const nF = () => ({
  addonBefore: ue.any,
  addonAfter: ue.any,
  prefix: ue.any,
  suffix: ue.any,
  clearIcon: ue.any,
  affixWrapperClassName: String,
  groupClassName: String,
  wrapperClassName: String,
  inputClassName: String,
  allowClear: {
    type: Boolean,
    default: void 0
  }
}), c2 = () => I(I({}, nF()), {
  value: {
    type: [String, Number, Symbol],
    default: void 0
  },
  defaultValue: {
    type: [String, Number, Symbol],
    default: void 0
  },
  inputElement: ue.any,
  prefixCls: String,
  disabled: {
    type: Boolean,
    default: void 0
  },
  focused: {
    type: Boolean,
    default: void 0
  },
  triggerFocus: Function,
  readonly: {
    type: Boolean,
    default: void 0
  },
  handleReset: Function,
  hidden: {
    type: Boolean,
    default: void 0
  }
}), d2 = () => I(I({}, c2()), {
  id: String,
  placeholder: {
    type: [String, Number]
  },
  autocomplete: String,
  type: dn("text"),
  name: String,
  size: {
    type: String
  },
  autofocus: {
    type: Boolean,
    default: void 0
  },
  lazy: {
    type: Boolean,
    default: !0
  },
  maxlength: Number,
  loading: {
    type: Boolean,
    default: void 0
  },
  bordered: {
    type: Boolean,
    default: void 0
  },
  showCount: {
    type: [Boolean, Object]
  },
  htmlSize: Number,
  onPressEnter: Function,
  onKeydown: Function,
  onKeyup: Function,
  onFocus: Function,
  onBlur: Function,
  onChange: Function,
  onInput: Function,
  "onUpdate:value": Function,
  onCompositionstart: Function,
  onCompositionend: Function,
  valueModifiers: Object,
  hidden: {
    type: Boolean,
    default: void 0
  },
  status: String
}), oF = ye({
  name: "BaseInput",
  inheritAttrs: !1,
  props: c2(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const i = le(), r = (l) => {
      var s;
      if (!((s = i.value) === null || s === void 0) && s.contains(l.target)) {
        const {
          triggerFocus: u
        } = e;
        u?.();
      }
    }, a = () => {
      var l;
      const {
        allowClear: s,
        value: u,
        disabled: c,
        readonly: d,
        handleReset: f,
        suffix: p = n.suffix,
        prefixCls: m
      } = e;
      if (!s)
        return null;
      const b = !c && !d && u, y = `${m}-clear-icon`, S = ((l = n.clearIcon) === null || l === void 0 ? void 0 : l.call(n)) || "*";
      return v("span", {
        onClick: f,
        onMousedown: (C) => C.preventDefault(),
        class: Te({
          [`${y}-hidden`]: !b,
          [`${y}-has-suffix`]: !!p
        }, y),
        role: "button",
        tabindex: -1
      }, [S]);
    };
    return () => {
      var l, s;
      const {
        focused: u,
        value: c,
        disabled: d,
        allowClear: f,
        readonly: p,
        hidden: m,
        prefixCls: b,
        prefix: y = (l = n.prefix) === null || l === void 0 ? void 0 : l.call(n),
        suffix: S = (s = n.suffix) === null || s === void 0 ? void 0 : s.call(n),
        addonAfter: C = n.addonAfter,
        addonBefore: O = n.addonBefore,
        inputElement: $,
        affixWrapperClassName: P,
        wrapperClassName: k,
        groupClassName: x
      } = e;
      let E = An($, {
        value: c,
        hidden: m
      });
      if (Lm({
        prefix: y,
        suffix: S,
        allowClear: f
      })) {
        const z = `${b}-affix-wrapper`, N = Te(z, {
          [`${z}-disabled`]: d,
          [`${z}-focused`]: u,
          [`${z}-readonly`]: p,
          [`${z}-input-with-clear-btn`]: S && f && c
        }, !bd({
          addonAfter: C,
          addonBefore: O
        }) && o.class, P), D = (S || f) && v("span", {
          class: `${b}-suffix`
        }, [a(), S]);
        E = v("span", {
          class: N,
          style: o.style,
          hidden: !bd({
            addonAfter: C,
            addonBefore: O
          }) && m,
          onMousedown: r,
          ref: i
        }, [y && v("span", {
          class: `${b}-prefix`
        }, [y]), An($, {
          style: null,
          value: c,
          hidden: null
        }), D]);
      }
      if (bd({
        addonAfter: C,
        addonBefore: O
      })) {
        const z = `${b}-group`, N = `${z}-addon`, D = Te(`${b}-wrapper`, z, k), W = Te(`${b}-group-wrapper`, o.class, x);
        return v("span", {
          class: W,
          style: o.style,
          hidden: m
        }, [v("span", {
          class: D
        }, [O && v("span", {
          class: N
        }, [O]), An(E, {
          style: null,
          hidden: null
        }), C && v("span", {
          class: N
        }, [C])])]);
      }
      return E;
    };
  }
});
var iF = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const rF = ye({
  name: "VCInput",
  inheritAttrs: !1,
  props: d2(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      expose: i,
      emit: r
    } = t;
    const a = Pe(e.value === void 0 ? e.defaultValue : e.value), l = Pe(!1), s = Pe(), u = Pe();
    Ie(() => e.value, () => {
      a.value = e.value;
    }), Ie(() => e.disabled, () => {
      e.disabled && (l.value = !1);
    });
    const c = (x) => {
      s.value && u2(s.value.input, x);
    }, d = () => {
      var x;
      (x = s.value.input) === null || x === void 0 || x.blur();
    }, f = (x, E, z) => {
      var N;
      (N = s.value.input) === null || N === void 0 || N.setSelectionRange(x, E, z);
    }, p = () => {
      var x;
      (x = s.value.input) === null || x === void 0 || x.select();
    };
    i({
      focus: c,
      blur: d,
      input: R(() => {
        var x;
        return (x = s.value.input) === null || x === void 0 ? void 0 : x.input;
      }),
      stateValue: a,
      setSelectionRange: f,
      select: p
    });
    const m = (x) => {
      r("change", x);
    }, b = (x, E) => {
      a.value !== x && (e.value === void 0 ? a.value = x : Nt(() => {
        var z;
        s.value.input.value !== a.value && ((z = u.value) === null || z === void 0 || z.$forceUpdate());
      }), Nt(() => {
        E && E();
      }));
    }, y = (x) => {
      const {
        value: E
      } = x.target;
      if (a.value === E) return;
      const z = x.target.value;
      Tu(s.value.input, x, m), b(z);
    }, S = (x) => {
      x.keyCode === 13 && r("pressEnter", x), r("keydown", x);
    }, C = (x) => {
      l.value = !0, r("focus", x);
    }, O = (x) => {
      l.value = !1, r("blur", x);
    }, $ = (x) => {
      Tu(s.value.input, x, m), b("", () => {
        c();
      });
    }, P = () => {
      var x, E;
      const {
        addonBefore: z = n.addonBefore,
        addonAfter: N = n.addonAfter,
        disabled: D,
        valueModifiers: W = {},
        htmlSize: H,
        autocomplete: L,
        prefixCls: A,
        inputClassName: U,
        prefix: j = (x = n.prefix) === null || x === void 0 ? void 0 : x.call(n),
        suffix: re = (E = n.suffix) === null || E === void 0 ? void 0 : E.call(n),
        allowClear: G,
        type: Y = "text"
      } = e, K = Tn(e, [
        "prefixCls",
        "onPressEnter",
        "addonBefore",
        "addonAfter",
        "prefix",
        "suffix",
        "allowClear",
        // Input elements must be either controlled or uncontrolled,
        // specify either the value prop, or the defaultValue prop, but not both.
        "defaultValue",
        "size",
        "bordered",
        "htmlSize",
        "lazy",
        "showCount",
        "valueModifiers",
        "showCount",
        "affixWrapperClassName",
        "groupClassName",
        "inputClassName",
        "wrapperClassName"
      ]), J = I(I(I({}, K), o), {
        autocomplete: L,
        onChange: y,
        onInput: y,
        onFocus: C,
        onBlur: O,
        onKeydown: S,
        class: Te(A, {
          [`${A}-disabled`]: D
        }, U, !bd({
          addonAfter: N,
          addonBefore: z
        }) && !Lm({
          prefix: j,
          suffix: re,
          allowClear: G
        }) && o.class),
        ref: s,
        key: "ant-input",
        size: H,
        type: Y,
        lazy: e.lazy
      });
      return W.lazy && delete J.onInput, J.autofocus || delete J.autofocus, v(Rv, Tn(J, ["size"]), null);
    }, k = () => {
      var x;
      const {
        maxlength: E,
        suffix: z = (x = n.suffix) === null || x === void 0 ? void 0 : x.call(n),
        showCount: N,
        prefixCls: D
      } = e, W = Number(E) > 0;
      if (z || N) {
        const H = [...Bh(a.value)].length, L = typeof N == "object" ? N.formatter({
          count: H,
          maxlength: E
        }) : `${H}${W ? ` / ${E}` : ""}`;
        return v(Ve, null, [!!N && v("span", {
          class: Te(`${D}-show-count-suffix`, {
            [`${D}-show-count-has-suffix`]: !!z
          })
        }, [L]), z]);
      }
      return null;
    };
    return Pt(() => {
      process.env.NODE_ENV === "test" && e.autofocus && c();
    }), () => {
      const {
        prefixCls: x,
        disabled: E
      } = e, z = iF(e, ["prefixCls", "disabled"]);
      return v(oF, Z(Z(Z({}, z), o), {}, {
        ref: u,
        prefixCls: x,
        inputElement: P(),
        handleReset: $,
        value: Bh(a.value),
        focused: l.value,
        triggerFocus: c,
        suffix: k(),
        disabled: E
      }), n);
    };
  }
}), Hf = () => Tn(d2(), ["wrapperClassName", "groupClassName", "inputClassName", "affixWrapperClassName"]), f2 = () => I(I({}, Tn(Hf(), ["prefix", "addonBefore", "addonAfter", "suffix"])), {
  rows: Number,
  autosize: {
    type: [Boolean, Object],
    default: void 0
  },
  autoSize: {
    type: [Boolean, Object],
    default: void 0
  },
  onResize: {
    type: Function
  },
  onCompositionstart: Cs(),
  onCompositionend: Cs(),
  valueModifiers: Object
});
var aF = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const ft = ye({
  compatConfig: {
    MODE: 3
  },
  name: "AInput",
  inheritAttrs: !1,
  props: Hf(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      expose: i,
      emit: r
    } = t;
    const a = le(), l = pi(), s = ui.useInject(), u = R(() => Ol(s.status, e.status)), {
      direction: c,
      prefixCls: d,
      size: f,
      autocomplete: p
    } = yt("input", e), {
      compactSize: m,
      compactItemClassnames: b
    } = Vs(d, c), y = R(() => m.value || f.value), [S, C] = Im(d), O = Ji();
    i({
      focus: (H) => {
        var L;
        (L = a.value) === null || L === void 0 || L.focus(H);
      },
      blur: () => {
        var H;
        (H = a.value) === null || H === void 0 || H.blur();
      },
      input: a,
      setSelectionRange: (H, L, A) => {
        var U;
        (U = a.value) === null || U === void 0 || U.setSelectionRange(H, L, A);
      },
      select: () => {
        var H;
        (H = a.value) === null || H === void 0 || H.select();
      }
    });
    const E = le([]), z = () => {
      E.value.push(setTimeout(() => {
        var H, L, A, U;
        !((H = a.value) === null || H === void 0) && H.input && ((L = a.value) === null || L === void 0 ? void 0 : L.input.getAttribute("type")) === "password" && (!((A = a.value) === null || A === void 0) && A.input.hasAttribute("value")) && ((U = a.value) === null || U === void 0 || U.input.removeAttribute("value"));
      }));
    };
    Pt(() => {
      z();
    }), Gh(() => {
      E.value.forEach((H) => clearTimeout(H));
    }), At(() => {
      E.value.forEach((H) => clearTimeout(H));
    });
    const N = (H) => {
      z(), r("blur", H), l.onFieldBlur();
    }, D = (H) => {
      z(), r("focus", H);
    }, W = (H) => {
      r("update:value", H.target.value), r("change", H), r("input", H), l.onFieldChange();
    };
    return () => {
      var H, L, A, U, j, re;
      const {
        hasFeedback: G,
        feedbackIcon: Y
      } = s, {
        allowClear: K,
        bordered: J = !0,
        prefix: be = (H = n.prefix) === null || H === void 0 ? void 0 : H.call(n),
        suffix: xe = (L = n.suffix) === null || L === void 0 ? void 0 : L.call(n),
        addonAfter: ge = (A = n.addonAfter) === null || A === void 0 ? void 0 : A.call(n),
        addonBefore: de = (U = n.addonBefore) === null || U === void 0 ? void 0 : U.call(n),
        id: ne = (j = l.id) === null || j === void 0 ? void 0 : j.value
      } = e, we = aF(e, ["allowClear", "bordered", "prefix", "suffix", "addonAfter", "addonBefore", "id"]), ae = (G || xe) && v(Ve, null, [xe, G && Y]), se = d.value, he = Lm({
        prefix: be,
        suffix: xe
      }) || !!G, Me = n.clearIcon || (() => v(fi, null, null));
      return S(v(rF, Z(Z(Z({}, o), Tn(we, ["onUpdate:value", "onChange", "onInput"])), {}, {
        onChange: W,
        id: ne,
        disabled: (re = e.disabled) !== null && re !== void 0 ? re : O.value,
        ref: a,
        prefixCls: se,
        autocomplete: p.value,
        onBlur: N,
        onFocus: D,
        prefix: be,
        suffix: ae,
        allowClear: K,
        addonAfter: ge && v(Wu, null, {
          default: () => [v(Nd, null, {
            default: () => [ge]
          })]
        }),
        addonBefore: de && v(Wu, null, {
          default: () => [v(Nd, null, {
            default: () => [de]
          })]
        }),
        class: [o.class, b.value],
        inputClassName: Te({
          [`${se}-sm`]: y.value === "small",
          [`${se}-lg`]: y.value === "large",
          [`${se}-rtl`]: c.value === "rtl",
          [`${se}-borderless`]: !J
        }, !he && Yi(se, u.value), C.value),
        affixWrapperClassName: Te({
          [`${se}-affix-wrapper-sm`]: y.value === "small",
          [`${se}-affix-wrapper-lg`]: y.value === "large",
          [`${se}-affix-wrapper-rtl`]: c.value === "rtl",
          [`${se}-affix-wrapper-borderless`]: !J
        }, Yi(`${se}-affix-wrapper`, u.value, G), C.value),
        wrapperClassName: Te({
          [`${se}-group-rtl`]: c.value === "rtl"
        }, C.value),
        groupClassName: Te({
          [`${se}-group-wrapper-sm`]: y.value === "small",
          [`${se}-group-wrapper-lg`]: y.value === "large",
          [`${se}-group-wrapper-rtl`]: c.value === "rtl"
        }, Yi(`${se}-group-wrapper`, u.value, G), C.value)
      }), I(I({}, n), {
        clearIcon: Me
      })));
    };
  }
}), lF = ye({
  compatConfig: {
    MODE: 3
  },
  name: "AInputGroup",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    size: {
      type: String
    },
    compact: {
      type: Boolean,
      default: void 0
    }
  },
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: i,
      direction: r,
      getPrefixCls: a
    } = yt("input-group", e), l = ui.useInject();
    ui.useProvide(l, {
      isFormItemInput: !1
    });
    const s = R(() => a("input")), [u, c] = Im(s), d = R(() => {
      const f = i.value;
      return {
        [`${f}`]: !0,
        [c.value]: !0,
        [`${f}-lg`]: e.size === "large",
        [`${f}-sm`]: e.size === "small",
        [`${f}-compact`]: e.compact,
        [`${f}-rtl`]: r.value === "rtl"
      };
    });
    return () => {
      var f;
      return u(v("span", Z(Z({}, o), {}, {
        class: Te(d.value, o.class)
      }), [(f = n.default) === null || f === void 0 ? void 0 : f.call(n)]));
    };
  }
});
var sF = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const uF = ye({
  compatConfig: {
    MODE: 3
  },
  name: "AInputSearch",
  inheritAttrs: !1,
  props: I(I({}, Hf()), {
    inputPrefixCls: String,
    // 不能设置默认值 https://github.com/vueComponent/ant-design-vue/issues/1916
    enterButton: ue.any,
    onSearch: {
      type: Function
    }
  }),
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      expose: i,
      emit: r
    } = t;
    const a = Pe(), l = Pe(!1);
    i({
      focus: () => {
        var P;
        (P = a.value) === null || P === void 0 || P.focus();
      },
      blur: () => {
        var P;
        (P = a.value) === null || P === void 0 || P.blur();
      }
    });
    const c = (P) => {
      r("update:value", P.target.value), P && P.target && P.type === "click" && r("search", P.target.value, P), r("change", P);
    }, d = (P) => {
      var k;
      document.activeElement === ((k = a.value) === null || k === void 0 ? void 0 : k.input) && P.preventDefault();
    }, f = (P) => {
      var k, x;
      r("search", (x = (k = a.value) === null || k === void 0 ? void 0 : k.input) === null || x === void 0 ? void 0 : x.stateValue, P);
    }, p = (P) => {
      l.value || e.loading || f(P);
    }, m = (P) => {
      l.value = !0, r("compositionstart", P);
    }, b = (P) => {
      l.value = !1, r("compositionend", P);
    }, {
      prefixCls: y,
      getPrefixCls: S,
      direction: C,
      size: O
    } = yt("input-search", e), $ = R(() => S("input", e.inputPrefixCls));
    return () => {
      var P, k, x, E;
      const {
        disabled: z,
        loading: N,
        addonAfter: D = (P = n.addonAfter) === null || P === void 0 ? void 0 : P.call(n),
        suffix: W = (k = n.suffix) === null || k === void 0 ? void 0 : k.call(n)
      } = e, H = sF(e, ["disabled", "loading", "addonAfter", "suffix"]);
      let {
        enterButton: L = (E = (x = n.enterButton) === null || x === void 0 ? void 0 : x.call(n)) !== null && E !== void 0 ? E : !1
      } = e;
      L = L || L === "";
      const A = typeof L == "boolean" ? v(Sf, null, null) : null, U = `${y.value}-button`, j = Array.isArray(L) ? L[0] : L;
      let re;
      const G = j.type && dw(j.type) && j.type.__ANT_BUTTON;
      if (G || j.tagName === "button")
        re = An(j, I({
          onMousedown: d,
          onClick: f,
          key: "enterButton"
        }, G ? {
          class: U,
          size: O.value
        } : {}), !1);
      else {
        const K = A && !L;
        re = v($t, {
          class: U,
          type: L ? "primary" : void 0,
          size: O.value,
          disabled: z,
          key: "enterButton",
          onMousedown: d,
          onClick: f,
          loading: N,
          icon: K ? A : null
        }, {
          default: () => [K ? null : A || L]
        });
      }
      D && (re = [re, D]);
      const Y = Te(y.value, {
        [`${y.value}-rtl`]: C.value === "rtl",
        [`${y.value}-${O.value}`]: !!O.value,
        [`${y.value}-with-button`]: !!L
      }, o.class);
      return v(ft, Z(Z(Z({
        ref: a
      }, Tn(H, ["onUpdate:value", "onSearch", "enterButton"])), o), {}, {
        onPressEnter: p,
        onCompositionstart: m,
        onCompositionend: b,
        size: O.value,
        prefixCls: $.value,
        addonAfter: re,
        suffix: W,
        onChange: c,
        class: Y,
        disabled: z
      }), n);
    };
  }
}), Fx = (e) => e != null && (Array.isArray(e) ? Ko(e).length : !0);
function cF(e) {
  return Fx(e.addonBefore) || Fx(e.addonAfter);
}
const dF = ["text", "input"], fF = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ClearableLabeledInput",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    inputType: ue.oneOf(li("text", "input")),
    value: ni(),
    defaultValue: ni(),
    allowClear: {
      type: Boolean,
      default: void 0
    },
    element: ni(),
    handleReset: Function,
    disabled: {
      type: Boolean,
      default: void 0
    },
    direction: {
      type: String
    },
    size: {
      type: String
    },
    suffix: ni(),
    prefix: ni(),
    addonBefore: ni(),
    addonAfter: ni(),
    readonly: {
      type: Boolean,
      default: void 0
    },
    focused: {
      type: Boolean,
      default: void 0
    },
    bordered: {
      type: Boolean,
      default: !0
    },
    triggerFocus: {
      type: Function
    },
    hidden: Boolean,
    status: String,
    hashId: String
  },
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const i = ui.useInject(), r = (l) => {
      const {
        value: s,
        disabled: u,
        readonly: c,
        handleReset: d,
        suffix: f = n.suffix
      } = e, p = !u && !c && s, m = `${l}-clear-icon`;
      return v(fi, {
        onClick: d,
        onMousedown: (b) => b.preventDefault(),
        class: Te({
          [`${m}-hidden`]: !p,
          [`${m}-has-suffix`]: !!f
        }, m),
        role: "button"
      }, null);
    }, a = (l, s) => {
      const {
        value: u,
        allowClear: c,
        direction: d,
        bordered: f,
        hidden: p,
        status: m,
        addonAfter: b = n.addonAfter,
        addonBefore: y = n.addonBefore,
        hashId: S
      } = e, {
        status: C,
        hasFeedback: O
      } = i;
      if (!c)
        return An(s, {
          value: u,
          disabled: e.disabled
        });
      const $ = Te(`${l}-affix-wrapper`, `${l}-affix-wrapper-textarea-with-clear-btn`, Yi(`${l}-affix-wrapper`, Ol(C, m), O), {
        [`${l}-affix-wrapper-rtl`]: d === "rtl",
        [`${l}-affix-wrapper-borderless`]: !f,
        // className will go to addon wrapper
        [`${o.class}`]: !cF({
          addonAfter: b,
          addonBefore: y
        }) && o.class
      }, S);
      return v("span", {
        class: $,
        style: o.style,
        hidden: p
      }, [An(s, {
        style: null,
        value: u,
        disabled: e.disabled
      }), r(l)]);
    };
    return () => {
      var l;
      const {
        prefixCls: s,
        inputType: u,
        element: c = (l = n.element) === null || l === void 0 ? void 0 : l.call(n)
      } = e;
      return u === dF[0] ? a(s, c) : null;
    };
  }
}), pF = `
  min-height:0 !important;
  max-height:none !important;
  height:0 !important;
  visibility:hidden !important;
  overflow:hidden !important;
  position:absolute !important;
  z-index:-1000 !important;
  top:0 !important;
  right:0 !important;
  pointer-events: none !important;
`, gF = ["letter-spacing", "line-height", "padding-top", "padding-bottom", "font-family", "font-weight", "font-size", "font-variant", "text-rendering", "text-transform", "width", "text-indent", "padding-left", "padding-right", "border-width", "box-sizing", "word-break", "white-space"], Qp = {};
let xi;
function hF(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  const n = e.getAttribute("id") || e.getAttribute("data-reactid") || e.getAttribute("name");
  if (t && Qp[n])
    return Qp[n];
  const o = window.getComputedStyle(e), i = o.getPropertyValue("box-sizing") || o.getPropertyValue("-moz-box-sizing") || o.getPropertyValue("-webkit-box-sizing"), r = parseFloat(o.getPropertyValue("padding-bottom")) + parseFloat(o.getPropertyValue("padding-top")), a = parseFloat(o.getPropertyValue("border-bottom-width")) + parseFloat(o.getPropertyValue("border-top-width")), s = {
    sizingStyle: gF.map((u) => `${u}:${o.getPropertyValue(u)}`).join(";"),
    paddingSize: r,
    borderSize: a,
    boxSizing: i
  };
  return t && n && (Qp[n] = s), s;
}
function vF(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null;
  xi || (xi = document.createElement("textarea"), xi.setAttribute("tab-index", "-1"), xi.setAttribute("aria-hidden", "true"), document.body.appendChild(xi)), e.getAttribute("wrap") ? xi.setAttribute("wrap", e.getAttribute("wrap")) : xi.removeAttribute("wrap");
  const {
    paddingSize: i,
    borderSize: r,
    boxSizing: a,
    sizingStyle: l
  } = hF(e, t);
  xi.setAttribute("style", `${l};${pF}`), xi.value = e.value || e.placeholder || "";
  let s, u, c, d = xi.scrollHeight;
  if (a === "border-box" ? d += r : a === "content-box" && (d -= i), n !== null || o !== null) {
    xi.value = " ";
    const p = xi.scrollHeight - i;
    n !== null && (s = p * n, a === "border-box" && (s = s + i + r), d = Math.max(s, d)), o !== null && (u = p * o, a === "border-box" && (u = u + i + r), c = d > u ? "" : "hidden", d = Math.min(u, d));
  }
  const f = {
    height: `${d}px`,
    overflowY: c,
    resize: "none"
  };
  return s && (f.minHeight = `${s}px`), u && (f.maxHeight = `${u}px`), f;
}
const Zp = 0, Jp = 1, eg = 2, mF = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ResizableTextArea",
  inheritAttrs: !1,
  props: f2(),
  setup(e, t) {
    let {
      attrs: n,
      emit: o,
      expose: i
    } = t, r, a;
    const l = le(), s = le({}), u = le(eg);
    At(() => {
      Mt.cancel(r), Mt.cancel(a);
    });
    const c = () => {
      try {
        if (l.value && document.activeElement === l.value.input) {
          const k = l.value.getSelectionStart(), x = l.value.getSelectionEnd(), E = l.value.getScrollTop();
          l.value.setSelectionRange(k, x), l.value.setScrollTop(E);
        }
      } catch {
      }
    }, d = le(), f = le();
    Lt(() => {
      const k = e.autoSize || e.autosize;
      k ? (d.value = k.minRows, f.value = k.maxRows) : (d.value = void 0, f.value = void 0);
    });
    const p = R(() => !!(e.autoSize || e.autosize)), m = () => {
      u.value = Zp;
    };
    Ie([() => e.value, d, f, p], () => {
      p.value && m();
    }, {
      immediate: !0
    });
    const b = le();
    Ie([u, l], () => {
      if (l.value)
        if (u.value === Zp)
          u.value = Jp;
        else if (u.value === Jp) {
          const k = vF(l.value.input, !1, d.value, f.value);
          u.value = eg, b.value = k;
        } else
          c();
    }, {
      immediate: !0,
      flush: "post"
    });
    const y = ci(), S = le(), C = () => {
      Mt.cancel(S.value);
    }, O = (k) => {
      u.value === eg && (o("resize", k), p.value && (C(), S.value = Mt(() => {
        m();
      })));
    };
    At(() => {
      C();
    }), i({
      resizeTextarea: () => {
        m();
      },
      textArea: R(() => {
        var k;
        return (k = l.value) === null || k === void 0 ? void 0 : k.input;
      }),
      instance: y
    }), Zn(e.autosize === void 0, "Input.TextArea", "autosize is deprecated, please use autoSize instead.");
    const P = () => {
      const {
        prefixCls: k,
        disabled: x
      } = e, E = Tn(e, ["prefixCls", "onPressEnter", "autoSize", "autosize", "defaultValue", "allowClear", "type", "maxlength", "valueModifiers"]), z = Te(k, n.class, {
        [`${k}-disabled`]: x
      }), N = p.value ? b.value : null, D = [n.style, s.value, N], W = I(I(I({}, E), n), {
        style: D,
        class: z
      });
      return (u.value === Zp || u.value === Jp) && D.push({
        overflowX: "hidden",
        overflowY: "hidden"
      }), W.autofocus || delete W.autofocus, W.rows === 0 && delete W.rows, v(Ss, {
        onResize: O,
        disabled: !p.value
      }, {
        default: () => [v(Rv, Z(Z({}, W), {}, {
          ref: l,
          tag: "textarea"
        }), null)]
      });
    };
    return () => P();
  }
});
function p2(e, t) {
  return [...e || ""].slice(0, t).join("");
}
function Hx(e, t, n, o) {
  let i = n;
  return e ? i = p2(n, o) : [...t || ""].length < n.length && [...n || ""].length > o && (i = t), i;
}
const bF = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ATextarea",
  inheritAttrs: !1,
  props: f2(),
  setup(e, t) {
    let {
      attrs: n,
      expose: o,
      emit: i
    } = t;
    var r;
    const a = pi(), l = ui.useInject(), s = R(() => Ol(l.status, e.status)), u = Pe((r = e.value) !== null && r !== void 0 ? r : e.defaultValue), c = Pe(), d = Pe(""), {
      prefixCls: f,
      size: p,
      direction: m
    } = yt("input", e), [b, y] = Im(f), S = Ji(), C = R(() => e.showCount === "" || e.showCount || !1), O = R(() => Number(e.maxlength) > 0), $ = Pe(!1), P = Pe(), k = Pe(0), x = (G) => {
      $.value = !0, P.value = d.value, k.value = G.currentTarget.selectionStart, i("compositionstart", G);
    }, E = (G) => {
      var Y;
      $.value = !1;
      let K = G.currentTarget.value;
      if (O.value) {
        const J = k.value >= e.maxlength + 1 || k.value === ((Y = P.value) === null || Y === void 0 ? void 0 : Y.length);
        K = Hx(J, P.value, K, e.maxlength);
      }
      K !== d.value && (W(K), Tu(G.currentTarget, G, A, K)), i("compositionend", G);
    }, z = ci();
    Ie(() => e.value, () => {
      var G;
      "value" in z.vnode.props, u.value = (G = e.value) !== null && G !== void 0 ? G : "";
    });
    const N = (G) => {
      var Y;
      u2((Y = c.value) === null || Y === void 0 ? void 0 : Y.textArea, G);
    }, D = () => {
      var G, Y;
      (Y = (G = c.value) === null || G === void 0 ? void 0 : G.textArea) === null || Y === void 0 || Y.blur();
    }, W = (G, Y) => {
      u.value !== G && (e.value === void 0 ? u.value = G : Nt(() => {
        var K, J, be;
        c.value.textArea.value !== d.value && ((be = (K = c.value) === null || K === void 0 ? void 0 : (J = K.instance).update) === null || be === void 0 || be.call(J));
      }), Nt(() => {
        Y && Y();
      }));
    }, H = (G) => {
      G.keyCode === 13 && i("pressEnter", G), i("keydown", G);
    }, L = (G) => {
      const {
        onBlur: Y
      } = e;
      Y?.(G), a.onFieldBlur();
    }, A = (G) => {
      i("update:value", G.target.value), i("change", G), i("input", G), a.onFieldChange();
    }, U = (G) => {
      Tu(c.value.textArea, G, A), W("", () => {
        N();
      });
    }, j = (G) => {
      let Y = G.target.value;
      if (u.value !== Y) {
        if (O.value) {
          const K = G.target, J = K.selectionStart >= e.maxlength + 1 || K.selectionStart === Y.length || !K.selectionStart;
          Y = Hx(J, d.value, Y, e.maxlength);
        }
        Tu(G.currentTarget, G, A, Y), W(Y);
      }
    }, re = () => {
      var G, Y;
      const {
        class: K
      } = n, {
        bordered: J = !0
      } = e, be = I(I(I({}, Tn(e, ["allowClear"])), n), {
        class: [{
          [`${f.value}-borderless`]: !J,
          [`${K}`]: K && !C.value,
          [`${f.value}-sm`]: p.value === "small",
          [`${f.value}-lg`]: p.value === "large"
        }, Yi(f.value, s.value), y.value],
        disabled: S.value,
        showCount: null,
        prefixCls: f.value,
        onInput: j,
        onChange: j,
        onBlur: L,
        onKeydown: H,
        onCompositionstart: x,
        onCompositionend: E
      });
      return !((G = e.valueModifiers) === null || G === void 0) && G.lazy && delete be.onInput, v(mF, Z(Z({}, be), {}, {
        id: (Y = be?.id) !== null && Y !== void 0 ? Y : a.id.value,
        ref: c,
        maxlength: e.maxlength,
        lazy: e.lazy
      }), null);
    };
    return o({
      focus: N,
      blur: D,
      resizableTextArea: c
    }), Lt(() => {
      let G = Bh(u.value);
      !$.value && O.value && (e.value === null || e.value === void 0) && (G = p2(G, e.maxlength)), d.value = G;
    }), () => {
      var G;
      const {
        maxlength: Y,
        bordered: K = !0,
        hidden: J
      } = e, {
        style: be,
        class: xe
      } = n, ge = I(I(I({}, e), n), {
        prefixCls: f.value,
        inputType: "text",
        handleReset: U,
        direction: m.value,
        bordered: K,
        style: C.value ? void 0 : be,
        hashId: y.value,
        disabled: (G = e.disabled) !== null && G !== void 0 ? G : S.value
      });
      let de = v(fF, Z(Z({}, ge), {}, {
        value: d.value,
        status: e.status
      }), {
        element: re
      });
      if (C.value || l.hasFeedback) {
        const ne = [...d.value].length;
        let we = "";
        typeof C.value == "object" ? we = C.value.formatter({
          value: d.value,
          count: ne,
          maxlength: Y
        }) : we = `${ne}${O.value ? ` / ${Y}` : ""}`, de = v("div", {
          hidden: J,
          class: Te(`${f.value}-textarea`, {
            [`${f.value}-textarea-rtl`]: m.value === "rtl",
            [`${f.value}-textarea-show-count`]: C.value,
            [`${f.value}-textarea-in-form-item`]: l.isFormItemInput
          }, `${f.value}-textarea-show-count`, xe, y.value),
          style: be,
          "data-count": typeof we != "object" ? we : void 0
        }, [de, l.hasFeedback && v("span", {
          class: `${f.value}-textarea-suffix`
        }, [l.feedbackIcon])]);
      }
      return b(de);
    };
  }
});
var yF = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z" } }] }, name: "eye", theme: "outlined" };
function Vx(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      xF(e, i, n[i]);
    });
  }
  return e;
}
function xF(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Fm = function(t, n) {
  var o = Vx({}, t, n.attrs);
  return v(pn, Vx({}, o, {
    icon: yF
  }), null);
};
Fm.displayName = "EyeOutlined";
Fm.inheritAttrs = !1;
var wF = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z" } }, { tag: "path", attrs: { d: "M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z" } }] }, name: "eye-invisible", theme: "outlined" };
function jx(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      SF(e, i, n[i]);
    });
  }
  return e;
}
function SF(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Hm = function(t, n) {
  var o = jx({}, t, n.attrs);
  return v(pn, jx({}, o, {
    icon: wF
  }), null);
};
Hm.displayName = "EyeInvisibleOutlined";
Hm.inheritAttrs = !1;
var CF = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const $F = {
  click: "onClick",
  hover: "onMouseover"
}, PF = (e) => e ? v(Fm, null, null) : v(Hm, null, null), OF = ye({
  compatConfig: {
    MODE: 3
  },
  name: "AInputPassword",
  inheritAttrs: !1,
  props: I(I({}, Hf()), {
    prefixCls: String,
    inputPrefixCls: String,
    action: {
      type: String,
      default: "click"
    },
    visibilityToggle: {
      type: Boolean,
      default: !0
    },
    visible: {
      type: Boolean,
      default: void 0
    },
    "onUpdate:visible": Function,
    iconRender: Function
  }),
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      expose: i,
      emit: r
    } = t;
    const a = Pe(!1), l = () => {
      const {
        disabled: y
      } = e;
      y || (a.value = !a.value, r("update:visible", a.value));
    };
    Lt(() => {
      e.visible !== void 0 && (a.value = !!e.visible);
    });
    const s = Pe();
    i({
      focus: () => {
        var y;
        (y = s.value) === null || y === void 0 || y.focus();
      },
      blur: () => {
        var y;
        (y = s.value) === null || y === void 0 || y.blur();
      }
    });
    const d = (y) => {
      const {
        action: S,
        iconRender: C = n.iconRender || PF
      } = e, O = $F[S] || "", $ = C(a.value), P = {
        [O]: l,
        class: `${y}-icon`,
        key: "passwordIcon",
        onMousedown: (k) => {
          k.preventDefault();
        },
        onMouseup: (k) => {
          k.preventDefault();
        }
      };
      return An(Bo($) ? $ : v("span", null, [$]), P);
    }, {
      prefixCls: f,
      getPrefixCls: p
    } = yt("input-password", e), m = R(() => p("input", e.inputPrefixCls)), b = () => {
      const {
        size: y,
        visibilityToggle: S
      } = e, C = CF(e, ["size", "visibilityToggle"]), O = S && d(f.value), $ = Te(f.value, o.class, {
        [`${f.value}-${y}`]: !!y
      }), P = I(I(I({}, Tn(C, ["suffix", "iconRender", "action"])), o), {
        type: a.value ? "text" : "password",
        class: $,
        prefixCls: m.value,
        suffix: O
      });
      return y && (P.size = y), v(ft, Z({
        ref: s
      }, P), n);
    };
    return () => b();
  }
});
ft.Group = lF;
ft.Search = uF;
ft.TextArea = bF;
ft.Password = OF;
ft.install = function(e) {
  return e.component(ft.name, ft), e.component(ft.Group.name, ft.Group), e.component(ft.Search.name, ft.Search), e.component(ft.TextArea.name, ft.TextArea), e.component(ft.Password.name, ft.Password), e;
};
function Vm() {
  return {
    keyboard: {
      type: Boolean,
      default: void 0
    },
    mask: {
      type: Boolean,
      default: void 0
    },
    afterClose: Function,
    closable: {
      type: Boolean,
      default: void 0
    },
    maskClosable: {
      type: Boolean,
      default: void 0
    },
    visible: {
      type: Boolean,
      default: void 0
    },
    destroyOnClose: {
      type: Boolean,
      default: void 0
    },
    mousePosition: ue.shape({
      x: Number,
      y: Number
    }).loose,
    title: ue.any,
    footer: ue.any,
    transitionName: String,
    maskTransitionName: String,
    animation: ue.any,
    maskAnimation: ue.any,
    wrapStyle: {
      type: Object,
      default: void 0
    },
    bodyStyle: {
      type: Object,
      default: void 0
    },
    maskStyle: {
      type: Object,
      default: void 0
    },
    prefixCls: String,
    wrapClassName: String,
    rootClassName: String,
    width: [String, Number],
    height: [String, Number],
    zIndex: Number,
    bodyProps: ue.any,
    maskProps: ue.any,
    wrapProps: ue.any,
    getContainer: ue.any,
    dialogStyle: {
      type: Object,
      default: void 0
    },
    dialogClass: String,
    closeIcon: ue.any,
    forceRender: {
      type: Boolean,
      default: void 0
    },
    getOpenCount: Function,
    // https://github.com/ant-design/ant-design/issues/19771
    // https://github.com/react-component/dialog/issues/95
    focusTriggerAfterClose: {
      type: Boolean,
      default: void 0
    },
    onClose: Function,
    modalRender: Function
  };
}
function Wx(e, t, n) {
  let o = t;
  return !o && n && (o = `${e}-${n}`), o;
}
let qx = -1;
function IF() {
  return qx += 1, qx;
}
function Gx(e, t) {
  let n = e[`page${t ? "Y" : "X"}Offset`];
  const o = `scroll${t ? "Top" : "Left"}`;
  if (typeof n != "number") {
    const i = e.document;
    n = i.documentElement[o], typeof n != "number" && (n = i.body[o]);
  }
  return n;
}
function MF(e) {
  const t = e.getBoundingClientRect(), n = {
    left: t.left,
    top: t.top
  }, o = e.ownerDocument, i = o.defaultView || o.parentWindow;
  return n.left += Gx(i), n.top += Gx(i, !0), n;
}
const TF = {
  width: 0,
  height: 0,
  overflow: "hidden",
  outline: "none"
}, kF = {
  outline: "none"
}, EF = ye({
  compatConfig: {
    MODE: 3
  },
  name: "DialogContent",
  inheritAttrs: !1,
  props: I(I({}, Vm()), {
    motionName: String,
    ariaId: String,
    onVisibleChanged: Function,
    onMousedown: Function,
    onMouseup: Function
  }),
  setup(e, t) {
    let {
      expose: n,
      slots: o,
      attrs: i
    } = t;
    const r = le(), a = le(), l = le();
    n({
      focus: () => {
        var f;
        (f = r.value) === null || f === void 0 || f.focus({
          preventScroll: !0
        });
      },
      changeActive: (f) => {
        const {
          activeElement: p
        } = document;
        f && p === a.value ? r.value.focus({
          preventScroll: !0
        }) : !f && p === r.value && a.value.focus({
          preventScroll: !0
        });
      }
    });
    const s = le(), u = R(() => {
      const {
        width: f,
        height: p
      } = e, m = {};
      return f !== void 0 && (m.width = typeof f == "number" ? `${f}px` : f), p !== void 0 && (m.height = typeof p == "number" ? `${p}px` : p), s.value && (m.transformOrigin = s.value), m;
    }), c = () => {
      Nt(() => {
        if (l.value) {
          const f = MF(l.value);
          s.value = e.mousePosition ? `${e.mousePosition.x - f.left}px ${e.mousePosition.y - f.top}px` : "";
        }
      });
    }, d = (f) => {
      e.onVisibleChanged(f);
    };
    return () => {
      var f, p, m, b;
      const {
        prefixCls: y,
        footer: S = (f = o.footer) === null || f === void 0 ? void 0 : f.call(o),
        title: C = (p = o.title) === null || p === void 0 ? void 0 : p.call(o),
        ariaId: O,
        closable: $,
        closeIcon: P = (m = o.closeIcon) === null || m === void 0 ? void 0 : m.call(o),
        onClose: k,
        bodyStyle: x,
        bodyProps: E,
        onMousedown: z,
        onMouseup: N,
        visible: D,
        modalRender: W = o.modalRender,
        destroyOnClose: H,
        motionName: L
      } = e;
      let A;
      S && (A = v("div", {
        class: `${y}-footer`
      }, [S]));
      let U;
      C && (U = v("div", {
        class: `${y}-header`
      }, [v("div", {
        class: `${y}-title`,
        id: O
      }, [C])]));
      let j;
      $ && (j = v("button", {
        type: "button",
        onClick: k,
        "aria-label": "Close",
        class: `${y}-close`
      }, [P || v("span", {
        class: `${y}-close-x`
      }, null)]));
      const re = v("div", {
        class: `${y}-content`
      }, [j, U, v("div", Z({
        class: `${y}-body`,
        style: x
      }, E), [(b = o.default) === null || b === void 0 ? void 0 : b.call(o)]), A]), G = xl(L);
      return v(Ti, Z(Z({}, G), {}, {
        onBeforeEnter: c,
        onAfterEnter: () => d(!0),
        onAfterLeave: () => d(!1)
      }), {
        default: () => [D || !H ? Zi(v("div", Z(Z({}, i), {}, {
          ref: l,
          key: "dialog-element",
          role: "document",
          style: [u.value, i.style],
          class: [y, i.class],
          onMousedown: z,
          onMouseup: N
        }), [v("div", {
          tabindex: 0,
          ref: r,
          style: kF
        }, [W ? W({
          originVNode: re
        }) : re]), v("div", {
          tabindex: 0,
          ref: a,
          style: TF
        }, null)]), [[mr, D]]) : null]
      });
    };
  }
}), _F = ye({
  compatConfig: {
    MODE: 3
  },
  name: "DialogMask",
  props: {
    prefixCls: String,
    visible: Boolean,
    motionName: String,
    maskProps: Object
  },
  setup(e, t) {
    return () => {
      const {
        prefixCls: n,
        visible: o,
        maskProps: i,
        motionName: r
      } = e, a = xl(r);
      return v(Ti, a, {
        default: () => [Zi(v("div", Z({
          class: `${n}-mask`
        }, i), null), [[mr, o]])]
      });
    };
  }
}), Kx = ye({
  compatConfig: {
    MODE: 3
  },
  name: "VcDialog",
  inheritAttrs: !1,
  props: wn(I(I({}, Vm()), {
    getOpenCount: Function,
    scrollLocker: Object
  }), {
    mask: !0,
    visible: !1,
    keyboard: !0,
    closable: !0,
    maskClosable: !0,
    destroyOnClose: !1,
    prefixCls: "rc-dialog",
    getOpenCount: () => null,
    focusTriggerAfterClose: !0
  }),
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const i = Pe(), r = Pe(), a = Pe(), l = Pe(e.visible), s = Pe(`vcDialogTitle${IF()}`), u = (S) => {
      var C, O;
      if (S)
        ma(r.value, document.activeElement) || (i.value = document.activeElement, (C = a.value) === null || C === void 0 || C.focus());
      else {
        const $ = l.value;
        if (l.value = !1, e.mask && i.value && e.focusTriggerAfterClose) {
          try {
            i.value.focus({
              preventScroll: !0
            });
          } catch {
          }
          i.value = null;
        }
        $ && ((O = e.afterClose) === null || O === void 0 || O.call(e));
      }
    }, c = (S) => {
      var C;
      (C = e.onClose) === null || C === void 0 || C.call(e, S);
    }, d = Pe(!1), f = Pe(), p = () => {
      clearTimeout(f.value), d.value = !0;
    }, m = () => {
      f.value = setTimeout(() => {
        d.value = !1;
      });
    }, b = (S) => {
      if (!e.maskClosable) return null;
      d.value ? d.value = !1 : r.value === S.target && c(S);
    }, y = (S) => {
      if (e.keyboard && S.keyCode === Xe.ESC) {
        S.stopPropagation(), c(S);
        return;
      }
      e.visible && S.keyCode === Xe.TAB && a.value.changeActive(!S.shiftKey);
    };
    return Ie(() => e.visible, () => {
      e.visible && (l.value = !0);
    }, {
      flush: "post"
    }), At(() => {
      var S;
      clearTimeout(f.value), (S = e.scrollLocker) === null || S === void 0 || S.unLock();
    }), Lt(() => {
      var S, C;
      (S = e.scrollLocker) === null || S === void 0 || S.unLock(), l.value && ((C = e.scrollLocker) === null || C === void 0 || C.lock());
    }), () => {
      const {
        prefixCls: S,
        mask: C,
        visible: O,
        maskTransitionName: $,
        maskAnimation: P,
        zIndex: k,
        wrapClassName: x,
        rootClassName: E,
        wrapStyle: z,
        closable: N,
        maskProps: D,
        maskStyle: W,
        transitionName: H,
        animation: L,
        wrapProps: A,
        title: U = o.title
      } = e, {
        style: j,
        class: re
      } = n;
      return v("div", Z({
        class: [`${S}-root`, E]
      }, yf(e, {
        data: !0
      })), [v(_F, {
        prefixCls: S,
        visible: C && O,
        motionName: Wx(S, $, P),
        style: I({
          zIndex: k
        }, W),
        maskProps: D
      }, null), v("div", Z({
        tabIndex: -1,
        onKeydown: y,
        class: Te(`${S}-wrap`, x),
        ref: r,
        onClick: b,
        role: "dialog",
        "aria-labelledby": U ? s.value : null,
        style: I(I({
          zIndex: k
        }, z), {
          display: l.value ? null : "none"
        })
      }, A), [v(EF, Z(Z({}, Tn(e, ["scrollLocker"])), {}, {
        style: j,
        class: re,
        onMousedown: p,
        onMouseup: m,
        ref: a,
        closable: N,
        ariaId: s.value,
        prefixCls: S,
        visible: O,
        onClose: c,
        onVisibleChanged: u,
        motionName: Wx(S, H, L)
      }), o)])]);
    };
  }
}), AF = Vm(), DF = ye({
  compatConfig: {
    MODE: 3
  },
  name: "DialogWrap",
  inheritAttrs: !1,
  props: wn(AF, {
    visible: !1
  }),
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const i = le(e.visible);
    return Dv({}, {
      inTriggerContext: !1
    }), Ie(() => e.visible, () => {
      e.visible && (i.value = !0);
    }, {
      flush: "post"
    }), () => {
      const {
        visible: r,
        getContainer: a,
        forceRender: l,
        destroyOnClose: s = !1,
        afterClose: u
      } = e;
      let c = I(I(I({}, e), n), {
        ref: "_component",
        key: "dialog"
      });
      return a === !1 ? v(Kx, Z(Z({}, c), {}, {
        getOpenCount: () => 2
      }), o) : !l && s && !i.value ? null : v(zv, {
        autoLock: !0,
        visible: r,
        forceRender: l,
        getContainer: a
      }, {
        default: (d) => (c = I(I(I({}, c), d), {
          afterClose: () => {
            u?.(), i.value = !1;
          }
        }), v(Kx, c, o))
      });
    };
  }
});
function Yx(e) {
  return {
    position: e,
    top: 0,
    insetInlineEnd: 0,
    bottom: 0,
    insetInlineStart: 0
  };
}
const zF = (e) => {
  const {
    componentCls: t
  } = e;
  return [{
    [`${t}-root`]: {
      [`${t}${e.antCls}-zoom-enter, ${t}${e.antCls}-zoom-appear`]: {
        // reset scale avoid mousePosition bug
        transform: "none",
        opacity: 0,
        animationDuration: e.motionDurationSlow,
        // https://github.com/ant-design/ant-design/issues/11777
        userSelect: "none"
      },
      [`${t}${e.antCls}-zoom-leave ${t}-content`]: {
        pointerEvents: "none"
      },
      [`${t}-mask`]: I(I({}, Yx("fixed")), {
        zIndex: e.zIndexPopupBase,
        height: "100%",
        backgroundColor: e.colorBgMask,
        [`${t}-hidden`]: {
          display: "none"
        }
      }),
      [`${t}-wrap`]: I(I({}, Yx("fixed")), {
        overflow: "auto",
        outline: 0,
        WebkitOverflowScrolling: "touch"
      })
    }
  }, {
    [`${t}-root`]: WR(e)
  }];
}, RF = (e) => {
  const {
    componentCls: t
  } = e;
  return [
    // ======================== Root =========================
    {
      [`${t}-root`]: {
        [`${t}-wrap`]: {
          zIndex: e.zIndexPopupBase,
          position: "fixed",
          inset: 0,
          overflow: "auto",
          outline: 0,
          WebkitOverflowScrolling: "touch"
        },
        [`${t}-wrap-rtl`]: {
          direction: "rtl"
        },
        [`${t}-centered`]: {
          textAlign: "center",
          "&::before": {
            display: "inline-block",
            width: 0,
            height: "100%",
            verticalAlign: "middle",
            content: '""'
          },
          [t]: {
            top: 0,
            display: "inline-block",
            paddingBottom: 0,
            textAlign: "start",
            verticalAlign: "middle"
          }
        },
        [`@media (max-width: ${e.screenSMMax})`]: {
          [t]: {
            maxWidth: "calc(100vw - 16px)",
            margin: `${e.marginXS} auto`
          },
          [`${t}-centered`]: {
            [t]: {
              flex: 1
            }
          }
        }
      }
    },
    // ======================== Modal ========================
    {
      [t]: I(I({}, Zt(e)), {
        pointerEvents: "none",
        position: "relative",
        top: 100,
        width: "auto",
        maxWidth: `calc(100vw - ${e.margin * 2}px)`,
        margin: "0 auto",
        paddingBottom: e.paddingLG,
        [`${t}-title`]: {
          margin: 0,
          color: e.modalHeadingColor,
          fontWeight: e.fontWeightStrong,
          fontSize: e.modalHeaderTitleFontSize,
          lineHeight: e.modalHeaderTitleLineHeight,
          wordWrap: "break-word"
        },
        [`${t}-content`]: {
          position: "relative",
          backgroundColor: e.modalContentBg,
          backgroundClip: "padding-box",
          border: 0,
          borderRadius: e.borderRadiusLG,
          boxShadow: e.boxShadowSecondary,
          pointerEvents: "auto",
          padding: `${e.paddingMD}px ${e.paddingContentHorizontalLG}px`
        },
        [`${t}-close`]: I({
          position: "absolute",
          top: (e.modalHeaderCloseSize - e.modalCloseBtnSize) / 2,
          insetInlineEnd: (e.modalHeaderCloseSize - e.modalCloseBtnSize) / 2,
          zIndex: e.zIndexPopupBase + 10,
          padding: 0,
          color: e.modalCloseColor,
          fontWeight: e.fontWeightStrong,
          lineHeight: 1,
          textDecoration: "none",
          background: "transparent",
          borderRadius: e.borderRadiusSM,
          width: e.modalConfirmIconSize,
          height: e.modalConfirmIconSize,
          border: 0,
          outline: 0,
          cursor: "pointer",
          transition: `color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,
          "&-x": {
            display: "block",
            fontSize: e.fontSizeLG,
            fontStyle: "normal",
            lineHeight: `${e.modalCloseBtnSize}px`,
            textAlign: "center",
            textTransform: "none",
            textRendering: "auto"
          },
          "&:hover": {
            color: e.modalIconHoverColor,
            backgroundColor: e.wireframe ? "transparent" : e.colorFillContent,
            textDecoration: "none"
          },
          "&:active": {
            backgroundColor: e.wireframe ? "transparent" : e.colorFillContentHover
          }
        }, bl(e)),
        [`${t}-header`]: {
          color: e.colorText,
          background: e.modalHeaderBg,
          borderRadius: `${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`,
          marginBottom: e.marginXS
        },
        [`${t}-body`]: {
          fontSize: e.fontSize,
          lineHeight: e.lineHeight,
          wordWrap: "break-word"
        },
        [`${t}-footer`]: {
          textAlign: "end",
          background: e.modalFooterBg,
          marginTop: e.marginSM,
          [`${e.antCls}-btn + ${e.antCls}-btn:not(${e.antCls}-dropdown-trigger)`]: {
            marginBottom: 0,
            marginInlineStart: e.marginXS
          }
        },
        [`${t}-open`]: {
          overflow: "hidden"
        }
      })
    },
    // ======================== Pure =========================
    {
      [`${t}-pure-panel`]: {
        top: "auto",
        padding: 0,
        display: "flex",
        flexDirection: "column",
        [`${t}-content,
          ${t}-body,
          ${t}-confirm-body-wrapper`]: {
          display: "flex",
          flexDirection: "column",
          flex: "auto"
        },
        [`${t}-confirm-body`]: {
          marginBottom: "auto"
        }
      }
    }
  ];
}, NF = (e) => {
  const {
    componentCls: t
  } = e, n = `${t}-confirm`;
  return {
    [n]: {
      "&-rtl": {
        direction: "rtl"
      },
      [`${e.antCls}-modal-header`]: {
        display: "none"
      },
      [`${n}-body-wrapper`]: I({}, Ea()),
      [`${n}-body`]: {
        display: "flex",
        flexWrap: "wrap",
        alignItems: "center",
        [`${n}-title`]: {
          flex: "0 0 100%",
          display: "block",
          // create BFC to avoid
          // https://user-images.githubusercontent.com/507615/37702510-ba844e06-2d2d-11e8-9b67-8e19be57f445.png
          overflow: "hidden",
          color: e.colorTextHeading,
          fontWeight: e.fontWeightStrong,
          fontSize: e.modalHeaderTitleFontSize,
          lineHeight: e.modalHeaderTitleLineHeight,
          [`+ ${n}-content`]: {
            marginBlockStart: e.marginXS,
            flexBasis: "100%",
            maxWidth: `calc(100% - ${e.modalConfirmIconSize + e.marginSM}px)`
          }
        },
        [`${n}-content`]: {
          color: e.colorText,
          fontSize: e.fontSize
        },
        [`> ${e.iconCls}`]: {
          flex: "none",
          marginInlineEnd: e.marginSM,
          fontSize: e.modalConfirmIconSize,
          [`+ ${n}-title`]: {
            flex: 1
          },
          // `content` after `icon` should set marginLeft
          [`+ ${n}-title + ${n}-content`]: {
            marginInlineStart: e.modalConfirmIconSize + e.marginSM
          }
        }
      },
      [`${n}-btns`]: {
        textAlign: "end",
        marginTop: e.marginSM,
        [`${e.antCls}-btn + ${e.antCls}-btn`]: {
          marginBottom: 0,
          marginInlineStart: e.marginXS
        }
      }
    },
    [`${n}-error ${n}-body > ${e.iconCls}`]: {
      color: e.colorError
    },
    [`${n}-warning ${n}-body > ${e.iconCls},
        ${n}-confirm ${n}-body > ${e.iconCls}`]: {
      color: e.colorWarning
    },
    [`${n}-info ${n}-body > ${e.iconCls}`]: {
      color: e.colorInfo
    },
    [`${n}-success ${n}-body > ${e.iconCls}`]: {
      color: e.colorSuccess
    },
    // https://github.com/ant-design/ant-design/issues/37329
    [`${t}-zoom-leave ${t}-btns`]: {
      pointerEvents: "none"
    }
  };
}, BF = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-root`]: {
      [`${t}-wrap-rtl`]: {
        direction: "rtl",
        [`${t}-confirm-body`]: {
          direction: "rtl"
        }
      }
    }
  };
}, LF = (e) => {
  const {
    componentCls: t,
    antCls: n
  } = e, o = `${t}-confirm`;
  return {
    [t]: {
      [`${t}-content`]: {
        padding: 0
      },
      [`${t}-header`]: {
        padding: e.modalHeaderPadding,
        borderBottom: `${e.modalHeaderBorderWidth}px ${e.modalHeaderBorderStyle} ${e.modalHeaderBorderColorSplit}`,
        marginBottom: 0
      },
      [`${t}-body`]: {
        padding: e.modalBodyPadding
      },
      [`${t}-footer`]: {
        padding: `${e.modalFooterPaddingVertical}px ${e.modalFooterPaddingHorizontal}px`,
        borderTop: `${e.modalFooterBorderWidth}px ${e.modalFooterBorderStyle} ${e.modalFooterBorderColorSplit}`,
        borderRadius: `0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`,
        marginTop: 0
      }
    },
    [o]: {
      [`${n}-modal-body`]: {
        padding: `${e.padding * 2}px ${e.padding * 2}px ${e.paddingLG}px`
      },
      [`${o}-body`]: {
        [`> ${e.iconCls}`]: {
          marginInlineEnd: e.margin,
          // `content` after `icon` should set marginLeft
          [`+ ${o}-title + ${o}-content`]: {
            marginInlineStart: e.modalConfirmIconSize + e.margin
          }
        }
      },
      [`${o}-btns`]: {
        marginTop: e.marginLG
      }
    }
  };
}, FF = nn("Modal", (e) => {
  const t = e.padding, n = e.fontSizeHeading5, o = e.lineHeightHeading5, i = _t(e, {
    modalBodyPadding: e.paddingLG,
    modalHeaderBg: e.colorBgElevated,
    modalHeaderPadding: `${t}px ${e.paddingLG}px`,
    modalHeaderBorderWidth: e.lineWidth,
    modalHeaderBorderStyle: e.lineType,
    modalHeaderTitleLineHeight: o,
    modalHeaderTitleFontSize: n,
    modalHeaderBorderColorSplit: e.colorSplit,
    modalHeaderCloseSize: o * n + t * 2,
    modalContentBg: e.colorBgElevated,
    modalHeadingColor: e.colorTextHeading,
    modalCloseColor: e.colorTextDescription,
    modalFooterBg: "transparent",
    modalFooterBorderColorSplit: e.colorSplit,
    modalFooterBorderStyle: e.lineType,
    modalFooterPaddingVertical: e.paddingXS,
    modalFooterPaddingHorizontal: e.padding,
    modalFooterBorderWidth: e.lineWidth,
    modalConfirmTitleFontSize: e.fontSizeLG,
    modalIconHoverColor: e.colorIconHover,
    modalConfirmIconSize: e.fontSize * e.lineHeight,
    modalCloseBtnSize: e.controlHeightLG * 0.55
  });
  return [RF(i), NF(i), BF(i), zF(i), e.wireframe && LF(i), Ju(i, "zoom")];
});
var HF = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z" } }] }, name: "up", theme: "outlined" };
function Ux(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      VF(e, i, n[i]);
    });
  }
  return e;
}
function VF(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var jm = function(t, n) {
  var o = Ux({}, t, n.attrs);
  return v(pn, Ux({}, o, {
    icon: HF
  }), null);
};
jm.displayName = "UpOutlined";
jm.inheritAttrs = !1;
function Lh() {
  return typeof BigInt == "function";
}
function ku(e) {
  let t = e.trim(), n = t.startsWith("-");
  n && (t = t.slice(1)), t = t.replace(/(\.\d*[^0])0*$/, "$1").replace(/\.0*$/, "").replace(/^0+/, ""), t.startsWith(".") && (t = `0${t}`);
  const o = t || "0", i = o.split("."), r = i[0] || "0", a = i[1] || "0";
  r === "0" && a === "0" && (n = !1);
  const l = n ? "-" : "";
  return {
    negative: n,
    negativeStr: l,
    trimStr: o,
    integerStr: r,
    decimalStr: a,
    fullStr: `${l}${o}`
  };
}
function Wm(e) {
  const t = String(e);
  return !Number.isNaN(Number(t)) && t.includes("e");
}
function Ku(e) {
  const t = String(e);
  if (Wm(e)) {
    let n = Number(t.slice(t.indexOf("e-") + 2));
    const o = t.match(/\.(\d+)/);
    return o?.[1] && (n += o[1].length), n;
  }
  return t.includes(".") && Gm(t) ? t.length - t.indexOf(".") - 1 : 0;
}
function qm(e) {
  let t = String(e);
  if (Wm(e)) {
    if (e > Number.MAX_SAFE_INTEGER)
      return String(Lh() ? BigInt(e).toString() : Number.MAX_SAFE_INTEGER);
    if (e < Number.MIN_SAFE_INTEGER)
      return String(Lh() ? BigInt(e).toString() : Number.MIN_SAFE_INTEGER);
    t = e.toFixed(Ku(t));
  }
  return ku(t).fullStr;
}
function Gm(e) {
  return typeof e == "number" ? !Number.isNaN(e) : e ? (
    // Normal type: 11.28
    /^\s*-?\d+(\.\d+)?\s*$/.test(e) || // Pre-number: 1.
    /^\s*-?\d+\.\s*$/.test(e) || // Post-number: .1
    /^\s*-?\.\d+\s*$/.test(e)
  ) : !1;
}
function g2(e) {
  return !e && e !== 0 && !Number.isNaN(e) || !String(e).trim();
}
class rl {
  constructor(t) {
    if (this.origin = "", g2(t)) {
      this.empty = !0;
      return;
    }
    this.origin = String(t), this.number = Number(t);
  }
  negate() {
    return new rl(-this.toNumber());
  }
  add(t) {
    if (this.isInvalidate())
      return new rl(t);
    const n = Number(t);
    if (Number.isNaN(n))
      return this;
    const o = this.number + n;
    if (o > Number.MAX_SAFE_INTEGER)
      return new rl(Number.MAX_SAFE_INTEGER);
    if (o < Number.MIN_SAFE_INTEGER)
      return new rl(Number.MIN_SAFE_INTEGER);
    const i = Math.max(Ku(this.number), Ku(n));
    return new rl(o.toFixed(i));
  }
  isEmpty() {
    return this.empty;
  }
  isNaN() {
    return Number.isNaN(this.number);
  }
  isInvalidate() {
    return this.isEmpty() || this.isNaN();
  }
  equals(t) {
    return this.toNumber() === t?.toNumber();
  }
  lessEquals(t) {
    return this.add(t.negate().toString()).toNumber() <= 0;
  }
  toNumber() {
    return this.number;
  }
  toString() {
    return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0) ? this.isInvalidate() ? "" : qm(this.number) : this.origin;
  }
}
class is {
  constructor(t) {
    if (this.origin = "", g2(t)) {
      this.empty = !0;
      return;
    }
    if (this.origin = String(t), t === "-" || Number.isNaN(t)) {
      this.nan = !0;
      return;
    }
    let n = t;
    if (Wm(n) && (n = Number(n)), n = typeof n == "string" ? n : qm(n), Gm(n)) {
      const o = ku(n);
      this.negative = o.negative;
      const i = o.trimStr.split(".");
      this.integer = BigInt(i[0]);
      const r = i[1] || "0";
      this.decimal = BigInt(r), this.decimalLen = r.length;
    } else
      this.nan = !0;
  }
  getMark() {
    return this.negative ? "-" : "";
  }
  getIntegerStr() {
    return this.integer.toString();
  }
  getDecimalStr() {
    return this.decimal.toString().padStart(this.decimalLen, "0");
  }
  /**
   * Align BigIntDecimal with same decimal length. e.g. 12.3 + 5 = 1230000
   * This is used for add function only.
   */
  alignDecimal(t) {
    const n = `${this.getMark()}${this.getIntegerStr()}${this.getDecimalStr().padEnd(t, "0")}`;
    return BigInt(n);
  }
  negate() {
    const t = new is(this.toString());
    return t.negative = !t.negative, t;
  }
  add(t) {
    if (this.isInvalidate())
      return new is(t);
    const n = new is(t);
    if (n.isInvalidate())
      return this;
    const o = Math.max(this.getDecimalStr().length, n.getDecimalStr().length), i = this.alignDecimal(o), r = n.alignDecimal(o), a = (i + r).toString(), {
      negativeStr: l,
      trimStr: s
    } = ku(a), u = `${l}${s.padStart(o + 1, "0")}`;
    return new is(`${u.slice(0, -o)}.${u.slice(-o)}`);
  }
  isEmpty() {
    return this.empty;
  }
  isNaN() {
    return this.nan;
  }
  isInvalidate() {
    return this.isEmpty() || this.isNaN();
  }
  equals(t) {
    return this.toString() === t?.toString();
  }
  lessEquals(t) {
    return this.add(t.negate().toString()).toNumber() <= 0;
  }
  toNumber() {
    return this.isNaN() ? NaN : Number(this.toString());
  }
  toString() {
    return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0) ? this.isInvalidate() ? "" : ku(`${this.getMark()}${this.getIntegerStr()}.${this.getDecimalStr()}`).fullStr : this.origin;
  }
}
function pr(e) {
  return Lh() ? new is(e) : new rl(e);
}
function Fh(e, t, n) {
  let o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
  if (e === "")
    return "";
  const {
    negativeStr: i,
    integerStr: r,
    decimalStr: a
  } = ku(e), l = `${t}${a}`, s = `${i}${r}`;
  if (n >= 0) {
    const u = Number(a[n]);
    if (u >= 5 && !o) {
      const c = pr(e).add(`${i}0.${"0".repeat(n)}${10 - u}`);
      return Fh(c.toString(), t, n, o);
    }
    return n === 0 ? s : `${s}${t}${a.padEnd(n, "0").slice(0, n)}`;
  }
  return l === ".0" ? s : `${s}${l}`;
}
const jF = 200, WF = 600, qF = ye({
  compatConfig: {
    MODE: 3
  },
  name: "StepHandler",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    upDisabled: Boolean,
    downDisabled: Boolean,
    onStep: Qe()
  },
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      emit: o
    } = t;
    const i = le(), r = (l, s) => {
      l.preventDefault(), o("step", s);
      function u() {
        o("step", s), i.value = setTimeout(u, jF);
      }
      i.value = setTimeout(u, WF);
    }, a = () => {
      clearTimeout(i.value);
    };
    return At(() => {
      a();
    }), () => {
      if (Lv())
        return null;
      const {
        prefixCls: l,
        upDisabled: s,
        downDisabled: u
      } = e, c = `${l}-handler`, d = Te(c, `${c}-up`, {
        [`${c}-up-disabled`]: s
      }), f = Te(c, `${c}-down`, {
        [`${c}-down-disabled`]: u
      }), p = {
        unselectable: "on",
        role: "button",
        onMouseup: a,
        onMouseleave: a
      }, {
        upNode: m,
        downNode: b
      } = n;
      return v("div", {
        class: `${c}-wrap`
      }, [v("span", Z(Z({}, p), {}, {
        onMousedown: (y) => {
          r(y, !0);
        },
        "aria-label": "Increase Value",
        "aria-disabled": s,
        class: d
      }), [m?.() || v("span", {
        unselectable: "on",
        class: `${l}-handler-up-inner`
      }, null)]), v("span", Z(Z({}, p), {}, {
        onMousedown: (y) => {
          r(y, !1);
        },
        "aria-label": "Decrease Value",
        "aria-disabled": u,
        class: f
      }), [b?.() || v("span", {
        unselectable: "on",
        class: `${l}-handler-down-inner`
      }, null)])]);
    };
  }
});
function GF(e, t) {
  const n = le(null);
  function o() {
    try {
      const {
        selectionStart: r,
        selectionEnd: a,
        value: l
      } = e.value, s = l.substring(0, r), u = l.substring(a);
      n.value = {
        start: r,
        end: a,
        value: l,
        beforeTxt: s,
        afterTxt: u
      };
    } catch {
    }
  }
  function i() {
    if (e.value && n.value && t.value)
      try {
        const {
          value: r
        } = e.value, {
          beforeTxt: a,
          afterTxt: l,
          start: s
        } = n.value;
        let u = r.length;
        if (r.endsWith(l))
          u = r.length - n.value.afterTxt.length;
        else if (r.startsWith(a))
          u = a.length;
        else {
          const c = a[s - 1], d = r.indexOf(c, s - 1);
          d !== -1 && (u = d + 1);
        }
        e.value.setSelectionRange(u, u);
      } catch (r) {
        yo(!1, `Something warning of cursor restore. Please fire issue about this: ${r.message}`);
      }
  }
  return [o, i];
}
const KF = (() => {
  const e = Pe(0), t = () => {
    Mt.cancel(e.value);
  };
  return At(() => {
    t();
  }), (n) => {
    t(), e.value = Mt(() => {
      n();
    });
  };
});
var YF = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const Xx = (e, t) => e || t.isEmpty() ? t.toString() : t.toNumber(), Qx = (e) => {
  const t = pr(e);
  return t.isInvalidate() ? null : t;
}, h2 = () => ({
  /** value will show as string */
  stringMode: st(),
  defaultValue: tn([String, Number]),
  value: tn([String, Number]),
  prefixCls: dn(),
  min: tn([String, Number]),
  max: tn([String, Number]),
  step: tn([String, Number], 1),
  tabindex: Number,
  controls: st(!0),
  readonly: st(),
  disabled: st(),
  autofocus: st(),
  keyboard: st(!0),
  /** Parse display value to validate number */
  parser: Qe(),
  /** Transform `value` to display value show in input */
  formatter: Qe(),
  /** Syntactic sugar of `formatter`. Config precision of display. */
  precision: Number,
  /** Syntactic sugar of `formatter`. Config decimal separator of display. */
  decimalSeparator: String,
  onInput: Qe(),
  onChange: Qe(),
  onPressEnter: Qe(),
  onStep: Qe(),
  onBlur: Qe(),
  onFocus: Qe()
}), UF = ye({
  compatConfig: {
    MODE: 3
  },
  name: "InnerInputNumber",
  inheritAttrs: !1,
  props: I(I({}, h2()), {
    lazy: Boolean
  }),
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      emit: i,
      expose: r
    } = t;
    const a = Pe(), l = Pe(!1), s = Pe(!1), u = Pe(!1), c = Pe(pr(e.value));
    function d(J) {
      e.value === void 0 && (c.value = J);
    }
    const f = (J, be) => {
      if (!be)
        return e.precision >= 0 ? e.precision : Math.max(Ku(J), Ku(e.step));
    }, p = (J) => {
      const be = String(J);
      if (e.parser)
        return e.parser(be);
      let xe = be;
      return e.decimalSeparator && (xe = xe.replace(e.decimalSeparator, ".")), xe.replace(/[^\w.-]+/g, "");
    }, m = Pe(""), b = (J, be) => {
      if (e.formatter)
        return e.formatter(J, {
          userTyping: be,
          input: String(m.value)
        });
      let xe = typeof J == "number" ? qm(J) : J;
      if (!be) {
        const ge = f(xe, be);
        if (Gm(xe) && (e.decimalSeparator || ge >= 0)) {
          const de = e.decimalSeparator || ".";
          xe = Fh(xe, de, ge);
        }
      }
      return xe;
    }, y = (() => {
      const J = e.value;
      return c.value.isInvalidate() && ["string", "number"].includes(typeof J) ? Number.isNaN(J) ? "" : J : b(c.value.toString(), !1);
    })();
    m.value = y;
    function S(J, be) {
      m.value = b(
        // Invalidate number is sometime passed by external control, we should let it go
        // Otherwise is controlled by internal interactive logic which check by userTyping
        // You can ref 'show limited value when input is not focused' test for more info.
        J.isInvalidate() ? J.toString(!1) : J.toString(!be),
        be
      );
    }
    const C = R(() => Qx(e.max)), O = R(() => Qx(e.min)), $ = R(() => !C.value || !c.value || c.value.isInvalidate() ? !1 : C.value.lessEquals(c.value)), P = R(() => !O.value || !c.value || c.value.isInvalidate() ? !1 : c.value.lessEquals(O.value)), [k, x] = GF(a, l), E = (J) => C.value && !J.lessEquals(C.value) ? C.value : O.value && !O.value.lessEquals(J) ? O.value : null, z = (J) => !E(J), N = (J, be) => {
      var xe;
      let ge = J, de = z(ge) || ge.isEmpty();
      if (!ge.isEmpty() && !be && (ge = E(ge) || ge, de = !0), !e.readonly && !e.disabled && de) {
        const ne = ge.toString(), we = f(ne, be);
        return we >= 0 && (ge = pr(Fh(ne, ".", we))), ge.equals(c.value) || (d(ge), (xe = e.onChange) === null || xe === void 0 || xe.call(e, ge.isEmpty() ? null : Xx(e.stringMode, ge)), e.value === void 0 && S(ge, be)), ge;
      }
      return c.value;
    }, D = KF(), W = (J) => {
      var be;
      if (k(), m.value = J, !u.value) {
        const xe = p(J), ge = pr(xe);
        ge.isNaN() || N(ge, !0);
      }
      (be = e.onInput) === null || be === void 0 || be.call(e, J), D(() => {
        let xe = J;
        e.parser || (xe = J.replace(/。/g, ".")), xe !== J && W(xe);
      });
    }, H = () => {
      u.value = !0;
    }, L = () => {
      u.value = !1, W(a.value.value);
    }, A = (J) => {
      W(J.target.value);
    }, U = (J) => {
      var be, xe;
      if (J && $.value || !J && P.value)
        return;
      s.value = !1;
      let ge = pr(e.step);
      J || (ge = ge.negate());
      const de = (c.value || pr(0)).add(ge.toString()), ne = N(de, !1);
      (be = e.onStep) === null || be === void 0 || be.call(e, Xx(e.stringMode, ne), {
        offset: e.step,
        type: J ? "up" : "down"
      }), (xe = a.value) === null || xe === void 0 || xe.focus();
    }, j = (J) => {
      const be = pr(p(m.value));
      let xe = be;
      be.isNaN() ? xe = c.value : xe = N(be, J), e.value !== void 0 ? S(c.value, !1) : xe.isNaN() || S(xe, !1);
    }, re = () => {
      s.value = !0;
    }, G = (J) => {
      var be;
      const {
        which: xe
      } = J;
      s.value = !0, xe === Xe.ENTER && (u.value || (s.value = !1), j(!1), (be = e.onPressEnter) === null || be === void 0 || be.call(e, J)), e.keyboard !== !1 && !u.value && [Xe.UP, Xe.DOWN].includes(xe) && (U(Xe.UP === xe), J.preventDefault());
    }, Y = () => {
      s.value = !1;
    }, K = (J) => {
      j(!1), l.value = !1, s.value = !1, i("blur", J);
    };
    return Ie(() => e.precision, () => {
      c.value.isInvalidate() || S(c.value, !1);
    }, {
      flush: "post"
    }), Ie(() => e.value, () => {
      const J = pr(e.value);
      c.value = J;
      const be = pr(p(m.value));
      (!J.equals(be) || !s.value || e.formatter) && S(J, s.value);
    }, {
      flush: "post"
    }), Ie(m, () => {
      e.formatter && x();
    }, {
      flush: "post"
    }), Ie(() => e.disabled, (J) => {
      J && (l.value = !1);
    }), r({
      focus: () => {
        var J;
        (J = a.value) === null || J === void 0 || J.focus();
      },
      blur: () => {
        var J;
        (J = a.value) === null || J === void 0 || J.blur();
      }
    }), () => {
      const J = I(I({}, n), e), {
        prefixCls: be = "rc-input-number",
        min: xe,
        max: ge,
        step: de = 1,
        defaultValue: ne,
        value: we,
        disabled: ae,
        readonly: se,
        keyboard: he,
        controls: Me = !0,
        autofocus: ke,
        stringMode: Le,
        parser: Re,
        formatter: We,
        precision: et,
        decimalSeparator: Fe,
        onChange: Ne,
        onInput: Ge,
        onPressEnter: it,
        onStep: Ke,
        lazy: Oe,
        class: je,
        style: De
      } = J, Je = YF(J, ["prefixCls", "min", "max", "step", "defaultValue", "value", "disabled", "readonly", "keyboard", "controls", "autofocus", "stringMode", "parser", "formatter", "precision", "decimalSeparator", "onChange", "onInput", "onPressEnter", "onStep", "lazy", "class", "style"]), {
        upHandler: wt,
        downHandler: lt
      } = o, qe = `${be}-input`, rt = {};
      return Oe ? rt.onChange = A : rt.onInput = A, v("div", {
        class: Te(be, je, {
          [`${be}-focused`]: l.value,
          [`${be}-disabled`]: ae,
          [`${be}-readonly`]: se,
          [`${be}-not-a-number`]: c.value.isNaN(),
          [`${be}-out-of-range`]: !c.value.isInvalidate() && !z(c.value)
        }),
        style: De,
        onKeydown: G,
        onKeyup: Y
      }, [Me && v(qF, {
        prefixCls: be,
        upDisabled: $.value,
        downDisabled: P.value,
        onStep: U
      }, {
        upNode: wt,
        downNode: lt
      }), v("div", {
        class: `${qe}-wrap`
      }, [v("input", Z(Z(Z({
        autofocus: ke,
        autocomplete: "off",
        role: "spinbutton",
        "aria-valuemin": xe,
        "aria-valuemax": ge,
        "aria-valuenow": c.value.isInvalidate() ? null : c.value.toString(),
        step: de
      }, Je), {}, {
        ref: a,
        class: qe,
        value: m.value,
        disabled: ae,
        readonly: se,
        onFocus: (dt) => {
          l.value = !0, i("focus", dt);
        }
      }, rt), {}, {
        onBlur: K,
        onCompositionstart: H,
        onCompositionend: L,
        onBeforeinput: re
      }), null)])]);
    };
  }
});
function tg(e) {
  return e != null;
}
const XF = (e) => {
  const {
    componentCls: t,
    lineWidth: n,
    lineType: o,
    colorBorder: i,
    borderRadius: r,
    fontSizeLG: a,
    controlHeightLG: l,
    controlHeightSM: s,
    colorError: u,
    inputPaddingHorizontalSM: c,
    colorTextDescription: d,
    motionDurationMid: f,
    colorPrimary: p,
    controlHeight: m,
    inputPaddingHorizontal: b,
    colorBgContainer: y,
    colorTextDisabled: S,
    borderRadiusSM: C,
    borderRadiusLG: O,
    controlWidth: $,
    handleVisible: P
  } = e;
  return [
    {
      [t]: I(I(I(I({}, Zt(e)), ic(e)), Af(e, t)), {
        display: "inline-block",
        width: $,
        margin: 0,
        padding: 0,
        border: `${n}px ${o} ${i}`,
        borderRadius: r,
        "&-rtl": {
          direction: "rtl",
          [`${t}-input`]: {
            direction: "rtl"
          }
        },
        "&-lg": {
          padding: 0,
          fontSize: a,
          borderRadius: O,
          [`input${t}-input`]: {
            height: l - 2 * n
          }
        },
        "&-sm": {
          padding: 0,
          borderRadius: C,
          [`input${t}-input`]: {
            height: s - 2 * n,
            padding: `0 ${c}px`
          }
        },
        "&:hover": I({}, Ws(e)),
        "&-focused": I({}, Cl(e)),
        "&-disabled": I(I({}, oP(e)), {
          [`${t}-input`]: {
            cursor: "not-allowed"
          }
        }),
        // ===================== Out Of Range =====================
        "&-out-of-range": {
          input: {
            color: u
          }
        },
        // Style for input-group: input with label, with button or dropdown...
        "&-group": I(I(I({}, Zt(e)), aP(e)), {
          "&-wrapper": {
            display: "inline-block",
            textAlign: "start",
            verticalAlign: "top",
            [`${t}-affix-wrapper`]: {
              width: "100%"
            },
            // Size
            "&-lg": {
              [`${t}-group-addon`]: {
                borderRadius: O
              }
            },
            "&-sm": {
              [`${t}-group-addon`]: {
                borderRadius: C
              }
            }
          }
        }),
        [t]: {
          "&-input": I(I({
            width: "100%",
            height: m - 2 * n,
            padding: `0 ${b}px`,
            textAlign: "start",
            backgroundColor: "transparent",
            border: 0,
            borderRadius: r,
            outline: 0,
            transition: `all ${f} linear`,
            appearance: "textfield",
            color: e.colorText,
            fontSize: "inherit",
            verticalAlign: "top"
          }, nP(e.colorTextPlaceholder)), {
            '&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button': {
              margin: 0,
              /* stylelint-disable-next-line property-no-vendor-prefix */
              webkitAppearance: "none",
              appearance: "none"
            }
          })
        }
      })
    },
    // Handler
    {
      [t]: {
        [`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]: {
          opacity: 1
        },
        [`${t}-handler-wrap`]: {
          position: "absolute",
          insetBlockStart: 0,
          insetInlineEnd: 0,
          width: e.handleWidth,
          height: "100%",
          background: y,
          borderStartStartRadius: 0,
          borderStartEndRadius: r,
          borderEndEndRadius: r,
          borderEndStartRadius: 0,
          opacity: P === !0 ? 1 : 0,
          display: "flex",
          flexDirection: "column",
          alignItems: "stretch",
          transition: `opacity ${f} linear ${f}`,
          // Fix input number inside Menu makes icon too large
          // We arise the selector priority by nest selector here
          // https://github.com/ant-design/ant-design/issues/14367
          [`${t}-handler`]: {
            display: "flex",
            alignItems: "center",
            justifyContent: "center",
            flex: "auto",
            height: "40%",
            [`
              ${t}-handler-up-inner,
              ${t}-handler-down-inner
            `]: {
              marginInlineEnd: 0,
              fontSize: e.handleFontSize
            }
          }
        },
        [`${t}-handler`]: {
          height: "50%",
          overflow: "hidden",
          color: d,
          fontWeight: "bold",
          lineHeight: 0,
          textAlign: "center",
          cursor: "pointer",
          borderInlineStart: `${n}px ${o} ${i}`,
          transition: `all ${f} linear`,
          "&:active": {
            background: e.colorFillAlter
          },
          // Hover
          "&:hover": {
            height: "60%",
            [`
              ${t}-handler-up-inner,
              ${t}-handler-down-inner
            `]: {
              color: p
            }
          },
          "&-up-inner, &-down-inner": I(I({}, Fs()), {
            color: d,
            transition: `all ${f} linear`,
            userSelect: "none"
          })
        },
        [`${t}-handler-up`]: {
          borderStartEndRadius: r
        },
        [`${t}-handler-down`]: {
          borderBlockStart: `${n}px ${o} ${i}`,
          borderEndEndRadius: r
        },
        // Disabled
        "&-disabled, &-readonly": {
          [`${t}-handler-wrap`]: {
            display: "none"
          },
          [`${t}-input`]: {
            color: "inherit"
          }
        },
        [`
          ${t}-handler-up-disabled,
          ${t}-handler-down-disabled
        `]: {
          cursor: "not-allowed"
        },
        [`
          ${t}-handler-up-disabled:hover &-handler-up-inner,
          ${t}-handler-down-disabled:hover &-handler-down-inner
        `]: {
          color: S
        }
      }
    },
    // Border-less
    {
      [`${t}-borderless`]: {
        borderColor: "transparent",
        boxShadow: "none",
        [`${t}-handler-down`]: {
          borderBlockStartWidth: 0
        }
      }
    }
  ];
}, QF = (e) => {
  const {
    componentCls: t,
    inputPaddingHorizontal: n,
    inputAffixPadding: o,
    controlWidth: i,
    borderRadiusLG: r,
    borderRadiusSM: a
  } = e;
  return {
    [`${t}-affix-wrapper`]: I(I(I({}, ic(e)), Af(e, `${t}-affix-wrapper`)), {
      // or number handler will cover form status
      position: "relative",
      display: "inline-flex",
      width: i,
      padding: 0,
      paddingInlineStart: n,
      "&-lg": {
        borderRadius: r
      },
      "&-sm": {
        borderRadius: a
      },
      [`&:not(${t}-affix-wrapper-disabled):hover`]: I(I({}, Ws(e)), {
        zIndex: 1
      }),
      "&-focused, &:focus": {
        zIndex: 1
      },
      "&-disabled": {
        [`${t}[disabled]`]: {
          background: "transparent"
        }
      },
      [`> div${t}`]: {
        width: "100%",
        border: "none",
        outline: "none",
        [`&${t}-focused`]: {
          boxShadow: "none !important"
        }
      },
      [`input${t}-input`]: {
        padding: 0
      },
      "&::before": {
        width: 0,
        visibility: "hidden",
        content: '"\\a0"'
      },
      [`${t}-handler-wrap`]: {
        zIndex: 2
      },
      [t]: {
        "&-prefix, &-suffix": {
          display: "flex",
          flex: "none",
          alignItems: "center",
          pointerEvents: "none"
        },
        "&-prefix": {
          marginInlineEnd: o
        },
        "&-suffix": {
          position: "absolute",
          insetBlockStart: 0,
          insetInlineEnd: 0,
          zIndex: 1,
          height: "100%",
          marginInlineEnd: n,
          marginInlineStart: o
        }
      }
    })
  };
}, ZF = nn("InputNumber", (e) => {
  const t = Om(e);
  return [
    XF(t),
    QF(t),
    // =====================================================
    // ==             Space Compact                       ==
    // =====================================================
    ec(t)
  ];
}, (e) => ({
  controlWidth: 90,
  handleWidth: e.controlHeightSM - e.lineWidth * 2,
  handleFontSize: e.fontSize / 2,
  handleVisible: "auto"
}));
var JF = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const Zx = h2(), eH = () => I(I({}, Zx), {
  size: dn(),
  bordered: st(!0),
  placeholder: String,
  name: String,
  id: String,
  type: String,
  addonBefore: ue.any,
  addonAfter: ue.any,
  prefix: ue.any,
  "onUpdate:value": Zx.onChange,
  valueModifiers: Object,
  status: dn()
}), ng = ye({
  compatConfig: {
    MODE: 3
  },
  name: "AInputNumber",
  inheritAttrs: !1,
  props: eH(),
  // emits: ['focus', 'blur', 'change', 'input', 'update:value'],
  slots: Object,
  setup(e, t) {
    let {
      emit: n,
      expose: o,
      attrs: i,
      slots: r
    } = t;
    var a;
    const l = pi(), s = ui.useInject(), u = R(() => Ol(s.status, e.status)), {
      prefixCls: c,
      size: d,
      direction: f,
      disabled: p
    } = yt("input-number", e), {
      compactSize: m,
      compactItemClassnames: b
    } = Vs(c, f), y = Ji(), S = R(() => {
      var H;
      return (H = p.value) !== null && H !== void 0 ? H : y.value;
    }), [C, O] = ZF(c), $ = R(() => m.value || d.value), P = Pe((a = e.value) !== null && a !== void 0 ? a : e.defaultValue), k = Pe(!1);
    Ie(() => e.value, () => {
      P.value = e.value;
    });
    const x = Pe(null), E = () => {
      var H;
      (H = x.value) === null || H === void 0 || H.focus();
    };
    o({
      focus: E,
      blur: () => {
        var H;
        (H = x.value) === null || H === void 0 || H.blur();
      }
    });
    const N = (H) => {
      e.value === void 0 && (P.value = H), n("update:value", H), n("change", H), l.onFieldChange();
    }, D = (H) => {
      k.value = !1, n("blur", H), l.onFieldBlur();
    }, W = (H) => {
      k.value = !0, n("focus", H);
    };
    return () => {
      var H, L, A, U;
      const {
        hasFeedback: j,
        isFormItemInput: re,
        feedbackIcon: G
      } = s, Y = (H = e.id) !== null && H !== void 0 ? H : l.id.value, K = I(I(I({}, i), e), {
        id: Y,
        disabled: S.value
      }), {
        class: J,
        bordered: be,
        readonly: xe,
        style: ge,
        addonBefore: de = (L = r.addonBefore) === null || L === void 0 ? void 0 : L.call(r),
        addonAfter: ne = (A = r.addonAfter) === null || A === void 0 ? void 0 : A.call(r),
        prefix: we = (U = r.prefix) === null || U === void 0 ? void 0 : U.call(r),
        valueModifiers: ae = {}
      } = K, se = JF(K, ["class", "bordered", "readonly", "style", "addonBefore", "addonAfter", "prefix", "valueModifiers"]), he = c.value, Me = Te({
        [`${he}-lg`]: $.value === "large",
        [`${he}-sm`]: $.value === "small",
        [`${he}-rtl`]: f.value === "rtl",
        [`${he}-readonly`]: xe,
        [`${he}-borderless`]: !be,
        [`${he}-in-form-item`]: re
      }, Yi(he, u.value), J, b.value, O.value);
      let ke = v(UF, Z(Z({}, Tn(se, ["size", "defaultValue"])), {}, {
        ref: x,
        lazy: !!ae.lazy,
        value: P.value,
        class: Me,
        prefixCls: he,
        readonly: xe,
        onChange: N,
        onBlur: D,
        onFocus: W
      }), {
        upHandler: r.upIcon ? () => v("span", {
          class: `${he}-handler-up-inner`
        }, [r.upIcon()]) : () => v(jm, {
          class: `${he}-handler-up-inner`
        }, null),
        downHandler: r.downIcon ? () => v("span", {
          class: `${he}-handler-down-inner`
        }, [r.downIcon()]) : () => v(wf, {
          class: `${he}-handler-down-inner`
        }, null)
      });
      const Le = tg(de) || tg(ne), Re = tg(we);
      if (Re || j) {
        const We = Te(`${he}-affix-wrapper`, Yi(`${he}-affix-wrapper`, u.value, j), {
          [`${he}-affix-wrapper-focused`]: k.value,
          [`${he}-affix-wrapper-disabled`]: S.value,
          [`${he}-affix-wrapper-sm`]: $.value === "small",
          [`${he}-affix-wrapper-lg`]: $.value === "large",
          [`${he}-affix-wrapper-rtl`]: f.value === "rtl",
          [`${he}-affix-wrapper-readonly`]: xe,
          [`${he}-affix-wrapper-borderless`]: !be,
          // className will go to addon wrapper
          [`${J}`]: !Le && J
        }, O.value);
        ke = v("div", {
          class: We,
          style: ge,
          onClick: E
        }, [Re && v("span", {
          class: `${he}-prefix`
        }, [we]), ke, j && v("span", {
          class: `${he}-suffix`
        }, [G])]);
      }
      if (Le) {
        const We = `${he}-group`, et = `${We}-addon`, Fe = de ? v("div", {
          class: et
        }, [de]) : null, Ne = ne ? v("div", {
          class: et
        }, [ne]) : null, Ge = Te(`${he}-wrapper`, We, {
          [`${We}-rtl`]: f.value === "rtl"
        }, O.value), it = Te(`${he}-group-wrapper`, {
          [`${he}-group-wrapper-sm`]: $.value === "small",
          [`${he}-group-wrapper-lg`]: $.value === "large",
          [`${he}-group-wrapper-rtl`]: f.value === "rtl"
        }, Yi(`${c}-group-wrapper`, u.value, j), J, O.value);
        ke = v("div", {
          class: it,
          style: ge
        }, [v("div", {
          class: Ge
        }, [Fe && v(Wu, null, {
          default: () => [v(Nd, null, {
            default: () => [Fe]
          })]
        }), ke, Ne && v(Wu, null, {
          default: () => [v(Nd, null, {
            default: () => [Ne]
          })]
        })])]);
      }
      return C(An(ke, {
        style: ge
      }));
    };
  }
}), fo = I(ng, {
  install: (e) => (e.component(ng.name, ng), e)
}), tH = (e) => {
  const {
    componentCls: t,
    colorBgContainer: n,
    colorBgBody: o,
    colorText: i
  } = e;
  return {
    [`${t}-sider-light`]: {
      background: n,
      [`${t}-sider-trigger`]: {
        color: i,
        background: n
      },
      [`${t}-sider-zero-width-trigger`]: {
        color: i,
        background: n,
        border: `1px solid ${o}`,
        borderInlineStart: 0
      }
    }
  };
}, nH = (e) => {
  const {
    antCls: t,
    // .ant
    componentCls: n,
    // .ant-layout
    colorText: o,
    colorTextLightSolid: i,
    colorBgHeader: r,
    colorBgBody: a,
    colorBgTrigger: l,
    layoutHeaderHeight: s,
    layoutHeaderPaddingInline: u,
    layoutHeaderColor: c,
    layoutFooterPadding: d,
    layoutTriggerHeight: f,
    layoutZeroTriggerSize: p,
    motionDurationMid: m,
    motionDurationSlow: b,
    fontSize: y,
    borderRadius: S
  } = e;
  return {
    [n]: I(I({
      display: "flex",
      flex: "auto",
      flexDirection: "column",
      color: o,
      /* fix firefox can't set height smaller than content on flex item */
      minHeight: 0,
      background: a,
      "&, *": {
        boxSizing: "border-box"
      },
      [`&${n}-has-sider`]: {
        flexDirection: "row",
        [`> ${n}, > ${n}-content`]: {
          // https://segmentfault.com/a/1190000019498300
          width: 0
        }
      },
      [`${n}-header, &${n}-footer`]: {
        flex: "0 0 auto"
      },
      [`${n}-header`]: {
        height: s,
        paddingInline: u,
        color: c,
        lineHeight: `${s}px`,
        background: r,
        // Other components/menu/style/index.less line:686
        // Integration with header element so menu items have the same height
        [`${t}-menu`]: {
          lineHeight: "inherit"
        }
      },
      [`${n}-footer`]: {
        padding: d,
        color: o,
        fontSize: y,
        background: a
      },
      [`${n}-content`]: {
        flex: "auto",
        // fix firefox can't set height smaller than content on flex item
        minHeight: 0
      },
      [`${n}-sider`]: {
        position: "relative",
        // fix firefox can't set width smaller than content on flex item
        minWidth: 0,
        background: r,
        transition: `all ${m}, background 0s`,
        "&-children": {
          height: "100%",
          // Hack for fixing margin collapse bug
          // https://github.com/ant-design/ant-design/issues/7967
          // solution from https://stackoverflow.com/a/33132624/3040605
          marginTop: -0.1,
          paddingTop: 0.1,
          [`${t}-menu${t}-menu-inline-collapsed`]: {
            width: "auto"
          }
        },
        "&-has-trigger": {
          paddingBottom: f
        },
        "&-right": {
          order: 1
        },
        "&-trigger": {
          position: "fixed",
          bottom: 0,
          zIndex: 1,
          height: f,
          color: i,
          lineHeight: `${f}px`,
          textAlign: "center",
          background: l,
          cursor: "pointer",
          transition: `all ${m}`
        },
        "&-zero-width": {
          "> *": {
            overflow: "hidden"
          },
          "&-trigger": {
            position: "absolute",
            top: s,
            insetInlineEnd: -p,
            zIndex: 1,
            width: p,
            height: p,
            color: i,
            fontSize: e.fontSizeXL,
            display: "flex",
            alignItems: "center",
            justifyContent: "center",
            background: r,
            borderStartStartRadius: 0,
            borderStartEndRadius: S,
            borderEndEndRadius: S,
            borderEndStartRadius: 0,
            cursor: "pointer",
            transition: `background ${b} ease`,
            "&::after": {
              position: "absolute",
              inset: 0,
              background: "transparent",
              transition: `all ${b}`,
              content: '""'
            },
            "&:hover::after": {
              // FIXME: Hardcode, but seems no need to create a token for this
              background: "rgba(255, 255, 255, 0.2)"
            },
            "&-right": {
              insetInlineStart: -p,
              borderStartStartRadius: S,
              borderStartEndRadius: 0,
              borderEndEndRadius: 0,
              borderEndStartRadius: S
            }
          }
        }
      }
    }, tH(e)), {
      // RTL
      "&-rtl": {
        direction: "rtl"
      }
    })
  };
}, oH = nn("Layout", (e) => {
  const {
    colorText: t,
    controlHeightSM: n,
    controlHeight: o,
    controlHeightLG: i,
    marginXXS: r
  } = e, a = i * 1.25, l = _t(e, {
    // Layout
    layoutHeaderHeight: o * 2,
    layoutHeaderPaddingInline: a,
    layoutHeaderColor: t,
    layoutFooterPadding: `${n}px ${a}px`,
    layoutTriggerHeight: i + r * 2,
    layoutZeroTriggerSize: i
  });
  return [nH(l)];
}, (e) => {
  const {
    colorBgLayout: t
  } = e;
  return {
    colorBgHeader: "#001529",
    colorBgBody: t,
    colorBgTrigger: "#002140"
  };
}), Km = () => ({
  prefixCls: String,
  hasSider: {
    type: Boolean,
    default: void 0
  },
  tagName: String
});
function Vf(e) {
  let {
    suffixCls: t,
    tagName: n,
    name: o
  } = e;
  return (i) => ye({
    compatConfig: {
      MODE: 3
    },
    name: o,
    props: Km(),
    setup(a, l) {
      let {
        slots: s
      } = l;
      const {
        prefixCls: u
      } = yt(t, a);
      return () => {
        const c = I(I({}, a), {
          prefixCls: u.value,
          tagName: n
        });
        return v(i, c, s);
      };
    }
  });
}
const Ym = ye({
  compatConfig: {
    MODE: 3
  },
  props: Km(),
  setup(e, t) {
    let {
      slots: n
    } = t;
    return () => v(e.tagName, {
      class: e.prefixCls
    }, n);
  }
}), iH = ye({
  compatConfig: {
    MODE: 3
  },
  inheritAttrs: !1,
  props: Km(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: i,
      direction: r
    } = yt("", e), [a, l] = oH(i), s = le([]);
    kt($$, {
      addSider: (d) => {
        s.value = [...s.value, d];
      },
      removeSider: (d) => {
        s.value = s.value.filter((f) => f !== d);
      }
    });
    const c = R(() => {
      const {
        prefixCls: d,
        hasSider: f
      } = e;
      return {
        [l.value]: !0,
        [`${d}`]: !0,
        [`${d}-has-sider`]: typeof f == "boolean" ? f : s.value.length > 0,
        [`${d}-rtl`]: r.value === "rtl"
      };
    });
    return () => {
      const {
        tagName: d
      } = e;
      return a(v(d, I(I({}, o), {
        class: [c.value, o.class]
      }), n));
    };
  }
}), og = Vf({
  suffixCls: "layout",
  tagName: "section",
  name: "ALayout"
})(iH), ig = Vf({
  suffixCls: "layout-header",
  tagName: "header",
  name: "ALayoutHeader"
})(Ym), rg = Vf({
  suffixCls: "layout-footer",
  tagName: "footer",
  name: "ALayoutFooter"
})(Ym), ag = Vf({
  suffixCls: "layout-content",
  tagName: "main",
  name: "ALayoutContent"
})(Ym);
var rH = { icon: { tag: "svg", attrs: { viewBox: "0 0 1024 1024", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, name: "bars", theme: "outlined" };
function Jx(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      aH(e, i, n[i]);
    });
  }
  return e;
}
function aH(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Um = function(t, n) {
  var o = Jx({}, t, n.attrs);
  return v(pn, Jx({}, o, {
    icon: rH
  }), null);
};
Um.displayName = "BarsOutlined";
Um.inheritAttrs = !1;
const e1 = {
  xs: "479.98px",
  sm: "575.98px",
  md: "767.98px",
  lg: "991.98px",
  xl: "1199.98px",
  xxl: "1599.98px",
  xxxl: "1999.98px"
}, lH = () => ({
  prefixCls: String,
  collapsible: {
    type: Boolean,
    default: void 0
  },
  collapsed: {
    type: Boolean,
    default: void 0
  },
  defaultCollapsed: {
    type: Boolean,
    default: void 0
  },
  reverseArrow: {
    type: Boolean,
    default: void 0
  },
  zeroWidthTriggerStyle: {
    type: Object,
    default: void 0
  },
  trigger: ue.any,
  width: ue.oneOfType([ue.number, ue.string]),
  collapsedWidth: ue.oneOfType([ue.number, ue.string]),
  breakpoint: ue.oneOf(li("xs", "sm", "md", "lg", "xl", "xxl", "xxxl")),
  theme: ue.oneOf(li("light", "dark")).def("dark"),
  onBreakpoint: Function,
  onCollapse: Function
}), sH = /* @__PURE__ */ (() => {
  let e = 0;
  return function() {
    let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
    return e += 1, `${t}${e}`;
  };
})(), lg = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ALayoutSider",
  inheritAttrs: !1,
  props: wn(lH(), {
    collapsible: !1,
    defaultCollapsed: !1,
    reverseArrow: !1,
    width: 200,
    collapsedWidth: 80
  }),
  emits: ["breakpoint", "update:collapsed", "collapse"],
  setup(e, t) {
    let {
      emit: n,
      attrs: o,
      slots: i
    } = t;
    const {
      prefixCls: r
    } = yt("layout-sider", e), a = Tt($$, void 0), l = Pe(!!(e.collapsed !== void 0 ? e.collapsed : e.defaultCollapsed)), s = Pe(!1);
    Ie(() => e.collapsed, () => {
      l.value = !!e.collapsed;
    }), kt(C$, l);
    const u = (b, y) => {
      e.collapsed === void 0 && (l.value = b), n("update:collapsed", b), n("collapse", b, y);
    }, c = Pe((b) => {
      s.value = b.matches, n("breakpoint", b.matches), l.value !== b.matches && u(b.matches, "responsive");
    });
    let d;
    function f(b) {
      return c.value(b);
    }
    const p = sH("ant-sider-");
    a && a.addSider(p), Pt(() => {
      Ie(() => e.breakpoint, () => {
        try {
          d?.removeEventListener("change", f);
        } catch {
          d?.removeListener(f);
        }
        if (typeof window < "u") {
          const {
            matchMedia: b
          } = window;
          if (b && e.breakpoint && e.breakpoint in e1) {
            d = b(`(max-width: ${e1[e.breakpoint]})`);
            try {
              d.addEventListener("change", f);
            } catch {
              d.addListener(f);
            }
            f(d);
          }
        }
      }, {
        immediate: !0
      });
    }), At(() => {
      try {
        d?.removeEventListener("change", f);
      } catch {
        d?.removeListener(f);
      }
      a && a.removeSider(p);
    });
    const m = () => {
      u(!l.value, "clickTrigger");
    };
    return () => {
      var b, y;
      const S = r.value, {
        collapsedWidth: C,
        width: O,
        reverseArrow: $,
        zeroWidthTriggerStyle: P,
        trigger: k = (b = i.trigger) === null || b === void 0 ? void 0 : b.call(i),
        collapsible: x,
        theme: E
      } = e, z = l.value ? C : O, N = uh(z) ? `${z}px` : String(z), D = parseFloat(String(C || 0)) === 0 ? v("span", {
        onClick: m,
        class: Te(`${S}-zero-width-trigger`, `${S}-zero-width-trigger-${$ ? "right" : "left"}`),
        style: P
      }, [k || v(Um, null, null)]) : null, W = {
        expanded: $ ? v(Sl, null, null) : v(qd, null, null),
        collapsed: $ ? v(qd, null, null) : v(Sl, null, null)
      }, H = l.value ? "collapsed" : "expanded", L = W[H], A = k !== null ? D || v("div", {
        class: `${S}-trigger`,
        onClick: m,
        style: {
          width: N
        }
      }, [k || L]) : null, U = [o.style, {
        flex: `0 0 ${N}`,
        maxWidth: N,
        minWidth: N,
        width: N
      }], j = Te(S, `${S}-${E}`, {
        [`${S}-collapsed`]: !!l.value,
        [`${S}-has-trigger`]: x && k !== null && !D,
        [`${S}-below`]: !!s.value,
        [`${S}-zero-width`]: parseFloat(N) === 0
      }, o.class);
      return v("aside", Z(Z({}, o), {}, {
        class: j,
        style: U
      }), [v("div", {
        class: `${S}-children`
      }, [(y = i.default) === null || y === void 0 ? void 0 : y.call(i)]), x || s.value && D ? A : null]);
    };
  }
}), t1 = I(og, {
  Header: ig,
  Footer: rg,
  Content: ag,
  Sider: lg,
  install: (e) => (e.component(og.name, og), e.component(ig.name, ig), e.component(rg.name, rg), e.component(lg.name, lg), e.component(ag.name, ag), e)
});
function uH(e, t, n) {
  var o = n || {}, i = o.noTrailing, r = i === void 0 ? !1 : i, a = o.noLeading, l = a === void 0 ? !1 : a, s = o.debounceMode, u = s === void 0 ? void 0 : s, c, d = !1, f = 0;
  function p() {
    c && clearTimeout(c);
  }
  function m(y) {
    var S = y || {}, C = S.upcomingOnly, O = C === void 0 ? !1 : C;
    p(), d = !O;
  }
  function b() {
    for (var y = arguments.length, S = new Array(y), C = 0; C < y; C++)
      S[C] = arguments[C];
    var O = this, $ = Date.now() - f;
    if (d)
      return;
    function P() {
      f = Date.now(), t.apply(O, S);
    }
    function k() {
      c = void 0;
    }
    !l && u && !c && P(), p(), u === void 0 && $ > e ? l ? (f = Date.now(), r || (c = setTimeout(u ? k : P, e))) : P() : r !== !0 && (c = setTimeout(u ? k : P, u === void 0 ? e - $ : e));
  }
  return b.cancel = m, b;
}
function cH(e, t, n) {
  var o = {}, i = o.atBegin, r = i === void 0 ? !1 : i;
  return uH(e, t, {
    debounceMode: r !== !1
  });
}
const dH = new Bt("antSpinMove", {
  to: {
    opacity: 1
  }
}), fH = new Bt("antRotate", {
  to: {
    transform: "rotate(405deg)"
  }
}), pH = (e) => ({
  [`${e.componentCls}`]: I(I({}, Zt(e)), {
    position: "absolute",
    display: "none",
    color: e.colorPrimary,
    textAlign: "center",
    verticalAlign: "middle",
    opacity: 0,
    transition: `transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,
    "&-spinning": {
      position: "static",
      display: "inline-block",
      opacity: 1
    },
    "&-nested-loading": {
      position: "relative",
      [`> div > ${e.componentCls}`]: {
        position: "absolute",
        top: 0,
        insetInlineStart: 0,
        zIndex: 4,
        display: "block",
        width: "100%",
        height: "100%",
        maxHeight: e.contentHeight,
        [`${e.componentCls}-dot`]: {
          position: "absolute",
          top: "50%",
          insetInlineStart: "50%",
          margin: -e.spinDotSize / 2
        },
        [`${e.componentCls}-text`]: {
          position: "absolute",
          top: "50%",
          width: "100%",
          paddingTop: (e.spinDotSize - e.fontSize) / 2 + 2,
          textShadow: `0 1px 2px ${e.colorBgContainer}`
          // FIXME: shadow
        },
        [`&${e.componentCls}-show-text ${e.componentCls}-dot`]: {
          marginTop: -(e.spinDotSize / 2) - 10
        },
        "&-sm": {
          [`${e.componentCls}-dot`]: {
            margin: -e.spinDotSizeSM / 2
          },
          [`${e.componentCls}-text`]: {
            paddingTop: (e.spinDotSizeSM - e.fontSize) / 2 + 2
          },
          [`&${e.componentCls}-show-text ${e.componentCls}-dot`]: {
            marginTop: -(e.spinDotSizeSM / 2) - 10
          }
        },
        "&-lg": {
          [`${e.componentCls}-dot`]: {
            margin: -(e.spinDotSizeLG / 2)
          },
          [`${e.componentCls}-text`]: {
            paddingTop: (e.spinDotSizeLG - e.fontSize) / 2 + 2
          },
          [`&${e.componentCls}-show-text ${e.componentCls}-dot`]: {
            marginTop: -(e.spinDotSizeLG / 2) - 10
          }
        }
      },
      [`${e.componentCls}-container`]: {
        position: "relative",
        transition: `opacity ${e.motionDurationSlow}`,
        "&::after": {
          position: "absolute",
          top: 0,
          insetInlineEnd: 0,
          bottom: 0,
          insetInlineStart: 0,
          zIndex: 10,
          width: "100%",
          height: "100%",
          background: e.colorBgContainer,
          opacity: 0,
          transition: `all ${e.motionDurationSlow}`,
          content: '""',
          pointerEvents: "none"
        }
      },
      [`${e.componentCls}-blur`]: {
        clear: "both",
        opacity: 0.5,
        userSelect: "none",
        pointerEvents: "none",
        "&::after": {
          opacity: 0.4,
          pointerEvents: "auto"
        }
      }
    },
    // tip
    // ------------------------------
    "&-tip": {
      color: e.spinDotDefault
    },
    // dots
    // ------------------------------
    [`${e.componentCls}-dot`]: {
      position: "relative",
      display: "inline-block",
      fontSize: e.spinDotSize,
      width: "1em",
      height: "1em",
      "&-item": {
        position: "absolute",
        display: "block",
        width: (e.spinDotSize - e.marginXXS / 2) / 2,
        height: (e.spinDotSize - e.marginXXS / 2) / 2,
        backgroundColor: e.colorPrimary,
        borderRadius: "100%",
        transform: "scale(0.75)",
        transformOrigin: "50% 50%",
        opacity: 0.3,
        animationName: dH,
        animationDuration: "1s",
        animationIterationCount: "infinite",
        animationTimingFunction: "linear",
        animationDirection: "alternate",
        "&:nth-child(1)": {
          top: 0,
          insetInlineStart: 0
        },
        "&:nth-child(2)": {
          top: 0,
          insetInlineEnd: 0,
          animationDelay: "0.4s"
        },
        "&:nth-child(3)": {
          insetInlineEnd: 0,
          bottom: 0,
          animationDelay: "0.8s"
        },
        "&:nth-child(4)": {
          bottom: 0,
          insetInlineStart: 0,
          animationDelay: "1.2s"
        }
      },
      "&-spin": {
        transform: "rotate(45deg)",
        animationName: fH,
        animationDuration: "1.2s",
        animationIterationCount: "infinite",
        animationTimingFunction: "linear"
      }
    },
    // Sizes
    // ------------------------------
    // small
    [`&-sm ${e.componentCls}-dot`]: {
      fontSize: e.spinDotSizeSM,
      i: {
        width: (e.spinDotSizeSM - e.marginXXS / 2) / 2,
        height: (e.spinDotSizeSM - e.marginXXS / 2) / 2
      }
    },
    // large
    [`&-lg ${e.componentCls}-dot`]: {
      fontSize: e.spinDotSizeLG,
      i: {
        width: (e.spinDotSizeLG - e.marginXXS) / 2,
        height: (e.spinDotSizeLG - e.marginXXS) / 2
      }
    },
    [`&${e.componentCls}-show-text ${e.componentCls}-text`]: {
      display: "block"
    }
  })
}), gH = nn("Spin", (e) => {
  const t = _t(e, {
    spinDotDefault: e.colorTextDescription,
    spinDotSize: e.controlHeightLG / 2,
    spinDotSizeSM: e.controlHeightLG * 0.35,
    spinDotSizeLG: e.controlHeight
  });
  return [pH(t)];
}, {
  contentHeight: 400
});
var hH = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const vH = () => ({
  prefixCls: String,
  spinning: {
    type: Boolean,
    default: void 0
  },
  size: String,
  wrapperClassName: String,
  tip: ue.any,
  delay: Number,
  indicator: ue.any
});
let yd = null;
function mH(e, t) {
  return !!e && !!t && !isNaN(Number(t));
}
function bH(e) {
  const t = e.indicator;
  yd = typeof t == "function" ? t : () => v(t, null, null);
}
const Do = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ASpin",
  inheritAttrs: !1,
  props: wn(vH(), {
    size: "default",
    spinning: !0,
    wrapperClassName: ""
  }),
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const {
      prefixCls: i,
      size: r,
      direction: a
    } = yt("spin", e), [l, s] = gH(i), u = Pe(e.spinning && !mH(e.spinning, e.delay));
    let c;
    return Ie([() => e.spinning, () => e.delay], () => {
      c?.cancel(), c = cH(e.delay, () => {
        u.value = e.spinning;
      }), c?.();
    }, {
      immediate: !0,
      flush: "post"
    }), At(() => {
      c?.cancel();
    }), () => {
      var d, f;
      const {
        class: p
      } = n, m = hH(n, ["class"]), {
        tip: b = (d = o.tip) === null || d === void 0 ? void 0 : d.call(o)
      } = e, y = (f = o.default) === null || f === void 0 ? void 0 : f.call(o), S = {
        [s.value]: !0,
        [i.value]: !0,
        [`${i.value}-sm`]: r.value === "small",
        [`${i.value}-lg`]: r.value === "large",
        [`${i.value}-spinning`]: u.value,
        [`${i.value}-show-text`]: !!b,
        [`${i.value}-rtl`]: a.value === "rtl",
        [p]: !!p
      };
      function C($) {
        const P = `${$}-dot`;
        let k = Mi(o, e, "indicator");
        return k === null ? null : (Array.isArray(k) && (k = k.length === 1 ? k[0] : k), Qi(k) ? vl(k, {
          class: P
        }) : yd && Qi(yd()) ? vl(yd(), {
          class: P
        }) : v("span", {
          class: `${P} ${$}-dot-spin`
        }, [v("i", {
          class: `${$}-dot-item`
        }, null), v("i", {
          class: `${$}-dot-item`
        }, null), v("i", {
          class: `${$}-dot-item`
        }, null), v("i", {
          class: `${$}-dot-item`
        }, null)]));
      }
      const O = v("div", Z(Z({}, m), {}, {
        class: S,
        "aria-live": "polite",
        "aria-busy": u.value
      }), [C(i.value), b ? v("div", {
        class: `${i.value}-text`
      }, [b]) : null]);
      if (y && Ko(y).length) {
        const $ = {
          [`${i.value}-container`]: !0,
          [`${i.value}-blur`]: u.value
        };
        return l(v("div", {
          class: [`${i.value}-nested-loading`, e.wrapperClassName, s.value]
        }, [u.value && v("div", {
          key: "loading"
        }, [O]), v("div", {
          class: $,
          key: "container"
        }, [y])]));
      }
      return l(O);
    };
  }
});
Do.setDefaultIndicator = bH;
Do.install = function(e) {
  return e.component(Do.name, Do), e;
};
var yH = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
let Hh;
const xH = (e) => {
  Hh = {
    x: e.pageX,
    y: e.pageY
  }, setTimeout(() => Hh = null, 100);
};
bP() && Gi(document.documentElement, "click", xH, !0);
const wH = () => ({
  prefixCls: String,
  /** @deprecated Please use `open` instead. */
  visible: {
    type: Boolean,
    default: void 0
  },
  open: {
    type: Boolean,
    default: void 0
  },
  confirmLoading: {
    type: Boolean,
    default: void 0
  },
  title: ue.any,
  closable: {
    type: Boolean,
    default: void 0
  },
  closeIcon: ue.any,
  onOk: Function,
  onCancel: Function,
  "onUpdate:visible": Function,
  "onUpdate:open": Function,
  onChange: Function,
  afterClose: Function,
  centered: {
    type: Boolean,
    default: void 0
  },
  width: [String, Number],
  footer: ue.any,
  okText: ue.any,
  okType: String,
  cancelText: ue.any,
  icon: ue.any,
  maskClosable: {
    type: Boolean,
    default: void 0
  },
  forceRender: {
    type: Boolean,
    default: void 0
  },
  okButtonProps: Ct(),
  cancelButtonProps: Ct(),
  destroyOnClose: {
    type: Boolean,
    default: void 0
  },
  wrapClassName: String,
  maskTransitionName: String,
  transitionName: String,
  getContainer: {
    type: [String, Function, Boolean, Object],
    default: void 0
  },
  zIndex: Number,
  bodyStyle: Ct(),
  maskStyle: Ct(),
  mask: {
    type: Boolean,
    default: void 0
  },
  keyboard: {
    type: Boolean,
    default: void 0
  },
  wrapProps: Object,
  focusTriggerAfterClose: {
    type: Boolean,
    default: void 0
  },
  modalRender: Function,
  mousePosition: Ct()
}), po = ye({
  compatConfig: {
    MODE: 3
  },
  name: "AModal",
  inheritAttrs: !1,
  props: wn(wH(), {
    width: 520,
    confirmLoading: !1,
    okType: "primary"
  }),
  setup(e, t) {
    let {
      emit: n,
      slots: o,
      attrs: i
    } = t;
    const [r] = Bs("Modal"), {
      prefixCls: a,
      rootPrefixCls: l,
      direction: s,
      getPopupContainer: u
    } = yt("modal", e), [c, d] = FF(a);
    Zn(e.visible === void 0, "Modal", "`visible` will be removed in next major version, please use `open` instead.");
    const f = (b) => {
      n("update:visible", !1), n("update:open", !1), n("cancel", b), n("change", !1);
    }, p = (b) => {
      n("ok", b);
    }, m = () => {
      var b, y;
      const {
        okText: S = (b = o.okText) === null || b === void 0 ? void 0 : b.call(o),
        okType: C,
        cancelText: O = (y = o.cancelText) === null || y === void 0 ? void 0 : y.call(o),
        confirmLoading: $
      } = e;
      return v(Ve, null, [v($t, Z({
        onClick: f
      }, e.cancelButtonProps), {
        default: () => [O || r.value.cancelText]
      }), v($t, Z(Z({}, l$(C)), {}, {
        loading: $,
        onClick: p
      }, e.okButtonProps), {
        default: () => [S || r.value.okText]
      })]);
    };
    return () => {
      var b, y;
      const {
        prefixCls: S,
        visible: C,
        open: O,
        wrapClassName: $,
        centered: P,
        getContainer: k,
        closeIcon: x = (b = o.closeIcon) === null || b === void 0 ? void 0 : b.call(o),
        focusTriggerAfterClose: E = !0
      } = e, z = yH(e, ["prefixCls", "visible", "open", "wrapClassName", "centered", "getContainer", "closeIcon", "focusTriggerAfterClose"]), N = Te($, {
        [`${a.value}-centered`]: !!P,
        [`${a.value}-wrap-rtl`]: s.value === "rtl"
      });
      return c(v(DF, Z(Z(Z({}, z), i), {}, {
        rootClassName: d.value,
        class: Te(d.value, i.class),
        getContainer: k || u?.value,
        prefixCls: a.value,
        wrapClassName: N,
        visible: O ?? C,
        onClose: f,
        focusTriggerAfterClose: E,
        transitionName: Kr(l.value, "zoom", e.transitionName),
        maskTransitionName: Kr(l.value, "fade", e.maskTransitionName),
        mousePosition: (y = z.mousePosition) !== null && y !== void 0 ? y : Hh
      }), I(I({}, o), {
        footer: o.footer || m,
        closeIcon: () => v("span", {
          class: `${a.value}-close-x`
        }, [x || v(Sr, {
          class: `${a.value}-close-icon`
        }, null)])
      })));
    };
  }
}), SH = () => {
  const e = Pe(!1);
  return At(() => {
    e.value = !0;
  }), e;
}, CH = {
  type: {
    type: String
  },
  actionFn: Function,
  close: Function,
  autofocus: Boolean,
  prefixCls: String,
  buttonProps: Ct(),
  emitEvent: Boolean,
  quitOnNullishReturnValue: Boolean
};
function n1(e) {
  return !!(e && e.then);
}
const o1 = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ActionButton",
  props: CH,
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = Pe(!1), i = Pe(), r = Pe(!1);
    let a;
    const l = SH();
    Pt(() => {
      e.autofocus && (a = setTimeout(() => {
        var d, f;
        return (f = (d = Br(i.value)) === null || d === void 0 ? void 0 : d.focus) === null || f === void 0 ? void 0 : f.call(d);
      }));
    }), At(() => {
      clearTimeout(a);
    });
    const s = function() {
      for (var d, f = arguments.length, p = new Array(f), m = 0; m < f; m++)
        p[m] = arguments[m];
      (d = e.close) === null || d === void 0 || d.call(e, ...p);
    }, u = (d) => {
      n1(d) && (r.value = !0, d.then(function() {
        l.value || (r.value = !1), s(...arguments), o.value = !1;
      }, (f) => (l.value || (r.value = !1), o.value = !1, Promise.reject(f))));
    }, c = (d) => {
      const {
        actionFn: f
      } = e;
      if (o.value)
        return;
      if (o.value = !0, !f) {
        s();
        return;
      }
      let p;
      if (e.emitEvent) {
        if (p = f(d), e.quitOnNullishReturnValue && !n1(p)) {
          o.value = !1, s(d);
          return;
        }
      } else if (f.length)
        p = f(e.close), o.value = !1;
      else if (p = f(), !p) {
        s();
        return;
      }
      u(p);
    };
    return () => {
      const {
        type: d,
        prefixCls: f,
        buttonProps: p
      } = e;
      return v($t, Z(Z(Z({}, l$(d)), {}, {
        onClick: c,
        loading: r.value,
        prefixCls: f
      }, p), {}, {
        ref: i
      }), n);
    };
  }
});
function Kl(e) {
  return typeof e == "function" ? e() : e;
}
const v2 = ye({
  name: "ConfirmDialog",
  inheritAttrs: !1,
  props: ["icon", "onCancel", "onOk", "close", "closable", "zIndex", "afterClose", "visible", "open", "keyboard", "centered", "getContainer", "maskStyle", "okButtonProps", "cancelButtonProps", "okType", "prefixCls", "okCancel", "width", "mask", "maskClosable", "okText", "cancelText", "autoFocusButton", "transitionName", "maskTransitionName", "type", "title", "content", "direction", "rootPrefixCls", "bodyStyle", "closeIcon", "modalRender", "focusTriggerAfterClose", "wrapClassName", "confirmPrefixCls", "footer"],
  setup(e, t) {
    let {
      attrs: n
    } = t;
    const [o] = Bs("Modal");
    return process.env.NODE_ENV !== "production" && Zn(e.visible === void 0, "Modal", "`visible` is deprecated, please use `open` instead."), () => {
      const {
        icon: i,
        onCancel: r,
        onOk: a,
        close: l,
        okText: s,
        closable: u = !1,
        zIndex: c,
        afterClose: d,
        keyboard: f,
        centered: p,
        getContainer: m,
        maskStyle: b,
        okButtonProps: y,
        cancelButtonProps: S,
        okCancel: C,
        width: O = 416,
        mask: $ = !0,
        maskClosable: P = !1,
        type: k,
        open: x,
        title: E,
        content: z,
        direction: N,
        closeIcon: D,
        modalRender: W,
        focusTriggerAfterClose: H,
        rootPrefixCls: L,
        bodyStyle: A,
        wrapClassName: U,
        footer: j
      } = e;
      let re = i;
      if (!i && i !== null)
        switch (k) {
          case "info":
            re = v(Il, null, null);
            break;
          case "success":
            re = v(Da, null, null);
            break;
          case "error":
            re = v(fi, null, null);
            break;
          default:
            re = v(za, null, null);
        }
      const G = e.okType || "primary", Y = e.prefixCls || "ant-modal", K = `${Y}-confirm`, J = n.style || {}, be = C ?? k === "confirm", xe = e.autoFocusButton === null ? !1 : e.autoFocusButton || "ok", ge = `${Y}-confirm`, de = Te(ge, `${ge}-${e.type}`, {
        [`${ge}-rtl`]: N === "rtl"
      }, n.class), ne = o.value, we = be && v(o1, {
        actionFn: r,
        close: l,
        autofocus: xe === "cancel",
        buttonProps: S,
        prefixCls: `${L}-btn`
      }, {
        default: () => [Kl(e.cancelText) || ne.cancelText]
      });
      return v(po, {
        prefixCls: Y,
        class: de,
        wrapClassName: Te({
          [`${ge}-centered`]: !!p
        }, U),
        onCancel: (ae) => l?.({
          triggerCancel: !0
        }, ae),
        open: x,
        title: "",
        footer: "",
        transitionName: Kr(L, "zoom", e.transitionName),
        maskTransitionName: Kr(L, "fade", e.maskTransitionName),
        mask: $,
        maskClosable: P,
        maskStyle: b,
        style: J,
        bodyStyle: A,
        width: O,
        zIndex: c,
        afterClose: d,
        keyboard: f,
        centered: p,
        getContainer: m,
        closable: u,
        closeIcon: D,
        modalRender: W,
        focusTriggerAfterClose: H
      }, {
        default: () => [v("div", {
          class: `${K}-body-wrapper`
        }, [v("div", {
          class: `${K}-body`
        }, [Kl(re), E === void 0 ? null : v("span", {
          class: `${K}-title`
        }, [Kl(E)]), v("div", {
          class: `${K}-content`
        }, [Kl(z)])]), j !== void 0 ? Kl(j) : v("div", {
          class: `${K}-btns`
        }, [we, v(o1, {
          type: G,
          actionFn: a,
          close: l,
          autofocus: xe === "ok",
          buttonProps: y,
          prefixCls: `${L}-btn`
        }, {
          default: () => [Kl(s) || (be ? ne.okText : ne.justOkText)]
        })])])]
      });
    };
  }
}), sl = [], sc = (e) => {
  const t = document.createDocumentFragment();
  let n = I(I({}, Tn(e, ["parentContext", "appContext"])), {
    close: r,
    open: !0
  }), o = null;
  function i() {
    o && (Ia(null, t), o = null);
    for (var u = arguments.length, c = new Array(u), d = 0; d < u; d++)
      c[d] = arguments[d];
    const f = c.some((p) => p && p.triggerCancel);
    e.onCancel && f && e.onCancel(() => {
    }, ...c.slice(1));
    for (let p = 0; p < sl.length; p++)
      if (sl[p] === r) {
        sl.splice(p, 1);
        break;
      }
  }
  function r() {
    for (var u = arguments.length, c = new Array(u), d = 0; d < u; d++)
      c[d] = arguments[d];
    n = I(I({}, n), {
      open: !1,
      afterClose: () => {
        typeof e.afterClose == "function" && e.afterClose(), i.apply(this, c);
      }
    }), n.visible && delete n.visible, a(n);
  }
  function a(u) {
    typeof u == "function" ? n = u(n) : n = I(I({}, n), u), o && fD(o, n, t);
  }
  const l = (u) => {
    const c = mo, d = c.prefixCls, f = u.prefixCls || `${d}-modal`, p = c.iconPrefixCls, m = y6();
    return v(pl, Z(Z({}, c), {}, {
      prefixCls: d
    }), {
      default: () => [v(v2, Z(Z({}, u), {}, {
        rootPrefixCls: d,
        prefixCls: f,
        iconPrefixCls: p,
        locale: m,
        cancelText: u.cancelText || m.cancelText
      }), null)]
    });
  };
  function s(u) {
    const c = v(l, I({}, u));
    return c.appContext = e.parentContext || e.appContext || c.appContext, Ia(c, t), c;
  }
  return o = s(n), sl.push(r), {
    destroy: r,
    update: a
  };
};
function m2(e) {
  return I(I({}, e), {
    type: "warning"
  });
}
function b2(e) {
  return I(I({}, e), {
    type: "info"
  });
}
function y2(e) {
  return I(I({}, e), {
    type: "success"
  });
}
function x2(e) {
  return I(I({}, e), {
    type: "error"
  });
}
function w2(e) {
  return I(I({}, e), {
    type: "confirm"
  });
}
const $H = () => ({
  config: Object,
  afterClose: Function,
  destroyAction: Function,
  open: Boolean
}), PH = ye({
  name: "HookModal",
  inheritAttrs: !1,
  props: wn($H(), {
    config: {
      width: 520,
      okType: "primary"
    }
  }),
  setup(e, t) {
    let {
      expose: n
    } = t;
    var o;
    const i = R(() => e.open), r = R(() => e.config), {
      direction: a,
      getPrefixCls: l
    } = cf(), s = l("modal"), u = l(), c = () => {
      var m, b;
      e?.afterClose(), (b = (m = r.value).afterClose) === null || b === void 0 || b.call(m);
    }, d = function() {
      e.destroyAction(...arguments);
    };
    n({
      destroy: d
    });
    const f = (o = r.value.okCancel) !== null && o !== void 0 ? o : r.value.type === "confirm", [p] = Bs("Modal", Ta.Modal);
    return () => v(v2, Z(Z({
      prefixCls: s,
      rootPrefixCls: u
    }, r.value), {}, {
      close: d,
      open: i.value,
      afterClose: c,
      okText: r.value.okText || (f ? p?.value.okText : p?.value.justOkText),
      direction: r.value.direction || a.value,
      cancelText: r.value.cancelText || p?.value.cancelText
    }), null);
  }
});
let i1 = 0;
const OH = ye({
  name: "ElementsHolder",
  inheritAttrs: !1,
  setup(e, t) {
    let {
      expose: n
    } = t;
    const o = Pe([]);
    return n({
      addModal: (r) => (o.value.push(r), o.value = o.value.slice(), () => {
        o.value = o.value.filter((a) => a !== r);
      })
    }), () => o.value.map((r) => r());
  }
});
function S2() {
  const e = Pe(null), t = Pe([]);
  Ie(t, () => {
    t.value.length && ([...t.value].forEach((a) => {
      a();
    }), t.value = []);
  }, {
    immediate: !0
  });
  const n = (r) => function(l) {
    var s;
    i1 += 1;
    const u = Pe(!0), c = Pe(null), d = Pe(M(l)), f = Pe({});
    Ie(() => l, (O) => {
      y(I(I({}, aw(O) ? O.value : O), f.value));
    });
    const p = function() {
      u.value = !1;
      for (var O = arguments.length, $ = new Array(O), P = 0; P < O; P++)
        $[P] = arguments[P];
      const k = $.some((x) => x && x.triggerCancel);
      d.value.onCancel && k && d.value.onCancel(() => {
      }, ...$.slice(1));
    };
    let m;
    const b = () => v(PH, {
      key: `modal-${i1}`,
      config: r(d.value),
      ref: c,
      open: u.value,
      destroyAction: p,
      afterClose: () => {
        m?.();
      }
    }, null);
    m = (s = e.value) === null || s === void 0 ? void 0 : s.addModal(b), m && sl.push(m);
    const y = (O) => {
      d.value = I(I({}, d.value), O);
    };
    return {
      destroy: () => {
        c.value ? p() : t.value = [...t.value, p];
      },
      update: (O) => {
        f.value = O, c.value ? y(O) : t.value = [...t.value, () => y(O)];
      }
    };
  }, o = R(() => ({
    info: n(b2),
    success: n(y2),
    error: n(x2),
    warning: n(m2),
    confirm: n(w2)
  })), i = Symbol("modalHolderKey");
  return [o.value, () => v(OH, {
    key: i,
    ref: e
  }, null)];
}
function C2(e) {
  return sc(m2(e));
}
po.useModal = S2;
po.info = function(t) {
  return sc(b2(t));
};
po.success = function(t) {
  return sc(y2(t));
};
po.error = function(t) {
  return sc(x2(t));
};
po.warning = C2;
po.warn = C2;
po.confirm = function(t) {
  return sc(w2(t));
};
po.destroyAll = function() {
  for (; sl.length; ) {
    const t = sl.pop();
    t && t();
  }
};
po.install = function(e) {
  return e.component(po.name, po), e;
};
const IH = {
  small: 8,
  middle: 16,
  large: 24
}, MH = () => ({
  prefixCls: String,
  size: {
    type: [String, Number, Array]
  },
  direction: ue.oneOf(li("horizontal", "vertical")).def("horizontal"),
  align: ue.oneOf(li("start", "end", "center", "baseline")),
  wrap: st()
});
function TH(e) {
  return typeof e == "string" ? IH[e] : e || 0;
}
const vr = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ASpace",
  inheritAttrs: !1,
  props: MH(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: i,
      space: r,
      direction: a
    } = yt("space", e), [l, s] = UC(i), u = yP(), c = R(() => {
      var S, C, O;
      return (O = (S = e.size) !== null && S !== void 0 ? S : (C = r?.value) === null || C === void 0 ? void 0 : C.size) !== null && O !== void 0 ? O : "small";
    }), d = le(), f = le();
    Ie(c, () => {
      [d.value, f.value] = (Array.isArray(c.value) ? c.value : [c.value, c.value]).map((S) => TH(S));
    }, {
      immediate: !0
    });
    const p = R(() => e.align === void 0 && e.direction === "horizontal" ? "center" : e.align), m = R(() => Te(i.value, s.value, `${i.value}-${e.direction}`, {
      [`${i.value}-rtl`]: a.value === "rtl",
      [`${i.value}-align-${p.value}`]: p.value
    })), b = R(() => a.value === "rtl" ? "marginLeft" : "marginRight"), y = R(() => {
      const S = {};
      return u.value && (S.columnGap = `${d.value}px`, S.rowGap = `${f.value}px`), I(I({}, S), e.wrap && {
        flexWrap: "wrap",
        marginBottom: `${-f.value}px`
      });
    });
    return () => {
      var S, C;
      const {
        wrap: O,
        direction: $ = "horizontal"
      } = e, P = (S = n.default) === null || S === void 0 ? void 0 : S.call(n), k = Ko(P), x = k.length;
      if (x === 0)
        return null;
      const E = (C = n.split) === null || C === void 0 ? void 0 : C.call(n), z = `${i.value}-item`, N = d.value, D = x - 1;
      return v("div", Z(Z({}, o), {}, {
        class: [m.value, o.class],
        style: [y.value, o.style]
      }), [k.map((W, H) => {
        let L = P.indexOf(W);
        L === -1 && (L = `$$space-${H}`);
        let A = {};
        return u.value || ($ === "vertical" ? H < D && (A = {
          marginBottom: `${N / (E ? 2 : 1)}px`
        }) : A = I(I({}, H < D && {
          [b.value]: `${N / (E ? 2 : 1)}px`
        }), O && {
          paddingBottom: `${f.value}px`
        })), l(v(Ve, {
          key: L
        }, [v("div", {
          class: z,
          style: A
        }, [W]), H < D && E && v("span", {
          class: `${z}-split`,
          style: A
        }, [E])]));
      })]);
    };
  }
});
vr.Compact = sh;
vr.install = function(e) {
  return e.component(vr.name, vr), e.component(sh.name, sh), e;
};
const kH = er(wP), Xm = (e, t) => {
  let {
    attrs: n
  } = t;
  const {
    included: o,
    vertical: i,
    style: r,
    class: a
  } = n;
  let {
    length: l,
    offset: s,
    reverse: u
  } = n;
  l < 0 && (u = !u, l = Math.abs(l), s = 100 - s);
  const c = i ? {
    [u ? "top" : "bottom"]: `${s}%`,
    [u ? "bottom" : "top"]: "auto",
    height: `${l}%`
  } : {
    [u ? "right" : "left"]: `${s}%`,
    [u ? "left" : "right"]: "auto",
    width: `${l}%`
  }, d = I(I({}, r), c);
  return o ? v("div", {
    class: a,
    style: d
  }, null) : null;
};
Xm.inheritAttrs = !1;
const EH = (e, t, n, o, i, r) => {
  Zn(n ? o > 0 : !0, "Slider", "`Slider[step]` should be a positive number in order to make Slider[dots] work.");
  const a = Object.keys(t).map(parseFloat).sort((l, s) => l - s);
  if (n && o)
    for (let l = i; l <= r; l += o)
      a.indexOf(l) === -1 && a.push(l);
  return a;
}, $2 = (e, t) => {
  let {
    attrs: n
  } = t;
  const {
    prefixCls: o,
    vertical: i,
    reverse: r,
    marks: a,
    dots: l,
    step: s,
    included: u,
    lowerBound: c,
    upperBound: d,
    max: f,
    min: p,
    dotStyle: m,
    activeDotStyle: b
  } = n, y = f - p, S = EH(i, a, l, s, p, f).map((C) => {
    const O = `${Math.abs(C - p) / y * 100}%`, $ = !u && C === d || u && C <= d && C >= c;
    let P = i ? I(I({}, m), {
      [r ? "top" : "bottom"]: O
    }) : I(I({}, m), {
      [r ? "right" : "left"]: O
    });
    $ && (P = I(I({}, P), b));
    const k = Te({
      [`${o}-dot`]: !0,
      [`${o}-dot-active`]: $,
      [`${o}-dot-reverse`]: r
    });
    return v("span", {
      class: k,
      style: P,
      key: C
    }, null);
  });
  return v("div", {
    class: `${o}-step`
  }, [S]);
};
$2.inheritAttrs = !1;
const P2 = (e, t) => {
  let {
    attrs: n,
    slots: o
  } = t;
  const {
    class: i,
    vertical: r,
    reverse: a,
    marks: l,
    included: s,
    upperBound: u,
    lowerBound: c,
    max: d,
    min: f,
    onClickLabel: p
  } = n, m = Object.keys(l), b = o.mark, y = d - f, S = m.map(parseFloat).sort((C, O) => C - O).map((C) => {
    const O = typeof l[C] == "function" ? l[C]() : l[C], $ = typeof O == "object" && !Bo(O);
    let P = $ ? O.label : O;
    if (!P && P !== 0)
      return null;
    b && (P = b({
      point: C,
      label: P
    }));
    const k = !s && C === u || s && C <= u && C >= c, x = Te({
      [`${i}-text`]: !0,
      [`${i}-text-active`]: k
    }), E = {
      marginBottom: "-50%",
      [a ? "top" : "bottom"]: `${(C - f) / y * 100}%`
    }, z = {
      transform: `translateX(${a ? "50%" : "-50%"})`,
      msTransform: `translateX(${a ? "50%" : "-50%"})`,
      [a ? "right" : "left"]: `${(C - f) / y * 100}%`
    }, N = r ? E : z, D = $ ? I(I({}, N), O.style) : N, W = {
      [bo ? "onTouchstartPassive" : "onTouchstart"]: (H) => p(H, C)
    };
    return v("span", Z({
      class: x,
      style: D,
      key: C,
      onMousedown: (H) => p(H, C)
    }, W), [P]);
  });
  return v("div", {
    class: i
  }, [S]);
};
P2.inheritAttrs = !1;
const O2 = ye({
  compatConfig: {
    MODE: 3
  },
  name: "Handle",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    vertical: {
      type: Boolean,
      default: void 0
    },
    offset: Number,
    disabled: {
      type: Boolean,
      default: void 0
    },
    min: Number,
    max: Number,
    value: Number,
    tabindex: ue.oneOfType([ue.number, ue.string]),
    reverse: {
      type: Boolean,
      default: void 0
    },
    ariaLabel: String,
    ariaLabelledBy: String,
    ariaValueTextFormatter: Function,
    onMouseenter: {
      type: Function
    },
    onMouseleave: {
      type: Function
    },
    onMousedown: {
      type: Function
    }
  },
  setup(e, t) {
    let {
      attrs: n,
      emit: o,
      expose: i
    } = t;
    const r = Pe(!1), a = Pe(), l = () => {
      document.activeElement === a.value && (r.value = !0);
    }, s = (y) => {
      r.value = !1, o("blur", y);
    }, u = () => {
      r.value = !1;
    }, c = () => {
      var y;
      (y = a.value) === null || y === void 0 || y.focus();
    }, d = () => {
      var y;
      (y = a.value) === null || y === void 0 || y.blur();
    }, f = () => {
      r.value = !0, c();
    }, p = (y) => {
      y.preventDefault(), c(), o("mousedown", y);
    };
    i({
      focus: c,
      blur: d,
      clickFocus: f,
      ref: a
    });
    let m = null;
    Pt(() => {
      m = Gi(document, "mouseup", l);
    }), At(() => {
      m?.remove();
    });
    const b = R(() => {
      const {
        vertical: y,
        offset: S,
        reverse: C
      } = e;
      return y ? {
        [C ? "top" : "bottom"]: `${S}%`,
        [C ? "bottom" : "top"]: "auto",
        transform: C ? null : "translateY(+50%)"
      } : {
        [C ? "right" : "left"]: `${S}%`,
        [C ? "left" : "right"]: "auto",
        transform: `translateX(${C ? "+" : "-"}50%)`
      };
    });
    return () => {
      const {
        prefixCls: y,
        disabled: S,
        min: C,
        max: O,
        value: $,
        tabindex: P,
        ariaLabel: k,
        ariaLabelledBy: x,
        ariaValueTextFormatter: E,
        onMouseenter: z,
        onMouseleave: N
      } = e, D = Te(n.class, {
        [`${y}-handle-click-focused`]: r.value
      }), W = {
        "aria-valuemin": C,
        "aria-valuemax": O,
        "aria-valuenow": $,
        "aria-disabled": !!S
      }, H = [n.style, b.value];
      let L = P || 0;
      (S || P === null) && (L = null);
      let A;
      E && (A = E($));
      const U = I(I(I(I({}, n), {
        role: "slider",
        tabindex: L
      }), W), {
        class: D,
        onBlur: s,
        onKeydown: u,
        onMousedown: p,
        onMouseenter: z,
        onMouseleave: N,
        ref: a,
        style: H
      });
      return v("div", Z(Z({}, U), {}, {
        "aria-label": k,
        "aria-labelledby": x,
        "aria-valuetext": A
      }), null);
    };
  }
});
function sg(e, t) {
  try {
    return Object.keys(t).some((n) => e.target === t[n].ref);
  } catch {
    return !1;
  }
}
function I2(e, t) {
  let {
    min: n,
    max: o
  } = t;
  return e < n || e > o;
}
function r1(e) {
  return e.touches.length > 1 || e.type.toLowerCase() === "touchend" && e.touches.length > 0;
}
function a1(e, t) {
  let {
    marks: n,
    step: o,
    min: i,
    max: r
  } = t;
  const a = Object.keys(n).map(parseFloat);
  if (o !== null) {
    const s = Math.pow(10, M2(o)), u = Math.floor((r * s - i * s) / (o * s)), c = Math.min((e - i) / o, u), d = Math.round(c) * o + i;
    a.push(d);
  }
  const l = a.map((s) => Math.abs(e - s));
  return a[l.indexOf(Math.min(...l))];
}
function M2(e) {
  const t = e.toString();
  let n = 0;
  return t.indexOf(".") >= 0 && (n = t.length - t.indexOf(".") - 1), n;
}
function l1(e, t) {
  let n = 1;
  return window.visualViewport && (n = +(window.visualViewport.width / document.body.getBoundingClientRect().width).toFixed(2)), (e ? t.clientY : t.pageX) / n;
}
function s1(e, t) {
  let n = 1;
  return window.visualViewport && (n = +(window.visualViewport.width / document.body.getBoundingClientRect().width).toFixed(2)), (e ? t.touches[0].clientY : t.touches[0].pageX) / n;
}
function u1(e, t) {
  const n = t.getBoundingClientRect();
  return e ? n.top + n.height * 0.5 : window.scrollX + n.left + n.width * 0.5;
}
function Qm(e, t) {
  let {
    max: n,
    min: o
  } = t;
  return e <= o ? o : e >= n ? n : e;
}
function T2(e, t) {
  const {
    step: n
  } = t, o = isFinite(a1(e, t)) ? a1(e, t) : 0;
  return n === null ? o : parseFloat(o.toFixed(M2(n)));
}
function As(e) {
  e.stopPropagation(), e.preventDefault();
}
function _H(e, t, n) {
  const o = {
    increase: (a, l) => a + l,
    decrease: (a, l) => a - l
  }, i = o[e](Object.keys(n.marks).indexOf(JSON.stringify(t)), 1), r = Object.keys(n.marks)[i];
  return n.step ? o[e](t, n.step) : Object.keys(n.marks).length && n.marks[r] ? n.marks[r] : t;
}
function k2(e, t, n) {
  const o = "increase", i = "decrease";
  let r = o;
  switch (e.keyCode) {
    case Xe.UP:
      r = t && n ? i : o;
      break;
    case Xe.RIGHT:
      r = !t && n ? i : o;
      break;
    case Xe.DOWN:
      r = t && n ? o : i;
      break;
    case Xe.LEFT:
      r = !t && n ? o : i;
      break;
    case Xe.END:
      return (a, l) => l.max;
    case Xe.HOME:
      return (a, l) => l.min;
    case Xe.PAGE_UP:
      return (a, l) => a + l.step * 2;
    case Xe.PAGE_DOWN:
      return (a, l) => a - l.step * 2;
    default:
      return;
  }
  return (a, l) => _H(r, a, l);
}
var AH = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
function Xa() {
}
function E2(e) {
  const t = {
    id: String,
    min: Number,
    max: Number,
    step: Number,
    marks: ue.object,
    included: {
      type: Boolean,
      default: void 0
    },
    prefixCls: String,
    disabled: {
      type: Boolean,
      default: void 0
    },
    handle: Function,
    dots: {
      type: Boolean,
      default: void 0
    },
    vertical: {
      type: Boolean,
      default: void 0
    },
    reverse: {
      type: Boolean,
      default: void 0
    },
    minimumTrackStyle: ue.object,
    maximumTrackStyle: ue.object,
    handleStyle: ue.oneOfType([ue.object, ue.arrayOf(ue.object)]),
    trackStyle: ue.oneOfType([ue.object, ue.arrayOf(ue.object)]),
    railStyle: ue.object,
    dotStyle: ue.object,
    activeDotStyle: ue.object,
    autofocus: {
      type: Boolean,
      default: void 0
    },
    draggableTrack: {
      type: Boolean,
      default: void 0
    }
  };
  return ye({
    compatConfig: {
      MODE: 3
    },
    name: "CreateSlider",
    mixins: [bf, e],
    inheritAttrs: !1,
    props: wn(t, {
      prefixCls: "rc-slider",
      min: 0,
      max: 100,
      step: 1,
      marks: {},
      included: !0,
      disabled: !1,
      dots: !1,
      vertical: !1,
      reverse: !1,
      trackStyle: [{}],
      handleStyle: [{}],
      railStyle: {},
      dotStyle: {},
      activeDotStyle: {}
    }),
    emits: ["change", "blur", "focus"],
    data() {
      const {
        step: n,
        max: o,
        min: i
      } = this, r = isFinite(o - i) ? (o - i) % n === 0 : !0;
      return Zn(n && Math.floor(n) === n ? r : !0, `Slider[max] - Slider[min] (${o - i}) should be a multiple of Slider[step] (${n})`), this.handlesRefs = {}, {};
    },
    mounted() {
      this.$nextTick(() => {
        this.document = this.sliderRef && this.sliderRef.ownerDocument;
        const {
          autofocus: n,
          disabled: o
        } = this;
        n && !o && this.focus();
      });
    },
    beforeUnmount() {
      this.$nextTick(() => {
        this.removeDocumentEvents();
      });
    },
    methods: {
      defaultHandle(n) {
        var {
          index: o,
          directives: i,
          className: r,
          style: a
        } = n, l = AH(n, ["index", "directives", "className", "style"]);
        if (delete l.dragging, l.value === null)
          return null;
        const s = I(I({}, l), {
          class: r,
          style: a,
          key: o
        });
        return v(O2, s, null);
      },
      onDown(n, o) {
        let i = o;
        const {
          draggableTrack: r,
          vertical: a
        } = this.$props, {
          bounds: l
        } = this.$data, s = r && this.positionGetValue ? this.positionGetValue(i) || [] : [], u = sg(n, this.handlesRefs);
        if (this.dragTrack = r && l.length >= 2 && !u && !s.map((c, d) => {
          const f = d ? !0 : c >= l[d];
          return d === s.length - 1 ? c <= l[d] : f;
        }).some((c) => !c), this.dragTrack)
          this.dragOffset = i, this.startBounds = [...l];
        else {
          if (!u)
            this.dragOffset = 0;
          else {
            const c = u1(a, n.target);
            this.dragOffset = i - c, i = c;
          }
          this.onStart(i);
        }
      },
      onMouseDown(n) {
        if (n.button !== 0)
          return;
        this.removeDocumentEvents();
        const o = this.$props.vertical, i = l1(o, n);
        this.onDown(n, i), this.addDocumentMouseEvents();
      },
      onTouchStart(n) {
        if (r1(n)) return;
        const o = this.vertical, i = s1(o, n);
        this.onDown(n, i), this.addDocumentTouchEvents(), As(n);
      },
      onFocus(n) {
        const {
          vertical: o
        } = this;
        if (sg(n, this.handlesRefs) && !this.dragTrack) {
          const i = u1(o, n.target);
          this.dragOffset = 0, this.onStart(i), As(n), this.$emit("focus", n);
        }
      },
      onBlur(n) {
        this.dragTrack || this.onEnd(), this.$emit("blur", n);
      },
      onMouseUp() {
        this.handlesRefs[this.prevMovedHandleIndex] && this.handlesRefs[this.prevMovedHandleIndex].clickFocus();
      },
      onMouseMove(n) {
        if (!this.sliderRef) {
          this.onEnd();
          return;
        }
        const o = l1(this.vertical, n);
        this.onMove(n, o - this.dragOffset, this.dragTrack, this.startBounds);
      },
      onTouchMove(n) {
        if (r1(n) || !this.sliderRef) {
          this.onEnd();
          return;
        }
        const o = s1(this.vertical, n);
        this.onMove(n, o - this.dragOffset, this.dragTrack, this.startBounds);
      },
      onKeyDown(n) {
        this.sliderRef && sg(n, this.handlesRefs) && this.onKeyboard(n);
      },
      onClickMarkLabel(n, o) {
        n.stopPropagation(), this.onChange({
          sValue: o
        }), this.setState({
          sValue: o
        }, () => this.onEnd(!0));
      },
      getSliderStart() {
        const n = this.sliderRef, {
          vertical: o,
          reverse: i
        } = this, r = n.getBoundingClientRect();
        return o ? i ? r.bottom : r.top : window.scrollX + (i ? r.right : r.left);
      },
      getSliderLength() {
        const n = this.sliderRef;
        if (!n)
          return 0;
        const o = n.getBoundingClientRect();
        return this.vertical ? o.height : o.width;
      },
      addDocumentTouchEvents() {
        this.onTouchMoveListener = Gi(this.document, "touchmove", this.onTouchMove), this.onTouchUpListener = Gi(this.document, "touchend", this.onEnd);
      },
      addDocumentMouseEvents() {
        this.onMouseMoveListener = Gi(this.document, "mousemove", this.onMouseMove), this.onMouseUpListener = Gi(this.document, "mouseup", this.onEnd);
      },
      removeDocumentEvents() {
        this.onTouchMoveListener && this.onTouchMoveListener.remove(), this.onTouchUpListener && this.onTouchUpListener.remove(), this.onMouseMoveListener && this.onMouseMoveListener.remove(), this.onMouseUpListener && this.onMouseUpListener.remove();
      },
      focus() {
        var n;
        this.$props.disabled || (n = this.handlesRefs[0]) === null || n === void 0 || n.focus();
      },
      blur() {
        this.$props.disabled || Object.keys(this.handlesRefs).forEach((n) => {
          var o, i;
          (i = (o = this.handlesRefs[n]) === null || o === void 0 ? void 0 : o.blur) === null || i === void 0 || i.call(o);
        });
      },
      calcValue(n) {
        const {
          vertical: o,
          min: i,
          max: r
        } = this, a = Math.abs(Math.max(n, 0) / this.getSliderLength());
        return o ? (1 - a) * (r - i) + i : a * (r - i) + i;
      },
      calcValueByPos(n) {
        const i = (this.reverse ? -1 : 1) * (n - this.getSliderStart());
        return this.trimAlignValue(this.calcValue(i));
      },
      calcOffset(n) {
        const {
          min: o,
          max: i
        } = this, r = (n - o) / (i - o);
        return Math.max(0, r * 100);
      },
      saveSlider(n) {
        this.sliderRef = n;
      },
      saveHandle(n, o) {
        this.handlesRefs[n] = o;
      }
    },
    render() {
      const {
        prefixCls: n,
        marks: o,
        dots: i,
        step: r,
        included: a,
        disabled: l,
        vertical: s,
        reverse: u,
        min: c,
        max: d,
        maximumTrackStyle: f,
        railStyle: p,
        dotStyle: m,
        activeDotStyle: b,
        id: y
      } = this, {
        class: S,
        style: C
      } = this.$attrs, {
        tracks: O,
        handles: $
      } = this.renderSlider(), P = Te(n, S, {
        [`${n}-with-marks`]: Object.keys(o).length,
        [`${n}-disabled`]: l,
        [`${n}-vertical`]: s,
        [`${n}-horizontal`]: !s
      }), k = {
        vertical: s,
        marks: o,
        included: a,
        lowerBound: this.getLowerBound(),
        upperBound: this.getUpperBound(),
        max: d,
        min: c,
        reverse: u,
        class: `${n}-mark`,
        onClickLabel: l ? Xa : this.onClickMarkLabel
      }, x = {
        [bo ? "onTouchstartPassive" : "onTouchstart"]: l ? Xa : this.onTouchStart
      };
      return v("div", Z(Z({
        id: y,
        ref: this.saveSlider,
        tabindex: "-1",
        class: P
      }, x), {}, {
        onMousedown: l ? Xa : this.onMouseDown,
        onMouseup: l ? Xa : this.onMouseUp,
        onKeydown: l ? Xa : this.onKeyDown,
        onFocus: l ? Xa : this.onFocus,
        onBlur: l ? Xa : this.onBlur,
        style: C
      }), [v("div", {
        class: `${n}-rail`,
        style: I(I({}, f), p)
      }, null), O, v($2, {
        prefixCls: n,
        vertical: s,
        reverse: u,
        marks: o,
        dots: i,
        step: r,
        included: a,
        lowerBound: this.getLowerBound(),
        upperBound: this.getUpperBound(),
        max: d,
        min: c,
        dotStyle: m,
        activeDotStyle: b
      }, null), $, v(P2, k, {
        mark: this.$slots.mark
      }), vS(this)]);
    }
  });
}
const DH = ye({
  compatConfig: {
    MODE: 3
  },
  name: "Slider",
  mixins: [bf],
  inheritAttrs: !1,
  props: {
    defaultValue: Number,
    value: Number,
    disabled: {
      type: Boolean,
      default: void 0
    },
    autofocus: {
      type: Boolean,
      default: void 0
    },
    tabindex: ue.oneOfType([ue.number, ue.string]),
    reverse: {
      type: Boolean,
      default: void 0
    },
    min: Number,
    max: Number,
    ariaLabelForHandle: String,
    ariaLabelledByForHandle: String,
    ariaValueTextFormatterForHandle: String,
    startPoint: Number
  },
  emits: ["beforeChange", "afterChange", "change"],
  data() {
    const e = this.defaultValue !== void 0 ? this.defaultValue : this.min, t = this.value !== void 0 ? this.value : e;
    return {
      sValue: this.trimAlignValue(t),
      dragging: !1
    };
  },
  watch: {
    value: {
      handler(e) {
        this.setChangeValue(e);
      },
      deep: !0
    },
    min() {
      const {
        sValue: e
      } = this;
      this.setChangeValue(e);
    },
    max() {
      const {
        sValue: e
      } = this;
      this.setChangeValue(e);
    }
  },
  methods: {
    setChangeValue(e) {
      const t = e !== void 0 ? e : this.sValue, n = this.trimAlignValue(t, this.$props);
      n !== this.sValue && (this.setState({
        sValue: n
      }), I2(t, this.$props) && this.$emit("change", n));
    },
    onChange(e) {
      const t = !Td(this, "value"), n = e.sValue > this.max ? I(I({}, e), {
        sValue: this.max
      }) : e;
      t && this.setState(n);
      const o = n.sValue;
      this.$emit("change", o);
    },
    onStart(e) {
      this.setState({
        dragging: !0
      });
      const {
        sValue: t
      } = this;
      this.$emit("beforeChange", t);
      const n = this.calcValueByPos(e);
      this.startValue = n, this.startPosition = e, n !== t && (this.prevMovedHandleIndex = 0, this.onChange({
        sValue: n
      }));
    },
    onEnd(e) {
      const {
        dragging: t
      } = this;
      this.removeDocumentEvents(), (t || e) && this.$emit("afterChange", this.sValue), this.setState({
        dragging: !1
      });
    },
    onMove(e, t) {
      As(e);
      const {
        sValue: n
      } = this, o = this.calcValueByPos(t);
      o !== n && this.onChange({
        sValue: o
      });
    },
    onKeyboard(e) {
      const {
        reverse: t,
        vertical: n
      } = this.$props, o = k2(e, n, t);
      if (o) {
        As(e);
        const {
          sValue: i
        } = this, r = o(i, this.$props), a = this.trimAlignValue(r);
        if (a === i) return;
        this.onChange({
          sValue: a
        }), this.$emit("afterChange", a), this.onEnd();
      }
    },
    getLowerBound() {
      const e = this.$props.startPoint || this.$props.min;
      return this.$data.sValue > e ? e : this.$data.sValue;
    },
    getUpperBound() {
      return this.$data.sValue < this.$props.startPoint ? this.$props.startPoint : this.$data.sValue;
    },
    trimAlignValue(e) {
      let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      if (e === null)
        return null;
      const n = I(I({}, this.$props), t), o = Qm(e, n);
      return T2(o, n);
    },
    getTrack(e) {
      let {
        prefixCls: t,
        reverse: n,
        vertical: o,
        included: i,
        minimumTrackStyle: r,
        mergedTrackStyle: a,
        length: l,
        offset: s
      } = e;
      return v(Xm, {
        class: `${t}-track`,
        vertical: o,
        included: i,
        offset: s,
        reverse: n,
        length: l,
        style: I(I({}, r), a)
      }, null);
    },
    renderSlider() {
      const {
        prefixCls: e,
        vertical: t,
        included: n,
        disabled: o,
        minimumTrackStyle: i,
        trackStyle: r,
        handleStyle: a,
        tabindex: l,
        ariaLabelForHandle: s,
        ariaLabelledByForHandle: u,
        ariaValueTextFormatterForHandle: c,
        min: d,
        max: f,
        startPoint: p,
        reverse: m,
        handle: b,
        defaultHandle: y
      } = this, S = b || y, {
        sValue: C,
        dragging: O
      } = this, $ = this.calcOffset(C), P = S({
        class: `${e}-handle`,
        prefixCls: e,
        vertical: t,
        offset: $,
        value: C,
        dragging: O,
        disabled: o,
        min: d,
        max: f,
        reverse: m,
        index: 0,
        tabindex: l,
        ariaLabel: s,
        ariaLabelledBy: u,
        ariaValueTextFormatter: c,
        style: a[0] || a,
        ref: (E) => this.saveHandle(0, E),
        onFocus: this.onFocus,
        onBlur: this.onBlur
      }), k = p !== void 0 ? this.calcOffset(p) : 0, x = r[0] || r;
      return {
        tracks: this.getTrack({
          prefixCls: e,
          reverse: m,
          vertical: t,
          included: n,
          offset: k,
          minimumTrackStyle: i,
          mergedTrackStyle: x,
          length: $ - k
        }),
        handles: P
      };
    }
  }
}), zH = E2(DH), uu = (e) => {
  let {
    value: t,
    handle: n,
    bounds: o,
    props: i
  } = e;
  const {
    allowCross: r,
    pushable: a
  } = i, l = Number(a), s = Qm(t, i);
  let u = s;
  return !r && n != null && o !== void 0 && (n > 0 && s <= o[n - 1] + l && (u = o[n - 1] + l), n < o.length - 1 && s >= o[n + 1] - l && (u = o[n + 1] - l)), T2(u, i);
}, RH = {
  defaultValue: ue.arrayOf(ue.number),
  value: ue.arrayOf(ue.number),
  count: Number,
  pushable: IA(ue.oneOfType([ue.looseBool, ue.number])),
  allowCross: {
    type: Boolean,
    default: void 0
  },
  disabled: {
    type: Boolean,
    default: void 0
  },
  reverse: {
    type: Boolean,
    default: void 0
  },
  tabindex: ue.arrayOf(ue.number),
  prefixCls: String,
  min: Number,
  max: Number,
  autofocus: {
    type: Boolean,
    default: void 0
  },
  ariaLabelGroupForHandles: Array,
  ariaLabelledByGroupForHandles: Array,
  ariaValueTextFormatterGroupForHandles: Array,
  draggableTrack: {
    type: Boolean,
    default: void 0
  }
}, NH = ye({
  compatConfig: {
    MODE: 3
  },
  name: "Range",
  mixins: [bf],
  inheritAttrs: !1,
  props: wn(RH, {
    count: 1,
    allowCross: !0,
    pushable: !1,
    tabindex: [],
    draggableTrack: !1,
    ariaLabelGroupForHandles: [],
    ariaLabelledByGroupForHandles: [],
    ariaValueTextFormatterGroupForHandles: []
  }),
  emits: ["beforeChange", "afterChange", "change"],
  displayName: "Range",
  data() {
    const {
      count: e,
      min: t,
      max: n
    } = this, o = Array(...Array(e + 1)).map(() => t), i = Td(this, "defaultValue") ? this.defaultValue : o;
    let {
      value: r
    } = this;
    r === void 0 && (r = i);
    const a = r.map((s, u) => uu({
      value: s,
      handle: u,
      props: this.$props
    }));
    return {
      sHandle: null,
      recent: a[0] === n ? 0 : a.length - 1,
      bounds: a
    };
  },
  watch: {
    value: {
      handler(e) {
        const {
          bounds: t
        } = this;
        this.setChangeValue(e || t);
      },
      deep: !0
    },
    min() {
      const {
        value: e
      } = this;
      this.setChangeValue(e || this.bounds);
    },
    max() {
      const {
        value: e
      } = this;
      this.setChangeValue(e || this.bounds);
    }
  },
  methods: {
    setChangeValue(e) {
      const {
        bounds: t
      } = this;
      let n = e.map((o, i) => uu({
        value: o,
        handle: i,
        bounds: t,
        props: this.$props
      }));
      if (t.length === n.length) {
        if (n.every((o, i) => o === t[i]))
          return null;
      } else
        n = e.map((o, i) => uu({
          value: o,
          handle: i,
          props: this.$props
        }));
      if (this.setState({
        bounds: n
      }), e.some((o) => I2(o, this.$props))) {
        const o = e.map((i) => Qm(i, this.$props));
        this.$emit("change", o);
      }
    },
    onChange(e) {
      if (!Td(this, "value"))
        this.setState(e);
      else {
        const i = {};
        ["sHandle", "recent"].forEach((r) => {
          e[r] !== void 0 && (i[r] = e[r]);
        }), Object.keys(i).length && this.setState(i);
      }
      const o = I(I({}, this.$data), e).bounds;
      this.$emit("change", o);
    },
    positionGetValue(e) {
      const t = this.getValue(), n = this.calcValueByPos(e), o = this.getClosestBound(n), i = this.getBoundNeedMoving(n, o), r = t[i];
      if (n === r) return null;
      const a = [...t];
      return a[i] = n, a;
    },
    onStart(e) {
      const {
        bounds: t
      } = this;
      this.$emit("beforeChange", t);
      const n = this.calcValueByPos(e);
      this.startValue = n, this.startPosition = e;
      const o = this.getClosestBound(n);
      this.prevMovedHandleIndex = this.getBoundNeedMoving(n, o), this.setState({
        sHandle: this.prevMovedHandleIndex,
        recent: this.prevMovedHandleIndex
      });
      const i = t[this.prevMovedHandleIndex];
      if (n === i) return;
      const r = [...t];
      r[this.prevMovedHandleIndex] = n, this.onChange({
        bounds: r
      });
    },
    onEnd(e) {
      const {
        sHandle: t
      } = this;
      this.removeDocumentEvents(), t || (this.dragTrack = !1), (t !== null || e) && this.$emit("afterChange", this.bounds), this.setState({
        sHandle: null
      });
    },
    onMove(e, t, n, o) {
      As(e);
      const {
        $data: i,
        $props: r
      } = this, a = r.max || 100, l = r.min || 0;
      if (n) {
        let f = r.vertical ? -t : t;
        f = r.reverse ? -f : f;
        const p = a - Math.max(...o), m = l - Math.min(...o), b = Math.min(Math.max(f / (this.getSliderLength() / 100), m), p), y = o.map((S) => Math.floor(Math.max(Math.min(S + b, a), l)));
        i.bounds.map((S, C) => S === y[C]).some((S) => !S) && this.onChange({
          bounds: y
        });
        return;
      }
      const {
        bounds: s,
        sHandle: u
      } = this, c = this.calcValueByPos(t), d = s[u];
      c !== d && this.moveTo(c);
    },
    onKeyboard(e) {
      const {
        reverse: t,
        vertical: n
      } = this.$props, o = k2(e, n, t);
      if (o) {
        As(e);
        const {
          bounds: i,
          sHandle: r
        } = this, a = i[r === null ? this.recent : r], l = o(a, this.$props), s = uu({
          value: l,
          handle: r,
          bounds: i,
          props: this.$props
        });
        if (s === a) return;
        this.moveTo(s, !0);
      }
    },
    getClosestBound(e) {
      const {
        bounds: t
      } = this;
      let n = 0;
      for (let o = 1; o < t.length - 1; o += 1)
        e >= t[o] && (n = o);
      return Math.abs(t[n + 1] - e) < Math.abs(t[n] - e) && (n += 1), n;
    },
    getBoundNeedMoving(e, t) {
      const {
        bounds: n,
        recent: o
      } = this;
      let i = t;
      const r = n[t + 1] === n[t];
      return r && n[o] === n[t] && (i = o), r && e !== n[t + 1] && (i = e < n[t + 1] ? t : t + 1), i;
    },
    getLowerBound() {
      return this.bounds[0];
    },
    getUpperBound() {
      const {
        bounds: e
      } = this;
      return e[e.length - 1];
    },
    /**
     * Returns an array of possible slider points, taking into account both
     * `marks` and `step`. The result is cached.
     */
    getPoints() {
      const {
        marks: e,
        step: t,
        min: n,
        max: o
      } = this, i = this.internalPointsCache;
      if (!i || i.marks !== e || i.step !== t) {
        const r = I({}, e);
        if (t !== null)
          for (let l = n; l <= o; l += t)
            r[l] = l;
        const a = Object.keys(r).map(parseFloat);
        a.sort((l, s) => l - s), this.internalPointsCache = {
          marks: e,
          step: t,
          points: a
        };
      }
      return this.internalPointsCache.points;
    },
    moveTo(e, t) {
      const n = [...this.bounds], {
        sHandle: o,
        recent: i
      } = this, r = o === null ? i : o;
      n[r] = e;
      let a = r;
      this.$props.pushable !== !1 ? this.pushSurroundingHandles(n, a) : this.$props.allowCross && (n.sort((l, s) => l - s), a = n.indexOf(e)), this.onChange({
        recent: a,
        sHandle: a,
        bounds: n
      }), t && (this.$emit("afterChange", n), this.setState({}, () => {
        this.handlesRefs[a].focus();
      }), this.onEnd());
    },
    pushSurroundingHandles(e, t) {
      const n = e[t], {
        pushable: o
      } = this, i = Number(o);
      let r = 0;
      if (e[t + 1] - n < i && (r = 1), n - e[t - 1] < i && (r = -1), r === 0)
        return;
      const a = t + r, l = r * (e[a] - n);
      this.pushHandle(e, a, r, i - l) || (e[t] = e[a] - r * i);
    },
    pushHandle(e, t, n, o) {
      const i = e[t];
      let r = e[t];
      for (; n * (r - i) < o; ) {
        if (!this.pushHandleOnePoint(e, t, n))
          return e[t] = i, !1;
        r = e[t];
      }
      return !0;
    },
    pushHandleOnePoint(e, t, n) {
      const o = this.getPoints(), r = o.indexOf(e[t]) + n;
      if (r >= o.length || r < 0)
        return !1;
      const a = t + n, l = o[r], {
        pushable: s
      } = this, u = Number(s), c = n * (e[a] - l);
      return this.pushHandle(e, a, n, u - c) ? (e[t] = l, !0) : !1;
    },
    trimAlignValue(e) {
      const {
        sHandle: t,
        bounds: n
      } = this;
      return uu({
        value: e,
        handle: t,
        bounds: n,
        props: this.$props
      });
    },
    ensureValueNotConflict(e, t, n) {
      let {
        allowCross: o,
        pushable: i
      } = n;
      const r = this.$data || {}, {
        bounds: a
      } = r;
      if (e = e === void 0 ? r.sHandle : e, i = Number(i), !o && e != null && a !== void 0) {
        if (e > 0 && t <= a[e - 1] + i)
          return a[e - 1] + i;
        if (e < a.length - 1 && t >= a[e + 1] - i)
          return a[e + 1] - i;
      }
      return t;
    },
    getTrack(e) {
      let {
        bounds: t,
        prefixCls: n,
        reverse: o,
        vertical: i,
        included: r,
        offsets: a,
        trackStyle: l
      } = e;
      return t.slice(0, -1).map((s, u) => {
        const c = u + 1, d = Te({
          [`${n}-track`]: !0,
          [`${n}-track-${c}`]: !0
        });
        return v(Xm, {
          class: d,
          vertical: i,
          reverse: o,
          included: r,
          offset: a[c - 1],
          length: a[c] - a[c - 1],
          style: l[u],
          key: c
        }, null);
      });
    },
    renderSlider() {
      const {
        sHandle: e,
        bounds: t,
        prefixCls: n,
        vertical: o,
        included: i,
        disabled: r,
        min: a,
        max: l,
        reverse: s,
        handle: u,
        defaultHandle: c,
        trackStyle: d,
        handleStyle: f,
        tabindex: p,
        ariaLabelGroupForHandles: m,
        ariaLabelledByGroupForHandles: b,
        ariaValueTextFormatterGroupForHandles: y
      } = this, S = u || c, C = t.map((P) => this.calcOffset(P)), O = `${n}-handle`, $ = t.map((P, k) => {
        let x = p[k] || 0;
        (r || p[k] === null) && (x = null);
        const E = e === k;
        return S({
          class: Te({
            [O]: !0,
            [`${O}-${k + 1}`]: !0,
            [`${O}-dragging`]: E
          }),
          prefixCls: n,
          vertical: o,
          dragging: E,
          offset: C[k],
          value: P,
          index: k,
          tabindex: x,
          min: a,
          max: l,
          reverse: s,
          disabled: r,
          style: f[k],
          ref: (z) => this.saveHandle(k, z),
          onFocus: this.onFocus,
          onBlur: this.onBlur,
          ariaLabel: m[k],
          ariaLabelledBy: b[k],
          ariaValueTextFormatter: y[k]
        });
      });
      return {
        tracks: this.getTrack({
          bounds: t,
          prefixCls: n,
          reverse: s,
          vertical: o,
          included: i,
          offsets: C,
          trackStyle: d
        }),
        handles: $
      };
    }
  }
}), BH = E2(NH), LH = ye({
  compatConfig: {
    MODE: 3
  },
  name: "SliderTooltip",
  inheritAttrs: !1,
  props: r$(),
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const i = le(null), r = le(null);
    function a() {
      Mt.cancel(r.value), r.value = null;
    }
    function l() {
      r.value = Mt(() => {
        var u;
        (u = i.value) === null || u === void 0 || u.forcePopupAlign(), r.value = null;
      });
    }
    const s = () => {
      a(), e.open && l();
    };
    return Ie([() => e.open, () => e.title], () => {
      s();
    }, {
      flush: "post",
      immediate: !0
    }), bO(() => {
      s();
    }), At(() => {
      a();
    }), () => v(xo, Z(Z({
      ref: i
    }, e), n), o);
  }
}), FH = (e) => {
  const {
    componentCls: t,
    controlSize: n,
    dotSize: o,
    marginFull: i,
    marginPart: r,
    colorFillContentHover: a
  } = e;
  return {
    [t]: I(I({}, Zt(e)), {
      position: "relative",
      height: n,
      margin: `${r}px ${i}px`,
      padding: 0,
      cursor: "pointer",
      touchAction: "none",
      "&-vertical": {
        margin: `${i}px ${r}px`
      },
      [`${t}-rail`]: {
        position: "absolute",
        backgroundColor: e.colorFillTertiary,
        borderRadius: e.borderRadiusXS,
        transition: `background-color ${e.motionDurationMid}`
      },
      [`${t}-track`]: {
        position: "absolute",
        backgroundColor: e.colorPrimaryBorder,
        borderRadius: e.borderRadiusXS,
        transition: `background-color ${e.motionDurationMid}`
      },
      "&:hover": {
        [`${t}-rail`]: {
          backgroundColor: e.colorFillSecondary
        },
        [`${t}-track`]: {
          backgroundColor: e.colorPrimaryBorderHover
        },
        [`${t}-dot`]: {
          borderColor: a
        },
        [`${t}-handle::after`]: {
          boxShadow: `0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorderHover}`
        },
        [`${t}-dot-active`]: {
          borderColor: e.colorPrimary
        }
      },
      [`${t}-handle`]: {
        position: "absolute",
        width: e.handleSize,
        height: e.handleSize,
        outline: "none",
        [`${t}-dragging`]: {
          zIndex: 1
        },
        // 扩大选区
        "&::before": {
          content: '""',
          position: "absolute",
          insetInlineStart: -e.handleLineWidth,
          insetBlockStart: -e.handleLineWidth,
          width: e.handleSize + e.handleLineWidth * 2,
          height: e.handleSize + e.handleLineWidth * 2,
          backgroundColor: "transparent"
        },
        "&::after": {
          content: '""',
          position: "absolute",
          insetBlockStart: 0,
          insetInlineStart: 0,
          width: e.handleSize,
          height: e.handleSize,
          backgroundColor: e.colorBgElevated,
          boxShadow: `0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorder}`,
          borderRadius: "50%",
          cursor: "pointer",
          transition: `
            inset-inline-start ${e.motionDurationMid},
            inset-block-start ${e.motionDurationMid},
            width ${e.motionDurationMid},
            height ${e.motionDurationMid},
            box-shadow ${e.motionDurationMid}
          `
        },
        "&:hover, &:active, &:focus": {
          "&::before": {
            insetInlineStart: -((e.handleSizeHover - e.handleSize) / 2 + e.handleLineWidthHover),
            insetBlockStart: -((e.handleSizeHover - e.handleSize) / 2 + e.handleLineWidthHover),
            width: e.handleSizeHover + e.handleLineWidthHover * 2,
            height: e.handleSizeHover + e.handleLineWidthHover * 2
          },
          "&::after": {
            boxShadow: `0 0 0 ${e.handleLineWidthHover}px ${e.colorPrimary}`,
            width: e.handleSizeHover,
            height: e.handleSizeHover,
            insetInlineStart: (e.handleSize - e.handleSizeHover) / 2,
            insetBlockStart: (e.handleSize - e.handleSizeHover) / 2
          }
        }
      },
      [`${t}-mark`]: {
        position: "absolute",
        fontSize: e.fontSize
      },
      [`${t}-mark-text`]: {
        position: "absolute",
        display: "inline-block",
        color: e.colorTextDescription,
        textAlign: "center",
        wordBreak: "keep-all",
        cursor: "pointer",
        userSelect: "none",
        "&-active": {
          color: e.colorText
        }
      },
      [`${t}-step`]: {
        position: "absolute",
        background: "transparent",
        pointerEvents: "none"
      },
      [`${t}-dot`]: {
        position: "absolute",
        width: o,
        height: o,
        backgroundColor: e.colorBgElevated,
        border: `${e.handleLineWidth}px solid ${e.colorBorderSecondary}`,
        borderRadius: "50%",
        cursor: "pointer",
        transition: `border-color ${e.motionDurationSlow}`,
        "&-active": {
          borderColor: e.colorPrimaryBorder
        }
      },
      [`&${t}-disabled`]: {
        cursor: "not-allowed",
        [`${t}-rail`]: {
          backgroundColor: `${e.colorFillSecondary} !important`
        },
        [`${t}-track`]: {
          backgroundColor: `${e.colorTextDisabled} !important`
        },
        [`
          ${t}-dot
        `]: {
          backgroundColor: e.colorBgElevated,
          borderColor: e.colorTextDisabled,
          boxShadow: "none",
          cursor: "not-allowed"
        },
        [`${t}-handle::after`]: {
          backgroundColor: e.colorBgElevated,
          cursor: "not-allowed",
          width: e.handleSize,
          height: e.handleSize,
          boxShadow: `0 0 0 ${e.handleLineWidth}px ${new In(e.colorTextDisabled).onBackground(e.colorBgContainer).toHexString()}`,
          insetInlineStart: 0,
          insetBlockStart: 0
        },
        [`
          ${t}-mark-text,
          ${t}-dot
        `]: {
          cursor: "not-allowed !important"
        }
      }
    })
  };
}, _2 = (e, t) => {
  const {
    componentCls: n,
    railSize: o,
    handleSize: i,
    dotSize: r
  } = e, a = t ? "paddingBlock" : "paddingInline", l = t ? "width" : "height", s = t ? "height" : "width", u = t ? "insetBlockStart" : "insetInlineStart", c = t ? "top" : "insetInlineStart";
  return {
    [a]: o,
    [s]: o * 3,
    [`${n}-rail`]: {
      [l]: "100%",
      [s]: o
    },
    [`${n}-track`]: {
      [s]: o
    },
    [`${n}-handle`]: {
      [u]: (o * 3 - i) / 2
    },
    [`${n}-mark`]: {
      // Reset all
      insetInlineStart: 0,
      top: 0,
      [c]: i,
      [l]: "100%"
    },
    [`${n}-step`]: {
      // Reset all
      insetInlineStart: 0,
      top: 0,
      [c]: o,
      [l]: "100%",
      [s]: o
    },
    [`${n}-dot`]: {
      position: "absolute",
      [u]: (o - r) / 2
    }
  };
}, HH = (e) => {
  const {
    componentCls: t,
    marginPartWithMark: n
  } = e;
  return {
    [`${t}-horizontal`]: I(I({}, _2(e, !0)), {
      [`&${t}-with-marks`]: {
        marginBottom: n
      }
    })
  };
}, VH = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-vertical`]: I(I({}, _2(e, !1)), {
      height: "100%"
    })
  };
}, jH = nn("Slider", (e) => {
  const t = _t(e, {
    marginPart: (e.controlHeight - e.controlSize) / 2,
    marginFull: e.controlSize / 2,
    marginPartWithMark: e.controlHeightLG - e.controlSize
  });
  return [FH(t), HH(t), VH(t)];
}, (e) => {
  const n = e.controlHeightLG / 4, o = e.controlHeightSM / 2, i = e.lineWidth + 1, r = e.lineWidth + 3;
  return {
    controlSize: n,
    railSize: 4,
    handleSize: n,
    handleSizeHover: o,
    dotSize: 8,
    handleLineWidth: i,
    handleLineWidthHover: r
  };
});
var c1 = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const WH = (e) => typeof e == "number" ? e.toString() : "", qH = () => ({
  id: String,
  prefixCls: String,
  tooltipPrefixCls: String,
  range: tn([Boolean, Object]),
  reverse: st(),
  min: Number,
  max: Number,
  step: tn([Object, Number]),
  marks: Ct(),
  dots: st(),
  value: tn([Array, Number]),
  defaultValue: tn([Array, Number]),
  included: st(),
  disabled: st(),
  vertical: st(),
  tipFormatter: tn([Function, Object], () => WH),
  tooltipOpen: st(),
  /** @deprecated `tooltipVisible` is deprecated. Please use `tooltipOpen` instead. */
  tooltipVisible: st(),
  tooltipPlacement: dn(),
  getTooltipPopupContainer: Qe(),
  autofocus: st(),
  handleStyle: tn([Array, Object]),
  trackStyle: tn([Array, Object]),
  onChange: Qe(),
  onAfterChange: Qe(),
  onFocus: Qe(),
  onBlur: Qe(),
  "onUpdate:value": Qe()
}), GH = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ASlider",
  inheritAttrs: !1,
  props: qH(),
  // emits: ['update:value', 'change', 'afterChange', 'blur'],
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      emit: i,
      expose: r
    } = t;
    process.env.NODE_ENV !== "production" && [["tooltipVisible", "tooltipOpen"]].forEach((x) => {
      let [E, z] = x;
      Fn(e.tooltipVisible === void 0, "Slider", `\`${E}\` is deprecated, please use \`${z}\` instead.`);
    });
    const {
      prefixCls: a,
      rootPrefixCls: l,
      direction: s,
      getPopupContainer: u,
      configProvider: c
    } = yt("slider", e), [d, f] = jH(a), p = pi(), m = le(), b = le({}), y = (x, E) => {
      b.value[x] = E;
    }, S = R(() => e.tooltipPlacement ? e.tooltipPlacement : e.vertical ? s.value === "rtl" ? "left" : "right" : "top"), C = () => {
      var x;
      (x = m.value) === null || x === void 0 || x.focus();
    }, O = () => {
      var x;
      (x = m.value) === null || x === void 0 || x.blur();
    }, $ = (x) => {
      i("update:value", x), i("change", x), p.onFieldChange();
    }, P = (x) => {
      i("blur", x);
    };
    r({
      focus: C,
      blur: O
    });
    const k = (x) => {
      var {
        tooltipPrefixCls: E
      } = x, z = x.info, {
        value: N,
        dragging: D,
        index: W
      } = z, H = c1(z, ["value", "dragging", "index"]);
      const {
        tipFormatter: L,
        tooltipOpen: A = e.tooltipVisible,
        getTooltipPopupContainer: U
      } = e, j = L ? b.value[W] || D : !1, re = A || A === void 0 && j;
      return v(LH, {
        prefixCls: E,
        title: L ? L(N) : "",
        open: re,
        placement: S.value,
        transitionName: `${l.value}-zoom-down`,
        key: W,
        overlayClassName: `${a.value}-tooltip`,
        getPopupContainer: U || u?.value
      }, {
        default: () => [v(O2, Z(Z({}, H), {}, {
          value: N,
          onMouseenter: () => y(W, !0),
          onMouseleave: () => y(W, !1)
        }), null)]
      });
    };
    return () => {
      const {
        tooltipPrefixCls: x,
        range: E,
        id: z = p.id.value
      } = e, N = c1(e, ["tooltipPrefixCls", "range", "id"]), D = c.getPrefixCls("tooltip", x), W = Te(n.class, {
        [`${a.value}-rtl`]: s.value === "rtl"
      }, f.value);
      s.value === "rtl" && !N.vertical && (N.reverse = !N.reverse);
      let H;
      return typeof E == "object" && (H = E.draggableTrack), d(E ? v(BH, Z(Z(Z({}, n), N), {}, {
        step: N.step,
        draggableTrack: H,
        class: W,
        ref: m,
        handle: (L) => k({
          tooltipPrefixCls: D,
          prefixCls: a.value,
          info: L
        }),
        prefixCls: a.value,
        onChange: $,
        onBlur: P
      }), {
        mark: o.mark
      }) : v(zH, Z(Z(Z({}, n), N), {}, {
        id: z,
        step: N.step,
        class: W,
        ref: m,
        handle: (L) => k({
          tooltipPrefixCls: D,
          prefixCls: a.value,
          info: L
        }),
        prefixCls: a.value,
        onChange: $,
        onBlur: P
      }), {
        mark: o.mark
      }));
    };
  }
}), qo = er(GH), KH = (e) => {
  const {
    componentCls: t
  } = e, n = `${t}-inner`;
  return {
    [t]: {
      [`&${t}-small`]: {
        minWidth: e.switchMinWidthSM,
        height: e.switchHeightSM,
        lineHeight: `${e.switchHeightSM}px`,
        [`${t}-inner`]: {
          paddingInlineStart: e.switchInnerMarginMaxSM,
          paddingInlineEnd: e.switchInnerMarginMinSM,
          [`${n}-checked`]: {
            marginInlineStart: `calc(-100% + ${e.switchPinSizeSM + e.switchPadding * 2}px - ${e.switchInnerMarginMaxSM * 2}px)`,
            marginInlineEnd: `calc(100% - ${e.switchPinSizeSM + e.switchPadding * 2}px + ${e.switchInnerMarginMaxSM * 2}px)`
          },
          [`${n}-unchecked`]: {
            marginTop: -e.switchHeightSM,
            marginInlineStart: 0,
            marginInlineEnd: 0
          }
        },
        [`${t}-handle`]: {
          width: e.switchPinSizeSM,
          height: e.switchPinSizeSM
        },
        [`${t}-loading-icon`]: {
          top: (e.switchPinSizeSM - e.switchLoadingIconSize) / 2,
          fontSize: e.switchLoadingIconSize
        },
        [`&${t}-checked`]: {
          [`${t}-inner`]: {
            paddingInlineStart: e.switchInnerMarginMinSM,
            paddingInlineEnd: e.switchInnerMarginMaxSM,
            [`${n}-checked`]: {
              marginInlineStart: 0,
              marginInlineEnd: 0
            },
            [`${n}-unchecked`]: {
              marginInlineStart: `calc(100% - ${e.switchPinSizeSM + e.switchPadding * 2}px + ${e.switchInnerMarginMaxSM * 2}px)`,
              marginInlineEnd: `calc(-100% + ${e.switchPinSizeSM + e.switchPadding * 2}px - ${e.switchInnerMarginMaxSM * 2}px)`
            }
          },
          [`${t}-handle`]: {
            insetInlineStart: `calc(100% - ${e.switchPinSizeSM + e.switchPadding}px)`
          }
        },
        [`&:not(${t}-disabled):active`]: {
          [`&:not(${t}-checked) ${n}`]: {
            [`${n}-unchecked`]: {
              marginInlineStart: e.marginXXS / 2,
              marginInlineEnd: -e.marginXXS / 2
            }
          },
          [`&${t}-checked ${n}`]: {
            [`${n}-checked`]: {
              marginInlineStart: -e.marginXXS / 2,
              marginInlineEnd: e.marginXXS / 2
            }
          }
        }
      }
    }
  };
}, YH = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [t]: {
      [`${t}-loading-icon${e.iconCls}`]: {
        position: "relative",
        top: (e.switchPinSize - e.fontSize) / 2,
        color: e.switchLoadingIconColor,
        verticalAlign: "top"
      },
      [`&${t}-checked ${t}-loading-icon`]: {
        color: e.switchColor
      }
    }
  };
}, UH = (e) => {
  const {
    componentCls: t
  } = e, n = `${t}-handle`;
  return {
    [t]: {
      [n]: {
        position: "absolute",
        top: e.switchPadding,
        insetInlineStart: e.switchPadding,
        width: e.switchPinSize,
        height: e.switchPinSize,
        transition: `all ${e.switchDuration} ease-in-out`,
        "&::before": {
          position: "absolute",
          top: 0,
          insetInlineEnd: 0,
          bottom: 0,
          insetInlineStart: 0,
          backgroundColor: e.colorWhite,
          borderRadius: e.switchPinSize / 2,
          boxShadow: e.switchHandleShadow,
          transition: `all ${e.switchDuration} ease-in-out`,
          content: '""'
        }
      },
      [`&${t}-checked ${n}`]: {
        insetInlineStart: `calc(100% - ${e.switchPinSize + e.switchPadding}px)`
      },
      [`&:not(${t}-disabled):active`]: {
        [`${n}::before`]: {
          insetInlineEnd: e.switchHandleActiveInset,
          insetInlineStart: 0
        },
        [`&${t}-checked ${n}::before`]: {
          insetInlineEnd: 0,
          insetInlineStart: e.switchHandleActiveInset
        }
      }
    }
  };
}, XH = (e) => {
  const {
    componentCls: t
  } = e, n = `${t}-inner`;
  return {
    [t]: {
      [n]: {
        display: "block",
        overflow: "hidden",
        borderRadius: 100,
        height: "100%",
        paddingInlineStart: e.switchInnerMarginMax,
        paddingInlineEnd: e.switchInnerMarginMin,
        transition: `padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,
        [`${n}-checked, ${n}-unchecked`]: {
          display: "block",
          color: e.colorTextLightSolid,
          fontSize: e.fontSizeSM,
          transition: `margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,
          pointerEvents: "none"
        },
        [`${n}-checked`]: {
          marginInlineStart: `calc(-100% + ${e.switchPinSize + e.switchPadding * 2}px - ${e.switchInnerMarginMax * 2}px)`,
          marginInlineEnd: `calc(100% - ${e.switchPinSize + e.switchPadding * 2}px + ${e.switchInnerMarginMax * 2}px)`
        },
        [`${n}-unchecked`]: {
          marginTop: -e.switchHeight,
          marginInlineStart: 0,
          marginInlineEnd: 0
        }
      },
      [`&${t}-checked ${n}`]: {
        paddingInlineStart: e.switchInnerMarginMin,
        paddingInlineEnd: e.switchInnerMarginMax,
        [`${n}-checked`]: {
          marginInlineStart: 0,
          marginInlineEnd: 0
        },
        [`${n}-unchecked`]: {
          marginInlineStart: `calc(100% - ${e.switchPinSize + e.switchPadding * 2}px + ${e.switchInnerMarginMax * 2}px)`,
          marginInlineEnd: `calc(-100% + ${e.switchPinSize + e.switchPadding * 2}px - ${e.switchInnerMarginMax * 2}px)`
        }
      },
      [`&:not(${t}-disabled):active`]: {
        [`&:not(${t}-checked) ${n}`]: {
          [`${n}-unchecked`]: {
            marginInlineStart: e.switchPadding * 2,
            marginInlineEnd: -e.switchPadding * 2
          }
        },
        [`&${t}-checked ${n}`]: {
          [`${n}-checked`]: {
            marginInlineStart: -e.switchPadding * 2,
            marginInlineEnd: e.switchPadding * 2
          }
        }
      }
    }
  };
}, QH = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [t]: I(I(I(I({}, Zt(e)), {
      position: "relative",
      display: "inline-block",
      boxSizing: "border-box",
      minWidth: e.switchMinWidth,
      height: e.switchHeight,
      lineHeight: `${e.switchHeight}px`,
      verticalAlign: "middle",
      background: e.colorTextQuaternary,
      border: "0",
      borderRadius: 100,
      cursor: "pointer",
      transition: `all ${e.motionDurationMid}`,
      userSelect: "none",
      [`&:hover:not(${t}-disabled)`]: {
        background: e.colorTextTertiary
      }
    }), bl(e)), {
      [`&${t}-checked`]: {
        background: e.switchColor,
        [`&:hover:not(${t}-disabled)`]: {
          background: e.colorPrimaryHover
        }
      },
      [`&${t}-loading, &${t}-disabled`]: {
        cursor: "not-allowed",
        opacity: e.switchDisabledOpacity,
        "*": {
          boxShadow: "none",
          cursor: "not-allowed"
        }
      },
      // rtl style
      [`&${t}-rtl`]: {
        direction: "rtl"
      }
    })
  };
}, ZH = nn("Switch", (e) => {
  const t = e.fontSize * e.lineHeight, n = e.controlHeight / 2, o = 2, i = t - o * 2, r = n - o * 2, a = _t(e, {
    switchMinWidth: i * 2 + o * 4,
    switchHeight: t,
    switchDuration: e.motionDurationMid,
    switchColor: e.colorPrimary,
    switchDisabledOpacity: e.opacityLoading,
    switchInnerMarginMin: i / 2,
    switchInnerMarginMax: i + o + o * 2,
    switchPadding: o,
    switchPinSize: i,
    switchBg: e.colorBgContainer,
    switchMinWidthSM: r * 2 + o * 2,
    switchHeightSM: n,
    switchInnerMarginMinSM: r / 2,
    switchInnerMarginMaxSM: r + o + o * 2,
    switchPinSizeSM: r,
    switchHandleShadow: `0 2px 4px 0 ${new In("#00230b").setAlpha(0.2).toRgbString()}`,
    switchLoadingIconSize: e.fontSizeIcon * 0.75,
    switchLoadingIconColor: `rgba(0, 0, 0, ${e.opacityLoading})`,
    switchHandleActiveInset: "-30%"
  });
  return [
    QH(a),
    // inner style
    XH(a),
    // handle style
    UH(a),
    // loading style
    YH(a),
    // small style
    KH(a)
  ];
}), JH = li("small", "default"), eV = () => ({
  id: String,
  prefixCls: String,
  size: ue.oneOf(JH),
  disabled: {
    type: Boolean,
    default: void 0
  },
  checkedChildren: ue.any,
  unCheckedChildren: ue.any,
  tabindex: ue.oneOfType([ue.string, ue.number]),
  autofocus: {
    type: Boolean,
    default: void 0
  },
  loading: {
    type: Boolean,
    default: void 0
  },
  checked: ue.oneOfType([ue.string, ue.number, ue.looseBool]),
  checkedValue: ue.oneOfType([ue.string, ue.number, ue.looseBool]).def(!0),
  unCheckedValue: ue.oneOfType([ue.string, ue.number, ue.looseBool]).def(!1),
  onChange: {
    type: Function
  },
  onClick: {
    type: Function
  },
  onKeydown: {
    type: Function
  },
  onMouseup: {
    type: Function
  },
  "onUpdate:checked": {
    type: Function
  },
  onBlur: Function,
  onFocus: Function
}), tV = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ASwitch",
  __ANT_SWITCH: !0,
  inheritAttrs: !1,
  props: eV(),
  slots: Object,
  // emits: ['update:checked', 'mouseup', 'change', 'click', 'keydown', 'blur'],
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      expose: i,
      emit: r
    } = t;
    const a = pi(), l = Ji(), s = R(() => {
      var z;
      return (z = e.disabled) !== null && z !== void 0 ? z : l.value;
    });
    Xd(() => {
      Zn(!("defaultChecked" in n), "Switch", "'defaultChecked' is deprecated, please use 'v-model:checked'"), Zn(!("value" in n), "Switch", "`value` is not validate prop, do you mean `checked`?");
    });
    const u = le(e.checked !== void 0 ? e.checked : n.defaultChecked), c = R(() => u.value === e.checkedValue);
    Ie(() => e.checked, () => {
      u.value = e.checked;
    });
    const {
      prefixCls: d,
      direction: f,
      size: p
    } = yt("switch", e), [m, b] = ZH(d), y = le(), S = () => {
      var z;
      (z = y.value) === null || z === void 0 || z.focus();
    };
    i({
      focus: S,
      blur: () => {
        var z;
        (z = y.value) === null || z === void 0 || z.blur();
      }
    }), Pt(() => {
      Nt(() => {
        e.autofocus && !s.value && y.value.focus();
      });
    });
    const O = (z, N) => {
      s.value || (r("update:checked", z), r("change", z, N), a.onFieldChange());
    }, $ = (z) => {
      r("blur", z);
    }, P = (z) => {
      S();
      const N = c.value ? e.unCheckedValue : e.checkedValue;
      O(N, z), r("click", N, z);
    }, k = (z) => {
      z.keyCode === Xe.LEFT ? O(e.unCheckedValue, z) : z.keyCode === Xe.RIGHT && O(e.checkedValue, z), r("keydown", z);
    }, x = (z) => {
      var N;
      (N = y.value) === null || N === void 0 || N.blur(), r("mouseup", z);
    }, E = R(() => ({
      [`${d.value}-small`]: p.value === "small",
      [`${d.value}-loading`]: e.loading,
      [`${d.value}-checked`]: c.value,
      [`${d.value}-disabled`]: s.value,
      [d.value]: !0,
      [`${d.value}-rtl`]: f.value === "rtl",
      [b.value]: !0
    }));
    return () => {
      var z;
      return m(v(tm, null, {
        default: () => [v("button", Z(Z(Z({}, Tn(e, ["prefixCls", "checkedChildren", "unCheckedChildren", "checked", "autofocus", "checkedValue", "unCheckedValue", "id", "onChange", "onUpdate:checked"])), n), {}, {
          id: (z = e.id) !== null && z !== void 0 ? z : a.id.value,
          onKeydown: k,
          onClick: P,
          onBlur: $,
          onMouseup: x,
          type: "button",
          role: "switch",
          "aria-checked": u.value,
          disabled: s.value || e.loading,
          class: [n.class, E.value],
          ref: y
        }), [v("div", {
          class: `${d.value}-handle`
        }, [e.loading ? v(yr, {
          class: `${d.value}-loading-icon`
        }, null) : null]), v("span", {
          class: `${d.value}-inner`
        }, [v("span", {
          class: `${d.value}-inner-checked`
        }, [Mi(o, e, "checkedChildren")]), v("span", {
          class: `${d.value}-inner-unchecked`
        }, [Mi(o, e, "unCheckedChildren")])])])]
      }));
    };
  }
}), Rr = er(tV), A2 = Symbol("appConfigContext"), nV = (e) => kt(A2, e), oV = () => Tt(A2, {}), D2 = Symbol("appContext"), iV = (e) => kt(D2, e), rV = Dn({
  message: {},
  notification: {},
  modal: {}
}), aV = () => Tt(D2, rV), lV = (e) => {
  const {
    componentCls: t,
    colorText: n,
    fontSize: o,
    lineHeight: i,
    fontFamily: r
  } = e;
  return {
    [t]: {
      color: n,
      fontSize: o,
      lineHeight: i,
      fontFamily: r
    }
  };
}, sV = nn("App", (e) => [lV(e)]), uV = () => ({
  rootClassName: String,
  message: Ct(),
  notification: Ct()
}), cV = () => aV(), ps = ye({
  name: "AApp",
  props: wn(uV(), {}),
  setup(e, t) {
    let {
      slots: n
    } = t;
    const {
      prefixCls: o
    } = yt("app", e), [i, r] = sV(o), a = R(() => Te(r.value, o.value, e.rootClassName)), l = oV(), s = R(() => ({
      message: I(I({}, l.message), e.message),
      notification: I(I({}, l.notification), e.notification)
    }));
    nV(s.value);
    const [u, c] = RP(s.value.message), [d, f] = UP(s.value.notification), [p, m] = S2(), b = R(() => ({
      message: u,
      notification: d,
      modal: p
    }));
    return iV(b.value), () => {
      var y;
      return i(v("div", {
        class: a.value
      }, [m(), c(), f(), (y = n.default) === null || y === void 0 ? void 0 : y.call(n)]));
    };
  }
});
ps.useApp = cV;
ps.install = function(e) {
  e.component(ps.name, ps);
};
const ha = (e, t) => new In(e).setAlpha(t).toRgbString(), Yl = (e, t) => new In(e).lighten(t).toHexString(), dV = (e) => {
  const t = Gr(e, {
    theme: "dark"
  });
  return {
    1: t[0],
    2: t[1],
    3: t[2],
    4: t[3],
    5: t[6],
    6: t[5],
    7: t[4],
    8: t[6],
    9: t[5],
    10: t[4]
    // 8: colors[9],
    // 9: colors[8],
    // 10: colors[7],
  };
}, fV = (e, t) => {
  const n = e || "#000", o = t || "#fff";
  return {
    colorBgBase: n,
    colorTextBase: o,
    colorText: ha(o, 0.85),
    colorTextSecondary: ha(o, 0.65),
    colorTextTertiary: ha(o, 0.45),
    colorTextQuaternary: ha(o, 0.25),
    colorFill: ha(o, 0.18),
    colorFillSecondary: ha(o, 0.12),
    colorFillTertiary: ha(o, 0.08),
    colorFillQuaternary: ha(o, 0.04),
    colorBgElevated: Yl(n, 12),
    colorBgContainer: Yl(n, 8),
    colorBgLayout: Yl(n, 0),
    colorBgSpotlight: Yl(n, 26),
    colorBorder: Yl(n, 26),
    colorBorderSecondary: Yl(n, 19)
  };
}, pV = (e, t) => {
  const n = Object.keys(mv).map((i) => {
    const r = Gr(e[i], {
      theme: "dark"
    });
    return new Array(10).fill(1).reduce((a, l, s) => (a[`${i}-${s + 1}`] = r[s], a), {});
  }).reduce((i, r) => (i = I(I({}, i), r), i), {}), o = t ?? bv(e);
  return I(I(I({}, o), n), XS(e, {
    generateColorPalettes: dV,
    generateNeutralColorPalettes: fV
  }));
}, d1 = {
  /** Default seedToken */
  defaultSeed: xv.token,
  defaultAlgorithm: bv,
  darkAlgorithm: pV
}, gV = typeof window < "u";
var f1;
gV && ((f1 = window?.navigator) != null && f1.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
function ti(e) {
  return e == null;
}
function z2() {
}
const hV = Object.freeze({
  aliceblue: "f0f8ff",
  antiquewhite: "faebd7",
  aqua: "0ff",
  aquamarine: "7fffd4",
  azure: "f0ffff",
  beige: "f5f5dc",
  bisque: "ffe4c4",
  black: "000",
  blanchedalmond: "ffebcd",
  blue: "00f",
  blueviolet: "8a2be2",
  brown: "a52a2a",
  burlywood: "deb887",
  burntsienna: "ea7e5d",
  cadetblue: "5f9ea0",
  chartreuse: "7fff00",
  chocolate: "d2691e",
  coral: "ff7f50",
  cornflowerblue: "6495ed",
  cornsilk: "fff8dc",
  crimson: "dc143c",
  cyan: "0ff",
  darkblue: "00008b",
  darkcyan: "008b8b",
  darkgoldenrod: "b8860b",
  darkgray: "a9a9a9",
  darkgreen: "006400",
  darkgrey: "a9a9a9",
  darkkhaki: "bdb76b",
  darkmagenta: "8b008b",
  darkolivegreen: "556b2f",
  darkorange: "ff8c00",
  darkorchid: "9932cc",
  darkred: "8b0000",
  darksalmon: "e9967a",
  darkseagreen: "8fbc8f",
  darkslateblue: "483d8b",
  darkslategray: "2f4f4f",
  darkslategrey: "2f4f4f",
  darkturquoise: "00ced1",
  darkviolet: "9400d3",
  deeppink: "ff1493",
  deepskyblue: "00bfff",
  dimgray: "696969",
  dimgrey: "696969",
  dodgerblue: "1e90ff",
  firebrick: "b22222",
  floralwhite: "fffaf0",
  forestgreen: "228b22",
  fuchsia: "f0f",
  gainsboro: "dcdcdc",
  ghostwhite: "f8f8ff",
  gold: "ffd700",
  goldenrod: "daa520",
  gray: "808080",
  green: "008000",
  greenyellow: "adff2f",
  grey: "808080",
  honeydew: "f0fff0",
  hotpink: "ff69b4",
  indianred: "cd5c5c",
  indigo: "4b0082",
  ivory: "fffff0",
  khaki: "f0e68c",
  lavender: "e6e6fa",
  lavenderblush: "fff0f5",
  lawngreen: "7cfc00",
  lemonchiffon: "fffacd",
  lightblue: "add8e6",
  lightcoral: "f08080",
  lightcyan: "e0ffff",
  lightgoldenrodyellow: "fafad2",
  lightgray: "d3d3d3",
  lightgreen: "90ee90",
  lightgrey: "d3d3d3",
  lightpink: "ffb6c1",
  lightsalmon: "ffa07a",
  lightseagreen: "20b2aa",
  lightskyblue: "87cefa",
  lightslategray: "789",
  lightslategrey: "789",
  lightsteelblue: "b0c4de",
  lightyellow: "ffffe0",
  lime: "0f0",
  limegreen: "32cd32",
  linen: "faf0e6",
  magenta: "f0f",
  maroon: "800000",
  mediumaquamarine: "66cdaa",
  mediumblue: "0000cd",
  mediumorchid: "ba55d3",
  mediumpurple: "9370db",
  mediumseagreen: "3cb371",
  mediumslateblue: "7b68ee",
  mediumspringgreen: "00fa9a",
  mediumturquoise: "48d1cc",
  mediumvioletred: "c71585",
  midnightblue: "191970",
  mintcream: "f5fffa",
  mistyrose: "ffe4e1",
  moccasin: "ffe4b5",
  navajowhite: "ffdead",
  navy: "000080",
  oldlace: "fdf5e6",
  olive: "808000",
  olivedrab: "6b8e23",
  orange: "ffa500",
  orangered: "ff4500",
  orchid: "da70d6",
  palegoldenrod: "eee8aa",
  palegreen: "98fb98",
  paleturquoise: "afeeee",
  palevioletred: "db7093",
  papayawhip: "ffefd5",
  peachpuff: "ffdab9",
  peru: "cd853f",
  pink: "ffc0cb",
  plum: "dda0dd",
  powderblue: "b0e0e6",
  purple: "800080",
  rebeccapurple: "663399",
  red: "f00",
  rosybrown: "bc8f8f",
  royalblue: "4169e1",
  saddlebrown: "8b4513",
  salmon: "fa8072",
  sandybrown: "f4a460",
  seagreen: "2e8b57",
  seashell: "fff5ee",
  sienna: "a0522d",
  silver: "c0c0c0",
  skyblue: "87ceeb",
  slateblue: "6a5acd",
  slategray: "708090",
  slategrey: "708090",
  snow: "fffafa",
  springgreen: "00ff7f",
  steelblue: "4682b4",
  tan: "d2b48c",
  teal: "008080",
  thistle: "d8bfd8",
  tomato: "ff6347",
  turquoise: "40e0d0",
  violet: "ee82ee",
  wheat: "f5deb3",
  white: "fff",
  whitesmoke: "f5f5f5",
  yellow: "ff0",
  yellowgreen: "9acd32"
});
Object.freeze(new Set(Object.keys(hV)));
function vV() {
  const e = /* @__PURE__ */ new Map();
  return {
    on(t, n) {
      const o = e.get(t);
      o?.add(n) || e.set(t, /* @__PURE__ */ new Set([n]));
    },
    off(t, n) {
      const o = e.get(t);
      o && o.delete(n);
    },
    clear(t) {
      const n = e.get(t);
      n && n.clear();
    },
    clearAll() {
      e.clear();
    },
    emit(t, ...n) {
      const o = e.get(t);
      o && o.forEach((i) => {
        i(...n);
      });
    }
  };
}
function p1(e, t = 16) {
  if (typeof e != "function")
    return z2;
  const n = (...r) => {
    e(...r);
  };
  if (t <= 0)
    return R2(n);
  let o = 0, i;
  return function(...r) {
    const a = Date.now(), l = a - o;
    clearTimeout(i), l >= t ? (o = a, n(...r)) : i = setTimeout(
      () => {
        o = Date.now(), n(...r);
      },
      Math.max(0, t - l)
    );
  };
}
function mV(e, t = 100) {
  if (typeof e != "function")
    return z2;
  const n = (...i) => {
    e(...i);
  };
  if (t <= 0)
    return R2(n);
  let o;
  return function(...i) {
    clearTimeout(o), o = setTimeout(() => {
      n(...i);
    }, t);
  };
}
function R2(e) {
  if (typeof e != "function")
    return e;
  let t = !1, n, o;
  return function(...i) {
    return n = i, t || (t = !0, o = Promise.resolve().then(() => (t = !1, o = void 0, e(...n)))), o;
  };
}
const Eu = /* @__PURE__ */ new Set(), N2 = /* @__PURE__ */ new WeakMap();
function bV() {
  Eu.forEach((e) => {
    e(...N2.get(e));
  }), Eu.clear();
}
function Eo(e, ...t) {
  if (typeof e != "function")
    return e;
  N2.set(e, t), !Eu.has(e) && (Eu.add(e), Eu.size === 1 && Promise.resolve().then(bV));
}
const B2 = Symbol("LAYOUT_KEY"), L2 = Symbol("EMITTER_KEY");
function yV(e) {
  let t = 0, n;
  for (let o = 0, i = e.length; o < i; o++)
    n = e[o].y + e[o].h, n > t && (t = n);
  return t;
}
function Vh(e) {
  const t = Array(e.length);
  for (let n = 0, o = e.length; n < o; n++)
    t[n] = xV(e[n]);
  return t;
}
function xV(e) {
  return { ...e };
}
function F2(e, t) {
  return !(e === t || e.x + e.w <= t.x || e.x >= t.x + t.w || e.y + e.h <= t.y || e.y >= t.y + t.h);
}
function ts(e, t, n) {
  const o = V2(e), i = j2(e), r = Array(e.length);
  for (let a = 0, l = i.length; a < l; a++) {
    let s = i[a];
    s.static || (s = wV(o, s, t, n), o.push(s)), r[e.findIndex((u) => u.i === s.i)] = s, s.moved = !1;
  }
  return r;
}
function wV(e, t, n, o) {
  if (n)
    for (; t.y > 0 && !_u(e, t); )
      t.y--;
  else if (o) {
    const r = o[t.i].y;
    for (; t.y > r && !_u(e, t); )
      t.y--;
  }
  let i;
  for (; i = _u(e, t); )
    t.y = i.y + i.h;
  return t;
}
function SV(e, t) {
  const n = V2(e);
  for (let o = 0, i = e.length; o < i; o++) {
    const r = e[o];
    if (r.x + r.w > t.cols && (r.x = t.cols - r.w), r.x < 0 && (r.x = 0, r.w = t.cols), !r.static) n.push(r);
    else
      for (; _u(n, r); )
        r.y++;
  }
  return e;
}
function g1(e, t) {
  for (let n = 0, o = e.length; n < o; n++)
    if (e[n].i === t) return e[n];
}
function _u(e, t) {
  for (let n = 0, o = e.length; n < o; n++)
    if (F2(e[n], t)) return e[n];
}
function H2(e, t) {
  return e.filter((n) => F2(n, t));
}
function V2(e) {
  return e.filter((t) => t.static);
}
function jh(e, t, n, o, i = !1, r = !1) {
  if (t.static) return e;
  const a = t.x, l = t.y, s = o && t.y > o;
  typeof n == "number" && (t.x = n), typeof o == "number" && (t.y = o), t.moved = !0;
  let u = j2(e);
  s && (u = u.reverse());
  const c = H2(u, t);
  if (r && c.length)
    return t.x = a, t.y = l, t.moved = !1, e;
  for (let d = 0, f = c.length; d < f; d++) {
    const p = c[d];
    p.moved || t.y > p.y && t.y - p.y > p.h / 4 || (p.static ? e = h1(e, p, t, i) : e = h1(e, t, p, i));
  }
  return e;
}
function h1(e, t, n, o) {
  if (o) {
    const i = {
      x: n.x,
      y: n.y,
      w: n.w,
      h: n.h
    };
    if (i.y = Math.max(t.y - n.h, 0), !_u(e, i))
      return jh(e, n, void 0, i.y, !1);
  }
  return jh(e, n, void 0, n.y + 1, !1);
}
function CV(e, t, n, o) {
  const i = "translate3d(" + t + "px," + e + "px, 0)";
  return {
    transform: i,
    WebkitTransform: i,
    MozTransform: i,
    msTransform: i,
    OTransform: i,
    width: n + "px",
    height: o + "px",
    position: "absolute"
  };
}
function $V(e, t, n, o) {
  const i = "translate3d(" + t * -1 + "px," + e + "px, 0)";
  return {
    transform: i,
    WebkitTransform: i,
    MozTransform: i,
    msTransform: i,
    OTransform: i,
    width: n + "px",
    height: o + "px",
    position: "absolute"
  };
}
function PV(e, t, n, o) {
  return {
    top: e + "px",
    left: t + "px",
    width: n + "px",
    height: o + "px",
    position: "absolute"
  };
}
function OV(e, t, n, o) {
  return {
    top: e + "px",
    right: t + "px",
    width: n + "px",
    height: o + "px",
    position: "absolute"
  };
}
function j2(e) {
  return Array.from(e).sort(function(t, n) {
    return t.y === n.y && t.x === n.x ? 0 : t.y > n.y || t.y === n.y && t.x > n.x ? 1 : -1;
  });
}
function IV(e, t) {
  t = t || "Layout";
  const n = ["x", "y", "w", "h"], o = [];
  if (!Array.isArray(e)) throw new Error(t + " must be an array!");
  for (let i = 0, r = e.length; i < r; i++) {
    const a = e[i];
    for (let l = 0; l < n.length; l++)
      if (typeof a[n[l]] != "number")
        throw new Error(
          "VueGridLayout: " + t + "[" + i + "]." + n[l] + " must be a number!"
        );
    if (a.i === void 0 || a.i === null)
      throw new Error("VueGridLayout: " + t + "[" + i + "].i cannot be null!");
    if (typeof a.i != "number" && typeof a.i != "string")
      throw new Error("VueGridLayout: " + t + "[" + i + "].i must be a string or number!");
    if (o.indexOf(a.i) >= 0)
      throw new Error("VueGridLayout: " + t + "[" + i + "].i must be unique!");
    if (o.push(a.i), a.static !== void 0 && typeof a.static != "boolean")
      throw new Error("VueGridLayout: " + t + "[" + i + "].static must be a boolean!");
  }
}
function MV(e, t = "vgl") {
  const n = () => `${t}-${e}`;
  return {
    b: n,
    be: (o) => `${n()}__${o}`,
    bm: (o) => `${n()}--${o}`,
    bem: (o, i) => `${n()}__${o}--${i}`
  };
}
function v1(e) {
  return TV(e);
}
function TV(e) {
  var t;
  const n = ((t = e.target) == null ? void 0 : t.offsetParent) || document.body, o = e.offsetParent === document.body ? { left: 0, top: 0 } : n.getBoundingClientRect(), i = e.clientX + n.scrollLeft - o.left, r = e.clientY + n.scrollTop - o.top;
  return { x: i, y: r };
}
function m1(e, t, n, o) {
  return kV(e) ? {
    deltaX: n - e,
    deltaY: o - t,
    lastX: e,
    lastY: t,
    x: n,
    y: o
  } : {
    deltaX: 0,
    deltaY: 0,
    lastX: n,
    lastY: o,
    x: n,
    y: o
  };
}
function kV(e) {
  return typeof e == "number" && !Number.isNaN(e);
}
function EV(e, t) {
  const n = q2(e);
  let o = n[0];
  for (let i = 1, r = n.length; i < r; i++) {
    const a = n[i];
    t > e[a] && (o = a);
  }
  return o;
}
function W2(e, t) {
  if (!t[e])
    throw new Error(
      "ResponsiveGridLayout: `cols` entry for breakpoint " + e + " is missing!"
    );
  return t[e];
}
function _V(e, t, n, o, i, r, a) {
  if (t[o]) return Vh(t[o]);
  let l = e;
  const s = q2(n), u = s.slice(s.indexOf(o));
  for (let c = 0, d = u.length; c < d; c++) {
    const f = u[c];
    if (t[f]) {
      l = t[f];
      break;
    }
  }
  return l = Vh(l || []), ts(SV(l, { cols: r }), a);
}
function q2(e) {
  return Object.keys(e).sort((t, n) => e[t] - e[n]);
}
let AV = "auto";
function DV() {
  return typeof document < "u";
}
function b1() {
  return DV() ? typeof document.dir < "u" ? document.dir : document.getElementsByTagName("html")[0].getAttribute("dir") : AV;
}
var yu = { exports: {} }, zV = yu.exports, y1;
function RV() {
  return y1 || (y1 = 1, (function(e, t) {
    (function(n, o) {
      e.exports = o();
    })(zV, (function() {
      function n(g, h) {
        var w = Object.keys(g);
        if (Object.getOwnPropertySymbols) {
          var T = Object.getOwnPropertySymbols(g);
          h && (T = T.filter((function(_) {
            return Object.getOwnPropertyDescriptor(g, _).enumerable;
          }))), w.push.apply(w, T);
        }
        return w;
      }
      function o(g) {
        for (var h = 1; h < arguments.length; h++) {
          var w = arguments[h] != null ? arguments[h] : {};
          h % 2 ? n(Object(w), !0).forEach((function(T) {
            s(g, T, w[T]);
          })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(g, Object.getOwnPropertyDescriptors(w)) : n(Object(w)).forEach((function(T) {
            Object.defineProperty(g, T, Object.getOwnPropertyDescriptor(w, T));
          }));
        }
        return g;
      }
      function i(g) {
        return i = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(h) {
          return typeof h;
        } : function(h) {
          return h && typeof Symbol == "function" && h.constructor === Symbol && h !== Symbol.prototype ? "symbol" : typeof h;
        }, i(g);
      }
      function r(g, h) {
        if (!(g instanceof h)) throw new TypeError("Cannot call a class as a function");
      }
      function a(g, h) {
        for (var w = 0; w < h.length; w++) {
          var T = h[w];
          T.enumerable = T.enumerable || !1, T.configurable = !0, "value" in T && (T.writable = !0), Object.defineProperty(g, b(T.key), T);
        }
      }
      function l(g, h, w) {
        return h && a(g.prototype, h), Object.defineProperty(g, "prototype", { writable: !1 }), g;
      }
      function s(g, h, w) {
        return (h = b(h)) in g ? Object.defineProperty(g, h, { value: w, enumerable: !0, configurable: !0, writable: !0 }) : g[h] = w, g;
      }
      function u(g, h) {
        if (typeof h != "function" && h !== null) throw new TypeError("Super expression must either be null or a function");
        g.prototype = Object.create(h && h.prototype, { constructor: { value: g, writable: !0, configurable: !0 } }), Object.defineProperty(g, "prototype", { writable: !1 }), h && d(g, h);
      }
      function c(g) {
        return c = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(h) {
          return h.__proto__ || Object.getPrototypeOf(h);
        }, c(g);
      }
      function d(g, h) {
        return d = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(w, T) {
          return w.__proto__ = T, w;
        }, d(g, h);
      }
      function f(g) {
        if (g === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        return g;
      }
      function p(g) {
        var h = (function() {
          if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
          if (typeof Proxy == "function") return !0;
          try {
            return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {
            }))), !0;
          } catch {
            return !1;
          }
        })();
        return function() {
          var w, T = c(g);
          if (h) {
            var _ = c(this).constructor;
            w = Reflect.construct(T, arguments, _);
          } else w = T.apply(this, arguments);
          return (function(F, q) {
            if (q && (typeof q == "object" || typeof q == "function")) return q;
            if (q !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
            return f(F);
          })(this, w);
        };
      }
      function m() {
        return m = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(g, h, w) {
          var T = (function(F, q) {
            for (; !Object.prototype.hasOwnProperty.call(F, q) && (F = c(F)) !== null; ) ;
            return F;
          })(g, h);
          if (T) {
            var _ = Object.getOwnPropertyDescriptor(T, h);
            return _.get ? _.get.call(arguments.length < 3 ? g : w) : _.value;
          }
        }, m.apply(this, arguments);
      }
      function b(g) {
        var h = (function(w, T) {
          if (typeof w != "object" || w === null) return w;
          var _ = w[Symbol.toPrimitive];
          if (_ !== void 0) {
            var F = _.call(w, T);
            if (typeof F != "object") return F;
            throw new TypeError("@@toPrimitive must return a primitive value.");
          }
          return String(w);
        })(g, "string");
        return typeof h == "symbol" ? h : h + "";
      }
      var y = function(g) {
        return !(!g || !g.Window) && g instanceof g.Window;
      }, S = void 0, C = void 0;
      function O(g) {
        S = g;
        var h = g.document.createTextNode("");
        h.ownerDocument !== g.document && typeof g.wrap == "function" && g.wrap(h) === h && (g = g.wrap(g)), C = g;
      }
      function $(g) {
        return y(g) ? g : (g.ownerDocument || g).defaultView || C.window;
      }
      typeof window < "u" && window && O(window);
      var P = function(g) {
        return !!g && i(g) === "object";
      }, k = function(g) {
        return typeof g == "function";
      }, x = { window: function(g) {
        return g === C || y(g);
      }, docFrag: function(g) {
        return P(g) && g.nodeType === 11;
      }, object: P, func: k, number: function(g) {
        return typeof g == "number";
      }, bool: function(g) {
        return typeof g == "boolean";
      }, string: function(g) {
        return typeof g == "string";
      }, element: function(g) {
        if (!g || i(g) !== "object") return !1;
        var h = $(g) || C;
        return /object|function/.test(typeof Element > "u" ? "undefined" : i(Element)) ? g instanceof Element || g instanceof h.Element : g.nodeType === 1 && typeof g.nodeName == "string";
      }, plainObject: function(g) {
        return P(g) && !!g.constructor && /function Object\b/.test(g.constructor.toString());
      }, array: function(g) {
        return P(g) && g.length !== void 0 && k(g.splice);
      } };
      function E(g) {
        var h = g.interaction;
        if (h.prepared.name === "drag") {
          var w = h.prepared.axis;
          w === "x" ? (h.coords.cur.page.y = h.coords.start.page.y, h.coords.cur.client.y = h.coords.start.client.y, h.coords.velocity.client.y = 0, h.coords.velocity.page.y = 0) : w === "y" && (h.coords.cur.page.x = h.coords.start.page.x, h.coords.cur.client.x = h.coords.start.client.x, h.coords.velocity.client.x = 0, h.coords.velocity.page.x = 0);
        }
      }
      function z(g) {
        var h = g.iEvent, w = g.interaction;
        if (w.prepared.name === "drag") {
          var T = w.prepared.axis;
          if (T === "x" || T === "y") {
            var _ = T === "x" ? "y" : "x";
            h.page[_] = w.coords.start.page[_], h.client[_] = w.coords.start.client[_], h.delta[_] = 0;
          }
        }
      }
      var N = { id: "actions/drag", install: function(g) {
        var h = g.actions, w = g.Interactable, T = g.defaults;
        w.prototype.draggable = N.draggable, h.map.drag = N, h.methodDict.drag = "draggable", T.actions.drag = N.defaults;
      }, listeners: { "interactions:before-action-move": E, "interactions:action-resume": E, "interactions:action-move": z, "auto-start:check": function(g) {
        var h = g.interaction, w = g.interactable, T = g.buttons, _ = w.options.drag;
        if (_ && _.enabled && (!h.pointerIsDown || !/mouse|pointer/.test(h.pointerType) || (T & w.options.drag.mouseButtons) != 0)) return g.action = { name: "drag", axis: _.lockAxis === "start" ? _.startAxis : _.lockAxis }, !1;
      } }, draggable: function(g) {
        return x.object(g) ? (this.options.drag.enabled = g.enabled !== !1, this.setPerAction("drag", g), this.setOnEvents("drag", g), /^(xy|x|y|start)$/.test(g.lockAxis) && (this.options.drag.lockAxis = g.lockAxis), /^(xy|x|y)$/.test(g.startAxis) && (this.options.drag.startAxis = g.startAxis), this) : x.bool(g) ? (this.options.drag.enabled = g, this) : this.options.drag;
      }, beforeMove: E, move: z, defaults: { startAxis: "xy", lockAxis: "xy" }, getCursor: function() {
        return "move";
      }, filterEventType: function(g) {
        return g.search("drag") === 0;
      } }, D = N, W = { init: function(g) {
        var h = g;
        W.document = h.document, W.DocumentFragment = h.DocumentFragment || H, W.SVGElement = h.SVGElement || H, W.SVGSVGElement = h.SVGSVGElement || H, W.SVGElementInstance = h.SVGElementInstance || H, W.Element = h.Element || H, W.HTMLElement = h.HTMLElement || W.Element, W.Event = h.Event, W.Touch = h.Touch || H, W.PointerEvent = h.PointerEvent || h.MSPointerEvent;
      }, document: null, DocumentFragment: null, SVGElement: null, SVGSVGElement: null, SVGElementInstance: null, Element: null, HTMLElement: null, Event: null, Touch: null, PointerEvent: null };
      function H() {
      }
      var L = W, A = { init: function(g) {
        var h = L.Element, w = g.navigator || {};
        A.supportsTouch = "ontouchstart" in g || x.func(g.DocumentTouch) && L.document instanceof g.DocumentTouch, A.supportsPointerEvent = w.pointerEnabled !== !1 && !!L.PointerEvent, A.isIOS = /iP(hone|od|ad)/.test(w.platform), A.isIOS7 = /iP(hone|od|ad)/.test(w.platform) && /OS 7[^\d]/.test(w.appVersion), A.isIe9 = /MSIE 9/.test(w.userAgent), A.isOperaMobile = w.appName === "Opera" && A.supportsTouch && /Presto/.test(w.userAgent), A.prefixedMatchesSelector = "matches" in h.prototype ? "matches" : "webkitMatchesSelector" in h.prototype ? "webkitMatchesSelector" : "mozMatchesSelector" in h.prototype ? "mozMatchesSelector" : "oMatchesSelector" in h.prototype ? "oMatchesSelector" : "msMatchesSelector", A.pEventTypes = A.supportsPointerEvent ? L.PointerEvent === g.MSPointerEvent ? { up: "MSPointerUp", down: "MSPointerDown", over: "mouseover", out: "mouseout", move: "MSPointerMove", cancel: "MSPointerCancel" } : { up: "pointerup", down: "pointerdown", over: "pointerover", out: "pointerout", move: "pointermove", cancel: "pointercancel" } : null, A.wheelEvent = L.document && "onmousewheel" in L.document ? "mousewheel" : "wheel";
      }, supportsTouch: null, supportsPointerEvent: null, isIOS7: null, isIOS: null, isIe9: null, isOperaMobile: null, prefixedMatchesSelector: null, pEventTypes: null, wheelEvent: null }, U = A;
      function j(g, h) {
        if (g.contains) return g.contains(h);
        for (; h; ) {
          if (h === g) return !0;
          h = h.parentNode;
        }
        return !1;
      }
      function re(g, h) {
        for (; x.element(g); ) {
          if (Y(g, h)) return g;
          g = G(g);
        }
        return null;
      }
      function G(g) {
        var h = g.parentNode;
        if (x.docFrag(h)) {
          for (; (h = h.host) && x.docFrag(h); ) ;
          return h;
        }
        return h;
      }
      function Y(g, h) {
        return C !== S && (h = h.replace(/\/deep\//g, " ")), g[U.prefixedMatchesSelector](h);
      }
      var K = function(g) {
        return g.parentNode || g.host;
      };
      function J(g, h) {
        for (var w, T = [], _ = g; (w = K(_)) && _ !== h && w !== _.ownerDocument; ) T.unshift(_), _ = w;
        return T;
      }
      function be(g, h, w) {
        for (; x.element(g); ) {
          if (Y(g, h)) return !0;
          if ((g = G(g)) === w) return Y(g, h);
        }
        return !1;
      }
      function xe(g) {
        return g.correspondingUseElement || g;
      }
      function ge(g) {
        var h = g instanceof L.SVGElement ? g.getBoundingClientRect() : g.getClientRects()[0];
        return h && { left: h.left, right: h.right, top: h.top, bottom: h.bottom, width: h.width || h.right - h.left, height: h.height || h.bottom - h.top };
      }
      function de(g) {
        var h, w = ge(g);
        if (!U.isIOS7 && w) {
          var T = { x: (h = (h = $(g)) || C).scrollX || h.document.documentElement.scrollLeft, y: h.scrollY || h.document.documentElement.scrollTop };
          w.left += T.x, w.right += T.x, w.top += T.y, w.bottom += T.y;
        }
        return w;
      }
      function ne(g) {
        for (var h = []; g; ) h.push(g), g = G(g);
        return h;
      }
      function we(g) {
        return !!x.string(g) && (L.document.querySelector(g), !0);
      }
      function ae(g, h) {
        for (var w in h) g[w] = h[w];
        return g;
      }
      function se(g, h, w) {
        return g === "parent" ? G(w) : g === "self" ? h.getRect(w) : re(w, g);
      }
      function he(g, h, w, T) {
        var _ = g;
        return x.string(_) ? _ = se(_, h, w) : x.func(_) && (_ = _.apply(void 0, T)), x.element(_) && (_ = de(_)), _;
      }
      function Me(g) {
        return g && { x: "x" in g ? g.x : g.left, y: "y" in g ? g.y : g.top };
      }
      function ke(g) {
        return !g || "x" in g && "y" in g || ((g = ae({}, g)).x = g.left || 0, g.y = g.top || 0, g.width = g.width || (g.right || 0) - g.x, g.height = g.height || (g.bottom || 0) - g.y), g;
      }
      function Le(g, h, w) {
        g.left && (h.left += w.x), g.right && (h.right += w.x), g.top && (h.top += w.y), g.bottom && (h.bottom += w.y), h.width = h.right - h.left, h.height = h.bottom - h.top;
      }
      function Re(g, h, w) {
        var T = w && g.options[w];
        return Me(he(T && T.origin || g.options.origin, g, h, [g && h])) || { x: 0, y: 0 };
      }
      function We(g, h) {
        var w = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : function(oe) {
          return !0;
        }, T = arguments.length > 3 ? arguments[3] : void 0;
        if (T = T || {}, x.string(g) && g.search(" ") !== -1 && (g = et(g)), x.array(g)) return g.forEach((function(oe) {
          return We(oe, h, w, T);
        })), T;
        if (x.object(g) && (h = g, g = ""), x.func(h) && w(g)) T[g] = T[g] || [], T[g].push(h);
        else if (x.array(h)) for (var _ = 0, F = h; _ < F.length; _++) {
          var q = F[_];
          We(g, q, w, T);
        }
        else if (x.object(h)) for (var X in h)
          We(et(X).map((function(oe) {
            return "".concat(g).concat(oe);
          })), h[X], w, T);
        return T;
      }
      function et(g) {
        return g.trim().split(/ +/);
      }
      var Fe = function(g, h) {
        return Math.sqrt(g * g + h * h);
      }, Ne = ["webkit", "moz"];
      function Ge(g, h) {
        g.__set || (g.__set = {});
        var w = function(_) {
          if (Ne.some((function(F) {
            return _.indexOf(F) === 0;
          }))) return 1;
          typeof g[_] != "function" && _ !== "__set" && Object.defineProperty(g, _, { get: function() {
            return _ in g.__set ? g.__set[_] : g.__set[_] = h[_];
          }, set: function(F) {
            g.__set[_] = F;
          }, configurable: !0 });
        };
        for (var T in h) w(T);
        return g;
      }
      function it(g, h) {
        g.page = g.page || {}, g.page.x = h.page.x, g.page.y = h.page.y, g.client = g.client || {}, g.client.x = h.client.x, g.client.y = h.client.y, g.timeStamp = h.timeStamp;
      }
      function Ke(g) {
        g.page.x = 0, g.page.y = 0, g.client.x = 0, g.client.y = 0;
      }
      function Oe(g) {
        return g instanceof L.Event || g instanceof L.Touch;
      }
      function je(g, h, w) {
        return g = g || "page", (w = w || {}).x = h[g + "X"], w.y = h[g + "Y"], w;
      }
      function De(g, h) {
        return h = h || { x: 0, y: 0 }, U.isOperaMobile && Oe(g) ? (je("screen", g, h), h.x += window.scrollX, h.y += window.scrollY) : je("page", g, h), h;
      }
      function Je(g) {
        return x.number(g.pointerId) ? g.pointerId : g.identifier;
      }
      function wt(g, h, w) {
        var T = h.length > 1 ? qe(h) : h[0];
        De(T, g.page), (function(_, F) {
          F = F || {}, U.isOperaMobile && Oe(_) ? je("screen", _, F) : je("client", _, F);
        })(T, g.client), g.timeStamp = w;
      }
      function lt(g) {
        var h = [];
        return x.array(g) ? (h[0] = g[0], h[1] = g[1]) : g.type === "touchend" ? g.touches.length === 1 ? (h[0] = g.touches[0], h[1] = g.changedTouches[0]) : g.touches.length === 0 && (h[0] = g.changedTouches[0], h[1] = g.changedTouches[1]) : (h[0] = g.touches[0], h[1] = g.touches[1]), h;
      }
      function qe(g) {
        for (var h = { pageX: 0, pageY: 0, clientX: 0, clientY: 0, screenX: 0, screenY: 0 }, w = 0; w < g.length; w++) {
          var T = g[w];
          for (var _ in h) h[_] += T[_];
        }
        for (var F in h) h[F] /= g.length;
        return h;
      }
      function rt(g) {
        if (!g.length) return null;
        var h = lt(g), w = Math.min(h[0].pageX, h[1].pageX), T = Math.min(h[0].pageY, h[1].pageY), _ = Math.max(h[0].pageX, h[1].pageX), F = Math.max(h[0].pageY, h[1].pageY);
        return { x: w, y: T, left: w, top: T, right: _, bottom: F, width: _ - w, height: F - T };
      }
      function dt(g, h) {
        var w = h + "X", T = h + "Y", _ = lt(g), F = _[0][w] - _[1][w], q = _[0][T] - _[1][T];
        return Fe(F, q);
      }
      function vt(g, h) {
        var w = h + "X", T = h + "Y", _ = lt(g), F = _[1][w] - _[0][w], q = _[1][T] - _[0][T];
        return 180 * Math.atan2(q, F) / Math.PI;
      }
      function Rt(g) {
        return x.string(g.pointerType) ? g.pointerType : x.number(g.pointerType) ? [void 0, void 0, "touch", "pen", "mouse"][g.pointerType] : /touch/.test(g.type || "") || g instanceof L.Touch ? "touch" : "mouse";
      }
      function Xt(g) {
        var h = x.func(g.composedPath) ? g.composedPath() : g.path;
        return [xe(h ? h[0] : g.target), xe(g.currentTarget)];
      }
      var vn = (function() {
        function g(h) {
          r(this, g), this.immediatePropagationStopped = !1, this.propagationStopped = !1, this._interaction = h;
        }
        return l(g, [{ key: "preventDefault", value: function() {
        } }, { key: "stopPropagation", value: function() {
          this.propagationStopped = !0;
        } }, { key: "stopImmediatePropagation", value: function() {
          this.immediatePropagationStopped = this.propagationStopped = !0;
        } }]), g;
      })();
      Object.defineProperty(vn.prototype, "interaction", { get: function() {
        return this._interaction._proxy;
      }, set: function() {
      } });
      var Dt = function(g, h) {
        for (var w = 0; w < h.length; w++) {
          var T = h[w];
          g.push(T);
        }
        return g;
      }, zn = function(g) {
        return Dt([], g);
      }, on = function(g, h) {
        for (var w = 0; w < g.length; w++) if (h(g[w], w, g)) return w;
        return -1;
      }, Qt = function(g, h) {
        return g[on(g, h)];
      }, mn = (function(g) {
        u(w, g);
        var h = p(w);
        function w(T, _, F) {
          var q;
          r(this, w), (q = h.call(this, _._interaction)).dropzone = void 0, q.dragEvent = void 0, q.relatedTarget = void 0, q.draggable = void 0, q.propagationStopped = !1, q.immediatePropagationStopped = !1;
          var X = F === "dragleave" ? T.prev : T.cur, oe = X.element, me = X.dropzone;
          return q.type = F, q.target = oe, q.currentTarget = oe, q.dropzone = me, q.dragEvent = _, q.relatedTarget = _.target, q.draggable = _.interactable, q.timeStamp = _.timeStamp, q;
        }
        return l(w, [{ key: "reject", value: function() {
          var T = this, _ = this._interaction.dropState;
          if (this.type === "dropactivate" || this.dropzone && _.cur.dropzone === this.dropzone && _.cur.element === this.target) if (_.prev.dropzone = this.dropzone, _.prev.element = this.target, _.rejected = !0, _.events.enter = null, this.stopImmediatePropagation(), this.type === "dropactivate") {
            var F = _.activeDrops, q = on(F, (function(oe) {
              var me = oe.dropzone, ie = oe.element;
              return me === T.dropzone && ie === T.target;
            }));
            _.activeDrops.splice(q, 1);
            var X = new w(_, this.dragEvent, "dropdeactivate");
            X.dropzone = this.dropzone, X.target = this.target, this.dropzone.fire(X);
          } else this.dropzone.fire(new w(_, this.dragEvent, "dragleave"));
        } }, { key: "preventDefault", value: function() {
        } }, { key: "stopPropagation", value: function() {
          this.propagationStopped = !0;
        } }, { key: "stopImmediatePropagation", value: function() {
          this.immediatePropagationStopped = this.propagationStopped = !0;
        } }]), w;
      })(vn);
      function Kt(g, h) {
        for (var w = 0, T = g.slice(); w < T.length; w++) {
          var _ = T[w], F = _.dropzone, q = _.element;
          h.dropzone = F, h.target = q, F.fire(h), h.propagationStopped = h.immediatePropagationStopped = !1;
        }
      }
      function Mn(g, h) {
        for (var w = (function(F, q) {
          for (var X = [], oe = 0, me = F.interactables.list; oe < me.length; oe++) {
            var ie = me[oe];
            if (ie.options.drop.enabled) {
              var Se = ie.options.drop.accept;
              if (!(x.element(Se) && Se !== q || x.string(Se) && !Y(q, Se) || x.func(Se) && !Se({ dropzone: ie, draggableElement: q }))) for (var $e = 0, _e = ie.getAllElements(); $e < _e.length; $e++) {
                var Ae = _e[$e];
                Ae !== q && X.push({ dropzone: ie, element: Ae, rect: ie.getRect(Ae) });
              }
            }
          }
          return X;
        })(g, h), T = 0; T < w.length; T++) {
          var _ = w[T];
          _.rect = _.dropzone.getRect(_.element);
        }
        return w;
      }
      function rn(g, h, w) {
        for (var T = g.dropState, _ = g.interactable, F = g.element, q = [], X = 0, oe = T.activeDrops; X < oe.length; X++) {
          var me = oe[X], ie = me.dropzone, Se = me.element, $e = me.rect, _e = ie.dropCheck(h, w, _, F, Se, $e);
          q.push(_e ? Se : null);
        }
        var Ae = (function(Be) {
          for (var Ye, Ue, at, mt = [], Ot = 0; Ot < Be.length; Ot++) {
            var pt = Be[Ot], St = Be[Ye];
            if (pt && Ot !== Ye) if (St) {
              var un = K(pt), Yt = K(St);
              if (un !== pt.ownerDocument) if (Yt !== pt.ownerDocument) if (un !== Yt) {
                mt = mt.length ? mt : J(St);
                var hn = void 0;
                if (St instanceof L.HTMLElement && pt instanceof L.SVGElement && !(pt instanceof L.SVGSVGElement)) {
                  if (pt === Yt) continue;
                  hn = pt.ownerSVGElement;
                } else hn = pt;
                for (var Cn = J(hn, St.ownerDocument), Wn = 0; Cn[Wn] && Cn[Wn] === mt[Wn]; ) Wn++;
                var Ni = [Cn[Wn - 1], Cn[Wn], mt[Wn]];
                if (Ni[0]) for (var Vo = Ni[0].lastChild; Vo; ) {
                  if (Vo === Ni[1]) {
                    Ye = Ot, mt = Cn;
                    break;
                  }
                  if (Vo === Ni[2]) break;
                  Vo = Vo.previousSibling;
                }
              } else at = St, (parseInt($(Ue = pt).getComputedStyle(Ue).zIndex, 10) || 0) >= (parseInt($(at).getComputedStyle(at).zIndex, 10) || 0) && (Ye = Ot);
              else Ye = Ot;
            } else Ye = Ot;
          }
          return Ye;
        })(q);
        return T.activeDrops[Ae] || null;
      }
      function gn(g, h, w) {
        var T = g.dropState, _ = { enter: null, leave: null, activate: null, deactivate: null, move: null, drop: null };
        return w.type === "dragstart" && (_.activate = new mn(T, w, "dropactivate"), _.activate.target = null, _.activate.dropzone = null), w.type === "dragend" && (_.deactivate = new mn(T, w, "dropdeactivate"), _.deactivate.target = null, _.deactivate.dropzone = null), T.rejected || (T.cur.element !== T.prev.element && (T.prev.dropzone && (_.leave = new mn(T, w, "dragleave"), w.dragLeave = _.leave.target = T.prev.element, w.prevDropzone = _.leave.dropzone = T.prev.dropzone), T.cur.dropzone && (_.enter = new mn(T, w, "dragenter"), w.dragEnter = T.cur.element, w.dropzone = T.cur.dropzone)), w.type === "dragend" && T.cur.dropzone && (_.drop = new mn(T, w, "drop"), w.dropzone = T.cur.dropzone, w.relatedTarget = T.cur.element), w.type === "dragmove" && T.cur.dropzone && (_.move = new mn(T, w, "dropmove"), w.dropzone = T.cur.dropzone)), _;
      }
      function Hn(g, h) {
        var w = g.dropState, T = w.activeDrops, _ = w.cur, F = w.prev;
        h.leave && F.dropzone.fire(h.leave), h.enter && _.dropzone.fire(h.enter), h.move && _.dropzone.fire(h.move), h.drop && _.dropzone.fire(h.drop), h.deactivate && Kt(T, h.deactivate), w.prev.dropzone = _.dropzone, w.prev.element = _.element;
      }
      function Co(g, h) {
        var w = g.interaction, T = g.iEvent, _ = g.event;
        if (T.type === "dragmove" || T.type === "dragend") {
          var F = w.dropState;
          h.dynamicDrop && (F.activeDrops = Mn(h, w.element));
          var q = T, X = rn(w, q, _);
          F.rejected = F.rejected && !!X && X.dropzone === F.cur.dropzone && X.element === F.cur.element, F.cur.dropzone = X && X.dropzone, F.cur.element = X && X.element, F.events = gn(w, 0, q);
        }
      }
      var ut = { id: "actions/drop", install: function(g) {
        var h = g.actions, w = g.interactStatic, T = g.Interactable, _ = g.defaults;
        g.usePlugin(D), T.prototype.dropzone = function(F) {
          return (function(q, X) {
            if (x.object(X)) {
              if (q.options.drop.enabled = X.enabled !== !1, X.listeners) {
                var oe = We(X.listeners), me = Object.keys(oe).reduce((function(Se, $e) {
                  return Se[/^(enter|leave)/.test($e) ? "drag".concat($e) : /^(activate|deactivate|move)/.test($e) ? "drop".concat($e) : $e] = oe[$e], Se;
                }), {}), ie = q.options.drop.listeners;
                ie && q.off(ie), q.on(me), q.options.drop.listeners = me;
              }
              return x.func(X.ondrop) && q.on("drop", X.ondrop), x.func(X.ondropactivate) && q.on("dropactivate", X.ondropactivate), x.func(X.ondropdeactivate) && q.on("dropdeactivate", X.ondropdeactivate), x.func(X.ondragenter) && q.on("dragenter", X.ondragenter), x.func(X.ondragleave) && q.on("dragleave", X.ondragleave), x.func(X.ondropmove) && q.on("dropmove", X.ondropmove), /^(pointer|center)$/.test(X.overlap) ? q.options.drop.overlap = X.overlap : x.number(X.overlap) && (q.options.drop.overlap = Math.max(Math.min(1, X.overlap), 0)), "accept" in X && (q.options.drop.accept = X.accept), "checker" in X && (q.options.drop.checker = X.checker), q;
            }
            return x.bool(X) ? (q.options.drop.enabled = X, q) : q.options.drop;
          })(this, F);
        }, T.prototype.dropCheck = function(F, q, X, oe, me, ie) {
          return (function(Se, $e, _e, Ae, Be, Ye, Ue) {
            var at = !1;
            if (!(Ue = Ue || Se.getRect(Ye))) return !!Se.options.drop.checker && Se.options.drop.checker($e, _e, at, Se, Ye, Ae, Be);
            var mt = Se.options.drop.overlap;
            if (mt === "pointer") {
              var Ot = Re(Ae, Be, "drag"), pt = De($e);
              pt.x += Ot.x, pt.y += Ot.y;
              var St = pt.x > Ue.left && pt.x < Ue.right, un = pt.y > Ue.top && pt.y < Ue.bottom;
              at = St && un;
            }
            var Yt = Ae.getRect(Be);
            if (Yt && mt === "center") {
              var hn = Yt.left + Yt.width / 2, Cn = Yt.top + Yt.height / 2;
              at = hn >= Ue.left && hn <= Ue.right && Cn >= Ue.top && Cn <= Ue.bottom;
            }
            return Yt && x.number(mt) && (at = Math.max(0, Math.min(Ue.right, Yt.right) - Math.max(Ue.left, Yt.left)) * Math.max(0, Math.min(Ue.bottom, Yt.bottom) - Math.max(Ue.top, Yt.top)) / (Yt.width * Yt.height) >= mt), Se.options.drop.checker && (at = Se.options.drop.checker($e, _e, at, Se, Ye, Ae, Be)), at;
          })(this, F, q, X, oe, me, ie);
        }, w.dynamicDrop = function(F) {
          return x.bool(F) ? (g.dynamicDrop = F, w) : g.dynamicDrop;
        }, ae(h.phaselessTypes, { dragenter: !0, dragleave: !0, dropactivate: !0, dropdeactivate: !0, dropmove: !0, drop: !0 }), h.methodDict.drop = "dropzone", g.dynamicDrop = !1, _.actions.drop = ut.defaults;
      }, listeners: { "interactions:before-action-start": function(g) {
        var h = g.interaction;
        h.prepared.name === "drag" && (h.dropState = { cur: { dropzone: null, element: null }, prev: { dropzone: null, element: null }, rejected: null, events: null, activeDrops: [] });
      }, "interactions:after-action-start": function(g, h) {
        var w = g.interaction, T = (g.event, g.iEvent);
        if (w.prepared.name === "drag") {
          var _ = w.dropState;
          _.activeDrops = [], _.events = {}, _.activeDrops = Mn(h, w.element), _.events = gn(w, 0, T), _.events.activate && (Kt(_.activeDrops, _.events.activate), h.fire("actions/drop:start", { interaction: w, dragEvent: T }));
        }
      }, "interactions:action-move": Co, "interactions:after-action-move": function(g, h) {
        var w = g.interaction, T = g.iEvent;
        if (w.prepared.name === "drag") {
          var _ = w.dropState;
          Hn(w, _.events), h.fire("actions/drop:move", { interaction: w, dragEvent: T }), _.events = {};
        }
      }, "interactions:action-end": function(g, h) {
        if (g.interaction.prepared.name === "drag") {
          var w = g.interaction, T = g.iEvent;
          Co(g, h), Hn(w, w.dropState.events), h.fire("actions/drop:end", { interaction: w, dragEvent: T });
        }
      }, "interactions:stop": function(g) {
        var h = g.interaction;
        if (h.prepared.name === "drag") {
          var w = h.dropState;
          w && (w.activeDrops = null, w.events = null, w.cur.dropzone = null, w.cur.element = null, w.prev.dropzone = null, w.prev.element = null, w.rejected = !1);
        }
      } }, getActiveDrops: Mn, getDrop: rn, getDropEvents: gn, fireDropEvents: Hn, filterEventType: function(g) {
        return g.search("drag") === 0 || g.search("drop") === 0;
      }, defaults: { enabled: !1, accept: null, overlap: "pointer" } }, qn = ut;
      function bn(g) {
        var h = g.interaction, w = g.iEvent, T = g.phase;
        if (h.prepared.name === "gesture") {
          var _ = h.pointers.map((function(me) {
            return me.pointer;
          })), F = T === "start", q = T === "end", X = h.interactable.options.deltaSource;
          if (w.touches = [_[0], _[1]], F) w.distance = dt(_, X), w.box = rt(_), w.scale = 1, w.ds = 0, w.angle = vt(_, X), w.da = 0, h.gesture.startDistance = w.distance, h.gesture.startAngle = w.angle;
          else if (q || h.pointers.length < 2) {
            var oe = h.prevEvent;
            w.distance = oe.distance, w.box = oe.box, w.scale = oe.scale, w.ds = 0, w.angle = oe.angle, w.da = 0;
          } else w.distance = dt(_, X), w.box = rt(_), w.scale = w.distance / h.gesture.startDistance, w.angle = vt(_, X), w.ds = w.scale - h.gesture.scale, w.da = w.angle - h.gesture.angle;
          h.gesture.distance = w.distance, h.gesture.angle = w.angle, x.number(w.scale) && w.scale !== 1 / 0 && !isNaN(w.scale) && (h.gesture.scale = w.scale);
        }
      }
      var Gn = { id: "actions/gesture", before: ["actions/drag", "actions/resize"], install: function(g) {
        var h = g.actions, w = g.Interactable, T = g.defaults;
        w.prototype.gesturable = function(_) {
          return x.object(_) ? (this.options.gesture.enabled = _.enabled !== !1, this.setPerAction("gesture", _), this.setOnEvents("gesture", _), this) : x.bool(_) ? (this.options.gesture.enabled = _, this) : this.options.gesture;
        }, h.map.gesture = Gn, h.methodDict.gesture = "gesturable", T.actions.gesture = Gn.defaults;
      }, listeners: { "interactions:action-start": bn, "interactions:action-move": bn, "interactions:action-end": bn, "interactions:new": function(g) {
        g.interaction.gesture = { angle: 0, distance: 0, scale: 1, startAngle: 0, startDistance: 0 };
      }, "auto-start:check": function(g) {
        if (!(g.interaction.pointers.length < 2)) {
          var h = g.interactable.options.gesture;
          if (h && h.enabled) return g.action = { name: "gesture" }, !1;
        }
      } }, defaults: {}, getCursor: function() {
        return "";
      }, filterEventType: function(g) {
        return g.search("gesture") === 0;
      } }, Fo = Gn;
      function gi(g, h, w, T, _, F, q) {
        if (!h) return !1;
        if (h === !0) {
          var X = x.number(F.width) ? F.width : F.right - F.left, oe = x.number(F.height) ? F.height : F.bottom - F.top;
          if (q = Math.min(q, Math.abs((g === "left" || g === "right" ? X : oe) / 2)), X < 0 && (g === "left" ? g = "right" : g === "right" && (g = "left")), oe < 0 && (g === "top" ? g = "bottom" : g === "bottom" && (g = "top")), g === "left") {
            var me = X >= 0 ? F.left : F.right;
            return w.x < me + q;
          }
          if (g === "top") {
            var ie = oe >= 0 ? F.top : F.bottom;
            return w.y < ie + q;
          }
          if (g === "right") return w.x > (X >= 0 ? F.right : F.left) - q;
          if (g === "bottom") return w.y > (oe >= 0 ? F.bottom : F.top) - q;
        }
        return !!x.element(T) && (x.element(h) ? h === T : be(T, h, _));
      }
      function ze(g) {
        var h = g.iEvent, w = g.interaction;
        if (w.prepared.name === "resize" && w.resizeAxes) {
          var T = h;
          w.interactable.options.resize.square ? (w.resizeAxes === "y" ? T.delta.x = T.delta.y : T.delta.y = T.delta.x, T.axes = "xy") : (T.axes = w.resizeAxes, w.resizeAxes === "x" ? T.delta.y = 0 : w.resizeAxes === "y" && (T.delta.x = 0));
        }
      }
      var nt, tt, zt = { id: "actions/resize", before: ["actions/drag"], install: function(g) {
        var h = g.actions, w = g.browser, T = g.Interactable, _ = g.defaults;
        zt.cursors = (function(F) {
          return F.isIe9 ? { x: "e-resize", y: "s-resize", xy: "se-resize", top: "n-resize", left: "w-resize", bottom: "s-resize", right: "e-resize", topleft: "se-resize", bottomright: "se-resize", topright: "ne-resize", bottomleft: "ne-resize" } : { x: "ew-resize", y: "ns-resize", xy: "nwse-resize", top: "ns-resize", left: "ew-resize", bottom: "ns-resize", right: "ew-resize", topleft: "nwse-resize", bottomright: "nwse-resize", topright: "nesw-resize", bottomleft: "nesw-resize" };
        })(w), zt.defaultMargin = w.supportsTouch || w.supportsPointerEvent ? 20 : 10, T.prototype.resizable = function(F) {
          return (function(q, X, oe) {
            return x.object(X) ? (q.options.resize.enabled = X.enabled !== !1, q.setPerAction("resize", X), q.setOnEvents("resize", X), x.string(X.axis) && /^x$|^y$|^xy$/.test(X.axis) ? q.options.resize.axis = X.axis : X.axis === null && (q.options.resize.axis = oe.defaults.actions.resize.axis), x.bool(X.preserveAspectRatio) ? q.options.resize.preserveAspectRatio = X.preserveAspectRatio : x.bool(X.square) && (q.options.resize.square = X.square), q) : x.bool(X) ? (q.options.resize.enabled = X, q) : q.options.resize;
          })(this, F, g);
        }, h.map.resize = zt, h.methodDict.resize = "resizable", _.actions.resize = zt.defaults;
      }, listeners: { "interactions:new": function(g) {
        g.interaction.resizeAxes = "xy";
      }, "interactions:action-start": function(g) {
        (function(h) {
          var w = h.iEvent, T = h.interaction;
          if (T.prepared.name === "resize" && T.prepared.edges) {
            var _ = w, F = T.rect;
            T._rects = { start: ae({}, F), corrected: ae({}, F), previous: ae({}, F), delta: { left: 0, right: 0, width: 0, top: 0, bottom: 0, height: 0 } }, _.edges = T.prepared.edges, _.rect = T._rects.corrected, _.deltaRect = T._rects.delta;
          }
        })(g), ze(g);
      }, "interactions:action-move": function(g) {
        (function(h) {
          var w = h.iEvent, T = h.interaction;
          if (T.prepared.name === "resize" && T.prepared.edges) {
            var _ = w, F = T.interactable.options.resize.invert, q = F === "reposition" || F === "negate", X = T.rect, oe = T._rects, me = oe.start, ie = oe.corrected, Se = oe.delta, $e = oe.previous;
            if (ae($e, ie), q) {
              if (ae(ie, X), F === "reposition") {
                if (ie.top > ie.bottom) {
                  var _e = ie.top;
                  ie.top = ie.bottom, ie.bottom = _e;
                }
                if (ie.left > ie.right) {
                  var Ae = ie.left;
                  ie.left = ie.right, ie.right = Ae;
                }
              }
            } else ie.top = Math.min(X.top, me.bottom), ie.bottom = Math.max(X.bottom, me.top), ie.left = Math.min(X.left, me.right), ie.right = Math.max(X.right, me.left);
            for (var Be in ie.width = ie.right - ie.left, ie.height = ie.bottom - ie.top, ie) Se[Be] = ie[Be] - $e[Be];
            _.edges = T.prepared.edges, _.rect = ie, _.deltaRect = Se;
          }
        })(g), ze(g);
      }, "interactions:action-end": function(g) {
        var h = g.iEvent, w = g.interaction;
        if (w.prepared.name === "resize" && w.prepared.edges) {
          var T = h;
          T.edges = w.prepared.edges, T.rect = w._rects.corrected, T.deltaRect = w._rects.delta;
        }
      }, "auto-start:check": function(g) {
        var h = g.interaction, w = g.interactable, T = g.element, _ = g.rect, F = g.buttons;
        if (_) {
          var q = ae({}, h.coords.cur.page), X = w.options.resize;
          if (X && X.enabled && (!h.pointerIsDown || !/mouse|pointer/.test(h.pointerType) || (F & X.mouseButtons) != 0)) {
            if (x.object(X.edges)) {
              var oe = { left: !1, right: !1, top: !1, bottom: !1 };
              for (var me in oe) oe[me] = gi(me, X.edges[me], q, h._latestPointer.eventTarget, T, _, X.margin || zt.defaultMargin);
              oe.left = oe.left && !oe.right, oe.top = oe.top && !oe.bottom, (oe.left || oe.right || oe.top || oe.bottom) && (g.action = { name: "resize", edges: oe });
            } else {
              var ie = X.axis !== "y" && q.x > _.right - zt.defaultMargin, Se = X.axis !== "x" && q.y > _.bottom - zt.defaultMargin;
              (ie || Se) && (g.action = { name: "resize", axes: (ie ? "x" : "") + (Se ? "y" : "") });
            }
            return !g.action && void 0;
          }
        }
      } }, defaults: { square: !1, preserveAspectRatio: !1, axis: "xy", margin: NaN, edges: null, invert: "none" }, cursors: null, getCursor: function(g) {
        var h = g.edges, w = g.axis, T = g.name, _ = zt.cursors, F = null;
        if (w) F = _[T + w];
        else if (h) {
          for (var q = "", X = 0, oe = ["top", "bottom", "left", "right"]; X < oe.length; X++) {
            var me = oe[X];
            h[me] && (q += me);
          }
          F = _[q];
        }
        return F;
      }, filterEventType: function(g) {
        return g.search("resize") === 0;
      }, defaultMargin: null }, Vn = zt, Rn = { id: "actions", install: function(g) {
        g.usePlugin(Fo), g.usePlugin(Vn), g.usePlugin(D), g.usePlugin(qn);
      } }, go = 0, Jt = { request: function(g) {
        return nt(g);
      }, cancel: function(g) {
        return tt(g);
      }, init: function(g) {
        if (nt = g.requestAnimationFrame, tt = g.cancelAnimationFrame, !nt) for (var h = ["ms", "moz", "webkit", "o"], w = 0; w < h.length; w++) {
          var T = h[w];
          nt = g["".concat(T, "RequestAnimationFrame")], tt = g["".concat(T, "CancelAnimationFrame")] || g["".concat(T, "CancelRequestAnimationFrame")];
        }
        nt = nt && nt.bind(g), tt = tt && tt.bind(g), nt || (nt = function(_) {
          var F = Date.now(), q = Math.max(0, 16 - (F - go)), X = g.setTimeout((function() {
            _(F + q);
          }), q);
          return go = F + q, X;
        }, tt = function(_) {
          return clearTimeout(_);
        });
      } }, ht = { defaults: { enabled: !1, margin: 60, container: null, speed: 300 }, now: Date.now, interaction: null, i: 0, x: 0, y: 0, isScrolling: !1, prevTime: 0, margin: 0, speed: 0, start: function(g) {
        ht.isScrolling = !0, Jt.cancel(ht.i), g.autoScroll = ht, ht.interaction = g, ht.prevTime = ht.now(), ht.i = Jt.request(ht.scroll);
      }, stop: function() {
        ht.isScrolling = !1, ht.interaction && (ht.interaction.autoScroll = null), Jt.cancel(ht.i);
      }, scroll: function() {
        var g = ht.interaction, h = g.interactable, w = g.element, T = g.prepared.name, _ = h.options[T].autoScroll, F = Jn(_.container, h, w), q = ht.now(), X = (q - ht.prevTime) / 1e3, oe = _.speed * X;
        if (oe >= 1) {
          var me = { x: ht.x * oe, y: ht.y * oe };
          if (me.x || me.y) {
            var ie = $o(F);
            x.window(F) ? F.scrollBy(me.x, me.y) : F && (F.scrollLeft += me.x, F.scrollTop += me.y);
            var Se = $o(F), $e = { x: Se.x - ie.x, y: Se.y - ie.y };
            ($e.x || $e.y) && h.fire({ type: "autoscroll", target: w, interactable: h, delta: $e, interaction: g, container: F });
          }
          ht.prevTime = q;
        }
        ht.isScrolling && (Jt.cancel(ht.i), ht.i = Jt.request(ht.scroll));
      }, check: function(g, h) {
        var w;
        return (w = g.options[h].autoScroll) == null ? void 0 : w.enabled;
      }, onInteractionMove: function(g) {
        var h = g.interaction, w = g.pointer;
        if (h.interacting() && ht.check(h.interactable, h.prepared.name)) if (h.simulation) ht.x = ht.y = 0;
        else {
          var T, _, F, q, X = h.interactable, oe = h.element, me = h.prepared.name, ie = X.options[me].autoScroll, Se = Jn(ie.container, X, oe);
          if (x.window(Se)) q = w.clientX < ht.margin, T = w.clientY < ht.margin, _ = w.clientX > Se.innerWidth - ht.margin, F = w.clientY > Se.innerHeight - ht.margin;
          else {
            var $e = ge(Se);
            q = w.clientX < $e.left + ht.margin, T = w.clientY < $e.top + ht.margin, _ = w.clientX > $e.right - ht.margin, F = w.clientY > $e.bottom - ht.margin;
          }
          ht.x = _ ? 1 : q ? -1 : 0, ht.y = F ? 1 : T ? -1 : 0, ht.isScrolling || (ht.margin = ie.margin, ht.speed = ie.speed, ht.start(h));
        }
      } };
      function Jn(g, h, w) {
        return (x.string(g) ? se(g, h, w) : g) || $(w);
      }
      function $o(g) {
        return x.window(g) && (g = window.document.body), { x: g.scrollLeft, y: g.scrollTop };
      }
      var an = { id: "auto-scroll", install: function(g) {
        var h = g.defaults, w = g.actions;
        g.autoScroll = ht, ht.now = function() {
          return g.now();
        }, w.phaselessTypes.autoscroll = !0, h.perAction.autoScroll = ht.defaults;
      }, listeners: { "interactions:new": function(g) {
        g.interaction.autoScroll = null;
      }, "interactions:destroy": function(g) {
        g.interaction.autoScroll = null, ht.stop(), ht.interaction && (ht.interaction = null);
      }, "interactions:stop": ht.stop, "interactions:action-move": function(g) {
        return ht.onInteractionMove(g);
      } } }, ln = an;
      function Ht(g, h) {
        var w = !1;
        return function() {
          return w || (C.console.warn(h), w = !0), g.apply(this, arguments);
        };
      }
      function sn(g, h) {
        return g.name = h.name, g.axis = h.axis, g.edges = h.edges, g;
      }
      function Io(g) {
        return x.bool(g) ? (this.options.styleCursor = g, this) : g === null ? (delete this.options.styleCursor, this) : this.options.styleCursor;
      }
      function kn(g) {
        return x.func(g) ? (this.options.actionChecker = g, this) : g === null ? (delete this.options.actionChecker, this) : this.options.actionChecker;
      }
      var Ho = { id: "auto-start/interactableMethods", install: function(g) {
        var h = g.Interactable;
        h.prototype.getAction = function(w, T, _, F) {
          var q = (function(X, oe, me, ie, Se) {
            var $e = X.getRect(ie), _e = oe.buttons || { 0: 1, 1: 4, 3: 8, 4: 16 }[oe.button], Ae = { action: null, interactable: X, interaction: me, element: ie, rect: $e, buttons: _e };
            return Se.fire("auto-start:check", Ae), Ae.action;
          })(this, T, _, F, g);
          return this.options.actionChecker ? this.options.actionChecker(w, T, q, this, F, _) : q;
        }, h.prototype.ignoreFrom = Ht((function(w) {
          return this._backCompatOption("ignoreFrom", w);
        }), "Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."), h.prototype.allowFrom = Ht((function(w) {
          return this._backCompatOption("allowFrom", w);
        }), "Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."), h.prototype.actionChecker = kn, h.prototype.styleCursor = Io;
      } };
      function ho(g, h, w, T, _) {
        return h.testIgnoreAllow(h.options[g.name], w, T) && h.options[g.name].enabled && tr(h, w, g, _) ? g : null;
      }
      function $r(g, h, w, T, _, F, q) {
        for (var X = 0, oe = T.length; X < oe; X++) {
          var me = T[X], ie = _[X], Se = me.getAction(h, w, g, ie);
          if (Se) {
            var $e = ho(Se, me, ie, F, q);
            if ($e) return { action: $e, interactable: me, element: ie };
          }
        }
        return { action: null, interactable: null, element: null };
      }
      function Pr(g, h, w, T, _) {
        var F = [], q = [], X = T;
        function oe(ie) {
          F.push(ie), q.push(X);
        }
        for (; x.element(X); ) {
          F = [], q = [], _.interactables.forEachMatch(X, oe);
          var me = $r(g, h, w, F, q, T, _);
          if (me.action && !me.interactable.options[me.action.name].manualStart) return me;
          X = G(X);
        }
        return { action: null, interactable: null, element: null };
      }
      function _i(g, h, w) {
        var T = h.action, _ = h.interactable, F = h.element;
        T = T || { name: null }, g.interactable = _, g.element = F, sn(g.prepared, T), g.rect = _ && T.name ? _.getRect(F) : null, Qr(g, w), w.fire("autoStart:prepared", { interaction: g });
      }
      function tr(g, h, w, T) {
        var _ = g.options, F = _[w.name].max, q = _[w.name].maxPerElement, X = T.autoStart.maxInteractions, oe = 0, me = 0, ie = 0;
        if (!(F && q && X)) return !1;
        for (var Se = 0, $e = T.interactions.list; Se < $e.length; Se++) {
          var _e = $e[Se], Ae = _e.prepared.name;
          if (_e.interacting() && (++oe >= X || _e.interactable === g && ((me += Ae === w.name ? 1 : 0) >= F || _e.element === h && (ie++, Ae === w.name && ie >= q))))
            return !1;
        }
        return X > 0;
      }
      function Xr(g, h) {
        return x.number(g) ? (h.autoStart.maxInteractions = g, this) : h.autoStart.maxInteractions;
      }
      function nr(g, h, w) {
        var T = w.autoStart.cursorElement;
        T && T !== g && (T.style.cursor = ""), g.ownerDocument.documentElement.style.cursor = h, g.style.cursor = h, w.autoStart.cursorElement = h ? g : null;
      }
      function Qr(g, h) {
        var w = g.interactable, T = g.element, _ = g.prepared;
        if (g.pointerType === "mouse" && w && w.options.styleCursor) {
          var F = "";
          if (_.name) {
            var q = w.options[_.name].cursorChecker;
            F = x.func(q) ? q(_, w, T, g._interacting) : h.actions.map[_.name].getCursor(_);
          }
          nr(g.element, F || "", h);
        } else h.autoStart.cursorElement && nr(h.autoStart.cursorElement, "", h);
      }
      var Ai = { id: "auto-start/base", before: ["actions"], install: function(g) {
        var h = g.interactStatic, w = g.defaults;
        g.usePlugin(Ho), w.base.actionChecker = null, w.base.styleCursor = !0, ae(w.perAction, { manualStart: !1, max: 1 / 0, maxPerElement: 1, allowFrom: null, ignoreFrom: null, mouseButtons: 1 }), h.maxInteractions = function(T) {
          return Xr(T, g);
        }, g.autoStart = { maxInteractions: 1 / 0, withinInteractionLimit: tr, cursorElement: null };
      }, listeners: { "interactions:down": function(g, h) {
        var w = g.interaction, T = g.pointer, _ = g.event, F = g.eventTarget;
        w.interacting() || _i(w, Pr(w, T, _, F, h), h);
      }, "interactions:move": function(g, h) {
        (function(w, T) {
          var _ = w.interaction, F = w.pointer, q = w.event, X = w.eventTarget;
          _.pointerType !== "mouse" || _.pointerIsDown || _.interacting() || _i(_, Pr(_, F, q, X, T), T);
        })(g, h), (function(w, T) {
          var _ = w.interaction;
          if (_.pointerIsDown && !_.interacting() && _.pointerWasMoved && _.prepared.name) {
            T.fire("autoStart:before-start", w);
            var F = _.interactable, q = _.prepared.name;
            q && F && (F.options[q].manualStart || !tr(F, _.element, _.prepared, T) ? _.stop() : (_.start(_.prepared, F, _.element), Qr(_, T)));
          }
        })(g, h);
      }, "interactions:stop": function(g, h) {
        var w = g.interaction, T = w.interactable;
        T && T.options.styleCursor && nr(w.element, "", h);
      } }, maxInteractions: Xr, withinInteractionLimit: tr, validateAction: ho }, or = Ai, Na = { id: "auto-start/dragAxis", listeners: { "autoStart:before-start": function(g, h) {
        var w = g.interaction, T = g.eventTarget, _ = g.dx, F = g.dy;
        if (w.prepared.name === "drag") {
          var q = Math.abs(_), X = Math.abs(F), oe = w.interactable.options.drag, me = oe.startAxis, ie = q > X ? "x" : q < X ? "y" : "xy";
          if (w.prepared.axis = oe.lockAxis === "start" ? ie[0] : oe.lockAxis, ie !== "xy" && me !== "xy" && me !== ie) {
            w.prepared.name = null;
            for (var Se = T, $e = function(Ae) {
              if (Ae !== w.interactable) {
                var Be = w.interactable.options.drag;
                if (!Be.manualStart && Ae.testIgnoreAllow(Be, Se, T)) {
                  var Ye = Ae.getAction(w.downPointer, w.downEvent, w, Se);
                  if (Ye && Ye.name === "drag" && (function(Ue, at) {
                    if (!at) return !1;
                    var mt = at.options.drag.startAxis;
                    return Ue === "xy" || mt === "xy" || mt === Ue;
                  })(ie, Ae) && or.validateAction(Ye, Ae, Se, T, h)) return Ae;
                }
              }
            }; x.element(Se); ) {
              var _e = h.interactables.forEachMatch(Se, $e);
              if (_e) {
                w.prepared.name = "drag", w.interactable = _e, w.element = Se;
                break;
              }
              Se = G(Se);
            }
          }
        }
      } } };
      function Mo(g) {
        var h = g.prepared && g.prepared.name;
        if (!h) return null;
        var w = g.interactable.options;
        return w[h].hold || w[h].delay;
      }
      var El = { id: "auto-start/hold", install: function(g) {
        var h = g.defaults;
        g.usePlugin(or), h.perAction.hold = 0, h.perAction.delay = 0;
      }, listeners: { "interactions:new": function(g) {
        g.interaction.autoStartHoldTimer = null;
      }, "autoStart:prepared": function(g) {
        var h = g.interaction, w = Mo(h);
        w > 0 && (h.autoStartHoldTimer = setTimeout((function() {
          h.start(h.prepared, h.interactable, h.element);
        }), w));
      }, "interactions:move": function(g) {
        var h = g.interaction, w = g.duplicate;
        h.autoStartHoldTimer && h.pointerWasMoved && !w && (clearTimeout(h.autoStartHoldTimer), h.autoStartHoldTimer = null);
      }, "autoStart:before-start": function(g) {
        var h = g.interaction;
        Mo(h) > 0 && (h.prepared.name = null);
      } }, getHoldDuration: Mo }, Ba = El, Zr = { id: "auto-start", install: function(g) {
        g.usePlugin(or), g.usePlugin(Ba), g.usePlugin(Na);
      } }, La = function(g) {
        return /^(always|never|auto)$/.test(g) ? (this.options.preventDefault = g, this) : x.bool(g) ? (this.options.preventDefault = g ? "always" : "never", this) : this.options.preventDefault;
      };
      function Fa(g) {
        var h = g.interaction, w = g.event;
        h.interactable && h.interactable.checkAndPreventDefault(w);
      }
      var Jr = { id: "core/interactablePreventDefault", install: function(g) {
        var h = g.Interactable;
        h.prototype.preventDefault = La, h.prototype.checkAndPreventDefault = function(w) {
          return (function(T, _, F) {
            var q = T.options.preventDefault;
            if (q !== "never") if (q !== "always") {
              if (_.events.supportsPassive && /^touch(start|move)$/.test(F.type)) {
                var X = $(F.target).document, oe = _.getDocOptions(X);
                if (!oe || !oe.events || oe.events.passive !== !1) return;
              }
              /^(mouse|pointer|touch)*(down|start)/i.test(F.type) || x.element(F.target) && Y(F.target, "input,select,textarea,[contenteditable=true],[contenteditable=true] *") || F.preventDefault();
            } else F.preventDefault();
          })(this, g, w);
        }, g.interactions.docEvents.push({ type: "dragstart", listener: function(w) {
          for (var T = 0, _ = g.interactions.list; T < _.length; T++) {
            var F = _[T];
            if (F.element && (F.element === w.target || j(F.element, w.target))) return void F.interactable.checkAndPreventDefault(w);
          }
        } });
      }, listeners: ["down", "move", "up", "cancel"].reduce((function(g, h) {
        return g["interactions:".concat(h)] = Fa, g;
      }), {}) };
      function ea(g, h) {
        if (h.phaselessTypes[g]) return !0;
        for (var w in h.map) if (g.indexOf(w) === 0 && g.substr(w.length) in h.phases) return !0;
        return !1;
      }
      function Nn(g) {
        var h = {};
        for (var w in g) {
          var T = g[w];
          x.plainObject(T) ? h[w] = Nn(T) : x.array(T) ? h[w] = zn(T) : h[w] = T;
        }
        return h;
      }
      var To = (function() {
        function g(h) {
          r(this, g), this.states = [], this.startOffset = { left: 0, right: 0, top: 0, bottom: 0 }, this.startDelta = void 0, this.result = void 0, this.endResult = void 0, this.startEdges = void 0, this.edges = void 0, this.interaction = void 0, this.interaction = h, this.result = Or(), this.edges = { left: !1, right: !1, top: !1, bottom: !1 };
        }
        return l(g, [{ key: "start", value: function(h, w) {
          var T, _, F = h.phase, q = this.interaction, X = (function(me) {
            var ie = me.interactable.options[me.prepared.name], Se = ie.modifiers;
            return Se && Se.length ? Se : ["snap", "snapSize", "snapEdges", "restrict", "restrictEdges", "restrictSize"].map((function($e) {
              var _e = ie[$e];
              return _e && _e.enabled && { options: _e, methods: _e._methods };
            })).filter((function($e) {
              return !!$e;
            }));
          })(q);
          this.prepareStates(X), this.startEdges = ae({}, q.edges), this.edges = ae({}, this.startEdges), this.startOffset = (T = q.rect, _ = w, T ? { left: _.x - T.left, top: _.y - T.top, right: T.right - _.x, bottom: T.bottom - _.y } : { left: 0, top: 0, right: 0, bottom: 0 }), this.startDelta = { x: 0, y: 0 };
          var oe = this.fillArg({ phase: F, pageCoords: w, preEnd: !1 });
          return this.result = Or(), this.startAll(oe), this.result = this.setAll(oe);
        } }, { key: "fillArg", value: function(h) {
          var w = this.interaction;
          return h.interaction = w, h.interactable = w.interactable, h.element = w.element, h.rect || (h.rect = w.rect), h.edges || (h.edges = this.startEdges), h.startOffset = this.startOffset, h;
        } }, { key: "startAll", value: function(h) {
          for (var w = 0, T = this.states; w < T.length; w++) {
            var _ = T[w];
            _.methods.start && (h.state = _, _.methods.start(h));
          }
        } }, { key: "setAll", value: function(h) {
          var w = h.phase, T = h.preEnd, _ = h.skipModifiers, F = h.rect, q = h.edges;
          h.coords = ae({}, h.pageCoords), h.rect = ae({}, F), h.edges = ae({}, q);
          for (var X = _ ? this.states.slice(_) : this.states, oe = Or(h.coords, h.rect), me = 0; me < X.length; me++) {
            var ie, Se = X[me], $e = Se.options, _e = ae({}, h.coords), Ae = null;
            (ie = Se.methods) != null && ie.set && this.shouldDo($e, T, w) && (h.state = Se, Ae = Se.methods.set(h), Le(h.edges, h.rect, { x: h.coords.x - _e.x, y: h.coords.y - _e.y })), oe.eventProps.push(Ae);
          }
          ae(this.edges, h.edges), oe.delta.x = h.coords.x - h.pageCoords.x, oe.delta.y = h.coords.y - h.pageCoords.y, oe.rectDelta.left = h.rect.left - F.left, oe.rectDelta.right = h.rect.right - F.right, oe.rectDelta.top = h.rect.top - F.top, oe.rectDelta.bottom = h.rect.bottom - F.bottom;
          var Be = this.result.coords, Ye = this.result.rect;
          if (Be && Ye) {
            var Ue = oe.rect.left !== Ye.left || oe.rect.right !== Ye.right || oe.rect.top !== Ye.top || oe.rect.bottom !== Ye.bottom;
            oe.changed = Ue || Be.x !== oe.coords.x || Be.y !== oe.coords.y;
          }
          return oe;
        } }, { key: "applyToInteraction", value: function(h) {
          var w = this.interaction, T = h.phase, _ = w.coords.cur, F = w.coords.start, q = this.result, X = this.startDelta, oe = q.delta;
          T === "start" && ae(this.startDelta, q.delta);
          for (var me = 0, ie = [[F, X], [_, oe]]; me < ie.length; me++) {
            var Se = ie[me], $e = Se[0], _e = Se[1];
            $e.page.x += _e.x, $e.page.y += _e.y, $e.client.x += _e.x, $e.client.y += _e.y;
          }
          var Ae = this.result.rectDelta, Be = h.rect || w.rect;
          Be.left += Ae.left, Be.right += Ae.right, Be.top += Ae.top, Be.bottom += Ae.bottom, Be.width = Be.right - Be.left, Be.height = Be.bottom - Be.top;
        } }, { key: "setAndApply", value: function(h) {
          var w = this.interaction, T = h.phase, _ = h.preEnd, F = h.skipModifiers, q = this.setAll(this.fillArg({ preEnd: _, phase: T, pageCoords: h.modifiedCoords || w.coords.cur.page }));
          if (this.result = q, !q.changed && (!F || F < this.states.length) && w.interacting()) return !1;
          if (h.modifiedCoords) {
            var X = w.coords.cur.page, oe = { x: h.modifiedCoords.x - X.x, y: h.modifiedCoords.y - X.y };
            q.coords.x += oe.x, q.coords.y += oe.y, q.delta.x += oe.x, q.delta.y += oe.y;
          }
          this.applyToInteraction(h);
        } }, { key: "beforeEnd", value: function(h) {
          var w = h.interaction, T = h.event, _ = this.states;
          if (_ && _.length) {
            for (var F = !1, q = 0; q < _.length; q++) {
              var X = _[q];
              h.state = X;
              var oe = X.options, me = X.methods, ie = me.beforeEnd && me.beforeEnd(h);
              if (ie) return this.endResult = ie, !1;
              F = F || !F && this.shouldDo(oe, !0, h.phase, !0);
            }
            F && w.move({ event: T, preEnd: !0 });
          }
        } }, { key: "stop", value: function(h) {
          var w = h.interaction;
          if (this.states && this.states.length) {
            var T = ae({ states: this.states, interactable: w.interactable, element: w.element, rect: null }, h);
            this.fillArg(T);
            for (var _ = 0, F = this.states; _ < F.length; _++) {
              var q = F[_];
              T.state = q, q.methods.stop && q.methods.stop(T);
            }
            this.states = null, this.endResult = null;
          }
        } }, { key: "prepareStates", value: function(h) {
          this.states = [];
          for (var w = 0; w < h.length; w++) {
            var T = h[w], _ = T.options, F = T.methods, q = T.name;
            this.states.push({ options: _, methods: F, index: w, name: q });
          }
          return this.states;
        } }, { key: "restoreInteractionCoords", value: function(h) {
          var w = h.interaction, T = w.coords, _ = w.rect, F = w.modification;
          if (F.result) {
            for (var q = F.startDelta, X = F.result, oe = X.delta, me = X.rectDelta, ie = 0, Se = [[T.start, q], [T.cur, oe]]; ie < Se.length; ie++) {
              var $e = Se[ie], _e = $e[0], Ae = $e[1];
              _e.page.x -= Ae.x, _e.page.y -= Ae.y, _e.client.x -= Ae.x, _e.client.y -= Ae.y;
            }
            _.left -= me.left, _.right -= me.right, _.top -= me.top, _.bottom -= me.bottom;
          }
        } }, { key: "shouldDo", value: function(h, w, T, _) {
          return !(!h || h.enabled === !1 || _ && !h.endOnly || h.endOnly && !w || T === "start" && !h.setStart);
        } }, { key: "copyFrom", value: function(h) {
          this.startOffset = h.startOffset, this.startDelta = h.startDelta, this.startEdges = h.startEdges, this.edges = h.edges, this.states = h.states.map((function(w) {
            return Nn(w);
          })), this.result = Or(ae({}, h.result.coords), ae({}, h.result.rect));
        } }, { key: "destroy", value: function() {
          for (var h in this) this[h] = null;
        } }]), g;
      })();
      function Or(g, h) {
        return { rect: h, coords: g, delta: { x: 0, y: 0 }, rectDelta: { left: 0, right: 0, top: 0, bottom: 0 }, eventProps: [], changed: !0 };
      }
      function ko(g, h) {
        var w = g.defaults, T = { start: g.start, set: g.set, beforeEnd: g.beforeEnd, stop: g.stop }, _ = function(F) {
          var q = F || {};
          for (var X in q.enabled = q.enabled !== !1, w) X in q || (q[X] = w[X]);
          var oe = { options: q, methods: T, name: h, enable: function() {
            return q.enabled = !0, oe;
          }, disable: function() {
            return q.enabled = !1, oe;
          } };
          return oe;
        };
        return h && typeof h == "string" && (_._defaults = w, _._methods = T), _;
      }
      function co(g) {
        var h = g.iEvent, w = g.interaction.modification.result;
        w && (h.modifiers = w.eventProps);
      }
      var ta = { id: "modifiers/base", before: ["actions"], install: function(g) {
        g.defaults.perAction.modifiers = [];
      }, listeners: { "interactions:new": function(g) {
        var h = g.interaction;
        h.modification = new To(h);
      }, "interactions:before-action-start": function(g) {
        var h = g.interaction, w = g.interaction.modification;
        w.start(g, h.coords.start.page), h.edges = w.edges, w.applyToInteraction(g);
      }, "interactions:before-action-move": function(g) {
        var h = g.interaction, w = h.modification, T = w.setAndApply(g);
        return h.edges = w.edges, T;
      }, "interactions:before-action-end": function(g) {
        var h = g.interaction, w = h.modification, T = w.beforeEnd(g);
        return h.edges = w.startEdges, T;
      }, "interactions:action-start": co, "interactions:action-move": co, "interactions:action-end": co, "interactions:after-action-start": function(g) {
        return g.interaction.modification.restoreInteractionCoords(g);
      }, "interactions:after-action-move": function(g) {
        return g.interaction.modification.restoreInteractionCoords(g);
      }, "interactions:stop": function(g) {
        return g.interaction.modification.stop(g);
      } } }, na = ta, oa = { base: { preventDefault: "auto", deltaSource: "page" }, perAction: { enabled: !1, origin: { x: 0, y: 0 } }, actions: {} }, ir = (function(g) {
        u(w, g);
        var h = p(w);
        function w(T, _, F, q, X, oe, me) {
          var ie;
          r(this, w), (ie = h.call(this, T)).relatedTarget = null, ie.screenX = void 0, ie.screenY = void 0, ie.button = void 0, ie.buttons = void 0, ie.ctrlKey = void 0, ie.shiftKey = void 0, ie.altKey = void 0, ie.metaKey = void 0, ie.page = void 0, ie.client = void 0, ie.delta = void 0, ie.rect = void 0, ie.x0 = void 0, ie.y0 = void 0, ie.t0 = void 0, ie.dt = void 0, ie.duration = void 0, ie.clientX0 = void 0, ie.clientY0 = void 0, ie.velocity = void 0, ie.speed = void 0, ie.swipe = void 0, ie.axes = void 0, ie.preEnd = void 0, X = X || T.element;
          var Se = T.interactable, $e = (Se && Se.options || oa).deltaSource, _e = Re(Se, X, F), Ae = q === "start", Be = q === "end", Ye = Ae ? f(ie) : T.prevEvent, Ue = Ae ? T.coords.start : Be ? { page: Ye.page, client: Ye.client, timeStamp: T.coords.cur.timeStamp } : T.coords.cur;
          return ie.page = ae({}, Ue.page), ie.client = ae({}, Ue.client), ie.rect = ae({}, T.rect), ie.timeStamp = Ue.timeStamp, Be || (ie.page.x -= _e.x, ie.page.y -= _e.y, ie.client.x -= _e.x, ie.client.y -= _e.y), ie.ctrlKey = _.ctrlKey, ie.altKey = _.altKey, ie.shiftKey = _.shiftKey, ie.metaKey = _.metaKey, ie.button = _.button, ie.buttons = _.buttons, ie.target = X, ie.currentTarget = X, ie.preEnd = oe, ie.type = me || F + (q || ""), ie.interactable = Se, ie.t0 = Ae ? T.pointers[T.pointers.length - 1].downTime : Ye.t0, ie.x0 = T.coords.start.page.x - _e.x, ie.y0 = T.coords.start.page.y - _e.y, ie.clientX0 = T.coords.start.client.x - _e.x, ie.clientY0 = T.coords.start.client.y - _e.y, ie.delta = Ae || Be ? { x: 0, y: 0 } : { x: ie[$e].x - Ye[$e].x, y: ie[$e].y - Ye[$e].y }, ie.dt = T.coords.delta.timeStamp, ie.duration = ie.timeStamp - ie.t0, ie.velocity = ae({}, T.coords.velocity[$e]), ie.speed = Fe(ie.velocity.x, ie.velocity.y), ie.swipe = Be || q === "inertiastart" ? ie.getSwipe() : null, ie;
        }
        return l(w, [{ key: "getSwipe", value: function() {
          var T = this._interaction;
          if (T.prevEvent.speed < 600 || this.timeStamp - T.prevEvent.timeStamp > 150) return null;
          var _ = 180 * Math.atan2(T.prevEvent.velocityY, T.prevEvent.velocityX) / Math.PI;
          _ < 0 && (_ += 360);
          var F = 112.5 <= _ && _ < 247.5, q = 202.5 <= _ && _ < 337.5;
          return { up: q, down: !q && 22.5 <= _ && _ < 157.5, left: F, right: !F && (292.5 <= _ || _ < 67.5), angle: _, speed: T.prevEvent.speed, velocity: { x: T.prevEvent.velocityX, y: T.prevEvent.velocityY } };
        } }, { key: "preventDefault", value: function() {
        } }, { key: "stopImmediatePropagation", value: function() {
          this.immediatePropagationStopped = this.propagationStopped = !0;
        } }, { key: "stopPropagation", value: function() {
          this.propagationStopped = !0;
        } }]), w;
      })(vn);
      Object.defineProperties(ir.prototype, { pageX: { get: function() {
        return this.page.x;
      }, set: function(g) {
        this.page.x = g;
      } }, pageY: { get: function() {
        return this.page.y;
      }, set: function(g) {
        this.page.y = g;
      } }, clientX: { get: function() {
        return this.client.x;
      }, set: function(g) {
        this.client.x = g;
      } }, clientY: { get: function() {
        return this.client.y;
      }, set: function(g) {
        this.client.y = g;
      } }, dx: { get: function() {
        return this.delta.x;
      }, set: function(g) {
        this.delta.x = g;
      } }, dy: { get: function() {
        return this.delta.y;
      }, set: function(g) {
        this.delta.y = g;
      } }, velocityX: { get: function() {
        return this.velocity.x;
      }, set: function(g) {
        this.velocity.x = g;
      } }, velocityY: { get: function() {
        return this.velocity.y;
      }, set: function(g) {
        this.velocity.y = g;
      } } });
      var _l = l((function g(h, w, T, _, F) {
        r(this, g), this.id = void 0, this.pointer = void 0, this.event = void 0, this.downTime = void 0, this.downTarget = void 0, this.id = h, this.pointer = w, this.event = T, this.downTime = _, this.downTarget = F;
      })), Ha = (function(g) {
        return g.interactable = "", g.element = "", g.prepared = "", g.pointerIsDown = "", g.pointerWasMoved = "", g._proxy = "", g;
      })({}), uc = (function(g) {
        return g.start = "", g.move = "", g.end = "", g.stop = "", g.interacting = "", g;
      })({}), ia = 0, Al = (function() {
        function g(h) {
          var w = this, T = h.pointerType, _ = h.scopeFire;
          r(this, g), this.interactable = null, this.element = null, this.rect = null, this._rects = void 0, this.edges = null, this._scopeFire = void 0, this.prepared = { name: null, axis: null, edges: null }, this.pointerType = void 0, this.pointers = [], this.downEvent = null, this.downPointer = {}, this._latestPointer = { pointer: null, event: null, eventTarget: null }, this.prevEvent = null, this.pointerIsDown = !1, this.pointerWasMoved = !1, this._interacting = !1, this._ending = !1, this._stopped = !0, this._proxy = void 0, this.simulation = null, this.doMove = Ht((function(ie) {
            this.move(ie);
          }), "The interaction.doMove() method has been renamed to interaction.move()"), this.coords = { start: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 }, prev: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 }, cur: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 }, delta: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 }, velocity: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 } }, this._id = ia++, this._scopeFire = _, this.pointerType = T;
          var F = this;
          this._proxy = {};
          var q = function(ie) {
            Object.defineProperty(w._proxy, ie, { get: function() {
              return F[ie];
            } });
          };
          for (var X in Ha) q(X);
          var oe = function(ie) {
            Object.defineProperty(w._proxy, ie, { value: function() {
              return F[ie].apply(F, arguments);
            } });
          };
          for (var me in uc) oe(me);
          this._scopeFire("interactions:new", { interaction: this });
        }
        return l(g, [{ key: "pointerMoveTolerance", get: function() {
          return 1;
        } }, { key: "pointerDown", value: function(h, w, T) {
          var _ = this.updatePointer(h, w, T, !0), F = this.pointers[_];
          this._scopeFire("interactions:down", { pointer: h, event: w, eventTarget: T, pointerIndex: _, pointerInfo: F, type: "down", interaction: this });
        } }, { key: "start", value: function(h, w, T) {
          return !(this.interacting() || !this.pointerIsDown || this.pointers.length < (h.name === "gesture" ? 2 : 1) || !w.options[h.name].enabled) && (sn(this.prepared, h), this.interactable = w, this.element = T, this.rect = w.getRect(T), this.edges = this.prepared.edges ? ae({}, this.prepared.edges) : { left: !0, right: !0, top: !0, bottom: !0 }, this._stopped = !1, this._interacting = this._doPhase({ interaction: this, event: this.downEvent, phase: "start" }) && !this._stopped, this._interacting);
        } }, { key: "pointerMove", value: function(h, w, T) {
          this.simulation || this.modification && this.modification.endResult || this.updatePointer(h, w, T, !1);
          var _, F, q = this.coords.cur.page.x === this.coords.prev.page.x && this.coords.cur.page.y === this.coords.prev.page.y && this.coords.cur.client.x === this.coords.prev.client.x && this.coords.cur.client.y === this.coords.prev.client.y;
          this.pointerIsDown && !this.pointerWasMoved && (_ = this.coords.cur.client.x - this.coords.start.client.x, F = this.coords.cur.client.y - this.coords.start.client.y, this.pointerWasMoved = Fe(_, F) > this.pointerMoveTolerance);
          var X, oe, me, ie = this.getPointerIndex(h), Se = { pointer: h, pointerIndex: ie, pointerInfo: this.pointers[ie], event: w, type: "move", eventTarget: T, dx: _, dy: F, duplicate: q, interaction: this };
          q || (X = this.coords.velocity, oe = this.coords.delta, me = Math.max(oe.timeStamp / 1e3, 1e-3), X.page.x = oe.page.x / me, X.page.y = oe.page.y / me, X.client.x = oe.client.x / me, X.client.y = oe.client.y / me, X.timeStamp = me), this._scopeFire("interactions:move", Se), q || this.simulation || (this.interacting() && (Se.type = null, this.move(Se)), this.pointerWasMoved && it(this.coords.prev, this.coords.cur));
        } }, { key: "move", value: function(h) {
          h && h.event || Ke(this.coords.delta), (h = ae({ pointer: this._latestPointer.pointer, event: this._latestPointer.event, eventTarget: this._latestPointer.eventTarget, interaction: this }, h || {})).phase = "move", this._doPhase(h);
        } }, { key: "pointerUp", value: function(h, w, T, _) {
          var F = this.getPointerIndex(h);
          F === -1 && (F = this.updatePointer(h, w, T, !1));
          var q = /cancel$/i.test(w.type) ? "cancel" : "up";
          this._scopeFire("interactions:".concat(q), { pointer: h, pointerIndex: F, pointerInfo: this.pointers[F], event: w, eventTarget: T, type: q, curEventTarget: _, interaction: this }), this.simulation || this.end(w), this.removePointer(h, w);
        } }, { key: "documentBlur", value: function(h) {
          this.end(h), this._scopeFire("interactions:blur", { event: h, type: "blur", interaction: this });
        } }, { key: "end", value: function(h) {
          var w;
          this._ending = !0, h = h || this._latestPointer.event, this.interacting() && (w = this._doPhase({ event: h, interaction: this, phase: "end" })), this._ending = !1, w === !0 && this.stop();
        } }, { key: "currentAction", value: function() {
          return this._interacting ? this.prepared.name : null;
        } }, { key: "interacting", value: function() {
          return this._interacting;
        } }, { key: "stop", value: function() {
          this._scopeFire("interactions:stop", { interaction: this }), this.interactable = this.element = null, this._interacting = !1, this._stopped = !0, this.prepared.name = this.prevEvent = null;
        } }, { key: "getPointerIndex", value: function(h) {
          var w = Je(h);
          return this.pointerType === "mouse" || this.pointerType === "pen" ? this.pointers.length - 1 : on(this.pointers, (function(T) {
            return T.id === w;
          }));
        } }, { key: "getPointerInfo", value: function(h) {
          return this.pointers[this.getPointerIndex(h)];
        } }, { key: "updatePointer", value: function(h, w, T, _) {
          var F, q, X, oe = Je(h), me = this.getPointerIndex(h), ie = this.pointers[me];
          return _ = _ !== !1 && (_ || /(down|start)$/i.test(w.type)), ie ? ie.pointer = h : (ie = new _l(oe, h, w, null, null), me = this.pointers.length, this.pointers.push(ie)), wt(this.coords.cur, this.pointers.map((function(Se) {
            return Se.pointer;
          })), this._now()), F = this.coords.delta, q = this.coords.prev, X = this.coords.cur, F.page.x = X.page.x - q.page.x, F.page.y = X.page.y - q.page.y, F.client.x = X.client.x - q.client.x, F.client.y = X.client.y - q.client.y, F.timeStamp = X.timeStamp - q.timeStamp, _ && (this.pointerIsDown = !0, ie.downTime = this.coords.cur.timeStamp, ie.downTarget = T, Ge(this.downPointer, h), this.interacting() || (it(this.coords.start, this.coords.cur), it(this.coords.prev, this.coords.cur), this.downEvent = w, this.pointerWasMoved = !1)), this._updateLatestPointer(h, w, T), this._scopeFire("interactions:update-pointer", { pointer: h, event: w, eventTarget: T, down: _, pointerInfo: ie, pointerIndex: me, interaction: this }), me;
        } }, { key: "removePointer", value: function(h, w) {
          var T = this.getPointerIndex(h);
          if (T !== -1) {
            var _ = this.pointers[T];
            this._scopeFire("interactions:remove-pointer", { pointer: h, event: w, eventTarget: null, pointerIndex: T, pointerInfo: _, interaction: this }), this.pointers.splice(T, 1), this.pointerIsDown = !1;
          }
        } }, { key: "_updateLatestPointer", value: function(h, w, T) {
          this._latestPointer.pointer = h, this._latestPointer.event = w, this._latestPointer.eventTarget = T;
        } }, { key: "destroy", value: function() {
          this._latestPointer.pointer = null, this._latestPointer.event = null, this._latestPointer.eventTarget = null;
        } }, { key: "_createPreparedEvent", value: function(h, w, T, _) {
          return new ir(this, h, this.prepared.name, w, this.element, T, _);
        } }, { key: "_fireEvent", value: function(h) {
          var w;
          (w = this.interactable) == null || w.fire(h), (!this.prevEvent || h.timeStamp >= this.prevEvent.timeStamp) && (this.prevEvent = h);
        } }, { key: "_doPhase", value: function(h) {
          var w = h.event, T = h.phase, _ = h.preEnd, F = h.type, q = this.rect;
          if (q && T === "move" && (Le(this.edges, q, this.coords.delta[this.interactable.options.deltaSource]), q.width = q.right - q.left, q.height = q.bottom - q.top), this._scopeFire("interactions:before-action-".concat(T), h) === !1) return !1;
          var X = h.iEvent = this._createPreparedEvent(w, T, _, F);
          return this._scopeFire("interactions:action-".concat(T), h), T === "start" && (this.prevEvent = X), this._fireEvent(X), this._scopeFire("interactions:after-action-".concat(T), h), !0;
        } }, { key: "_now", value: function() {
          return Date.now();
        } }]), g;
      })();
      function Dl(g) {
        ra(g.interaction);
      }
      function ra(g) {
        if (!(function(w) {
          return !(!w.offset.pending.x && !w.offset.pending.y);
        })(g)) return !1;
        var h = g.offset.pending;
        return rr(g.coords.cur, h), rr(g.coords.delta, h), Le(g.edges, g.rect, h), h.x = 0, h.y = 0, !0;
      }
      function jf(g) {
        var h = g.x, w = g.y;
        this.offset.pending.x += h, this.offset.pending.y += w, this.offset.total.x += h, this.offset.total.y += w;
      }
      function rr(g, h) {
        var w = g.page, T = g.client, _ = h.x, F = h.y;
        w.x += _, w.y += F, T.x += _, T.y += F;
      }
      uc.offsetBy = "";
      var Wf = { id: "offset", before: ["modifiers", "pointer-events", "actions", "inertia"], install: function(g) {
        g.Interaction.prototype.offsetBy = jf;
      }, listeners: { "interactions:new": function(g) {
        g.interaction.offset = { total: { x: 0, y: 0 }, pending: { x: 0, y: 0 } };
      }, "interactions:update-pointer": function(g) {
        return (function(h) {
          h.pointerIsDown && (rr(h.coords.cur, h.offset.total), h.offset.pending.x = 0, h.offset.pending.y = 0);
        })(g.interaction);
      }, "interactions:before-action-start": Dl, "interactions:before-action-move": Dl, "interactions:before-action-end": function(g) {
        var h = g.interaction;
        if (ra(h)) return h.move({ offset: !0 }), h.end(), !1;
      }, "interactions:stop": function(g) {
        var h = g.interaction;
        h.offset.total.x = 0, h.offset.total.y = 0, h.offset.pending.x = 0, h.offset.pending.y = 0;
      } } }, Gs = Wf, Ks = (function() {
        function g(h) {
          r(this, g), this.active = !1, this.isModified = !1, this.smoothEnd = !1, this.allowResume = !1, this.modification = void 0, this.modifierCount = 0, this.modifierArg = void 0, this.startCoords = void 0, this.t0 = 0, this.v0 = 0, this.te = 0, this.targetOffset = void 0, this.modifiedOffset = void 0, this.currentOffset = void 0, this.lambda_v0 = 0, this.one_ve_v0 = 0, this.timeout = void 0, this.interaction = void 0, this.interaction = h;
        }
        return l(g, [{ key: "start", value: function(h) {
          var w = this.interaction, T = aa(w);
          if (!T || !T.enabled) return !1;
          var _ = w.coords.velocity.client, F = Fe(_.x, _.y), q = this.modification || (this.modification = new To(w));
          if (q.copyFrom(w.modification), this.t0 = w._now(), this.allowResume = T.allowResume, this.v0 = F, this.currentOffset = { x: 0, y: 0 }, this.startCoords = w.coords.cur.page, this.modifierArg = q.fillArg({ pageCoords: this.startCoords, preEnd: !0, phase: "inertiastart" }), this.t0 - w.coords.cur.timeStamp < 50 && F > T.minSpeed && F > T.endSpeed) this.startInertia();
          else {
            if (q.result = q.setAll(this.modifierArg), !q.result.changed) return !1;
            this.startSmoothEnd();
          }
          return w.modification.result.rect = null, w.offsetBy(this.targetOffset), w._doPhase({ interaction: w, event: h, phase: "inertiastart" }), w.offsetBy({ x: -this.targetOffset.x, y: -this.targetOffset.y }), w.modification.result.rect = null, this.active = !0, w.simulation = this, !0;
        } }, { key: "startInertia", value: function() {
          var h = this, w = this.interaction.coords.velocity.client, T = aa(this.interaction), _ = T.resistance, F = -Math.log(T.endSpeed / this.v0) / _;
          this.targetOffset = { x: (w.x - F) / _, y: (w.y - F) / _ }, this.te = F, this.lambda_v0 = _ / this.v0, this.one_ve_v0 = 1 - T.endSpeed / this.v0;
          var q = this.modification, X = this.modifierArg;
          X.pageCoords = { x: this.startCoords.x + this.targetOffset.x, y: this.startCoords.y + this.targetOffset.y }, q.result = q.setAll(X), q.result.changed && (this.isModified = !0, this.modifiedOffset = { x: this.targetOffset.x + q.result.delta.x, y: this.targetOffset.y + q.result.delta.y }), this.onNextFrame((function() {
            return h.inertiaTick();
          }));
        } }, { key: "startSmoothEnd", value: function() {
          var h = this;
          this.smoothEnd = !0, this.isModified = !0, this.targetOffset = { x: this.modification.result.delta.x, y: this.modification.result.delta.y }, this.onNextFrame((function() {
            return h.smoothEndTick();
          }));
        } }, { key: "onNextFrame", value: function(h) {
          var w = this;
          this.timeout = Jt.request((function() {
            w.active && h();
          }));
        } }, { key: "inertiaTick", value: function() {
          var h, w, T, _, F, q, X, oe = this, me = this.interaction, ie = aa(me).resistance, Se = (me._now() - this.t0) / 1e3;
          if (Se < this.te) {
            var $e, _e = 1 - (Math.exp(-ie * Se) - this.lambda_v0) / this.one_ve_v0;
            this.isModified ? (h = 0, w = 0, T = this.targetOffset.x, _ = this.targetOffset.y, F = this.modifiedOffset.x, q = this.modifiedOffset.y, $e = { x: Ir(X = _e, h, T, F), y: Ir(X, w, _, q) }) : $e = { x: this.targetOffset.x * _e, y: this.targetOffset.y * _e };
            var Ae = { x: $e.x - this.currentOffset.x, y: $e.y - this.currentOffset.y };
            this.currentOffset.x += Ae.x, this.currentOffset.y += Ae.y, me.offsetBy(Ae), me.move(), this.onNextFrame((function() {
              return oe.inertiaTick();
            }));
          } else me.offsetBy({ x: this.modifiedOffset.x - this.currentOffset.x, y: this.modifiedOffset.y - this.currentOffset.y }), this.end();
        } }, { key: "smoothEndTick", value: function() {
          var h = this, w = this.interaction, T = w._now() - this.t0, _ = aa(w).smoothEndDuration;
          if (T < _) {
            var F = { x: Mr(T, 0, this.targetOffset.x, _), y: Mr(T, 0, this.targetOffset.y, _) }, q = { x: F.x - this.currentOffset.x, y: F.y - this.currentOffset.y };
            this.currentOffset.x += q.x, this.currentOffset.y += q.y, w.offsetBy(q), w.move({ skipModifiers: this.modifierCount }), this.onNextFrame((function() {
              return h.smoothEndTick();
            }));
          } else w.offsetBy({ x: this.targetOffset.x - this.currentOffset.x, y: this.targetOffset.y - this.currentOffset.y }), this.end();
        } }, { key: "resume", value: function(h) {
          var w = h.pointer, T = h.event, _ = h.eventTarget, F = this.interaction;
          F.offsetBy({ x: -this.currentOffset.x, y: -this.currentOffset.y }), F.updatePointer(w, T, _, !0), F._doPhase({ interaction: F, event: T, phase: "resume" }), it(F.coords.prev, F.coords.cur), this.stop();
        } }, { key: "end", value: function() {
          this.interaction.move(), this.interaction.end(), this.stop();
        } }, { key: "stop", value: function() {
          this.active = this.smoothEnd = !1, this.interaction.simulation = null, Jt.cancel(this.timeout);
        } }]), g;
      })();
      function aa(g) {
        var h = g.interactable, w = g.prepared;
        return h && h.options && w.name && h.options[w.name].inertia;
      }
      var Ys = { id: "inertia", before: ["modifiers", "actions"], install: function(g) {
        var h = g.defaults;
        g.usePlugin(Gs), g.usePlugin(na), g.actions.phases.inertiastart = !0, g.actions.phases.resume = !0, h.perAction.inertia = { enabled: !1, resistance: 10, minSpeed: 100, endSpeed: 10, allowResume: !0, smoothEndDuration: 300 };
      }, listeners: { "interactions:new": function(g) {
        var h = g.interaction;
        h.inertia = new Ks(h);
      }, "interactions:before-action-end": function(g) {
        var h = g.interaction, w = g.event;
        return (!h._interacting || h.simulation || !h.inertia.start(w)) && null;
      }, "interactions:down": function(g) {
        var h = g.interaction, w = g.eventTarget, T = h.inertia;
        if (T.active) for (var _ = w; x.element(_); ) {
          if (_ === h.element) {
            T.resume(g);
            break;
          }
          _ = G(_);
        }
      }, "interactions:stop": function(g) {
        var h = g.interaction.inertia;
        h.active && h.stop();
      }, "interactions:before-action-resume": function(g) {
        var h = g.interaction.modification;
        h.stop(g), h.start(g, g.interaction.coords.cur.page), h.applyToInteraction(g);
      }, "interactions:before-action-inertiastart": function(g) {
        return g.interaction.modification.setAndApply(g);
      }, "interactions:action-resume": co, "interactions:action-inertiastart": co, "interactions:after-action-inertiastart": function(g) {
        return g.interaction.modification.restoreInteractionCoords(g);
      }, "interactions:after-action-resume": function(g) {
        return g.interaction.modification.restoreInteractionCoords(g);
      } } };
      function Ir(g, h, w, T) {
        var _ = 1 - g;
        return _ * _ * h + 2 * _ * g * w + g * g * T;
      }
      function Mr(g, h, w, T) {
        return -w * (g /= T) * (g - 2) + h;
      }
      var cc = Ys;
      function Us(g, h) {
        for (var w = 0; w < h.length; w++) {
          var T = h[w];
          if (g.immediatePropagationStopped) break;
          T(g);
        }
      }
      var Tr = (function() {
        function g(h) {
          r(this, g), this.options = void 0, this.types = {}, this.propagationStopped = !1, this.immediatePropagationStopped = !1, this.global = void 0, this.options = ae({}, h || {});
        }
        return l(g, [{ key: "fire", value: function(h) {
          var w, T = this.global;
          (w = this.types[h.type]) && Us(h, w), !h.propagationStopped && T && (w = T[h.type]) && Us(h, w);
        } }, { key: "on", value: function(h, w) {
          var T = We(h, w);
          for (h in T) this.types[h] = Dt(this.types[h] || [], T[h]);
        } }, { key: "off", value: function(h, w) {
          var T = We(h, w);
          for (h in T) {
            var _ = this.types[h];
            if (_ && _.length) for (var F = 0, q = T[h]; F < q.length; F++) {
              var X = q[F], oe = _.indexOf(X);
              oe !== -1 && _.splice(oe, 1);
            }
          }
        } }, { key: "getRect", value: function(h) {
          return null;
        } }]), g;
      })(), la = (function() {
        function g(h) {
          r(this, g), this.currentTarget = void 0, this.originalEvent = void 0, this.type = void 0, this.originalEvent = h, Ge(this, h);
        }
        return l(g, [{ key: "preventOriginalDefault", value: function() {
          this.originalEvent.preventDefault();
        } }, { key: "stopPropagation", value: function() {
          this.originalEvent.stopPropagation();
        } }, { key: "stopImmediatePropagation", value: function() {
          this.originalEvent.stopImmediatePropagation();
        } }]), g;
      })();
      function sa(g) {
        return x.object(g) ? { capture: !!g.capture, passive: !!g.passive } : { capture: !!g, passive: !1 };
      }
      function Va(g, h) {
        return g === h || (typeof g == "boolean" ? !!h.capture === g && !h.passive : !!g.capture == !!h.capture && !!g.passive == !!h.passive);
      }
      var Sn = { id: "events", install: function(g) {
        var h, w = [], T = {}, _ = [], F = { add: q, remove: X, addDelegate: function(ie, Se, $e, _e, Ae) {
          var Be = sa(Ae);
          if (!T[$e]) {
            T[$e] = [];
            for (var Ye = 0; Ye < _.length; Ye++) {
              var Ue = _[Ye];
              q(Ue, $e, oe), q(Ue, $e, me, !0);
            }
          }
          var at = T[$e], mt = Qt(at, (function(Ot) {
            return Ot.selector === ie && Ot.context === Se;
          }));
          mt || (mt = { selector: ie, context: Se, listeners: [] }, at.push(mt)), mt.listeners.push({ func: _e, options: Be });
        }, removeDelegate: function(ie, Se, $e, _e, Ae) {
          var Be, Ye = sa(Ae), Ue = T[$e], at = !1;
          if (Ue)
            for (Be = Ue.length - 1; Be >= 0; Be--) {
              var mt = Ue[Be];
              if (mt.selector === ie && mt.context === Se) {
                for (var Ot = mt.listeners, pt = Ot.length - 1; pt >= 0; pt--) {
                  var St = Ot[pt];
                  if (St.func === _e && Va(St.options, Ye)) {
                    Ot.splice(pt, 1), Ot.length || (Ue.splice(Be, 1), X(Se, $e, oe), X(Se, $e, me, !0)), at = !0;
                    break;
                  }
                }
                if (at) break;
              }
            }
        }, delegateListener: oe, delegateUseCapture: me, delegatedEvents: T, documents: _, targets: w, supportsOptions: !1, supportsPassive: !1 };
        function q(ie, Se, $e, _e) {
          if (ie.addEventListener) {
            var Ae = sa(_e), Be = Qt(w, (function(Ye) {
              return Ye.eventTarget === ie;
            }));
            Be || (Be = { eventTarget: ie, events: {} }, w.push(Be)), Be.events[Se] || (Be.events[Se] = []), Qt(Be.events[Se], (function(Ye) {
              return Ye.func === $e && Va(Ye.options, Ae);
            })) || (ie.addEventListener(Se, $e, F.supportsOptions ? Ae : Ae.capture), Be.events[Se].push({ func: $e, options: Ae }));
          }
        }
        function X(ie, Se, $e, _e) {
          if (ie.addEventListener && ie.removeEventListener) {
            var Ae = on(w, (function(un) {
              return un.eventTarget === ie;
            })), Be = w[Ae];
            if (Be && Be.events) if (Se !== "all") {
              var Ye = !1, Ue = Be.events[Se];
              if (Ue) {
                if ($e === "all") {
                  for (var at = Ue.length - 1; at >= 0; at--) {
                    var mt = Ue[at];
                    X(ie, Se, mt.func, mt.options);
                  }
                  return;
                }
                for (var Ot = sa(_e), pt = 0; pt < Ue.length; pt++) {
                  var St = Ue[pt];
                  if (St.func === $e && Va(St.options, Ot)) {
                    ie.removeEventListener(Se, $e, F.supportsOptions ? Ot : Ot.capture), Ue.splice(pt, 1), Ue.length === 0 && (delete Be.events[Se], Ye = !0);
                    break;
                  }
                }
              }
              Ye && !Object.keys(Be.events).length && w.splice(Ae, 1);
            } else for (Se in Be.events) Be.events.hasOwnProperty(Se) && X(ie, Se, "all");
          }
        }
        function oe(ie, Se) {
          for (var $e = sa(Se), _e = new la(ie), Ae = T[ie.type], Be = Xt(ie)[0], Ye = Be; x.element(Ye); ) {
            for (var Ue = 0; Ue < Ae.length; Ue++) {
              var at = Ae[Ue], mt = at.selector, Ot = at.context;
              if (Y(Ye, mt) && j(Ot, Be) && j(Ot, Ye)) {
                var pt = at.listeners;
                _e.currentTarget = Ye;
                for (var St = 0; St < pt.length; St++) {
                  var un = pt[St];
                  Va(un.options, $e) && un.func(_e);
                }
              }
            }
            Ye = G(Ye);
          }
        }
        function me(ie) {
          return oe(ie, !0);
        }
        return (h = g.document) == null || h.createElement("div").addEventListener("test", null, { get capture() {
          return F.supportsOptions = !0;
        }, get passive() {
          return F.supportsPassive = !0;
        } }), g.events = F, F;
      } }, yn = { methodOrder: ["simulationResume", "mouseOrPen", "hasPointer", "idle"], search: function(g) {
        for (var h = 0, w = yn.methodOrder; h < w.length; h++) {
          var T = w[h], _ = yn[T](g);
          if (_) return _;
        }
        return null;
      }, simulationResume: function(g) {
        var h = g.pointerType, w = g.eventType, T = g.eventTarget, _ = g.scope;
        if (!/down|start/i.test(w)) return null;
        for (var F = 0, q = _.interactions.list; F < q.length; F++) {
          var X = q[F], oe = T;
          if (X.simulation && X.simulation.allowResume && X.pointerType === h) for (; oe; ) {
            if (oe === X.element) return X;
            oe = G(oe);
          }
        }
        return null;
      }, mouseOrPen: function(g) {
        var h, w = g.pointerId, T = g.pointerType, _ = g.eventType, F = g.scope;
        if (T !== "mouse" && T !== "pen") return null;
        for (var q = 0, X = F.interactions.list; q < X.length; q++) {
          var oe = X[q];
          if (oe.pointerType === T) {
            if (oe.simulation && !Di(oe, w)) continue;
            if (oe.interacting()) return oe;
            h || (h = oe);
          }
        }
        if (h) return h;
        for (var me = 0, ie = F.interactions.list; me < ie.length; me++) {
          var Se = ie[me];
          if (!(Se.pointerType !== T || /down/i.test(_) && Se.simulation)) return Se;
        }
        return null;
      }, hasPointer: function(g) {
        for (var h = g.pointerId, w = 0, T = g.scope.interactions.list; w < T.length; w++) {
          var _ = T[w];
          if (Di(_, h)) return _;
        }
        return null;
      }, idle: function(g) {
        for (var h = g.pointerType, w = 0, T = g.scope.interactions.list; w < T.length; w++) {
          var _ = T[w];
          if (_.pointers.length === 1) {
            var F = _.interactable;
            if (F && (!F.options.gesture || !F.options.gesture.enabled)) continue;
          } else if (_.pointers.length >= 2) continue;
          if (!_.interacting() && h === _.pointerType) return _;
        }
        return null;
      } };
      function Di(g, h) {
        return g.pointers.some((function(w) {
          return w.id === h;
        }));
      }
      var oo = yn, Kn = ["pointerDown", "pointerMove", "pointerUp", "updatePointer", "removePointer", "windowBlur"];
      function Un(g, h) {
        return function(w) {
          var T = h.interactions.list, _ = Rt(w), F = Xt(w), q = F[0], X = F[1], oe = [];
          if (/^touch/.test(w.type)) {
            h.prevTouchTime = h.now();
            for (var me = 0, ie = w.changedTouches; me < ie.length; me++) {
              var Se = ie[me], $e = { pointer: Se, pointerId: Je(Se), pointerType: _, eventType: w.type, eventTarget: q, curEventTarget: X, scope: h }, _e = xn($e);
              oe.push([$e.pointer, $e.eventTarget, $e.curEventTarget, _e]);
            }
          } else {
            var Ae = !1;
            if (!U.supportsPointerEvent && /mouse/.test(w.type)) {
              for (var Be = 0; Be < T.length && !Ae; Be++) Ae = T[Be].pointerType !== "mouse" && T[Be].pointerIsDown;
              Ae = Ae || h.now() - h.prevTouchTime < 500 || w.timeStamp === 0;
            }
            if (!Ae) {
              var Ye = { pointer: w, pointerId: Je(w), pointerType: _, eventType: w.type, curEventTarget: X, eventTarget: q, scope: h }, Ue = xn(Ye);
              oe.push([Ye.pointer, Ye.eventTarget, Ye.curEventTarget, Ue]);
            }
          }
          for (var at = 0; at < oe.length; at++) {
            var mt = oe[at], Ot = mt[0], pt = mt[1], St = mt[2];
            mt[3][g](Ot, w, pt, St);
          }
        };
      }
      function xn(g) {
        var h = g.pointerType, w = g.scope, T = { interaction: oo.search(g), searchDetails: g };
        return w.fire("interactions:find", T), T.interaction || w.interactions.new({ pointerType: h });
      }
      function ar(g, h) {
        var w = g.doc, T = g.scope, _ = g.options, F = T.interactions.docEvents, q = T.events, X = q[h];
        for (var oe in T.browser.isIOS && !_.events && (_.events = { passive: !1 }), q.delegatedEvents) X(w, oe, q.delegateListener), X(w, oe, q.delegateUseCapture, !0);
        for (var me = _ && _.events, ie = 0; ie < F.length; ie++) {
          var Se = F[ie];
          X(w, Se.type, Se.listener, me);
        }
      }
      var zl = { id: "core/interactions", install: function(g) {
        for (var h = {}, w = 0; w < Kn.length; w++) {
          var T = Kn[w];
          h[T] = Un(T, g);
        }
        var _, F = U.pEventTypes;
        function q() {
          for (var X = 0, oe = g.interactions.list; X < oe.length; X++) {
            var me = oe[X];
            if (me.pointerIsDown && me.pointerType === "touch" && !me._interacting) for (var ie = function() {
              var _e = $e[Se];
              g.documents.some((function(Ae) {
                return j(Ae.doc, _e.downTarget);
              })) || me.removePointer(_e.pointer, _e.event);
            }, Se = 0, $e = me.pointers; Se < $e.length; Se++) ie();
          }
        }
        (_ = L.PointerEvent ? [{ type: F.down, listener: q }, { type: F.down, listener: h.pointerDown }, { type: F.move, listener: h.pointerMove }, { type: F.up, listener: h.pointerUp }, { type: F.cancel, listener: h.pointerUp }] : [{ type: "mousedown", listener: h.pointerDown }, { type: "mousemove", listener: h.pointerMove }, { type: "mouseup", listener: h.pointerUp }, { type: "touchstart", listener: q }, { type: "touchstart", listener: h.pointerDown }, { type: "touchmove", listener: h.pointerMove }, { type: "touchend", listener: h.pointerUp }, { type: "touchcancel", listener: h.pointerUp }]).push({ type: "blur", listener: function(X) {
          for (var oe = 0, me = g.interactions.list; oe < me.length; oe++)
            me[oe].documentBlur(X);
        } }), g.prevTouchTime = 0, g.Interaction = (function(X) {
          u(me, X);
          var oe = p(me);
          function me() {
            return r(this, me), oe.apply(this, arguments);
          }
          return l(me, [{ key: "pointerMoveTolerance", get: function() {
            return g.interactions.pointerMoveTolerance;
          }, set: function(ie) {
            g.interactions.pointerMoveTolerance = ie;
          } }, { key: "_now", value: function() {
            return g.now();
          } }]), me;
        })(Al), g.interactions = { list: [], new: function(X) {
          X.scopeFire = function(me, ie) {
            return g.fire(me, ie);
          };
          var oe = new g.Interaction(X);
          return g.interactions.list.push(oe), oe;
        }, listeners: h, docEvents: _, pointerMoveTolerance: 1 }, g.usePlugin(Jr);
      }, listeners: { "scope:add-document": function(g) {
        return ar(g, "add");
      }, "scope:remove-document": function(g) {
        return ar(g, "remove");
      }, "interactable:unset": function(g, h) {
        for (var w = g.interactable, T = h.interactions.list.length - 1; T >= 0; T--) {
          var _ = h.interactions.list[T];
          _.interactable === w && (_.stop(), h.fire("interactions:destroy", { interaction: _ }), _.destroy(), h.interactions.list.length > 2 && h.interactions.list.splice(T, 1));
        }
      } }, onDocSignal: ar, doOnInteractions: Un, methodNames: Kn }, qf = zl, vo = (function(g) {
        return g[g.On = 0] = "On", g[g.Off = 1] = "Off", g;
      })(vo || {}), hi = (function() {
        function g(h, w, T, _) {
          r(this, g), this.target = void 0, this.options = void 0, this._actions = void 0, this.events = new Tr(), this._context = void 0, this._win = void 0, this._doc = void 0, this._scopeEvents = void 0, this._actions = w.actions, this.target = h, this._context = w.context || T, this._win = $(we(h) ? this._context : h), this._doc = this._win.document, this._scopeEvents = _, this.set(w);
        }
        return l(g, [{ key: "_defaults", get: function() {
          return { base: {}, perAction: {}, actions: {} };
        } }, { key: "setOnEvents", value: function(h, w) {
          return x.func(w.onstart) && this.on("".concat(h, "start"), w.onstart), x.func(w.onmove) && this.on("".concat(h, "move"), w.onmove), x.func(w.onend) && this.on("".concat(h, "end"), w.onend), x.func(w.oninertiastart) && this.on("".concat(h, "inertiastart"), w.oninertiastart), this;
        } }, { key: "updatePerActionListeners", value: function(h, w, T) {
          var _, F = this, q = (_ = this._actions.map[h]) == null ? void 0 : _.filterEventType, X = function(oe) {
            return (q == null || q(oe)) && ea(oe, F._actions);
          };
          (x.array(w) || x.object(w)) && this._onOff(vo.Off, h, w, void 0, X), (x.array(T) || x.object(T)) && this._onOff(vo.On, h, T, void 0, X);
        } }, { key: "setPerAction", value: function(h, w) {
          var T = this._defaults;
          for (var _ in w) {
            var F = _, q = this.options[h], X = w[F];
            F === "listeners" && this.updatePerActionListeners(h, q.listeners, X), x.array(X) ? q[F] = zn(X) : x.plainObject(X) ? (q[F] = ae(q[F] || {}, Nn(X)), x.object(T.perAction[F]) && "enabled" in T.perAction[F] && (q[F].enabled = X.enabled !== !1)) : x.bool(X) && x.object(T.perAction[F]) ? q[F].enabled = X : q[F] = X;
          }
        } }, { key: "getRect", value: function(h) {
          return h = h || (x.element(this.target) ? this.target : null), x.string(this.target) && (h = h || this._context.querySelector(this.target)), de(h);
        } }, { key: "rectChecker", value: function(h) {
          var w = this;
          return x.func(h) ? (this.getRect = function(T) {
            var _ = ae({}, h.apply(w, T));
            return "width" in _ || (_.width = _.right - _.left, _.height = _.bottom - _.top), _;
          }, this) : h === null ? (delete this.getRect, this) : this.getRect;
        } }, { key: "_backCompatOption", value: function(h, w) {
          if (we(w) || x.object(w)) {
            for (var T in this.options[h] = w, this._actions.map) this.options[T][h] = w;
            return this;
          }
          return this.options[h];
        } }, { key: "origin", value: function(h) {
          return this._backCompatOption("origin", h);
        } }, { key: "deltaSource", value: function(h) {
          return h === "page" || h === "client" ? (this.options.deltaSource = h, this) : this.options.deltaSource;
        } }, { key: "getAllElements", value: function() {
          var h = this.target;
          return x.string(h) ? Array.from(this._context.querySelectorAll(h)) : x.func(h) && h.getAllElements ? h.getAllElements() : x.element(h) ? [h] : [];
        } }, { key: "context", value: function() {
          return this._context;
        } }, { key: "inContext", value: function(h) {
          return this._context === h.ownerDocument || j(this._context, h);
        } }, { key: "testIgnoreAllow", value: function(h, w, T) {
          return !this.testIgnore(h.ignoreFrom, w, T) && this.testAllow(h.allowFrom, w, T);
        } }, { key: "testAllow", value: function(h, w, T) {
          return !h || !!x.element(T) && (x.string(h) ? be(T, h, w) : !!x.element(h) && j(h, T));
        } }, { key: "testIgnore", value: function(h, w, T) {
          return !(!h || !x.element(T)) && (x.string(h) ? be(T, h, w) : !!x.element(h) && j(h, T));
        } }, { key: "fire", value: function(h) {
          return this.events.fire(h), this;
        } }, { key: "_onOff", value: function(h, w, T, _, F) {
          x.object(w) && !x.array(w) && (_ = T, T = null);
          var q = We(w, T, F);
          for (var X in q) {
            X === "wheel" && (X = U.wheelEvent);
            for (var oe = 0, me = q[X]; oe < me.length; oe++) {
              var ie = me[oe];
              ea(X, this._actions) ? this.events[h === vo.On ? "on" : "off"](X, ie) : x.string(this.target) ? this._scopeEvents[h === vo.On ? "addDelegate" : "removeDelegate"](this.target, this._context, X, ie, _) : this._scopeEvents[h === vo.On ? "add" : "remove"](this.target, X, ie, _);
            }
          }
          return this;
        } }, { key: "on", value: function(h, w, T) {
          return this._onOff(vo.On, h, w, T);
        } }, { key: "off", value: function(h, w, T) {
          return this._onOff(vo.Off, h, w, T);
        } }, { key: "set", value: function(h) {
          var w = this._defaults;
          for (var T in x.object(h) || (h = {}), this.options = Nn(w.base), this._actions.methodDict) {
            var _ = T, F = this._actions.methodDict[_];
            this.options[_] = {}, this.setPerAction(_, ae(ae({}, w.perAction), w.actions[_])), this[F](h[_]);
          }
          for (var q in h) q !== "getRect" ? x.func(this[q]) && this[q](h[q]) : this.rectChecker(h.getRect);
          return this;
        } }, { key: "unset", value: function() {
          if (x.string(this.target)) for (var h in this._scopeEvents.delegatedEvents) for (var w = this._scopeEvents.delegatedEvents[h], T = w.length - 1; T >= 0; T--) {
            var _ = w[T], F = _.selector, q = _.context, X = _.listeners;
            F === this.target && q === this._context && w.splice(T, 1);
            for (var oe = X.length - 1; oe >= 0; oe--) this._scopeEvents.removeDelegate(this.target, this._context, h, X[oe][0], X[oe][1]);
          }
          else this._scopeEvents.remove(this.target, "all");
        } }]), g;
      })(), Gf = (function() {
        function g(h) {
          var w = this;
          r(this, g), this.list = [], this.selectorMap = {}, this.scope = void 0, this.scope = h, h.addListeners({ "interactable:unset": function(T) {
            var _ = T.interactable, F = _.target, q = x.string(F) ? w.selectorMap[F] : F[w.scope.id], X = on(q, (function(oe) {
              return oe === _;
            }));
            q.splice(X, 1);
          } });
        }
        return l(g, [{ key: "new", value: function(h, w) {
          w = ae(w || {}, { actions: this.scope.actions });
          var T = new this.scope.Interactable(h, w, this.scope.document, this.scope.events);
          return this.scope.addDocument(T._doc), this.list.push(T), x.string(h) ? (this.selectorMap[h] || (this.selectorMap[h] = []), this.selectorMap[h].push(T)) : (T.target[this.scope.id] || Object.defineProperty(h, this.scope.id, { value: [], configurable: !0 }), h[this.scope.id].push(T)), this.scope.fire("interactable:new", { target: h, options: w, interactable: T, win: this.scope._win }), T;
        } }, { key: "getExisting", value: function(h, w) {
          var T = w && w.context || this.scope.document, _ = x.string(h), F = _ ? this.selectorMap[h] : h[this.scope.id];
          if (F) return Qt(F, (function(q) {
            return q._context === T && (_ || q.inContext(h));
          }));
        } }, { key: "forEachMatch", value: function(h, w) {
          for (var T = 0, _ = this.list; T < _.length; T++) {
            var F = _[T], q = void 0;
            if ((x.string(F.target) ? x.element(h) && Y(h, F.target) : h === F.target) && F.inContext(h) && (q = w(F)), q !== void 0) return q;
          }
        } }]), g;
      })(), Kf = (function() {
        function g() {
          var h = this;
          r(this, g), this.id = "__interact_scope_".concat(Math.floor(100 * Math.random())), this.isInitialized = !1, this.listenerMaps = [], this.browser = U, this.defaults = Nn(oa), this.Eventable = Tr, this.actions = { map: {}, phases: { start: !0, move: !0, end: !0 }, methodDict: {}, phaselessTypes: {} }, this.interactStatic = (function(T) {
            var _ = function F(q, X) {
              var oe = T.interactables.getExisting(q, X);
              return oe || ((oe = T.interactables.new(q, X)).events.global = F.globalEvents), oe;
            };
            return _.getPointerAverage = qe, _.getTouchBBox = rt, _.getTouchDistance = dt, _.getTouchAngle = vt, _.getElementRect = de, _.getElementClientRect = ge, _.matchesSelector = Y, _.closest = re, _.globalEvents = {}, _.version = "1.10.27", _.scope = T, _.use = function(F, q) {
              return this.scope.usePlugin(F, q), this;
            }, _.isSet = function(F, q) {
              return !!this.scope.interactables.get(F, q && q.context);
            }, _.on = Ht((function(F, q, X) {
              if (x.string(F) && F.search(" ") !== -1 && (F = F.trim().split(/ +/)), x.array(F)) {
                for (var oe = 0, me = F; oe < me.length; oe++) {
                  var ie = me[oe];
                  this.on(ie, q, X);
                }
                return this;
              }
              if (x.object(F)) {
                for (var Se in F) this.on(Se, F[Se], q);
                return this;
              }
              return ea(F, this.scope.actions) ? this.globalEvents[F] ? this.globalEvents[F].push(q) : this.globalEvents[F] = [q] : this.scope.events.add(this.scope.document, F, q, { options: X }), this;
            }), "The interact.on() method is being deprecated"), _.off = Ht((function(F, q, X) {
              if (x.string(F) && F.search(" ") !== -1 && (F = F.trim().split(/ +/)), x.array(F)) {
                for (var oe = 0, me = F; oe < me.length; oe++) {
                  var ie = me[oe];
                  this.off(ie, q, X);
                }
                return this;
              }
              if (x.object(F)) {
                for (var Se in F) this.off(Se, F[Se], q);
                return this;
              }
              var $e;
              return ea(F, this.scope.actions) ? F in this.globalEvents && ($e = this.globalEvents[F].indexOf(q)) !== -1 && this.globalEvents[F].splice($e, 1) : this.scope.events.remove(this.scope.document, F, q, X), this;
            }), "The interact.off() method is being deprecated"), _.debug = function() {
              return this.scope;
            }, _.supportsTouch = function() {
              return U.supportsTouch;
            }, _.supportsPointerEvent = function() {
              return U.supportsPointerEvent;
            }, _.stop = function() {
              for (var F = 0, q = this.scope.interactions.list; F < q.length; F++) q[F].stop();
              return this;
            }, _.pointerMoveTolerance = function(F) {
              return x.number(F) ? (this.scope.interactions.pointerMoveTolerance = F, this) : this.scope.interactions.pointerMoveTolerance;
            }, _.addDocument = function(F, q) {
              this.scope.addDocument(F, q);
            }, _.removeDocument = function(F) {
              this.scope.removeDocument(F);
            }, _;
          })(this), this.InteractEvent = ir, this.Interactable = void 0, this.interactables = new Gf(this), this._win = void 0, this.document = void 0, this.window = void 0, this.documents = [], this._plugins = { list: [], map: {} }, this.onWindowUnload = function(T) {
            return h.removeDocument(T.target);
          };
          var w = this;
          this.Interactable = (function(T) {
            u(F, T);
            var _ = p(F);
            function F() {
              return r(this, F), _.apply(this, arguments);
            }
            return l(F, [{ key: "_defaults", get: function() {
              return w.defaults;
            } }, { key: "set", value: function(q) {
              return m(c(F.prototype), "set", this).call(this, q), w.fire("interactable:set", { options: q, interactable: this }), this;
            } }, { key: "unset", value: function() {
              m(c(F.prototype), "unset", this).call(this);
              var q = w.interactables.list.indexOf(this);
              q < 0 || (w.interactables.list.splice(q, 1), w.fire("interactable:unset", { interactable: this }));
            } }]), F;
          })(hi);
        }
        return l(g, [{ key: "addListeners", value: function(h, w) {
          this.listenerMaps.push({ id: w, map: h });
        } }, { key: "fire", value: function(h, w) {
          for (var T = 0, _ = this.listenerMaps; T < _.length; T++) {
            var F = _[T].map[h];
            if (F && F(w, this, h) === !1) return !1;
          }
        } }, { key: "init", value: function(h) {
          return this.isInitialized ? this : (function(w, T) {
            return w.isInitialized = !0, x.window(T) && O(T), L.init(T), U.init(T), Jt.init(T), w.window = T, w.document = T.document, w.usePlugin(qf), w.usePlugin(Sn), w;
          })(this, h);
        } }, { key: "pluginIsInstalled", value: function(h) {
          var w = h.id;
          return w ? !!this._plugins.map[w] : this._plugins.list.indexOf(h) !== -1;
        } }, { key: "usePlugin", value: function(h, w) {
          if (!this.isInitialized) return this;
          if (this.pluginIsInstalled(h)) return this;
          if (h.id && (this._plugins.map[h.id] = h), this._plugins.list.push(h), h.install && h.install(this, w), h.listeners && h.before) {
            for (var T = 0, _ = this.listenerMaps.length, F = h.before.reduce((function(X, oe) {
              return X[oe] = !0, X[dc(oe)] = !0, X;
            }), {}); T < _; T++) {
              var q = this.listenerMaps[T].id;
              if (q && (F[q] || F[dc(q)])) break;
            }
            this.listenerMaps.splice(T, 0, { id: h.id, map: h.listeners });
          } else h.listeners && this.listenerMaps.push({ id: h.id, map: h.listeners });
          return this;
        } }, { key: "addDocument", value: function(h, w) {
          if (this.getDocIndex(h) !== -1) return !1;
          var T = $(h);
          w = w ? ae({}, w) : {}, this.documents.push({ doc: h, options: w }), this.events.documents.push(h), h !== this.document && this.events.add(T, "unload", this.onWindowUnload), this.fire("scope:add-document", { doc: h, window: T, scope: this, options: w });
        } }, { key: "removeDocument", value: function(h) {
          var w = this.getDocIndex(h), T = $(h), _ = this.documents[w].options;
          this.events.remove(T, "unload", this.onWindowUnload), this.documents.splice(w, 1), this.events.documents.splice(w, 1), this.fire("scope:remove-document", { doc: h, window: T, scope: this, options: _ });
        } }, { key: "getDocIndex", value: function(h) {
          for (var w = 0; w < this.documents.length; w++) if (this.documents[w].doc === h) return w;
          return -1;
        } }, { key: "getDocOptions", value: function(h) {
          var w = this.getDocIndex(h);
          return w === -1 ? null : this.documents[w].options;
        } }, { key: "now", value: function() {
          return (this.window.Date || Date).now();
        } }]), g;
      })();
      function dc(g) {
        return g && g.replace(/\/.*$/, "");
      }
      var fc = new Kf(), En = fc.interactStatic, lr = typeof globalThis < "u" ? globalThis : window;
      fc.init(lr);
      var kr = Object.freeze({ __proto__: null, edgeTarget: function() {
      }, elements: function() {
      }, grid: function(g) {
        var h = [["x", "y"], ["left", "top"], ["right", "bottom"], ["width", "height"]].filter((function(T) {
          var _ = T[0], F = T[1];
          return _ in g || F in g;
        })), w = function(T, _) {
          for (var F = g.range, q = g.limits, X = q === void 0 ? { left: -1 / 0, right: 1 / 0, top: -1 / 0, bottom: 1 / 0 } : q, oe = g.offset, me = oe === void 0 ? { x: 0, y: 0 } : oe, ie = { range: F, grid: g, x: null, y: null }, Se = 0; Se < h.length; Se++) {
            var $e = h[Se], _e = $e[0], Ae = $e[1], Be = Math.round((T - me.x) / g[_e]), Ye = Math.round((_ - me.y) / g[Ae]);
            ie[_e] = Math.max(X.left, Math.min(X.right, Be * g[_e] + me.x)), ie[Ae] = Math.max(X.top, Math.min(X.bottom, Ye * g[Ae] + me.y));
          }
          return ie;
        };
        return w.grid = g, w.coordFields = h, w;
      } }), ua = { id: "snappers", install: function(g) {
        var h = g.interactStatic;
        h.snappers = ae(h.snappers || {}, kr), h.createSnapGrid = h.snappers.grid;
      } }, Yf = ua, vi = { start: function(g) {
        var h = g.state, w = g.rect, T = g.edges, _ = g.pageCoords, F = h.options, q = F.ratio, X = F.enabled, oe = h.options, me = oe.equalDelta, ie = oe.modifiers;
        q === "preserve" && (q = w.width / w.height), h.startCoords = ae({}, _), h.startRect = ae({}, w), h.ratio = q, h.equalDelta = me;
        var Se = h.linkedEdges = { top: T.top || T.left && !T.bottom, left: T.left || T.top && !T.right, bottom: T.bottom || T.right && !T.top, right: T.right || T.bottom && !T.left };
        if (h.xIsPrimaryAxis = !(!T.left && !T.right), h.equalDelta) {
          var $e = (Se.left ? 1 : -1) * (Se.top ? 1 : -1);
          h.edgeSign = { x: $e, y: $e };
        } else h.edgeSign = { x: Se.left ? -1 : 1, y: Se.top ? -1 : 1 };
        if (X !== !1 && ae(T, Se), ie != null && ie.length) {
          var _e = new To(g.interaction);
          _e.copyFrom(g.interaction.modification), _e.prepareStates(ie), h.subModification = _e, _e.startAll(o({}, g));
        }
      }, set: function(g) {
        var h = g.state, w = g.rect, T = g.coords, _ = h.linkedEdges, F = ae({}, T), q = h.equalDelta ? Uf : pc;
        if (ae(g.edges, _), q(h, h.xIsPrimaryAxis, T, w), !h.subModification) return null;
        var X = ae({}, w);
        Le(_, X, { x: T.x - F.x, y: T.y - F.y });
        var oe = h.subModification.setAll(o(o({}, g), {}, { rect: X, edges: _, pageCoords: T, prevCoords: T, prevRect: X })), me = oe.delta;
        return oe.changed && (q(h, Math.abs(me.x) > Math.abs(me.y), oe.coords, oe.rect), ae(T, oe.coords)), oe.eventProps;
      }, defaults: { ratio: "preserve", equalDelta: !1, modifiers: [], enabled: !1 } };
      function Uf(g, h, w) {
        var T = g.startCoords, _ = g.edgeSign;
        h ? w.y = T.y + (w.x - T.x) * _.y : w.x = T.x + (w.y - T.y) * _.x;
      }
      function pc(g, h, w, T) {
        var _ = g.startRect, F = g.startCoords, q = g.ratio, X = g.edgeSign;
        if (h) {
          var oe = T.width / q;
          w.y = F.y + (oe - _.height) * X.y;
        } else {
          var me = T.height * q;
          w.x = F.x + (me - _.width) * X.x;
        }
      }
      var gc = ko(vi, "aspectRatio"), ca = function() {
      };
      ca._defaults = {};
      var sr = ca;
      function Er(g, h, w) {
        return x.func(g) ? he(g, h.interactable, h.element, [w.x, w.y, h]) : he(g, h.interactable, h.element);
      }
      var da = { start: function(g) {
        var h = g.rect, w = g.startOffset, T = g.state, _ = g.interaction, F = g.pageCoords, q = T.options, X = q.elementRect, oe = ae({ left: 0, top: 0, right: 0, bottom: 0 }, q.offset || {});
        if (h && X) {
          var me = Er(q.restriction, _, F);
          if (me) {
            var ie = me.right - me.left - h.width, Se = me.bottom - me.top - h.height;
            ie < 0 && (oe.left += ie, oe.right += ie), Se < 0 && (oe.top += Se, oe.bottom += Se);
          }
          oe.left += w.left - h.width * X.left, oe.top += w.top - h.height * X.top, oe.right += w.right - h.width * (1 - X.right), oe.bottom += w.bottom - h.height * (1 - X.bottom);
        }
        T.offset = oe;
      }, set: function(g) {
        var h = g.coords, w = g.interaction, T = g.state, _ = T.options, F = T.offset, q = Er(_.restriction, w, h);
        if (q) {
          var X = (function(oe) {
            return !oe || "left" in oe && "top" in oe || ((oe = ae({}, oe)).left = oe.x || 0, oe.top = oe.y || 0, oe.right = oe.right || oe.left + oe.width, oe.bottom = oe.bottom || oe.top + oe.height), oe;
          })(q);
          h.x = Math.max(Math.min(X.right - F.right, h.x), X.left + F.left), h.y = Math.max(Math.min(X.bottom - F.bottom, h.y), X.top + F.top);
        }
      }, defaults: { restriction: null, elementRect: null, offset: null, endOnly: !1, enabled: !1 } }, Xf = ko(da, "restrict"), ur = { top: 1 / 0, left: 1 / 0, bottom: -1 / 0, right: -1 / 0 }, zi = { top: -1 / 0, left: -1 / 0, bottom: 1 / 0, right: 1 / 0 };
      function fa(g, h) {
        for (var w = 0, T = ["top", "left", "bottom", "right"]; w < T.length; w++) {
          var _ = T[w];
          _ in g || (g[_] = h[_]);
        }
        return g;
      }
      var pa = { noInner: ur, noOuter: zi, start: function(g) {
        var h, w = g.interaction, T = g.startOffset, _ = g.state, F = _.options;
        F && (h = Me(Er(F.offset, w, w.coords.start.page))), h = h || { x: 0, y: 0 }, _.offset = { top: h.y + T.top, left: h.x + T.left, bottom: h.y - T.bottom, right: h.x - T.right };
      }, set: function(g) {
        var h = g.coords, w = g.edges, T = g.interaction, _ = g.state, F = _.offset, q = _.options;
        if (w) {
          var X = ae({}, h), oe = Er(q.inner, T, X) || {}, me = Er(q.outer, T, X) || {};
          fa(oe, ur), fa(me, zi), w.top ? h.y = Math.min(Math.max(me.top + F.top, X.y), oe.top + F.top) : w.bottom && (h.y = Math.max(Math.min(me.bottom + F.bottom, X.y), oe.bottom + F.bottom)), w.left ? h.x = Math.min(Math.max(me.left + F.left, X.x), oe.left + F.left) : w.right && (h.x = Math.max(Math.min(me.right + F.right, X.x), oe.right + F.right));
        }
      }, defaults: { inner: null, outer: null, offset: null, endOnly: !1, enabled: !1 } }, Xs = ko(pa, "restrictEdges"), Qs = ae({ get elementRect() {
        return { top: 0, left: 0, bottom: 1, right: 1 };
      }, set elementRect(g) {
      } }, da.defaults), Rl = ko({ start: da.start, set: da.set, defaults: Qs }, "restrictRect"), hc = { width: -1 / 0, height: -1 / 0 }, vc = { width: 1 / 0, height: 1 / 0 }, mc = ko({ start: function(g) {
        return pa.start(g);
      }, set: function(g) {
        var h = g.interaction, w = g.state, T = g.rect, _ = g.edges, F = w.options;
        if (_) {
          var q = ke(Er(F.min, h, g.coords)) || hc, X = ke(Er(F.max, h, g.coords)) || vc;
          w.options = { endOnly: F.endOnly, inner: ae({}, pa.noInner), outer: ae({}, pa.noOuter) }, _.top ? (w.options.inner.top = T.bottom - q.height, w.options.outer.top = T.bottom - X.height) : _.bottom && (w.options.inner.bottom = T.top + q.height, w.options.outer.bottom = T.top + X.height), _.left ? (w.options.inner.left = T.right - q.width, w.options.outer.left = T.right - X.width) : _.right && (w.options.inner.right = T.left + q.width, w.options.outer.right = T.left + X.width), pa.set(g), w.options = F;
        }
      }, defaults: { min: null, max: null, endOnly: !1, enabled: !1 } }, "restrictSize"), Nl = { start: function(g) {
        var h, w = g.interaction, T = g.interactable, _ = g.element, F = g.rect, q = g.state, X = g.startOffset, oe = q.options, me = oe.offsetWithOrigin ? (function($e) {
          var _e = $e.interaction.element, Ae = Me(he($e.state.options.origin, null, null, [_e])), Be = Ae || Re($e.interactable, _e, $e.interaction.prepared.name);
          return Be;
        })(g) : { x: 0, y: 0 };
        if (oe.offset === "startCoords") h = { x: w.coords.start.page.x, y: w.coords.start.page.y };
        else {
          var ie = he(oe.offset, T, _, [w]);
          (h = Me(ie) || { x: 0, y: 0 }).x += me.x, h.y += me.y;
        }
        var Se = oe.relativePoints;
        q.offsets = F && Se && Se.length ? Se.map((function($e, _e) {
          return { index: _e, relativePoint: $e, x: X.left - F.width * $e.x + h.x, y: X.top - F.height * $e.y + h.y };
        })) : [{ index: 0, relativePoint: null, x: h.x, y: h.y }];
      }, set: function(g) {
        var h = g.interaction, w = g.coords, T = g.state, _ = T.options, F = T.offsets, q = Re(h.interactable, h.element, h.prepared.name), X = ae({}, w), oe = [];
        _.offsetWithOrigin || (X.x -= q.x, X.y -= q.y);
        for (var me = 0, ie = F; me < ie.length; me++) for (var Se = ie[me], $e = X.x - Se.x, _e = X.y - Se.y, Ae = 0, Be = _.targets.length; Ae < Be; Ae++) {
          var Ye = _.targets[Ae], Ue = void 0;
          (Ue = x.func(Ye) ? Ye($e, _e, h._proxy, Se, Ae) : Ye) && oe.push({ x: (x.number(Ue.x) ? Ue.x : $e) + Se.x, y: (x.number(Ue.y) ? Ue.y : _e) + Se.y, range: x.number(Ue.range) ? Ue.range : _.range, source: Ye, index: Ae, offset: Se });
        }
        for (var at = { target: null, inRange: !1, distance: 0, range: 0, delta: { x: 0, y: 0 } }, mt = 0; mt < oe.length; mt++) {
          var Ot = oe[mt], pt = Ot.range, St = Ot.x - X.x, un = Ot.y - X.y, Yt = Fe(St, un), hn = Yt <= pt;
          pt === 1 / 0 && at.inRange && at.range !== 1 / 0 && (hn = !1), at.target && !(hn ? at.inRange && pt !== 1 / 0 ? Yt / pt < at.distance / at.range : pt === 1 / 0 && at.range !== 1 / 0 || Yt < at.distance : !at.inRange && Yt < at.distance) || (at.target = Ot, at.distance = Yt, at.range = pt, at.inRange = hn, at.delta.x = St, at.delta.y = un);
        }
        return at.inRange && (w.x = at.target.x, w.y = at.target.y), T.closest = at, at;
      }, defaults: { range: 1 / 0, targets: null, offset: null, offsetWithOrigin: !0, origin: null, relativePoints: null, endOnly: !1, enabled: !1 } }, bc = ko(Nl, "snap"), ja = { start: function(g) {
        var h = g.state, w = g.edges, T = h.options;
        if (!w) return null;
        g.state = { options: { targets: null, relativePoints: [{ x: w.left ? 0 : 1, y: w.top ? 0 : 1 }], offset: T.offset || "self", origin: { x: 0, y: 0 }, range: T.range } }, h.targetFields = h.targetFields || [["width", "height"], ["x", "y"]], Nl.start(g), h.offsets = g.state.offsets, g.state = h;
      }, set: function(g) {
        var h = g.interaction, w = g.state, T = g.coords, _ = w.options, F = w.offsets, q = { x: T.x - F[0].x, y: T.y - F[0].y };
        w.options = ae({}, _), w.options.targets = [];
        for (var X = 0, oe = _.targets || []; X < oe.length; X++) {
          var me = oe[X], ie = void 0;
          if (ie = x.func(me) ? me(q.x, q.y, h) : me) {
            for (var Se = 0, $e = w.targetFields; Se < $e.length; Se++) {
              var _e = $e[Se], Ae = _e[0], Be = _e[1];
              if (Ae in ie || Be in ie) {
                ie.x = ie[Ae], ie.y = ie[Be];
                break;
              }
            }
            w.options.targets.push(ie);
          }
        }
        var Ye = Nl.set(g);
        return w.options = _, Ye;
      }, defaults: { range: 1 / 0, targets: null, offset: null, endOnly: !1, enabled: !1 } }, Qf = ko(ja, "snapSize"), Bl = { aspectRatio: gc, restrictEdges: Xs, restrict: Xf, restrictRect: Rl, restrictSize: mc, snapEdges: ko({ start: function(g) {
        var h = g.edges;
        return h ? (g.state.targetFields = g.state.targetFields || [[h.left ? "left" : "right", h.top ? "top" : "bottom"]], ja.start(g)) : null;
      }, set: ja.set, defaults: ae(Nn(ja.defaults), { targets: void 0, range: void 0, offset: { x: 0, y: 0 } }) }, "snapEdges"), snap: bc, snapSize: Qf, spring: sr, avoid: sr, transform: sr, rubberband: sr }, yc = { id: "modifiers", install: function(g) {
        var h = g.interactStatic;
        for (var w in g.usePlugin(na), g.usePlugin(Yf), h.modifiers = Bl, Bl) {
          var T = Bl[w], _ = T._defaults, F = T._methods;
          _._methods = F, g.defaults.perAction[w] = _;
        }
      } }, ga = yc, Wa = (function(g) {
        u(w, g);
        var h = p(w);
        function w(T, _, F, q, X, oe) {
          var me;
          if (r(this, w), Ge(f(me = h.call(this, X)), F), F !== _ && Ge(f(me), _), me.timeStamp = oe, me.originalEvent = F, me.type = T, me.pointerId = Je(_), me.pointerType = Rt(_), me.target = q, me.currentTarget = null, T === "tap") {
            var ie = X.getPointerIndex(_);
            me.dt = me.timeStamp - X.pointers[ie].downTime;
            var Se = me.timeStamp - X.tapTime;
            me.double = !!X.prevTap && X.prevTap.type !== "doubletap" && X.prevTap.target === me.target && Se < 500;
          } else T === "doubletap" && (me.dt = _.timeStamp - X.tapTime, me.double = !0);
          return me;
        }
        return l(w, [{ key: "_subtractOrigin", value: function(T) {
          var _ = T.x, F = T.y;
          return this.pageX -= _, this.pageY -= F, this.clientX -= _, this.clientY -= F, this;
        } }, { key: "_addOrigin", value: function(T) {
          var _ = T.x, F = T.y;
          return this.pageX += _, this.pageY += F, this.clientX += _, this.clientY += F, this;
        } }, { key: "preventDefault", value: function() {
          this.originalEvent.preventDefault();
        } }]), w;
      })(vn), Bn = { id: "pointer-events/base", before: ["inertia", "modifiers", "auto-start", "actions"], install: function(g) {
        g.pointerEvents = Bn, g.defaults.actions.pointerEvents = Bn.defaults, ae(g.actions.phaselessTypes, Bn.types);
      }, listeners: { "interactions:new": function(g) {
        var h = g.interaction;
        h.prevTap = null, h.tapTime = 0;
      }, "interactions:update-pointer": function(g) {
        var h = g.down, w = g.pointerInfo;
        !h && w.hold || (w.hold = { duration: 1 / 0, timeout: null });
      }, "interactions:move": function(g, h) {
        var w = g.interaction, T = g.pointer, _ = g.event, F = g.eventTarget;
        g.duplicate || w.pointerIsDown && !w.pointerWasMoved || (w.pointerIsDown && Ll(g), Ri({ interaction: w, pointer: T, event: _, eventTarget: F, type: "move" }, h));
      }, "interactions:down": function(g, h) {
        (function(w, T) {
          for (var _ = w.interaction, F = w.pointer, q = w.event, X = w.eventTarget, oe = w.pointerIndex, me = _.pointers[oe].hold, ie = ne(X), Se = { interaction: _, pointer: F, event: q, eventTarget: X, type: "hold", targets: [], path: ie, node: null }, $e = 0; $e < ie.length; $e++) {
            var _e = ie[$e];
            Se.node = _e, T.fire("pointerEvents:collect-targets", Se);
          }
          if (Se.targets.length) {
            for (var Ae = 1 / 0, Be = 0, Ye = Se.targets; Be < Ye.length; Be++) {
              var Ue = Ye[Be].eventable.options.holdDuration;
              Ue < Ae && (Ae = Ue);
            }
            me.duration = Ae, me.timeout = setTimeout((function() {
              Ri({ interaction: _, eventTarget: X, pointer: F, event: q, type: "hold" }, T);
            }), Ae);
          }
        })(g, h), Ri(g, h);
      }, "interactions:up": function(g, h) {
        Ll(g), Ri(g, h), (function(w, T) {
          var _ = w.interaction, F = w.pointer, q = w.event, X = w.eventTarget;
          _.pointerWasMoved || Ri({ interaction: _, eventTarget: X, pointer: F, event: q, type: "tap" }, T);
        })(g, h);
      }, "interactions:cancel": function(g, h) {
        Ll(g), Ri(g, h);
      } }, PointerEvent: Wa, fire: Ri, collectEventTargets: jn, defaults: { holdDuration: 600, ignoreFrom: null, allowFrom: null, origin: { x: 0, y: 0 } }, types: { down: !0, move: !0, up: !0, cancel: !0, tap: !0, doubletap: !0, hold: !0 } };
      function Ri(g, h) {
        var w = g.interaction, T = g.pointer, _ = g.event, F = g.eventTarget, q = g.type, X = g.targets, oe = X === void 0 ? jn(g, h) : X, me = new Wa(q, T, _, F, w, h.now());
        h.fire("pointerEvents:new", { pointerEvent: me });
        for (var ie = { interaction: w, pointer: T, event: _, eventTarget: F, targets: oe, type: q, pointerEvent: me }, Se = 0; Se < oe.length; Se++) {
          var $e = oe[Se];
          for (var _e in $e.props || {}) me[_e] = $e.props[_e];
          var Ae = Re($e.eventable, $e.node);
          if (me._subtractOrigin(Ae), me.eventable = $e.eventable, me.currentTarget = $e.node, $e.eventable.fire(me), me._addOrigin(Ae), me.immediatePropagationStopped || me.propagationStopped && Se + 1 < oe.length && oe[Se + 1].node !== me.currentTarget) break;
        }
        if (h.fire("pointerEvents:fired", ie), q === "tap") {
          var Be = me.double ? Ri({ interaction: w, pointer: T, event: _, eventTarget: F, type: "doubletap" }, h) : me;
          w.prevTap = Be, w.tapTime = Be.timeStamp;
        }
        return me;
      }
      function jn(g, h) {
        var w = g.interaction, T = g.pointer, _ = g.event, F = g.eventTarget, q = g.type, X = w.getPointerIndex(T), oe = w.pointers[X];
        if (q === "tap" && (w.pointerWasMoved || !oe || oe.downTarget !== F)) return [];
        for (var me = ne(F), ie = { interaction: w, pointer: T, event: _, eventTarget: F, type: q, path: me, targets: [], node: null }, Se = 0; Se < me.length; Se++) {
          var $e = me[Se];
          ie.node = $e, h.fire("pointerEvents:collect-targets", ie);
        }
        return q === "hold" && (ie.targets = ie.targets.filter((function(_e) {
          var Ae, Be;
          return _e.eventable.options.holdDuration === ((Ae = w.pointers[X]) == null || (Be = Ae.hold) == null ? void 0 : Be.duration);
        }))), ie.targets;
      }
      function Ll(g) {
        var h = g.interaction, w = g.pointerIndex, T = h.pointers[w].hold;
        T && T.timeout && (clearTimeout(T.timeout), T.timeout = null);
      }
      var Zs = Object.freeze({ __proto__: null, default: Bn });
      function qa(g) {
        var h = g.interaction;
        h.holdIntervalHandle && (clearInterval(h.holdIntervalHandle), h.holdIntervalHandle = null);
      }
      var Zf = { id: "pointer-events/holdRepeat", install: function(g) {
        g.usePlugin(Bn);
        var h = g.pointerEvents;
        h.defaults.holdRepeatInterval = 0, h.types.holdrepeat = g.actions.phaselessTypes.holdrepeat = !0;
      }, listeners: ["move", "up", "cancel", "endall"].reduce((function(g, h) {
        return g["pointerEvents:".concat(h)] = qa, g;
      }), { "pointerEvents:new": function(g) {
        var h = g.pointerEvent;
        h.type === "hold" && (h.count = (h.count || 0) + 1);
      }, "pointerEvents:fired": function(g, h) {
        var w = g.interaction, T = g.pointerEvent, _ = g.eventTarget, F = g.targets;
        if (T.type === "hold" && F.length) {
          var q = F[0].eventable.options.holdRepeatInterval;
          q <= 0 || (w.holdIntervalHandle = setTimeout((function() {
            h.pointerEvents.fire({ interaction: w, eventTarget: _, type: "hold", pointer: T, event: T }, h);
          }), q));
        }
      } }) }, Jf = Zf, Js = { id: "pointer-events/interactableTargets", install: function(g) {
        var h = g.Interactable;
        h.prototype.pointerEvents = function(T) {
          return ae(this.events.options, T), this;
        };
        var w = h.prototype._backCompatOption;
        h.prototype._backCompatOption = function(T, _) {
          var F = w.call(this, T, _);
          return F === this && (this.events.options[T] = _), F;
        };
      }, listeners: { "pointerEvents:collect-targets": function(g, h) {
        var w = g.targets, T = g.node, _ = g.type, F = g.eventTarget;
        h.interactables.forEachMatch(T, (function(q) {
          var X = q.events, oe = X.options;
          X.types[_] && X.types[_].length && q.testIgnoreAllow(oe, T, F) && w.push({ node: T, eventable: X, props: { interactable: q } });
        }));
      }, "interactable:new": function(g) {
        var h = g.interactable;
        h.events.getRect = function(w) {
          return h.getRect(w);
        };
      }, "interactable:set": function(g, h) {
        var w = g.interactable, T = g.options;
        ae(w.events.options, h.pointerEvents.defaults), ae(w.events.options, T.pointerEvents || {});
      } } }, V = Js, Q = { id: "pointer-events", install: function(g) {
        g.usePlugin(Zs), g.usePlugin(Jf), g.usePlugin(V);
      } }, fe = Q, pe = { id: "reflow", install: function(g) {
        var h = g.Interactable;
        g.actions.phases.reflow = !0, h.prototype.reflow = function(w) {
          return (function(T, _, F) {
            for (var q = T.getAllElements(), X = F.window.Promise, oe = X ? [] : null, me = function() {
              var Se = q[ie], $e = T.getRect(Se);
              if (!$e) return 1;
              var _e, Ae = Qt(F.interactions.list, (function(Ue) {
                return Ue.interacting() && Ue.interactable === T && Ue.element === Se && Ue.prepared.name === _.name;
              }));
              if (Ae) Ae.move(), oe && (_e = Ae._reflowPromise || new X((function(Ue) {
                Ae._reflowResolve = Ue;
              })));
              else {
                var Be = ke($e), Ye = /* @__PURE__ */ (function(Ue) {
                  return { coords: Ue, get page() {
                    return this.coords.page;
                  }, get client() {
                    return this.coords.client;
                  }, get timeStamp() {
                    return this.coords.timeStamp;
                  }, get pageX() {
                    return this.coords.page.x;
                  }, get pageY() {
                    return this.coords.page.y;
                  }, get clientX() {
                    return this.coords.client.x;
                  }, get clientY() {
                    return this.coords.client.y;
                  }, get pointerId() {
                    return this.coords.pointerId;
                  }, get target() {
                    return this.coords.target;
                  }, get type() {
                    return this.coords.type;
                  }, get pointerType() {
                    return this.coords.pointerType;
                  }, get buttons() {
                    return this.coords.buttons;
                  }, preventDefault: function() {
                  } };
                })({ page: { x: Be.x, y: Be.y }, client: { x: Be.x, y: Be.y }, timeStamp: F.now() });
                _e = (function(Ue, at, mt, Ot, pt) {
                  var St = Ue.interactions.new({ pointerType: "reflow" }), un = { interaction: St, event: pt, pointer: pt, eventTarget: mt, phase: "reflow" };
                  St.interactable = at, St.element = mt, St.prevEvent = pt, St.updatePointer(pt, pt, mt, !0), Ke(St.coords.delta), sn(St.prepared, Ot), St._doPhase(un);
                  var Yt = Ue.window, hn = Yt.Promise, Cn = hn ? new hn((function(Wn) {
                    St._reflowResolve = Wn;
                  })) : void 0;
                  return St._reflowPromise = Cn, St.start(Ot, at, mt), St._interacting ? (St.move(un), St.end(pt)) : (St.stop(), St._reflowResolve()), St.removePointer(pt, pt), Cn;
                })(F, T, Se, _, Ye);
              }
              oe && oe.push(_e);
            }, ie = 0; ie < q.length && !me(); ie++) ;
            return oe && X.all(oe).then((function() {
              return T;
            }));
          })(this, w, g);
        };
      }, listeners: { "interactions:stop": function(g, h) {
        var w = g.interaction;
        w.pointerType === "reflow" && (w._reflowResolve && w._reflowResolve(), (function(T, _) {
          T.splice(T.indexOf(_), 1);
        })(h.interactions.list, w));
      } } }, Ce = pe;
      if (En.use(Jr), En.use(Gs), En.use(fe), En.use(cc), En.use(ga), En.use(Zr), En.use(Rn), En.use(ln), En.use(Ce), En.default = En, i(e) === "object" && e) try {
        e.exports = En;
      } catch {
      }
      return En.default = En, En;
    }));
  })(yu, yu.exports)), yu.exports;
}
var NV = /* @__PURE__ */ RV();
const x1 = /* @__PURE__ */ FO(NV), w1 = /* @__PURE__ */ ye({
  __name: "grid-item",
  props: {
    isDraggable: { type: Boolean, default: void 0 },
    isResizable: { type: Boolean, default: void 0 },
    isBounded: { type: Boolean, default: void 0 },
    static: { type: Boolean, default: !1 },
    minH: { default: 1 },
    minW: { default: 1 },
    maxH: { default: 1 / 0 },
    maxW: { default: 1 / 0 },
    x: {},
    y: {},
    w: {},
    h: {},
    i: {},
    dragIgnoreFrom: { default: "a, button" },
    dragAllowFrom: { default: void 0 },
    resizeIgnoreFrom: { default: "a, button" },
    preserveAspectRatio: { type: Boolean, default: !1 },
    dragOption: { default: () => ({}) },
    resizeOption: { default: () => ({}) }
  },
  emits: ["container-resized", "resize", "resized", "move", "moved"],
  setup(e, { expose: t, emit: n }) {
    const o = e, i = n, r = Tt(B2), a = Tt(L2);
    if (!r)
      throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");
    const l = Pe(null), s = Dn({
      cols: 1,
      containerWidth: 100,
      rowHeight: 30,
      margin: [10, 10],
      maxRows: 1 / 0,
      draggable: void 0,
      resizable: void 0,
      bounded: void 0,
      transformScale: 1,
      useCssTransforms: !0,
      useStyleCursor: !0,
      isDragging: !1,
      dragging: {
        top: -1,
        left: -1
      },
      isResizing: !1,
      resizing: {
        width: -1,
        height: -1
      },
      style: {},
      rtl: !1
    });
    let u = !1, c = !1, d = NaN, f = NaN, p = NaN, m = NaN, b = -1, y = -1, S = -1, C = -1, O = o.x, $ = o.y, P = o.w, k = o.h;
    const x = le(), E = Dn({
      i: Ut(o, "i"),
      state: s,
      wrapper: x,
      calcXY: he
    });
    function z(Oe) {
      We(Oe);
    }
    function N() {
      et();
    }
    function D(Oe) {
      ti(o.isDraggable) && (s.draggable = Oe);
    }
    function W(Oe) {
      ti(o.isResizable) && (s.resizable = Oe);
    }
    function H(Oe) {
      ti(o.isBounded) && (s.bounded = Oe);
    }
    function L(Oe) {
      s.transformScale = Oe;
    }
    function A(Oe) {
      s.rowHeight = Oe;
    }
    function U(Oe) {
      s.maxRows = Oe;
    }
    function j() {
      s.rtl = b1() === "rtl", et();
    }
    function re(Oe) {
      s.cols = Math.floor(Oe);
    }
    r.increaseItem(E), Xd(() => {
      s.rtl = b1() === "rtl";
    }), Pt(() => {
      r.responsive && r.lastBreakpoint ? s.cols = W2(r.lastBreakpoint, r.cols) : s.cols = r.colNum, s.rowHeight = r.rowHeight, s.containerWidth = r.width !== null ? r.width : 100, s.margin = r.margin !== void 0 ? r.margin.map(Number) : [10, 10], s.maxRows = r.maxRows, ti(o.isDraggable) ? s.draggable = r.isDraggable : s.draggable = o.isDraggable, ti(o.isResizable) ? s.resizable = r.isResizable : s.resizable = o.isResizable, ti(o.isBounded) ? s.bounded = r.isBounded : s.bounded = o.isBounded, s.transformScale = r.transformScale, s.useCssTransforms = r.useCssTransforms, s.useStyleCursor = r.useStyleCursor, Lt(() => {
        O = o.x, $ = o.y, k = o.h, P = o.w, Eo(de);
      }), a.on("updateWidth", z), a.on("compact", N), a.on("setDraggable", D), a.on("setResizable", W), a.on("setBounded", H), a.on("setTransformScale", L), a.on("setRowHeight", A), a.on("setMaxRows", U), a.on("directionchange", j), a.on("setColNum", re);
    }), At(() => {
      a.off("updateWidth", z), a.off("compact", N), a.off("setDraggable", D), a.off("setResizable", W), a.off("setBounded", H), a.off("setTransformScale", L), a.off("setRowHeight", A), a.off("setMaxRows", U), a.off("directionchange", j), a.off("setColNum", re), l.value && (l.value.unset(), l.value = null), r.decreaseItem(E);
    }), t({ state: s, wrapper: x });
    const G = typeof navigator < "u" ? navigator.userAgent.toLowerCase().includes("android") : !1, Y = R(() => s.resizable && !o.static), K = R(() => r.isMirrored ? !s.rtl : s.rtl), J = R(() => (s.draggable || s.resizable) && !o.static), be = MV("item"), xe = R(() => ({
      [be.b()]: !0,
      [be.bm("resizable")]: Y.value,
      [be.bm("static")]: o.static,
      [be.bm("resizing")]: s.isResizing,
      [be.bm("dragging")]: s.isDragging,
      [be.bm("transform")]: s.useCssTransforms,
      [be.bm("rtl")]: K.value,
      [be.bm("no-touch")]: G && J.value
    })), ge = R(() => [be.be("resizer"), K.value && be.bem("resizer", "rtl")].filter(Boolean));
    Ie(
      () => o.isDraggable,
      (Oe) => {
        s.draggable = Oe;
      }
    ), Ie(
      () => o.static,
      () => {
        Eo(Ge), Eo(Ke);
      }
    ), Ie(
      () => s.draggable,
      () => {
        Eo(Ge);
      }
    ), Ie(
      () => o.isResizable,
      (Oe) => {
        s.resizable = Oe;
      }
    ), Ie(
      () => o.isBounded,
      (Oe) => {
        s.bounded = Oe;
      }
    ), Ie(
      () => s.resizable,
      () => {
        Eo(Ke);
      }
    ), Ie(
      () => s.rowHeight,
      () => {
        Eo(de), Eo(ne);
      }
    ), Ie([() => s.cols, () => s.containerWidth], () => {
      Eo(Ke), Eo(de), Eo(ne);
    }), Ie([() => o.minH, () => o.maxH, () => o.minW, () => o.maxW], () => {
      Eo(Ke);
    }), Ie(K, () => {
      Eo(Ke), Eo(de);
    }), Ie([() => r.margin, () => r.margin[0], () => r.margin[1]], () => {
      const Oe = r.margin;
      !Oe || Oe[0] === s.margin[0] && Oe[1] === s.margin[1] || (s.margin = Oe.map(Number), Eo(de), Eo(ne));
    });
    function de() {
      o.x + o.w > s.cols ? (O = 0, P = o.w > s.cols ? s.cols : o.w) : (O = o.x, P = o.w);
      const Oe = se(O, $, P, k);
      s.isDragging && (Oe.top = s.dragging.top, K.value ? Oe.right = s.dragging.left : Oe.left = s.dragging.left), s.isResizing && (Oe.width = s.resizing.width, Oe.height = s.resizing.height);
      let je;
      s.useCssTransforms ? K.value ? je = $V(Oe.top, Oe.right, Oe.width, Oe.height) : je = CV(Oe.top, Oe.left, Oe.width, Oe.height) : K.value ? je = OV(Oe.top, Oe.right, Oe.width, Oe.height) : je = PV(Oe.top, Oe.left, Oe.width, Oe.height), s.style = je;
    }
    function ne() {
      const Oe = {};
      for (const je of ["width", "height"]) {
        const De = s.style[je].match(/^(\d+)px$/);
        if (!De)
          return;
        Oe[je] = De[1];
      }
      i("container-resized", o.i, o.h, o.w, Oe.height, Oe.width);
    }
    function we(Oe) {
      if (o.static) return;
      const je = Oe.type;
      if (je === "resizestart" && s.isResizing || je !== "resizestart" && !s.isResizing)
        return;
      const De = v1(Oe);
      if (ti(De)) return;
      const { x: Je, y: wt } = De, lt = { width: 0, height: 0 };
      let qe;
      switch (je) {
        case "resizestart": {
          Ke(), b = P, y = k, qe = se(O, $, P, k), lt.width = qe.width, lt.height = qe.height, s.resizing = lt, s.isResizing = !0;
          break;
        }
        case "resizemove": {
          !Oe.edges.right && !Oe.edges.left && (p = Je), !Oe.edges.top && !Oe.edges.bottom && (m = wt);
          const rt = m1(p, m, Je, wt);
          K.value ? lt.width = s.resizing.width - rt.deltaX / s.transformScale : lt.width = s.resizing.width + rt.deltaX / s.transformScale, lt.height = s.resizing.height + rt.deltaY / s.transformScale, s.resizing = lt;
          break;
        }
        case "resizeend": {
          qe = se(O, $, P, k), lt.width = qe.width, lt.height = qe.height, s.resizing = { width: -1, height: -1 }, s.isResizing = !1;
          break;
        }
      }
      qe = Re(lt.height, lt.width), qe.w < o.minW && (qe.w = o.minW), qe.w > o.maxW && (qe.w = o.maxW), qe.h < o.minH && (qe.h = o.minH), qe.h > o.maxH && (qe.h = o.maxH), qe.h < 1 && (qe.h = 1), qe.w < 1 && (qe.w = 1), p = Je, m = wt, (P !== qe.w || k !== qe.h) && i("resize", o.i, qe.h, qe.w, lt.height, lt.width), Oe.type === "resizeend" && (b !== P || y !== k) && i("resized", o.i, qe.h, qe.w, lt.height, lt.width), a.emit("resizeEvent", Oe.type, o.i, O, $, qe.h, qe.w);
    }
    function ae(Oe) {
      if (o.static || s.isResizing) return;
      const je = Oe.type;
      if (je === "dragstart" && s.isDragging || je !== "dragstart" && !s.isDragging)
        return;
      const De = v1(Oe);
      if (ti(De)) return;
      const { x: Je, y: wt } = De, lt = Oe.target;
      if (!lt.offsetParent) return;
      const qe = { top: 0, left: 0 };
      switch (je) {
        case "dragstart": {
          S = O, C = $;
          const dt = lt.offsetParent.getBoundingClientRect(), vt = lt.getBoundingClientRect(), Rt = vt.left / s.transformScale, Xt = dt.left / s.transformScale, vn = vt.right / s.transformScale, Dt = dt.right / s.transformScale, zn = vt.top / s.transformScale, on = dt.top / s.transformScale;
          K.value ? qe.left = (vn - Dt) * -1 : qe.left = Rt - Xt, qe.top = zn - on, s.dragging = qe, s.isDragging = !0;
          break;
        }
        case "dragmove": {
          const dt = m1(d, f, Je, wt);
          if (K.value ? qe.left = s.dragging.left - dt.deltaX / s.transformScale : qe.left = s.dragging.left + dt.deltaX / s.transformScale, qe.top = s.dragging.top + dt.deltaY / s.transformScale, s.bounded) {
            const vt = lt.offsetParent.clientHeight - ke(o.h, s.rowHeight, s.margin[1]);
            qe.top = Le(qe.top, 0, vt);
            const Rt = Me(), Xt = s.containerWidth - ke(o.w, Rt, s.margin[0]);
            qe.left = Le(qe.left, 0, Xt);
          }
          s.dragging = qe;
          break;
        }
        case "dragend": {
          const dt = lt.offsetParent.getBoundingClientRect(), vt = lt.getBoundingClientRect(), Rt = vt.left / s.transformScale, Xt = dt.left / s.transformScale, vn = vt.right / s.transformScale, Dt = dt.right / s.transformScale, zn = vt.top / s.transformScale, on = dt.top / s.transformScale;
          K.value ? qe.left = (vn - Dt) * -1 : qe.left = Rt - Xt, qe.top = zn - on, s.dragging = { top: -1, left: -1 }, s.isDragging = !1;
          break;
        }
      }
      let rt;
      K.value, rt = he(qe.top, qe.left), d = Je, f = wt, (O !== rt.x || $ !== rt.y) && i("move", o.i, rt.x, rt.y), Oe.type === "dragend" && (S !== O || C !== $) && i("moved", o.i, rt.x, rt.y), a.emit("dragEvent", Oe.type, o.i, rt.x, rt.y, k, P);
    }
    function se(Oe, je, De, Je) {
      const wt = Me();
      let lt;
      return K.value ? lt = {
        right: Math.round(wt * Oe + (Oe + 1) * s.margin[0]),
        top: Math.round(s.rowHeight * je + (je + 1) * s.margin[1]),
        // 0 * Infinity === NaN, which causes problems with resize constraints;
        // Fix this if it occurs.
        // Note we do it here rather than later because Math.round(Infinity) causes depot
        width: De === 1 / 0 ? De : Math.round(wt * De + Math.max(0, De - 1) * s.margin[0]),
        height: Je === 1 / 0 ? Je : Math.round(s.rowHeight * Je + Math.max(0, Je - 1) * s.margin[1])
      } : lt = {
        left: Math.round(wt * Oe + (Oe + 1) * s.margin[0]),
        top: Math.round(s.rowHeight * je + (je + 1) * s.margin[1]),
        // 0 * Infinity === NaN, which causes problems with resize constraints;
        // Fix this if it occurs.
        // Note we do it here rather than later because Math.round(Infinity) causes depot
        width: De === 1 / 0 ? De : Math.round(wt * De + Math.max(0, De - 1) * s.margin[0]),
        height: Je === 1 / 0 ? Je : Math.round(s.rowHeight * Je + Math.max(0, Je - 1) * s.margin[1])
      }, lt;
    }
    function he(Oe, je) {
      const De = Me();
      let Je = Math.round((je - s.margin[0]) / (De + s.margin[0])), wt = Math.round((Oe - s.margin[1]) / (s.rowHeight + s.margin[1]));
      return Je = Math.max(Math.min(Je, s.cols - P), 0), wt = Math.max(Math.min(wt, s.maxRows - k), 0), { x: Je, y: wt };
    }
    function Me() {
      return (s.containerWidth - s.margin[0] * (s.cols + 1)) / s.cols;
    }
    function ke(Oe, je, De) {
      return Number.isFinite(Oe) ? Math.round(je * Oe + Math.max(0, Oe - 1) * De) : Oe;
    }
    function Le(Oe, je, De) {
      return Math.max(Math.min(Oe, De), je);
    }
    function Re(Oe, je, De = !1) {
      const Je = Me();
      let wt = Math.round((je + s.margin[0]) / (Je + s.margin[0])), lt = 0;
      return De ? lt = Math.ceil((Oe + s.margin[1]) / (s.rowHeight + s.margin[1])) : lt = Math.round((Oe + s.margin[1]) / (s.rowHeight + s.margin[1])), wt = Math.max(Math.min(wt, s.cols - O), 0), lt = Math.max(Math.min(lt, s.maxRows - $), 0), { w: wt, h: lt };
    }
    function We(Oe, je) {
      s.containerWidth = Oe;
    }
    function et() {
      de();
    }
    function Fe() {
      !l.value && x.value && (l.value = x1(x.value), s.useStyleCursor || l.value.styleCursor(!1));
    }
    const Ne = p1(ae);
    function Ge() {
      if (Fe(), !!l.value)
        if (s.draggable && !o.static) {
          const Oe = {
            ignoreFrom: o.dragIgnoreFrom,
            allowFrom: o.dragAllowFrom,
            ...o.dragOption
          };
          l.value.draggable(Oe), u || (u = !0, l.value.on("dragstart dragmove dragend", (je) => {
            je.type === "dragmove" ? Ne(je) : ae(je);
          }));
        } else
          l.value.draggable({ enabled: !1 });
    }
    const it = p1(we);
    function Ke() {
      if (Fe(), !!l.value)
        if (s.resizable && !o.static) {
          const Oe = se(0, 0, o.maxW, o.maxH), je = se(0, 0, o.minW, o.minH), De = {
            edges: {
              left: K.value ? `.${ge.value[0]}` : !1,
              right: K.value ? !1 : `.${ge.value[0]}`,
              bottom: `.${ge.value[0]}`,
              top: !1
            },
            ignoreFrom: o.resizeIgnoreFrom,
            restrictSize: {
              min: {
                height: je.height * s.transformScale,
                width: je.width * s.transformScale
              },
              max: {
                height: Oe.height * s.transformScale,
                width: Oe.width * s.transformScale
              }
            },
            ...o.resizeOption
          };
          o.preserveAspectRatio && (De.modifiers = [x1.modifiers.aspectRatio({ ratio: "preserve" })]), l.value.resizable(De), c || (c = !0, l.value.on("resizestart resizemove resizeend", (Je) => {
            Je.type === "resizemove" ? it(Je) : we(Je);
          }));
        } else
          l.value.resizable({ enabled: !1 });
    }
    return (Oe, je) => (ee(), ve("section", {
      ref_key: "wrapper",
      ref: x,
      class: ct(xe.value),
      style: xt(s.style)
    }, [
      Wr(Oe.$slots, "default"),
      Y.value ? (ee(), ve("span", {
        key: 0,
        class: ct(ge.value)
      }, null, 2)) : He("", !0)
    ], 6));
  }
}), kl = typeof window < "u";
var S1;
kl && (S1 = window?.navigator) != null && S1.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent);
function C1(e) {
  return e != null;
}
function $1() {
}
const BV = Object.freeze({
  aliceblue: "f0f8ff",
  antiquewhite: "faebd7",
  aqua: "0ff",
  aquamarine: "7fffd4",
  azure: "f0ffff",
  beige: "f5f5dc",
  bisque: "ffe4c4",
  black: "000",
  blanchedalmond: "ffebcd",
  blue: "00f",
  blueviolet: "8a2be2",
  brown: "a52a2a",
  burlywood: "deb887",
  burntsienna: "ea7e5d",
  cadetblue: "5f9ea0",
  chartreuse: "7fff00",
  chocolate: "d2691e",
  coral: "ff7f50",
  cornflowerblue: "6495ed",
  cornsilk: "fff8dc",
  crimson: "dc143c",
  cyan: "0ff",
  darkblue: "00008b",
  darkcyan: "008b8b",
  darkgoldenrod: "b8860b",
  darkgray: "a9a9a9",
  darkgreen: "006400",
  darkgrey: "a9a9a9",
  darkkhaki: "bdb76b",
  darkmagenta: "8b008b",
  darkolivegreen: "556b2f",
  darkorange: "ff8c00",
  darkorchid: "9932cc",
  darkred: "8b0000",
  darksalmon: "e9967a",
  darkseagreen: "8fbc8f",
  darkslateblue: "483d8b",
  darkslategray: "2f4f4f",
  darkslategrey: "2f4f4f",
  darkturquoise: "00ced1",
  darkviolet: "9400d3",
  deeppink: "ff1493",
  deepskyblue: "00bfff",
  dimgray: "696969",
  dimgrey: "696969",
  dodgerblue: "1e90ff",
  firebrick: "b22222",
  floralwhite: "fffaf0",
  forestgreen: "228b22",
  fuchsia: "f0f",
  gainsboro: "dcdcdc",
  ghostwhite: "f8f8ff",
  gold: "ffd700",
  goldenrod: "daa520",
  gray: "808080",
  green: "008000",
  greenyellow: "adff2f",
  grey: "808080",
  honeydew: "f0fff0",
  hotpink: "ff69b4",
  indianred: "cd5c5c",
  indigo: "4b0082",
  ivory: "fffff0",
  khaki: "f0e68c",
  lavender: "e6e6fa",
  lavenderblush: "fff0f5",
  lawngreen: "7cfc00",
  lemonchiffon: "fffacd",
  lightblue: "add8e6",
  lightcoral: "f08080",
  lightcyan: "e0ffff",
  lightgoldenrodyellow: "fafad2",
  lightgray: "d3d3d3",
  lightgreen: "90ee90",
  lightgrey: "d3d3d3",
  lightpink: "ffb6c1",
  lightsalmon: "ffa07a",
  lightseagreen: "20b2aa",
  lightskyblue: "87cefa",
  lightslategray: "789",
  lightslategrey: "789",
  lightsteelblue: "b0c4de",
  lightyellow: "ffffe0",
  lime: "0f0",
  limegreen: "32cd32",
  linen: "faf0e6",
  magenta: "f0f",
  maroon: "800000",
  mediumaquamarine: "66cdaa",
  mediumblue: "0000cd",
  mediumorchid: "ba55d3",
  mediumpurple: "9370db",
  mediumseagreen: "3cb371",
  mediumslateblue: "7b68ee",
  mediumspringgreen: "00fa9a",
  mediumturquoise: "48d1cc",
  mediumvioletred: "c71585",
  midnightblue: "191970",
  mintcream: "f5fffa",
  mistyrose: "ffe4e1",
  moccasin: "ffe4b5",
  navajowhite: "ffdead",
  navy: "000080",
  oldlace: "fdf5e6",
  olive: "808000",
  olivedrab: "6b8e23",
  orange: "ffa500",
  orangered: "ff4500",
  orchid: "da70d6",
  palegoldenrod: "eee8aa",
  palegreen: "98fb98",
  paleturquoise: "afeeee",
  palevioletred: "db7093",
  papayawhip: "ffefd5",
  peachpuff: "ffdab9",
  peru: "cd853f",
  pink: "ffc0cb",
  plum: "dda0dd",
  powderblue: "b0e0e6",
  purple: "800080",
  rebeccapurple: "663399",
  red: "f00",
  rosybrown: "bc8f8f",
  royalblue: "4169e1",
  saddlebrown: "8b4513",
  salmon: "fa8072",
  sandybrown: "f4a460",
  seagreen: "2e8b57",
  seashell: "fff5ee",
  sienna: "a0522d",
  silver: "c0c0c0",
  skyblue: "87ceeb",
  slateblue: "6a5acd",
  slategray: "708090",
  slategrey: "708090",
  snow: "fffafa",
  springgreen: "00ff7f",
  steelblue: "4682b4",
  tan: "d2b48c",
  teal: "008080",
  thistle: "d8bfd8",
  tomato: "ff6347",
  turquoise: "40e0d0",
  violet: "ee82ee",
  wheat: "f5deb3",
  white: "fff",
  whitesmoke: "f5f5f5",
  yellow: "ff0",
  yellowgreen: "9acd32"
});
Object.freeze(new Set(Object.keys(BV)));
const LV = kl && ("ontouchstart" in window || FV() > 0), P1 = LV ? "pointerdown" : "click";
function FV() {
  return typeof navigator < "u" && (navigator.maxTouchPoints || navigator.msMaxTouchPoints) || 0;
}
function HV(e, t, n = window.Event) {
  const { type: o, bubbles: i = !1, cancelable: r = !1, ...a } = t;
  if (!C1(o) || o === "") return !1;
  let l;
  return C1(n) ? l = new n(o, { bubbles: i, cancelable: r }) : (l = document.createEvent("HTMLEvents"), l.initEvent(o, i, r)), Object.assign(l, a), e.dispatchEvent(l);
}
const VV = "clickoutside", jV = /* @__PURE__ */ new Set();
let ug = null;
function WV(e, t) {
  return e instanceof Node ? t === e || t.contains(e) || !!t.__transferElement && (t.__transferElement === e || t.__transferElement.contains(e)) : !1;
}
kl && (P1 === "click" && document.addEventListener(
  "pointerdown",
  (e) => {
    ug = e.target;
  },
  !0
), document.addEventListener(
  P1,
  (e) => {
    const t = ug;
    ug = null, jV.forEach((n) => {
      if (t && WV(t, n))
        return;
      const o = e.target, i = e.composedPath && e.composedPath();
      n !== o && (i ? !i.includes(n) : !n.contains(o)) && (!n.__transferElement || n.__transferElement !== o && !n.__transferElement.contains(o)) && HV(n, { type: VV });
    });
  },
  !0
));
const qV = [
  [
    "requestFullscreen",
    "exitFullscreen",
    "fullscreenElement",
    "fullscreenEnabled",
    "fullscreenchange",
    "fullscreenerror"
  ],
  // New WebKit
  [
    "webkitRequestFullscreen",
    "webkitExitFullscreen",
    "webkitFullscreenElement",
    "webkitFullscreenEnabled",
    "webkitfullscreenchange",
    "webkitfullscreenerror"
  ],
  // Old WebKit
  [
    "webkitRequestFullScreen",
    "webkitCancelFullScreen",
    "webkitCurrentFullScreenElement",
    "webkitCancelFullScreen",
    "webkitfullscreenchange",
    "webkitfullscreenerror"
  ],
  [
    "mozRequestFullScreen",
    "mozCancelFullScreen",
    "mozFullScreenElement",
    "mozFullScreenEnabled",
    "mozfullscreenchange",
    "mozfullscreenerror"
  ],
  [
    "msRequestFullscreen",
    "msExitFullscreen",
    "msFullscreenElement",
    "msFullscreenEnabled",
    "MSFullscreenChange",
    "MSFullscreenError"
  ]
];
let xd;
if (kl) {
  for (const e of qV)
    if (e[1] in document) {
      xd = e;
      break;
    }
}
R(() => !1);
const GV = /* @__PURE__ */ new Set(), KV = /* @__PURE__ */ new WeakMap();
if (kl && xd) {
  const e = xd[2], t = xd[4];
  document.addEventListener(
    t,
    () => {
      if (GV.forEach((n) => {
        n.value = !1;
      }), document[e]) {
        const n = KV.get(document[e]);
        n && (n.value = !0);
      }
    },
    !1
  );
}
const G2 = /* @__PURE__ */ new Map();
G2.set("x", 0);
G2.set("y", 0);
var gl = [], YV = function() {
  return gl.some(function(e) {
    return e.activeTargets.length > 0;
  });
}, UV = function() {
  return gl.some(function(e) {
    return e.skippedTargets.length > 0;
  });
}, O1 = "ResizeObserver loop completed with undelivered notifications.", XV = function() {
  var e;
  typeof ErrorEvent == "function" ? e = new ErrorEvent("error", {
    message: O1
  }) : (e = document.createEvent("Event"), e.initEvent("error", !1, !1), e.message = O1), window.dispatchEvent(e);
}, Yu;
(function(e) {
  e.BORDER_BOX = "border-box", e.CONTENT_BOX = "content-box", e.DEVICE_PIXEL_CONTENT_BOX = "device-pixel-content-box";
})(Yu || (Yu = {}));
var hl = function(e) {
  return Object.freeze(e);
}, QV = /* @__PURE__ */ (function() {
  function e(t, n) {
    this.inlineSize = t, this.blockSize = n, hl(this);
  }
  return e;
})(), K2 = (function() {
  function e(t, n, o, i) {
    return this.x = t, this.y = n, this.width = o, this.height = i, this.top = this.y, this.left = this.x, this.bottom = this.top + this.height, this.right = this.left + this.width, hl(this);
  }
  return e.prototype.toJSON = function() {
    var t = this, n = t.x, o = t.y, i = t.top, r = t.right, a = t.bottom, l = t.left, s = t.width, u = t.height;
    return { x: n, y: o, top: i, right: r, bottom: a, left: l, width: s, height: u };
  }, e.fromRect = function(t) {
    return new e(t.x, t.y, t.width, t.height);
  }, e;
})(), Zm = function(e) {
  return e instanceof SVGElement && "getBBox" in e;
}, Y2 = function(e) {
  if (Zm(e)) {
    var t = e.getBBox(), n = t.width, o = t.height;
    return !n && !o;
  }
  var i = e, r = i.offsetWidth, a = i.offsetHeight;
  return !(r || a || e.getClientRects().length);
}, I1 = function(e) {
  var t;
  if (e instanceof Element)
    return !0;
  var n = (t = e?.ownerDocument) === null || t === void 0 ? void 0 : t.defaultView;
  return !!(n && e instanceof n.Element);
}, ZV = function(e) {
  switch (e.tagName) {
    case "INPUT":
      if (e.type !== "image")
        break;
    case "VIDEO":
    case "AUDIO":
    case "EMBED":
    case "OBJECT":
    case "CANVAS":
    case "IFRAME":
    case "IMG":
      return !0;
  }
  return !1;
}, Au = typeof window < "u" ? window : {}, Yc = /* @__PURE__ */ new WeakMap(), M1 = /auto|scroll/, JV = /^tb|vertical/, ej = /msie|trident/i.test(Au.navigator && Au.navigator.userAgent), dr = function(e) {
  return parseFloat(e || "0");
}, gs = function(e, t, n) {
  return e === void 0 && (e = 0), t === void 0 && (t = 0), n === void 0 && (n = !1), new QV((n ? t : e) || 0, (n ? e : t) || 0);
}, T1 = hl({
  devicePixelContentBoxSize: gs(),
  borderBoxSize: gs(),
  contentBoxSize: gs(),
  contentRect: new K2(0, 0, 0, 0)
}), U2 = function(e, t) {
  if (t === void 0 && (t = !1), Yc.has(e) && !t)
    return Yc.get(e);
  if (Y2(e))
    return Yc.set(e, T1), T1;
  var n = getComputedStyle(e), o = Zm(e) && e.ownerSVGElement && e.getBBox(), i = !ej && n.boxSizing === "border-box", r = JV.test(n.writingMode || ""), a = !o && M1.test(n.overflowY || ""), l = !o && M1.test(n.overflowX || ""), s = o ? 0 : dr(n.paddingTop), u = o ? 0 : dr(n.paddingRight), c = o ? 0 : dr(n.paddingBottom), d = o ? 0 : dr(n.paddingLeft), f = o ? 0 : dr(n.borderTopWidth), p = o ? 0 : dr(n.borderRightWidth), m = o ? 0 : dr(n.borderBottomWidth), b = o ? 0 : dr(n.borderLeftWidth), y = d + u, S = s + c, C = b + p, O = f + m, $ = l ? e.offsetHeight - O - e.clientHeight : 0, P = a ? e.offsetWidth - C - e.clientWidth : 0, k = i ? y + C : 0, x = i ? S + O : 0, E = o ? o.width : dr(n.width) - k - P, z = o ? o.height : dr(n.height) - x - $, N = E + y + P + C, D = z + S + $ + O, W = hl({
    devicePixelContentBoxSize: gs(Math.round(E * devicePixelRatio), Math.round(z * devicePixelRatio), r),
    borderBoxSize: gs(N, D, r),
    contentBoxSize: gs(E, z, r),
    contentRect: new K2(d, s, E, z)
  });
  return Yc.set(e, W), W;
}, X2 = function(e, t, n) {
  var o = U2(e, n), i = o.borderBoxSize, r = o.contentBoxSize, a = o.devicePixelContentBoxSize;
  switch (t) {
    case Yu.DEVICE_PIXEL_CONTENT_BOX:
      return a;
    case Yu.BORDER_BOX:
      return i;
    default:
      return r;
  }
}, tj = /* @__PURE__ */ (function() {
  function e(t) {
    var n = U2(t);
    this.target = t, this.contentRect = n.contentRect, this.borderBoxSize = hl([n.borderBoxSize]), this.contentBoxSize = hl([n.contentBoxSize]), this.devicePixelContentBoxSize = hl([n.devicePixelContentBoxSize]);
  }
  return e;
})(), Q2 = function(e) {
  if (Y2(e))
    return 1 / 0;
  for (var t = 0, n = e.parentNode; n; )
    t += 1, n = n.parentNode;
  return t;
}, nj = function() {
  var e = 1 / 0, t = [];
  gl.forEach(function(r) {
    if (r.activeTargets.length !== 0) {
      var a = [];
      r.activeTargets.forEach(function(l) {
        var s = new tj(l.target), u = Q2(l.target);
        a.push(s), l.lastReportedSize = X2(l.target, l.observedBox), u < e && (e = u);
      }), t.push(function() {
        r.callback.call(r.observer, a, r.observer);
      }), r.activeTargets.splice(0, r.activeTargets.length);
    }
  });
  for (var n = 0, o = t; n < o.length; n++) {
    var i = o[n];
    i();
  }
  return e;
}, k1 = function(e) {
  gl.forEach(function(t) {
    t.activeTargets.splice(0, t.activeTargets.length), t.skippedTargets.splice(0, t.skippedTargets.length), t.observationTargets.forEach(function(n) {
      n.isActive() && (Q2(n.target) > e ? t.activeTargets.push(n) : t.skippedTargets.push(n));
    });
  });
}, oj = function() {
  var e = 0;
  for (k1(e); YV(); )
    e = nj(), k1(e);
  return UV() && XV(), e > 0;
}, cg, Z2 = [], ij = function() {
  return Z2.splice(0).forEach(function(e) {
    return e();
  });
}, rj = function(e) {
  if (!cg) {
    var t = 0, n = document.createTextNode(""), o = { characterData: !0 };
    new MutationObserver(function() {
      return ij();
    }).observe(n, o), cg = function() {
      n.textContent = "".concat(t ? t-- : t++);
    };
  }
  Z2.push(e), cg();
}, aj = function(e) {
  rj(function() {
    requestAnimationFrame(e);
  });
}, wd = 0, lj = function() {
  return !!wd;
}, sj = 250, uj = { attributes: !0, characterData: !0, childList: !0, subtree: !0 }, E1 = [
  "resize",
  "load",
  "transitionend",
  "animationend",
  "animationstart",
  "animationiteration",
  "keyup",
  "keydown",
  "mouseup",
  "mousedown",
  "mouseover",
  "mouseout",
  "blur",
  "focus"
], _1 = function(e) {
  return e === void 0 && (e = 0), Date.now() + e;
}, dg = !1, cj = (function() {
  function e() {
    var t = this;
    this.stopped = !0, this.listener = function() {
      return t.schedule();
    };
  }
  return e.prototype.run = function(t) {
    var n = this;
    if (t === void 0 && (t = sj), !dg) {
      dg = !0;
      var o = _1(t);
      aj(function() {
        var i = !1;
        try {
          i = oj();
        } finally {
          if (dg = !1, t = o - _1(), !lj())
            return;
          i ? n.run(1e3) : t > 0 ? n.run(t) : n.start();
        }
      });
    }
  }, e.prototype.schedule = function() {
    this.stop(), this.run();
  }, e.prototype.observe = function() {
    var t = this, n = function() {
      return t.observer && t.observer.observe(document.body, uj);
    };
    document.body ? n() : Au.addEventListener("DOMContentLoaded", n);
  }, e.prototype.start = function() {
    var t = this;
    this.stopped && (this.stopped = !1, this.observer = new MutationObserver(this.listener), this.observe(), E1.forEach(function(n) {
      return Au.addEventListener(n, t.listener, !0);
    }));
  }, e.prototype.stop = function() {
    var t = this;
    this.stopped || (this.observer && this.observer.disconnect(), E1.forEach(function(n) {
      return Au.removeEventListener(n, t.listener, !0);
    }), this.stopped = !0);
  }, e;
})(), Wh = new cj(), A1 = function(e) {
  !wd && e > 0 && Wh.start(), wd += e, !wd && Wh.stop();
}, dj = function(e) {
  return !Zm(e) && !ZV(e) && getComputedStyle(e).display === "inline";
}, fj = (function() {
  function e(t, n) {
    this.target = t, this.observedBox = n || Yu.CONTENT_BOX, this.lastReportedSize = {
      inlineSize: 0,
      blockSize: 0
    };
  }
  return e.prototype.isActive = function() {
    var t = X2(this.target, this.observedBox, !0);
    return dj(this.target) && (this.lastReportedSize = t), this.lastReportedSize.inlineSize !== t.inlineSize || this.lastReportedSize.blockSize !== t.blockSize;
  }, e;
})(), pj = /* @__PURE__ */ (function() {
  function e(t, n) {
    this.activeTargets = [], this.skippedTargets = [], this.observationTargets = [], this.observer = t, this.callback = n;
  }
  return e;
})(), Uc = /* @__PURE__ */ new WeakMap(), D1 = function(e, t) {
  for (var n = 0; n < e.length; n += 1)
    if (e[n].target === t)
      return n;
  return -1;
}, Xc = (function() {
  function e() {
  }
  return e.connect = function(t, n) {
    var o = new pj(t, n);
    Uc.set(t, o);
  }, e.observe = function(t, n, o) {
    var i = Uc.get(t), r = i.observationTargets.length === 0;
    D1(i.observationTargets, n) < 0 && (r && gl.push(i), i.observationTargets.push(new fj(n, o && o.box)), A1(1), Wh.schedule());
  }, e.unobserve = function(t, n) {
    var o = Uc.get(t), i = D1(o.observationTargets, n), r = o.observationTargets.length === 1;
    i >= 0 && (r && gl.splice(gl.indexOf(o), 1), o.observationTargets.splice(i, 1), A1(-1));
  }, e.disconnect = function(t) {
    var n = this, o = Uc.get(t);
    o.observationTargets.slice().forEach(function(i) {
      return n.unobserve(t, i.target);
    }), o.activeTargets.splice(0, o.activeTargets.length);
  }, e;
})(), gj = (function() {
  function e(t) {
    if (arguments.length === 0)
      throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");
    if (typeof t != "function")
      throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");
    Xc.connect(this, t);
  }
  return e.prototype.observe = function(t, n) {
    if (arguments.length === 0)
      throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");
    if (!I1(t))
      throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");
    Xc.observe(this, t, n);
  }, e.prototype.unobserve = function(t) {
    if (arguments.length === 0)
      throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");
    if (!I1(t))
      throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");
    Xc.unobserve(this, t);
  }, e.prototype.disconnect = function() {
    Xc.disconnect(this);
  }, e.toString = function() {
    return "function ResizeObserver () { [polyfill code] }";
  }, e;
})();
const Yd = /* @__PURE__ */ new WeakMap();
function hj(e) {
  var t;
  for (let n = 0, o = e.length; n < o; ++n) {
    const i = e[n], r = Yd.get(i.target);
    if (typeof r == "function") {
      const { inlineSize: a, blockSize: l } = ((t = i.borderBoxSize) == null ? void 0 : t[0]) ?? {}, { offsetWidth: s, offsetHeight: u } = i.target;
      r(
        Object.assign(i, {
          offsetWidth: s,
          offsetHeight: u,
          width: a ?? s,
          height: l ?? u
        })
      );
    }
  }
}
const J2 = new (kl && window.ResizeObserver || gj)(
  hj
);
function z1(e, t) {
  Yd.set(e, t), J2.observe(e);
}
function R1(e) {
  Yd.has(e) && (J2.unobserve(e), Yd.delete(e));
}
function vj(e = {}) {
  let t = $1;
  const n = Ie(
    () => M(e.target),
    (i) => {
      t(), !(!i || typeof e.onResize != "function") && (z1(i, e.onResize), t = () => {
        R1(i), t = $1;
      });
    },
    { immediate: !0 }
  ), o = () => {
    n(), t();
  };
  return lw() && sw(o), {
    /**
     * @deprecated Will be removed in next major version, please directly use `observeResize` from imports.
     */
    observeResize: z1,
    /**
     * @deprecated Will be removed in next major version, please directly use `unobserveResize` from imports.
     */
    unobserveResize: R1,
    unobserve: o
  };
}
const mj = le(!1);
R(() => mj.value);
const N1 = "__theme_style__", fg = "__theme_observer__", B1 = Dn(/* @__PURE__ */ new Map()), L1 = /* @__PURE__ */ new Map();
Ie(B1, () => {
  if (!kl) return;
  L1.clear();
  const e = document.head.querySelector(`#${N1}`);
  e && document.head.removeChild(e);
  const t = document.createElement("style");
  let n = `.${fg} { width: 1px }`, o = 1;
  for (const [i, [r, a]] of B1.entries())
    n += ` html.${r} .${fg}, .${a} .${fg} { width: ${++o}px }`, L1.set(o, i);
  t.textContent = n, t.id = N1, document.head.appendChild(t);
});
const bj = /* @__PURE__ */ ye({
  __name: "grid-layout",
  props: {
    autoSize: { type: Boolean, default: !0 },
    colNum: { default: 12 },
    rowHeight: { default: 150 },
    maxRows: { default: 1 / 0 },
    margin: { default: () => [10, 10] },
    isDraggable: { type: Boolean, default: !0 },
    isResizable: { type: Boolean, default: !0 },
    isMirrored: { type: Boolean, default: !1 },
    isBounded: { type: Boolean, default: !1 },
    useCssTransforms: { type: Boolean, default: !0 },
    verticalCompact: { type: Boolean, default: !0 },
    restoreOnDrag: { type: Boolean, default: !1 },
    layout: {},
    responsive: { type: Boolean, default: !1 },
    responsiveLayouts: { default: () => ({}) },
    transformScale: { default: 1 },
    breakpoints: { default: () => ({ lg: 1200, md: 996, sm: 768, xs: 480, xxs: 0 }) },
    cols: { default: () => ({ lg: 12, md: 10, sm: 6, xs: 4, xxs: 2 }) },
    preventCollision: { type: Boolean, default: !1 },
    useStyleCursor: { type: Boolean, default: !0 }
  },
  emits: [
    "layout-before-mount",
    "layout-mounted",
    "layout-updated",
    "breakpoint-changed",
    "update:layout",
    "layout-ready"
  ],
  setup(e, { expose: t, emit: n }) {
    const o = e, i = n, r = Dn({
      width: -1,
      mergedStyle: {},
      lastLayoutLength: 0,
      isDragging: !1,
      placeholder: {
        x: 0,
        y: 0,
        w: 0,
        h: 0,
        i: ""
      },
      layouts: {},
      // array to store all layouts from different breakpoints
      lastBreakpoint: null,
      // store last active breakpoint
      originalLayout: null
      // store original Layout
    }), a = /* @__PURE__ */ new Map(), l = le(o.layout), s = le(), { observeResize: u, unobserveResize: c } = vj(), d = vV();
    d.on("resizeEvent", f), d.on("dragEvent", p), Xd(() => {
      i("layout-before-mount", l.value);
    }), Pt(() => {
      i("layout-mounted", l.value), Nt(() => {
        IV(l.value), r.originalLayout = l.value, Nt(() => {
          z(), s.value && u(s.value, mV(O, 16)), ts(l.value, o.verticalCompact), i("layout-updated", l.value), C(), O();
        });
      });
    }), At(() => {
      d.clearAll(), s.value && c(s.value);
    });
    function f(D, W, H, L, A, U) {
      x(D, W, H, L, A, U);
    }
    function p(D, W, H, L, A, U) {
      k(D, W, H, L, A, U);
    }
    Ie(
      () => r.width,
      (D, W) => {
        Nt(() => {
          d.emit("updateWidth", D), W === -1 && Nt(() => {
            i("layout-ready", l.value);
          }), C();
        });
      }
    ), Ie(
      () => [o.layout, o.layout.length],
      () => {
        l.value = o.layout, S();
      }
    ), Ie(
      () => o.colNum,
      (D) => {
        d.emit("setColNum", D);
      }
    ), Ie(
      () => o.rowHeight,
      (D) => {
        d.emit("setRowHeight", D);
      }
    ), Ie(
      () => o.isDraggable,
      (D) => {
        d.emit("setDraggable", D);
      }
    ), Ie(
      () => o.isResizable,
      (D) => {
        d.emit("setResizable", D);
      }
    ), Ie(
      () => o.isBounded,
      (D) => {
        d.emit("setBounded", D);
      }
    ), Ie(
      () => o.transformScale,
      (D) => {
        d.emit("setTransformScale", D);
      }
    ), Ie(
      () => o.responsive,
      (D) => {
        D || (i("update:layout", r.originalLayout), d.emit("setColNum", o.colNum)), O();
      }
    ), Ie(
      () => o.maxRows,
      (D) => {
        d.emit("setMaxRows", D);
      }
    ), Ie([() => o.margin, () => o.margin[1]], C), kt(
      B2,
      Dn({
        ...Sd(o),
        ...Sd(r),
        increaseItem: m,
        decreaseItem: b
      })
    ), kt(L2, d), t({ state: r, getItem: y, resizeEvent: x, dragEvent: k, layoutUpdate: S });
    function m(D) {
      a.set(D.i, D);
    }
    function b(D) {
      a.delete(D.i);
    }
    function y(D) {
      return a.get(D);
    }
    function S() {
      if (!ti(l.value) && !ti(r.originalLayout)) {
        if (l.value.length !== r.originalLayout.length) {
          const D = N(l.value, r.originalLayout);
          if (D.length > 0)
            if (l.value.length > r.originalLayout.length)
              r.originalLayout = r.originalLayout.concat(D);
            else {
              const W = new Set(D.map((H) => H.i));
              r.originalLayout = r.originalLayout.filter((H) => !W.has(H.i));
            }
          r.lastLayoutLength = l.value.length, z();
        }
        ts(l.value, o.verticalCompact), d.emit("updateWidth", r.width), C(), i("layout-updated", l.value);
      }
    }
    function C() {
      r.mergedStyle = {
        height: $()
      };
    }
    function O() {
      s.value && (r.width = s.value.offsetWidth), d.emit("resizeEvent");
    }
    function $() {
      if (!o.autoSize) return;
      const D = parseFloat(o.margin[1]);
      return yV(l.value) * (o.rowHeight + D) + D + "px";
    }
    let P;
    function k(D, W, H, L, A, U) {
      let j = g1(l.value, W);
      ti(j) && (j = { h: 0, w: 0, x: 0, y: 0, i: "" }), D === "dragstart" && !o.verticalCompact && (P = l.value.reduce(
        (re, { i: G, x: Y, y: K }) => ({
          ...re,
          [G]: { x: Y, y: K }
        }),
        {}
      )), D === "dragmove" || D === "dragstart" ? (r.placeholder.i = W, r.placeholder.x = j.x, r.placeholder.y = j.y, r.placeholder.w = U, r.placeholder.h = A, Nt(() => {
        r.isDragging = !0;
      }), d.emit("updateWidth", r.width)) : Nt(() => {
        r.isDragging = !1;
      }), l.value = jh(l.value, j, H, L, !0, o.preventCollision), o.restoreOnDrag ? (j.static = !0, ts(l.value, o.verticalCompact, P), j.static = !1) : ts(l.value, o.verticalCompact), d.emit("compact"), C(), D === "dragend" && (P = void 0, i("layout-updated", l.value));
    }
    function x(D, W, H, L, A, U) {
      let j = g1(l.value, W);
      ti(j) && (j = { h: 0, w: 0, x: 0, y: 0, i: "" });
      let re;
      if (o.preventCollision) {
        const G = H2(l.value, { ...j, w: U, h: A }).filter(
          (Y) => Y.i !== j.i
        );
        if (re = G.length > 0, re) {
          let Y = 1 / 0, K = 1 / 0;
          G.forEach((J) => {
            J.x > j.x && (Y = Math.min(Y, J.x)), J.y > j.y && (K = Math.min(K, J.y));
          }), Number.isFinite(Y) && (j.w = Y - j.x), Number.isFinite(K) && (j.h = K - j.y);
        }
      }
      re || (j.w = U, j.h = A), D === "resizestart" || D === "resizemove" ? (r.placeholder.i = W, r.placeholder.x = H, r.placeholder.y = L, r.placeholder.w = j.w, r.placeholder.h = j.h, Nt(() => {
        r.isDragging = !0;
      }), d.emit("updateWidth", r.width)) : D && Nt(() => {
        r.isDragging = !1;
      }), o.responsive && E(), ts(l.value, o.verticalCompact), d.emit("compact"), C(), D === "resizeend" && i("layout-updated", l.value);
    }
    function E() {
      const D = EV(o.breakpoints, r.width);
      if (D === r.lastBreakpoint)
        return;
      const W = W2(D, o.cols);
      !ti(r.lastBreakpoint) && !r.layouts[r.lastBreakpoint] && (r.layouts[r.lastBreakpoint] = Vh(l.value));
      const H = _V(
        r.originalLayout,
        r.layouts,
        o.breakpoints,
        D,
        r.lastBreakpoint,
        W,
        o.verticalCompact
      );
      r.layouts[D] = H, r.lastBreakpoint !== D && i("breakpoint-changed", D, H), l.value = H, i("update:layout", H), r.lastBreakpoint = D, d.emit("setColNum", W);
    }
    function z() {
      r.layouts = Object.assign({}, o.responsiveLayouts);
    }
    function N(D, W) {
      const H = new Set(W.map((j) => j.i)), L = new Set(D.map((j) => j.i)), A = D.filter((j) => !H.has(j.i)), U = W.filter((j) => !L.has(j.i));
      return A.concat(U);
    }
    return (D, W) => (ee(), ve("div", {
      ref_key: "wrapper",
      ref: s,
      class: "vgl-layout",
      style: xt(r.mergedStyle)
    }, [
      D.$slots.default ? Wr(D.$slots, "default", { key: 0 }) : (ee(!0), ve(Ve, { key: 1 }, It(l.value, (H) => (ee(), Ze(w1, yO({
        key: H.i,
        ref_for: !0
      }, H), {
        default: ce(() => [
          Wr(D.$slots, "item", { item: H })
        ]),
        _: 2
      }, 1040))), 128)),
      Zi(v(w1, {
        class: "vgl-item--placeholder",
        x: r.placeholder.x,
        y: r.placeholder.y,
        w: r.placeholder.w,
        h: r.placeholder.h,
        i: r.placeholder.i
      }, null, 8, ["x", "y", "w", "h", "i"]), [
        [mr, r.isDragging]
      ])
    ], 4));
  }
});
(function() {
  try {
    if (typeof document < "u") {
      var e = document.createElement("style");
      e.appendChild(document.createTextNode('.vgl-layout{--vgl-placeholder-bg: red;--vgl-placeholder-opacity: 20%;--vgl-placeholder-z-index: 2;--vgl-item-resizing-z-index: 3;--vgl-item-resizing-opacity: 60%;--vgl-item-dragging-z-index: 3;--vgl-item-dragging-opacity: 100%;--vgl-resizer-size: 10px;--vgl-resizer-border-color: #444;--vgl-resizer-border-width: 2px;position:relative;box-sizing:border-box;transition:height .2s ease}.vgl-item{position:absolute;box-sizing:border-box;transition:.2s ease;transition-property:left,top,right}.vgl-item--placeholder{z-index:var(--vgl-placeholder-z-index, 2);-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vgl-placeholder-bg, red);opacity:var(--vgl-placeholder-opacity, 20%);transition-duration:.1s}.vgl-item--no-touch{touch-action:none}.vgl-item--transform{right:auto;left:0;transition-property:transform}.vgl-item--transform.vgl-item--rtl{right:0;left:auto}.vgl-item--resizing{z-index:var(--vgl-item-resizing-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-resizing-opacity, 60%)}.vgl-item--dragging{z-index:var(--vgl-item-dragging-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-dragging-opacity, 100%);transition:none}.vgl-item__resizer{position:absolute;right:0;bottom:0;box-sizing:border-box;width:var(--vgl-resizer-size);height:var(--vgl-resizer-size);cursor:se-resize}.vgl-item__resizer:before{position:absolute;top:0;right:3px;bottom:3px;left:0;content:"";border:0 solid var(--vgl-resizer-border-color);border-right-width:var(--vgl-resizer-border-width);border-bottom-width:var(--vgl-resizer-border-width)}.vgl-item__resizer--rtl{right:auto;left:0;cursor:sw-resize}.vgl-item__resizer--rtl:before{top:0;right:0;bottom:3px;left:3px;border-right-width:0;border-bottom-width:var(--vgl-resizer-border-width);border-left-width:var(--vgl-resizer-border-width)}')), document.head.appendChild(e);
    }
  } catch (t) {
    console.error("vite-plugin-css-injected-by-js", t);
  }
})();
const eO = Symbol("panelEditor");
function yj(e) {
  kt(eO, e);
}
function qs() {
  const e = Tt(eO);
  if (!e)
    throw new Error("usePanelEditor must be used within a PanelEditorProvider");
  return e;
}
function xj(e, t, { signal: n, edges: o } = {}) {
  let i, r = null;
  const a = o != null && o.includes("leading"), l = o == null || o.includes("trailing"), s = () => {
    r !== null && (e.apply(i, r), i = void 0, r = null);
  }, u = () => {
    l && s(), p();
  };
  let c = null;
  const d = () => {
    c != null && clearTimeout(c), c = setTimeout(() => {
      c = null, u();
    }, t);
  }, f = () => {
    c !== null && (clearTimeout(c), c = null);
  }, p = () => {
    f(), i = void 0, r = null;
  }, m = () => {
    s();
  }, b = function(...y) {
    if (n?.aborted)
      return;
    i = this, r = y;
    const S = c == null;
    d(), a && S && s();
  };
  return b.schedule = d, b.cancel = p, b.flush = m, n?.addEventListener("abort", p, { once: !0 }), b;
}
function wj() {
}
function Hi(e, t, n) {
  return n == null ? Math.min(e, t) : Math.min(Math.max(e, t), n);
}
function F1(e) {
  return Object.getOwnPropertySymbols(e).filter((t) => Object.prototype.propertyIsEnumerable.call(e, t));
}
function H1(e) {
  return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e);
}
const Sj = "[object RegExp]", Cj = "[object String]", $j = "[object Number]", Pj = "[object Boolean]", V1 = "[object Arguments]", Oj = "[object Symbol]", Ij = "[object Date]", Mj = "[object Map]", Tj = "[object Set]", kj = "[object Array]", Ej = "[object Function]", _j = "[object ArrayBuffer]", pg = "[object Object]", Aj = "[object Error]", Dj = "[object DataView]", zj = "[object Uint8Array]", Rj = "[object Uint8ClampedArray]", Nj = "[object Uint16Array]", Bj = "[object Uint32Array]", Lj = "[object BigUint64Array]", Fj = "[object Int8Array]", Hj = "[object Int16Array]", Vj = "[object Int32Array]", jj = "[object BigInt64Array]", Wj = "[object Float32Array]", qj = "[object Float64Array]";
function j1(e) {
  if (!e || typeof e != "object")
    return !1;
  const t = Object.getPrototypeOf(e);
  return t === null || t === Object.prototype || Object.getPrototypeOf(t) === null ? Object.prototype.toString.call(e) === "[object Object]" : !1;
}
function Gj(e, t) {
  return e === t || Number.isNaN(e) && Number.isNaN(t);
}
function Kj(e, t, n) {
  return xu(e, t, void 0, void 0, void 0, void 0, n);
}
function xu(e, t, n, o, i, r, a) {
  const l = a(e, t, n, o, i, r);
  if (l !== void 0)
    return l;
  if (typeof e == typeof t)
    switch (typeof e) {
      case "bigint":
      case "string":
      case "boolean":
      case "symbol":
      case "undefined":
        return e === t;
      case "number":
        return e === t || Object.is(e, t);
      case "function":
        return e === t;
      case "object":
        return Du(e, t, r, a);
    }
  return Du(e, t, r, a);
}
function Du(e, t, n, o) {
  if (Object.is(e, t))
    return !0;
  let i = H1(e), r = H1(t);
  if (i === V1 && (i = pg), r === V1 && (r = pg), i !== r)
    return !1;
  switch (i) {
    case Cj:
      return e.toString() === t.toString();
    case $j: {
      const s = e.valueOf(), u = t.valueOf();
      return Gj(s, u);
    }
    case Pj:
    case Ij:
    case Oj:
      return Object.is(e.valueOf(), t.valueOf());
    case Sj:
      return e.source === t.source && e.flags === t.flags;
    case Ej:
      return e === t;
  }
  n = n ?? /* @__PURE__ */ new Map();
  const a = n.get(e), l = n.get(t);
  if (a != null && l != null)
    return a === t;
  n.set(e, t), n.set(t, e);
  try {
    switch (i) {
      case Mj: {
        if (e.size !== t.size)
          return !1;
        for (const [s, u] of e.entries())
          if (!t.has(s) || !xu(u, t.get(s), s, e, t, n, o))
            return !1;
        return !0;
      }
      case Tj: {
        if (e.size !== t.size)
          return !1;
        const s = Array.from(e.values()), u = Array.from(t.values());
        for (let c = 0; c < s.length; c++) {
          const d = s[c], f = u.findIndex((p) => xu(d, p, void 0, e, t, n, o));
          if (f === -1)
            return !1;
          u.splice(f, 1);
        }
        return !0;
      }
      case kj:
      case zj:
      case Rj:
      case Nj:
      case Bj:
      case Lj:
      case Fj:
      case Hj:
      case Vj:
      case jj:
      case Wj:
      case qj: {
        if (typeof Buffer < "u" && Buffer.isBuffer(e) !== Buffer.isBuffer(t) || e.length !== t.length)
          return !1;
        for (let s = 0; s < e.length; s++)
          if (!xu(e[s], t[s], s, e, t, n, o))
            return !1;
        return !0;
      }
      case _j:
        return e.byteLength !== t.byteLength ? !1 : Du(new Uint8Array(e), new Uint8Array(t), n, o);
      case Dj:
        return e.byteLength !== t.byteLength || e.byteOffset !== t.byteOffset ? !1 : Du(new Uint8Array(e), new Uint8Array(t), n, o);
      case Aj:
        return e.name === t.name && e.message === t.message;
      case pg: {
        if (!(Du(e.constructor, t.constructor, n, o) || j1(e) && j1(t)))
          return !1;
        const s = [...Object.keys(e), ...F1(e)], u = [...Object.keys(t), ...F1(t)];
        if (s.length !== u.length)
          return !1;
        for (let c = 0; c < s.length; c++) {
          const d = s[c], f = e[d];
          if (!Object.hasOwn(t, d))
            return !1;
          const p = t[d];
          if (!xu(f, p, d, e, t, n, o))
            return !1;
        }
        return !0;
      }
      default:
        return !1;
    }
  } finally {
    n.delete(e), n.delete(t);
  }
}
function Yj(e, t) {
  return Kj(e, t, wj);
}
const Uj = "_splitView_pzp7c_6", Xj = "_sashContainer_pzp7c_13", Qj = "_sash_pzp7c_13", Zj = "_splitViewContainer_pzp7c_24", Jj = "_splitViewView_pzp7c_31", e7 = "_vertical_pzp7c_37", t7 = "_horizontal_pzp7c_41", n7 = "_separatorBorder_pzp7c_45", ya = {
  splitView: Uj,
  sashContainer: Xj,
  sash: Qj,
  splitViewContainer: Zj,
  splitViewView: Jj,
  vertical: e7,
  horizontal: t7,
  separatorBorder: n7
};
let tO = !1, nO = !1, cu;
typeof navigator == "object" && (cu = navigator.userAgent, nO = cu.includes("Macintosh"), tO = (cu.includes("Macintosh") || cu.includes("iPad") || cu.includes("iPhone")) && !!navigator.maxTouchPoints && navigator.maxTouchPoints > 0);
const oO = tO, o7 = nO;
class i7 {
  _size;
  getSize() {
    return this._size;
  }
  setSize(t) {
    this._size = t;
  }
}
function Qc(e, t) {
  const n = e.length, o = n - t.length;
  return o >= 0 && e.slice(o, n) === t;
}
function r7(e) {
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
var W1 = { exports: {} }, q1;
function a7() {
  return q1 || (q1 = 1, (function(e) {
    var t = Object.prototype.hasOwnProperty, n = "~";
    function o() {
    }
    Object.create && (o.prototype = /* @__PURE__ */ Object.create(null), new o().__proto__ || (n = !1));
    function i(s, u, c) {
      this.fn = s, this.context = u, this.once = c || !1;
    }
    function r(s, u, c, d, f) {
      if (typeof c != "function")
        throw new TypeError("The listener must be a function");
      var p = new i(c, d || s, f), m = n ? n + u : u;
      return s._events[m] ? s._events[m].fn ? s._events[m] = [s._events[m], p] : s._events[m].push(p) : (s._events[m] = p, s._eventsCount++), s;
    }
    function a(s, u) {
      --s._eventsCount === 0 ? s._events = new o() : delete s._events[u];
    }
    function l() {
      this._events = new o(), this._eventsCount = 0;
    }
    l.prototype.eventNames = function() {
      var s = [], u, c;
      if (this._eventsCount === 0) return s;
      for (c in u = this._events)
        t.call(u, c) && s.push(n ? c.slice(1) : c);
      return Object.getOwnPropertySymbols ? s.concat(Object.getOwnPropertySymbols(u)) : s;
    }, l.prototype.listeners = function(s) {
      var u = n ? n + s : s, c = this._events[u];
      if (!c) return [];
      if (c.fn) return [c.fn];
      for (var d = 0, f = c.length, p = new Array(f); d < f; d++)
        p[d] = c[d].fn;
      return p;
    }, l.prototype.listenerCount = function(s) {
      var u = n ? n + s : s, c = this._events[u];
      return c ? c.fn ? 1 : c.length : 0;
    }, l.prototype.emit = function(s, u, c, d, f, p) {
      var m = n ? n + s : s;
      if (!this._events[m]) return !1;
      var b = this._events[m], y = arguments.length, S, C;
      if (b.fn) {
        switch (b.once && this.removeListener(s, b.fn, void 0, !0), y) {
          case 1:
            return b.fn.call(b.context), !0;
          case 2:
            return b.fn.call(b.context, u), !0;
          case 3:
            return b.fn.call(b.context, u, c), !0;
          case 4:
            return b.fn.call(b.context, u, c, d), !0;
          case 5:
            return b.fn.call(b.context, u, c, d, f), !0;
          case 6:
            return b.fn.call(b.context, u, c, d, f, p), !0;
        }
        for (C = 1, S = new Array(y - 1); C < y; C++)
          S[C - 1] = arguments[C];
        b.fn.apply(b.context, S);
      } else {
        var O = b.length, $;
        for (C = 0; C < O; C++)
          switch (b[C].once && this.removeListener(s, b[C].fn, void 0, !0), y) {
            case 1:
              b[C].fn.call(b[C].context);
              break;
            case 2:
              b[C].fn.call(b[C].context, u);
              break;
            case 3:
              b[C].fn.call(b[C].context, u, c);
              break;
            case 4:
              b[C].fn.call(b[C].context, u, c, d);
              break;
            default:
              if (!S) for ($ = 1, S = new Array(y - 1); $ < y; $++)
                S[$ - 1] = arguments[$];
              b[C].fn.apply(b[C].context, S);
          }
      }
      return !0;
    }, l.prototype.on = function(s, u, c) {
      return r(this, s, u, c, !1);
    }, l.prototype.once = function(s, u, c) {
      return r(this, s, u, c, !0);
    }, l.prototype.removeListener = function(s, u, c, d) {
      var f = n ? n + s : s;
      if (!this._events[f]) return this;
      if (!u)
        return a(this, f), this;
      var p = this._events[f];
      if (p.fn)
        p.fn === u && (!d || p.once) && (!c || p.context === c) && a(this, f);
      else {
        for (var m = 0, b = [], y = p.length; m < y; m++)
          (p[m].fn !== u || d && !p[m].once || c && p[m].context !== c) && b.push(p[m]);
        b.length ? this._events[f] = b.length === 1 ? b[0] : b : a(this, f);
      }
      return this;
    }, l.prototype.removeAllListeners = function(s) {
      var u;
      return s ? (u = n ? n + s : s, this._events[u] && a(this, u)) : (this._events = new o(), this._eventsCount = 0), this;
    }, l.prototype.off = l.prototype.removeListener, l.prototype.addListener = l.prototype.on, l.prefixed = n, l.EventEmitter = l, e.exports = l;
  })(W1)), W1.exports;
}
var l7 = a7();
const Jm = /* @__PURE__ */ r7(l7);
function G1(e, t) {
  const n = e.indexOf(t);
  n !== -1 && (e.splice(n, 1), e.unshift(t));
}
function gg(e, t) {
  const n = e.indexOf(t);
  n !== -1 && (e.splice(n, 1), e.push(t));
}
function wi(e, t, n = 1) {
  const o = Math.max(0, Math.ceil((t - e) / n)), i = Array.from({ length: o });
  let r = -1;
  for (; ++r < o; )
    i[r] = e + r * n;
  return i;
}
const s7 = "_sash_j5cmb_7", u7 = "_disabled_j5cmb_15", c7 = "_mac_j5cmb_19", d7 = "_vertical_j5cmb_19", f7 = "_minimum_j5cmb_23", p7 = "_maximum_j5cmb_27", g7 = "_horizontal_j5cmb_31", h7 = "_hover_j5cmb_126", v7 = "_active_j5cmb_127", _o = {
  sash: s7,
  disabled: u7,
  mac: c7,
  vertical: d7,
  minimum: f7,
  maximum: p7,
  horizontal: g7,
  hover: h7,
  active: v7
};
var ji = /* @__PURE__ */ ((e) => (e[e.Vertical = 0] = "Vertical", e[e.Horizontal = 1] = "Horizontal", e))(ji || {}), tl = /* @__PURE__ */ ((e) => (e[e.Disabled = 0] = "Disabled", e[e.Minimum = 1] = "Minimum", e[e.Maximum = 2] = "Maximum", e[e.Enabled = 3] = "Enabled", e))(tl || {});
let iO = oO ? 20 : 8;
const rO = new Jm();
function m7(e) {
  iO = e, rO.emit("onDidChangeGlobalSize", e);
}
class K1 extends Jm {
  el;
  layoutProvider;
  orientation;
  size;
  hoverDelay = 300;
  hoverDelayerFunc = (t) => t.classList.add("sash-hover", _o.hover);
  hoverDelayer = xj(
    this.hoverDelayerFunc,
    this.hoverDelay
  );
  _state = 3;
  get state() {
    return this._state;
  }
  /**
   * The state of a sash defines whether it can be interacted with by the user
   * as well as what mouse cursor to use, when hovered.
   */
  set state(t) {
    this._state !== t && (this.el.classList.toggle(
      _o.disabled,
      t === 0
      /* Disabled */
    ), this.el.classList.toggle(
      "sash-disabled",
      t === 0
      /* Disabled */
    ), this.el.classList.toggle(
      _o.minimum,
      t === 1
      /* Minimum */
    ), this.el.classList.toggle(
      "sash-minimum",
      t === 1
      /* Minimum */
    ), this.el.classList.toggle(
      _o.maximum,
      t === 2
      /* Maximum */
    ), this.el.classList.toggle(
      "sash-maximum",
      t === 2
      /* Maximum */
    ), this._state = t, this.emit("enablementChange", t));
  }
  constructor(t, n, o) {
    super(), this.el = document.createElement("div"), this.el.classList.add("sash", _o.sash), this.el.dataset.testid = "sash", t.append(this.el), o7 && this.el.classList.add("sash-mac", _o.mac), this.el.addEventListener("pointerdown", this.onPointerStart), this.el.addEventListener("dblclick", this.onPointerDoublePress), this.el.addEventListener("mouseenter", this.onMouseEnter), this.el.addEventListener("mouseleave", this.onMouseLeave), typeof o.size == "number" ? (this.size = o.size, o.orientation === 0 ? this.el.style.width = `${this.size}px` : this.el.style.height = `${this.size}px`) : (this.size = iO, rO.on("onDidChangeGlobalSize", (i) => {
      this.size = i, this.layout();
    })), this.layoutProvider = n, this.orientation = o.orientation ?? 0, this.orientation === 1 ? (this.el.classList.add("sash-horizontal", _o.horizontal), this.el.classList.remove("sash-vertical", _o.vertical)) : (this.el.classList.remove("sash-horizontal", _o.horizontal), this.el.classList.add("sash-vertical", _o.vertical)), o.skipInitialLayout || this.layout();
  }
  onPointerStart = (t) => {
    const n = t.pageX, o = t.pageY, i = {
      startX: n,
      currentX: n,
      startY: o,
      currentY: o
    };
    this.el.classList.add("sash-active", _o.active), this.emit("start", i), this.el.setPointerCapture(t.pointerId);
    const r = (l) => {
      l.preventDefault();
      const s = {
        startX: n,
        currentX: l.pageX,
        startY: o,
        currentY: l.pageY
      };
      this.emit("change", s);
    }, a = (l) => {
      l.preventDefault(), this.el.classList.remove("sash-active", _o.active), this.hoverDelayer.cancel(), this.emit("end"), this.el.releasePointerCapture(l.pointerId), globalThis.removeEventListener("pointermove", r), globalThis.removeEventListener("pointerup", a);
    };
    globalThis.addEventListener("pointermove", r), globalThis.addEventListener("pointerup", a);
  };
  onPointerDoublePress = () => {
    this.emit("reset");
  };
  onMouseEnter = () => {
    this.el.classList.contains(_o.active) ? (this.hoverDelayer.cancel(), this.el.classList.add("sash-hover", _o.hover)) : this.hoverDelayer(this.el);
  };
  onMouseLeave = () => {
    this.hoverDelayer.cancel(), this.el.classList.remove("sash-hover", _o.hover);
  };
  /**
   * Layout the sash. The sash will size and position itself
   * based on its provided {@link SashLayoutProvider layout provider}.
   */
  layout() {
    if (this.orientation === 0) {
      const t = this.layoutProvider;
      this.el.style.left = `${t.getVerticalSashLeft(this) - this.size / 2}px`, t.getVerticalSashTop && (this.el.style.top = `${t.getVerticalSashTop(this)}px`), t.getVerticalSashHeight && (this.el.style.height = `${t.getVerticalSashHeight(this)}px`);
    } else {
      const t = this.layoutProvider;
      this.el.style.top = `${t.getHorizontalSashTop(this) - this.size / 2}px`, t.getHorizontalSashLeft && (this.el.style.left = `${t.getHorizontalSashLeft(this)}px`), t.getHorizontalSashWidth && (this.el.style.width = `${t.getHorizontalSashWidth(this)}px`);
    }
  }
  dispose() {
    this.el.removeEventListener("pointerdown", this.onPointerStart), this.el.removeEventListener("dblclick", this.onPointerDoublePress), this.el.removeEventListener("mouseenter", this.onMouseEnter), this.el.removeEventListener("mouseleave", this.onMouseLeave), this.el.remove();
  }
}
const aO = {
  /**
   * When adding or removing views, distribute the delta space among
   * all other views.
   */
  Distribute: { type: "distribute" },
  /**
   * When adding or removing views, split the delta space with another
   * specific view, indexed by the provided `index`.
   */
  Split: (e) => ({ type: "split", index: e }),
  /**
   * When adding or removing views, assume the view is invisible.
   */
  Invisible: (e) => ({ type: "invisible", cachedVisibleSize: e })
};
var Ud = /* @__PURE__ */ ((e) => (e[e.Normal = 0] = "Normal", e[e.Low = 1] = "Low", e[e.High = 2] = "High", e))(Ud || {});
class lO {
  container;
  view;
  _size;
  _cachedVisibleSize = void 0;
  constructor(t, n, o) {
    this.container = t, this.view = n, this.container.classList.add("split-view-view", ya.splitViewView), this.container.dataset.testid = "split-view-view", typeof o == "number" ? (this._size = o, this._cachedVisibleSize = void 0, t.classList.add("split-view-view-visible")) : (this._size = 0, this._cachedVisibleSize = o.cachedVisibleSize);
  }
  set size(t) {
    this._size = t;
  }
  get size() {
    return this._size;
  }
  get priority() {
    return this.view.priority;
  }
  get snap() {
    return !!this.view.snap;
  }
  get visible() {
    return this._cachedVisibleSize === void 0;
  }
  setVisible(t, n) {
    t !== this.visible && (t ? (this.size = Hi(
      this._cachedVisibleSize ?? 0,
      this.view.minimumSize,
      this.view.maximumSize
    ), this._cachedVisibleSize = void 0) : (this._cachedVisibleSize = typeof n == "number" ? n : this.size, this.size = 0), this.container.classList.toggle("split-view-view-visible", t), this.view.setVisible && this.view.setVisible(t));
  }
  get minimumSize() {
    return this.visible ? this.view.minimumSize : 0;
  }
  get maximumSize() {
    return this.visible ? this.view.maximumSize : 0;
  }
  get cachedVisibleSize() {
    return this._cachedVisibleSize;
  }
}
class b7 extends lO {
  layout(t) {
    if (!this.visible) {
      this.container.style.height = "0px", this.container.style.top = `${t}px`, this.container.style.left = "0px", this.container.style.width = "100%";
      return;
    }
    this.container.style.top = `${t}px`, this.container.style.height = `${this.size}px`, this.container.style.left = "0px", this.container.style.width = "100%", this.view.layout(this.size, t);
  }
}
class y7 extends lO {
  layout(t) {
    if (!this.visible) {
      this.container.style.width = "0px", this.container.style.left = `${t}px`, this.container.style.top = "0px", this.container.style.height = "100%";
      return;
    }
    this.container.style.left = `${t}px`, this.container.style.width = `${this.size}px`, this.container.style.top = "0px", this.container.style.height = "100%", this.view.layout(this.size, t);
  }
}
class x7 extends Jm {
  onDidChange;
  onDidDragStart;
  onDidDragEnd;
  _orientation;
  get orientation() {
    return this._orientation;
  }
  set orientation(t) {
    this._orientation = t;
  }
  sashContainer;
  size = 0;
  contentSize = 0;
  proportions = void 0;
  viewItems = [];
  sashItems = [];
  sashDragState;
  _proportionalLayout;
  get proportionalLayout() {
    return this._proportionalLayout;
  }
  set proportionalLayout(t) {
    this._proportionalLayout = t;
  }
  getSashOrthogonalSize;
  _startSnappingEnabled = !0;
  get startSnappingEnabled() {
    return this._startSnappingEnabled;
  }
  set startSnappingEnabled(t) {
    this._startSnappingEnabled !== t && (this._startSnappingEnabled = t, this.updateSashEnablement());
  }
  _endSnappingEnabled = !0;
  get endSnappingEnabled() {
    return this._endSnappingEnabled;
  }
  set endSnappingEnabled(t) {
    this._endSnappingEnabled !== t && (this._endSnappingEnabled = t, this.updateSashEnablement());
  }
  /** Create a new {@link SplitView} instance. */
  constructor(t, n = {}, o, i, r) {
    if (super(), this._orientation = n.orientation ?? ji.Vertical, this._proportionalLayout = n.proportionalLayout ?? !0, this.getSashOrthogonalSize = n.getSashOrthogonalSize, o && (this.onDidChange = o), i && (this.onDidDragStart = i), r && (this.onDidDragEnd = r), this.sashContainer = document.createElement("div"), this.sashContainer.classList.add("sash-container", ya.sashContainer), t.prepend(this.sashContainer), n.descriptor) {
      this.size = n.descriptor.size;
      for (const [a, l] of n.descriptor.views.entries()) {
        const s = l.size, u = l.container, c = l.view;
        this.addView(u, c, s, a, !0);
      }
      this.contentSize = this.viewItems.reduce((a, l) => a + l.size, 0), this.saveProportions();
    }
  }
  addView(t, n, o, i = this.viewItems.length, r) {
    let a;
    typeof o == "number" ? a = o : o.type === "split" ? a = this.getViewSize(o.index) / 2 : o.type === "invisible" ? a = { cachedVisibleSize: o.cachedVisibleSize } : a = n.minimumSize;
    const l = this.orientation === ji.Vertical ? new b7(t, n, a) : new y7(t, n, a);
    if (this.viewItems.splice(i, 0, l), this.viewItems.length > 1) {
      const s = this.orientation === ji.Vertical ? new K1(
        this.sashContainer,
        {
          getHorizontalSashTop: (d) => this.getSashPosition(d),
          getHorizontalSashWidth: this.getSashOrthogonalSize
        },
        { orientation: ji.Horizontal }
      ) : new K1(
        this.sashContainer,
        {
          getVerticalSashLeft: (d) => this.getSashPosition(d),
          getVerticalSashHeight: this.getSashOrthogonalSize
        },
        { orientation: ji.Vertical }
      ), u = this.orientation === ji.Vertical ? (d) => ({
        sash: s,
        start: d.startY,
        current: d.currentY
      }) : (d) => ({
        sash: s,
        start: d.startX,
        current: d.currentX
      });
      s.on("start", (d) => {
        this.emit("sashDragStart"), this.onSashStart(u(d));
        const f = this.viewItems.map((p) => p.size);
        this.onDidDragStart?.(f);
      }), s.on("change", (d) => this.onSashChange(u(d))), s.on("end", () => {
        this.emit("sashDragEnd");
        let d = this.sashItems.findIndex((p) => p.sash === s);
        if (d === -1) {
          const p = s.el;
          p && (d = this.sashItems.findIndex((m) => m.sash.el === p));
        }
        this.onSashEnd(d);
        const f = this.viewItems.map((p) => p.size);
        this.onDidDragEnd?.(f);
      }), s.on("reset", () => {
        let d = this.sashItems.findIndex((y) => y.sash === s);
        if (d === -1) {
          const y = s.el;
          y && (d = this.sashItems.findIndex((S) => S.sash.el === y));
        }
        const f = wi(d, -1, -1), p = wi(d + 1, this.viewItems.length), m = this.findFirstSnapIndex(f), b = this.findFirstSnapIndex(p);
        typeof m == "number" && !this.viewItems[m].visible || typeof b == "number" && !this.viewItems[b].visible || this.emit("sashreset", d);
      });
      const c = { sash: s };
      this.sashItems.splice(i - 1, 0, c);
    }
    r || this.relayout(), !r && typeof o != "number" && o.type === "distribute" && this.distributeViewSizes();
  }
  removeView(t, n) {
    if (t < 0 || t >= this.viewItems.length)
      throw new Error("Index out of bounds");
    const o = this.viewItems.splice(t, 1)[0].view;
    if (this.viewItems.length > 0) {
      const i = Math.max(t - 1, 0);
      this.sashItems.splice(i, 1)[0].sash.dispose();
    }
    return this.relayout(), n && n.type === "distribute" && this.distributeViewSizes(), o;
  }
  moveView(t, n, o) {
    const i = this.getViewCachedVisibleSize(n), r = i === void 0 ? this.getViewSize(n) : aO.Invisible(i), a = this.removeView(n);
    this.addView(t, a, r, o);
  }
  getViewCachedVisibleSize(t) {
    if (t < 0 || t >= this.viewItems.length)
      throw new Error("Index out of bounds");
    return this.viewItems[t].cachedVisibleSize;
  }
  layout(t = this.size) {
    if (this.viewItems.length === 0)
      return;
    const n = Math.max(this.size, this.contentSize);
    if (this.size = t, this.proportions)
      for (let o = 0; o < this.viewItems.length; o++) {
        const i = this.viewItems[o];
        i && this.proportions[o] !== void 0 && (i.size = Hi(
          Math.round(this.proportions[o] * t),
          i.minimumSize,
          i.maximumSize
        ));
      }
    else {
      const o = wi(0, this.viewItems.length), i = o.filter(
        (a) => this.viewItems[a] && this.viewItems[a].priority === 1
        /* Low */
      ), r = o.filter(
        (a) => this.viewItems[a] && this.viewItems[a].priority === 2
        /* High */
      );
      this.resize(
        this.viewItems.length - 1,
        t - n,
        void 0,
        i,
        r
      );
    }
    this.distributeEmptySpace(), this.layoutViews();
  }
  resizeView(t, n) {
    if (t < 0 || t >= this.viewItems.length)
      return;
    const o = wi(0, this.viewItems.length).filter((l) => l !== t), i = [
      ...o.filter(
        (l) => this.viewItems[l].priority === 1
        /* Low */
      ),
      t
    ], r = o.filter(
      (l) => this.viewItems[l].priority === 2
      /* High */
    ), a = this.viewItems[t];
    n = Math.round(n), n = Hi(n, a.minimumSize, Math.min(a.maximumSize, this.size)), a.size = n, this.relayout(i, r);
  }
  resizeViews(t) {
    for (let [n, o] of t.entries()) {
      const i = this.viewItems[n];
      o = Math.round(o), o = Hi(
        o,
        i.minimumSize,
        Math.min(i.maximumSize, this.size)
      ), i.size = o;
    }
    this.contentSize = this.viewItems.reduce((n, o) => n + o.size, 0), this.saveProportions(), this.layout(this.size);
  }
  getViewSize(t) {
    return t < 0 || t >= this.viewItems.length ? -1 : this.viewItems[t].size;
  }
  isViewVisible(t) {
    if (t < 0 || t >= this.viewItems.length)
      throw new Error("Index out of bounds");
    return this.viewItems[t].visible;
  }
  setViewVisible(t, n) {
    if (t < 0 || t >= this.viewItems.length)
      throw new Error("Index out of bounds");
    this.viewItems[t].setVisible(n), this.emit("sashchange", t), this.distributeEmptySpace(), this.layoutViews(), this.saveProportions();
  }
  distributeViewSizes() {
    const t = [];
    let n = 0;
    for (const l of this.viewItems)
      l.maximumSize - l.minimumSize > 0 && (t.push(l), n += l.size);
    const o = Math.floor(n / t.length);
    for (const l of t)
      l.size = Hi(o, l.minimumSize, l.maximumSize);
    const i = wi(0, this.viewItems.length), r = i.filter(
      (l) => this.viewItems[l].priority === 1
      /* Low */
    ), a = i.filter(
      (l) => this.viewItems[l].priority === 2
      /* High */
    );
    this.relayout(r, a);
  }
  dispose() {
    for (const t of this.sashItems) t.sash.dispose();
    this.sashItems = [], this.viewItems = [], this.sashContainer && this.sashContainer.parentElement && this.sashContainer.remove();
  }
  onSashStart({ sash: t, start: n, current: o }) {
    let i = this.sashItems.findIndex((m) => m.sash === t);
    if (i === -1) {
      const m = t.el;
      m && (i = this.sashItems.findIndex((b) => b.sash.el === m));
    }
    const r = this.viewItems.map((m) => m.size), a = wi(i, -1, -1), l = wi(i + 1, this.viewItems.length), s = this.getMinDelta(a, l, r), u = this.getMaxDelta(a, l, r);
    let c, d;
    const f = this.findFirstSnapIndex(a), p = this.findFirstSnapIndex(l);
    if (typeof f == "number") {
      const m = this.viewItems[f], b = Math.floor(m.minimumSize / 2);
      c = {
        index: f,
        limitDelta: m.visible ? s - b : s + b,
        size: m.size
      };
    }
    if (typeof p == "number") {
      const m = this.viewItems[p], b = Math.floor(m.minimumSize / 2);
      d = {
        index: p,
        limitDelta: m.visible ? u + b : u - b,
        size: m.size
      };
    }
    this.sashDragState = {
      index: i,
      start: n,
      current: o,
      sizes: r,
      minDelta: s,
      maxDelta: u,
      snapBefore: c,
      snapAfter: d
    };
  }
  onSashChange({ current: t }) {
    const { index: n, start: o, sizes: i, minDelta: r, maxDelta: a, snapBefore: l, snapAfter: s } = this.sashDragState, u = t - o;
    this.resize(n, u, i, void 0, void 0, r, a, l, s), this.distributeEmptySpace(), this.layoutViews();
  }
  onSashEnd(t) {
    this.emit("sashchange", t), this.sashDragState = void 0, this.saveProportions();
    const n = this.viewItems.map((o) => o.size);
    this.onDidChange?.(n);
  }
  getMinDelta(t, n, o) {
    const i = t.reduce(
      (a, l) => a + (this.viewItems[l].minimumSize - o[l]),
      0
    ), r = n.reduce(
      (a, l) => a + (o[l] - this.viewItems[l].maximumSize),
      0
    );
    return Math.max(i, r);
  }
  getMaxDelta(t, n, o) {
    const i = t.reduce(
      (a, l) => a + (this.viewItems[l].maximumSize - o[l]),
      0
    ), r = n.reduce(
      (a, l) => a + (o[l] - this.viewItems[l].minimumSize),
      0
    );
    return Math.min(r, i);
  }
  resize(t, n, o, i, r, a = Number.NEGATIVE_INFINITY, l = Number.POSITIVE_INFINITY, s, u) {
    if (t < 0 || t >= this.viewItems.length || this.viewItems.length === 0)
      return 0;
    const c = wi(t, -1, -1), d = wi(t + 1, this.viewItems.length);
    if (r)
      for (const E of r)
        G1(c, E), G1(d, E);
    if (i)
      for (const E of i)
        gg(c, E), gg(d, E);
    const f = o ?? this.viewItems.map((E) => E?.size || 0), p = c.map((E) => this.viewItems[E]), m = c.map((E) => f[E]), b = d.map((E) => this.viewItems[E]), y = d.map((E) => f[E]), S = c.reduce(
      (E, z) => E + (this.viewItems[z].minimumSize - f[z]),
      0
    ), C = c.reduce(
      (E, z) => E + (this.viewItems[z].maximumSize - f[z]),
      0
    ), O = d.length === 0 ? Number.POSITIVE_INFINITY : d.reduce(
      (E, z) => E + (f[z] - this.viewItems[z].minimumSize),
      0
    ), $ = d.length === 0 ? Number.NEGATIVE_INFINITY : d.reduce(
      (E, z) => E + (f[z] - this.viewItems[z].maximumSize),
      0
    ), P = Math.max(S, $, a), k = Math.min(O, C, l);
    let x = !1;
    if (s) {
      const E = this.viewItems[s.index], z = n >= s.limitDelta;
      x = z !== E.visible, E.setVisible(z, s.size);
    }
    if (!x && u) {
      const E = this.viewItems[u.index], z = n < u.limitDelta;
      x = z !== E.visible, E.setVisible(z, u.size);
    }
    if (x)
      return this.resize(
        t,
        n,
        o,
        i,
        r,
        a,
        l
      );
    n = Hi(n, P, k);
    for (let E = 0, z = n; E < p.length; E++) {
      const N = p[E];
      if (!N)
        continue;
      const D = Hi(
        m[E] + z,
        N.minimumSize,
        N.maximumSize
      ), W = D - m[E];
      z -= W, N.size = D;
    }
    for (let E = 0, z = n; E < b.length; E++) {
      const N = b[E];
      if (!N)
        continue;
      const D = Hi(
        y[E] - z,
        N.minimumSize,
        N.maximumSize
      ), W = D - y[E];
      z += W, N.size = D;
    }
    return n;
  }
  distributeEmptySpace(t) {
    if (this.viewItems.length === 0)
      return;
    const n = this.viewItems.reduce((u, c) => u + c.size, 0);
    let o = this.size - n;
    const i = wi(0, this.viewItems.length), r = [], a = i.filter(
      (u) => this.viewItems[u].priority === 1
      /* Low */
    ), l = i.filter(
      (u) => this.viewItems[u].priority === 0
      /* Normal */
    ), s = i.filter(
      (u) => this.viewItems[u].priority === 2
      /* High */
    );
    r.push(
      ...s,
      ...l,
      ...a
    ), typeof t == "number" && gg(r, t);
    for (let u = 0; o !== 0 && u < r.length; u++) {
      const c = this.viewItems[r[u]];
      if (!c)
        continue;
      const d = Hi(
        c.size + o,
        c.minimumSize,
        c.maximumSize
      ), f = d - c.size;
      o -= f, c.size = d;
    }
    this.contentSize = this.viewItems.reduce((u, c) => u + c.size, 0);
  }
  layoutViews() {
    this.contentSize = this.viewItems.reduce((n, o) => n + o.size, 0);
    let t = 0;
    for (const n of this.viewItems)
      n && (n.layout(t), t += n.size);
    for (const n of this.sashItems) n.sash.layout();
    this.updateSashEnablement();
  }
  saveProportions() {
    this.proportionalLayout && this.contentSize > 0 && (this.proportions = this.viewItems.map((t) => t.size / this.contentSize));
  }
  relayout(t, n) {
    const o = this.viewItems.reduce((i, r) => i + r.size, 0);
    this.resize(
      this.viewItems.length - 1,
      this.size - o,
      void 0,
      t,
      n,
      Number.NEGATIVE_INFINITY,
      Number.POSITIVE_INFINITY
    ), this.distributeEmptySpace(), this.layoutViews(), this.saveProportions();
  }
  getSashPosition(t) {
    let n = -1;
    for (let i = 0; i < this.sashItems.length; i++)
      if (this.sashItems[i].sash === t) {
        n = i;
        break;
      }
    if (n === -1) {
      const i = t.el || t;
      if (i) {
        for (let r = 0; r < this.sashItems.length; r++)
          if ((this.sashItems[r].sash.el || this.sashItems[r].sash) === i) {
            n = r;
            break;
          }
      }
    }
    if (n === -1)
      return 0;
    let o = 0;
    for (let i = 0; i <= n; i++)
      this.viewItems[i] && (o += this.viewItems[i].size);
    return o;
  }
  findFirstSnapIndex(t) {
    for (const n of t) {
      const o = this.viewItems[n];
      if (o.visible && o.snap)
        return n;
    }
    for (const n of t) {
      const o = this.viewItems[n];
      if (o.visible && o.maximumSize - o.minimumSize > 0)
        return;
      if (!o.visible && o.snap)
        return n;
    }
  }
  updateSashEnablement() {
    let t = !1;
    const n = this.viewItems.map(
      (s) => t = s.size - s.minimumSize > 0 || t
    );
    t = !1;
    const o = this.viewItems.map(
      (s) => t = s.maximumSize - s.size > 0 || t
    ), i = [...this.viewItems].toReversed();
    t = !1;
    const r = i.map((s) => t = s.size - s.minimumSize > 0 || t).toReversed();
    t = !1;
    const a = i.map((s) => t = s.maximumSize - s.size > 0 || t).toReversed();
    let l = 0;
    for (let s = 0; s < this.sashItems.length; s++) {
      const { sash: u } = this.sashItems[s], c = this.viewItems[s];
      l += c.size;
      const d = !(n[s] && a[s + 1]), f = !(o[s] && r[s + 1]);
      if (d && f) {
        const p = wi(s, -1, -1), m = wi(s + 1, this.viewItems.length), b = this.findFirstSnapIndex(p), y = this.findFirstSnapIndex(m), S = typeof b == "number" && !this.viewItems[b].visible, C = typeof y == "number" && !this.viewItems[y].visible;
        S && r[s] && (l > 0 || this.startSnappingEnabled) ? u.state = tl.Minimum : C && n[s] && (l < this.contentSize || this.endSnappingEnabled) ? u.state = tl.Maximum : u.state = tl.Disabled;
      } else d && !f ? u.state = tl.Minimum : !d && f ? u.state = tl.Maximum : u.state = tl.Enabled;
    }
  }
}
class Ul {
  size;
  constructor(t) {
    this.size = t;
  }
  getPreferredSize() {
    return this.size;
  }
}
class Y1 {
  proportion;
  layoutService;
  constructor(t, n) {
    this.proportion = t, this.layoutService = n;
  }
  getPreferredSize() {
    return this.proportion * this.layoutService.getSize();
  }
}
class Zc {
  getPreferredSize() {
  }
}
class U1 {
  minimumSize = 0;
  maximumSize = Number.POSITIVE_INFINITY;
  element;
  priority;
  snap;
  layoutService;
  layoutStrategy;
  get preferredSize() {
    return this.layoutStrategy.getPreferredSize();
  }
  set preferredSize(t) {
    if (typeof t == "number")
      this.layoutStrategy = new Ul(t);
    else if (typeof t == "string") {
      const n = t.trim();
      if (Qc(n, "%")) {
        const o = Number(n.slice(0, -1)) / 100;
        this.layoutStrategy = new Y1(
          o,
          this.layoutService
        );
      } else if (Qc(n, "px")) {
        const o = Number(n.slice(0, -2));
        this.layoutStrategy = new Ul(o);
      } else if (typeof Number.parseFloat(n) == "number") {
        const o = Number.parseFloat(n);
        this.layoutStrategy = new Ul(o);
      } else
        this.layoutStrategy = new Zc();
    } else
      this.layoutStrategy = new Zc();
  }
  constructor(t, n) {
    if (this.layoutService = t, this.element = n.element, this.snap = typeof n.snap == "boolean" ? n.snap : !1, this.minimumSize = this.snap ? 0 : typeof n.minimumSize == "number" ? n.minimumSize : 30, this.maximumSize = typeof n.maximumSize == "number" ? n.maximumSize : Number.POSITIVE_INFINITY, typeof n.preferredSize == "number")
      this.layoutStrategy = new Ul(n.preferredSize);
    else if (typeof n.preferredSize == "string") {
      const o = n.preferredSize.trim();
      if (Qc(o, "%")) {
        const i = Number(o.slice(0, -1)) / 100;
        this.layoutStrategy = new Y1(
          i,
          this.layoutService
        );
      } else if (Qc(o, "px")) {
        const i = Number(o.slice(0, -2));
        this.layoutStrategy = new Ul(i);
      } else if (typeof Number.parseFloat(o) == "number") {
        const i = Number.parseFloat(o);
        this.layoutStrategy = new Ul(i);
      } else
        this.layoutStrategy = new Zc();
    } else
      this.layoutStrategy = new Zc();
    this.priority = n.priority ?? Ud.Normal;
  }
  layout(t) {
  }
}
function w7(e) {
  const t = Hi(e, 4, 20), n = Hi(e, 1, 8);
  document.documentElement.style.setProperty("--sash-size", `${t}px`), document.documentElement.style.setProperty(
    "--sash-hover-size",
    `${n}px`
  ), m7(t);
}
const S7 = ["id"], C7 = /* @__PURE__ */ ye({
  __name: "Allotment",
  props: {
    className: { default: "" },
    defaultSizes: {},
    id: {},
    maxSize: { default: 1 / 0 },
    minSize: { default: 30 },
    proportionalLayout: { type: Boolean, default: !0 },
    separator: { type: Boolean, default: !0 },
    snap: { type: Boolean, default: !1 },
    sizes: {},
    vertical: { type: Boolean, default: !1 }
  },
  emits: ["change", "reset", "visibleChange", "dragStart", "dragEnd"],
  setup(e, { expose: t, emit: n }) {
    const o = e, i = n, r = le(), a = le(), l = le(!1), s = le(null), u = Dn(/* @__PURE__ */ new Map()), c = Dn(/* @__PURE__ */ new Map()), d = le(new i7()), f = le([]), p = le([]), m = le(null), b = xO();
    kt("allotment", {
      registerPane: (x, E, z) => {
        u.set(x, E), c.set(x, z), l.value && Nt(() => {
          P();
        });
      },
      unregisterPane: (x) => {
        u.delete(x), c.delete(x);
      },
      registerNonPane: (x, E) => {
        u.set(x, E), c.set(x, {});
      }
    });
    const y = R(() => {
      const x = b.default?.({}) || [], E = (z) => {
        const N = [];
        for (const D of z)
          Array.isArray(D.children) ? N.push(...E(D.children)) : D.type && N.push(D);
        return N;
      };
      return E(x);
    });
    function S(x) {
      const E = f.value?.[x];
      return typeof E?.preferredSize != "number" ? !1 : (s.value?.resizeView(x, Math.round(E.preferredSize)), !0);
    }
    function C() {
      if (i("reset"), !!s.value) {
        s.value.distributeViewSizes();
        for (let x = 0; x < f.value.length; x++)
          S(x);
      }
    }
    function O(x) {
      s.value?.resizeViews(x);
    }
    t({
      reset: C,
      resize: O
    });
    function $() {
      if (!r.value)
        return;
      let x = !0;
      o.defaultSizes && u.size !== o.defaultSizes.length && (x = !1, console.warn(
        `Expected ${o.defaultSizes.length} children based on defaultSizes but found ${u.size}`
      ));
      const E = o.vertical ? r.value.clientHeight : r.value.clientWidth;
      d.value.setSize(E);
      let z = o.defaultSizes;
      if (!o.defaultSizes && u.size > 0) {
        const D = Math.floor(E / u.size);
        z = Array.from({ length: u.size }, () => D), z[z.length - 1] += E - D * u.size, x = !0, p.value = y.value.map(
          (W) => W.key
        );
      } else if (o.defaultSizes) {
        const D = o.defaultSizes.reduce((W, H) => W + H, 0);
        if (E > 0 && D > 0 && Math.abs(E - D) > 1) {
          const W = E / D;
          z = o.defaultSizes.map((H) => Math.round(H * W));
        }
        p.value = y.value.map(
          (W) => W.key
        );
      }
      f.value = [];
      const N = {
        orientation: o.vertical ? ji.Vertical : ji.Horizontal,
        proportionalLayout: o.proportionalLayout,
        ...x && z && {
          descriptor: {
            size: z.reduce((D, W) => D + W, 0),
            views: z.map((D, W) => {
              const H = [...u.keys()][W], L = c.get(H), A = new U1(d.value, {
                element: document.createElement("div"),
                minimumSize: L?.minSize ?? o.minSize,
                maximumSize: L?.maxSize ?? o.maxSize,
                priority: L?.priority ?? Ud.Normal,
                ...L?.preferredSize && {
                  preferredSize: L?.preferredSize
                },
                snap: L?.snap ?? o.snap
              });
              return f.value.push(A), {
                container: [...u.values()][W],
                size: D,
                view: A
              };
            })
          }
        }
      };
      if (s.value = new x7(
        r.value,
        N,
        (D) => i("change", D),
        (D) => i("dragStart", D),
        (D) => i("dragEnd", D)
      ), s.value.on("sashDragStart", () => {
        r.value?.classList.add("split-view-sash-dragging");
      }), s.value.on("sashDragEnd", () => {
        r.value?.classList.remove("split-view-sash-dragging");
      }), s.value.on("sashchange", (D) => {
        if (s.value) {
          const W = y.value.map((H) => H.key);
          for (const [H, L] of W.entries()) {
            const A = c.get(L);
            A?.visible !== void 0 && A.visible !== s.value.isViewVisible(H) && i("visibleChange", H, s.value.isViewVisible(H));
          }
        }
      }), s.value?.on("sashreset", (D) => {
        i("reset"), !S(D) && (S(D + 1) || s.value?.distributeViewSizes());
      }), E > 0) {
        s.value.layout(E);
        for (let D = 0; D < f.value.length; D++)
          S(D);
      }
    }
    function P() {
      if (!l.value || !s.value)
        return;
      const x = y.value.map((W) => W.key), E = [...p.value], z = x.filter((W) => !p.value.includes(W)), N = x.filter((W) => p.value.includes(W)), D = p.value.map((W, H) => ({ key: W, index: H, shouldExit: !x.includes(W) }));
      for (let W = D.length - 1; W >= 0; W--)
        D[W].shouldExit && (s.value.removeView(D[W].index), E.splice(D[W].index, 1), f.value.splice(D[W].index, 1));
      for (const W of z) {
        const H = c.get(W), L = new U1(d.value, {
          element: document.createElement("div"),
          minimumSize: H?.minSize ?? o.minSize,
          maximumSize: H?.maxSize ?? o.maxSize,
          priority: H?.priority ?? Ud.Normal,
          ...H?.preferredSize && {
            preferredSize: H?.preferredSize
          },
          snap: H?.snap ?? o.snap
        }), A = x.indexOf(W);
        s.value.addView(
          u.get(W),
          L,
          aO.Distribute,
          A
        ), E.splice(A, 0, W), f.value.splice(A, 0, L);
      }
      for (; !Yj(x, E); )
        for (const [W, H] of x.entries()) {
          const L = E.indexOf(H);
          if (L !== W) {
            s.value.moveView(
              u.get(H),
              L,
              W
            );
            const A = E[L];
            E.splice(L, 1), E.splice(W, 0, A);
            const U = f.value[L];
            f.value.splice(L, 1), f.value.splice(W, 0, U);
            break;
          }
        }
      for (const W of [...z, ...N]) {
        const H = c.get(W), L = x.indexOf(W);
        if (H) {
          H.visible !== void 0 && s.value.isViewVisible(L) !== H.visible && s.value.setViewVisible(L, H.visible), H.preferredSize !== void 0 && f.value[L].preferredSize !== H.preferredSize && (f.value[L].preferredSize = H.preferredSize, S(L));
          let A = !1;
          H.minSize !== void 0 && f.value[L].minimumSize !== H.minSize && (f.value[L].minimumSize = H.minSize, A = !0), H.maxSize !== void 0 && f.value[L].maximumSize !== H.maxSize && (f.value[L].maximumSize = H.maxSize, A = !0), A && s.value.layout();
        }
      }
      (z.length > 0 || D.some((W) => W.shouldExit)) && (p.value = x);
    }
    function k() {
      r.value && (m.value = new ResizeObserver(() => {
        if (r.value) {
          const x = o.vertical ? r.value.clientHeight : r.value.clientWidth;
          x > 0 && (s.value?.layout(x), d.value.setSize(x), l.value || (l.value = !0));
        }
      }), m.value.observe(r.value));
    }
    return Pt(() => {
      oO && w7(20), Nt(() => {
        $(), k(), setTimeout(() => {
          if (r.value && s.value) {
            const x = o.vertical ? r.value.clientHeight : r.value.clientWidth;
            x > 0 && s.value.layout(x);
          }
        }, 50);
      });
    }), Ie(y, () => {
      Nt(() => {
        P();
      });
    }, { deep: !0 }), Ie(() => o.vertical, (x) => {
      s.value && (s.value.orientation = x ? ji.Vertical : ji.Horizontal, s.value.layout());
    }), Ie(() => o.proportionalLayout, (x) => {
      s.value && (s.value.proportionalLayout = x);
    }), Lo(() => {
      m.value?.disconnect(), s.value?.dispose();
    }), (x, E) => (ee(), ve("div", {
      id: x.id,
      ref_key: "containerRef",
      ref: r,
      class: ct(["split-view", [
        x.vertical ? "split-view-vertical" : "split-view-horizontal",
        { "split-view-separator-border": x.separator },
        M(ya).splitView,
        x.vertical ? M(ya).vertical : M(ya).horizontal,
        { [M(ya).separatorBorder]: x.separator },
        x.className
      ]])
    }, [
      B("div", {
        ref_key: "splitViewContainerRef",
        ref: a,
        class: ct(["split-view-container", [M(ya).splitViewContainer]])
      }, [
        Wr(x.$slots, "default", {}, void 0, !0)
      ], 2)
    ], 10, S7));
  }
}), $7 = (e, t) => {
  const n = e.__vccOpts || e;
  for (const [o, i] of t)
    n[o] = i;
  return n;
}, X1 = /* @__PURE__ */ $7(C7, [["__scopeId", "data-v-e77a1ca4"]]), Jc = /* @__PURE__ */ ye({
  __name: "Pane",
  props: {
    className: { default: "" },
    maxSize: {},
    minSize: {},
    snap: { type: Boolean, default: !1 },
    preferredSize: {},
    priority: {},
    visible: { type: Boolean, default: !0 }
  },
  setup(e, { expose: t }) {
    const n = e, o = le(), i = ci(), r = Tt("allotment");
    function a() {
      return i?.vnode.key || `pane-${Math.random().toString(36).slice(2, 11)}`;
    }
    const l = a();
    return Pt(() => {
      r && o.value && r.registerPane(l, o.value, {
        minSize: n.minSize,
        maxSize: n.maxSize,
        preferredSize: n.preferredSize,
        priority: n.priority,
        snap: n.snap,
        visible: n.visible
      });
    }), Ie(() => n, (s) => {
      r && o.value && r.registerPane(l, o.value, {
        minSize: s.minSize,
        maxSize: s.maxSize,
        preferredSize: s.preferredSize,
        priority: s.priority,
        snap: s.snap,
        visible: s.visible
      });
    }, { deep: !0 }), Lo(() => {
      r && r.unregisterPane(l);
    }), t({
      element: o
    }), (s, u) => (ee(), ve("div", {
      ref_key: "paneRef",
      ref: o,
      class: ct(["split-view-view", [
        s.visible && "split-view-view-visible",
        M(ya).splitViewView,
        s.className
      ]])
    }, [
      Wr(s.$slots, "default")
    ], 2));
  }
}), P7 = { class: "flex flex-col gap-3" }, O7 = { class: "text-xs text-secondary mb-1" }, I7 = { class: "text-xs text-secondary mb-1" }, M7 = { class: "text-xs text-secondary mb-1" }, T7 = { class: "text-xs text-secondary mb-1" }, k7 = { class: "text-xs text-secondary mb-1" }, E7 = { class: "text-xs text-secondary mb-1" }, _7 = ["value"], A7 = { class: "text-xs text-secondary mb-1" }, D7 = { class: "text-xs text-secondary mb-1" }, z7 = { class: "text-xs text-secondary mb-1" }, R7 = { class: "text-xs text-secondary mb-1" }, N7 = { class: "text-xs text-secondary mb-1" }, B7 = { class: "text-xs text-secondary mb-1" }, L7 = ["value"], F7 = { class: "text-xs text-secondary mb-1" }, H7 = { class: "text-xs text-secondary mb-1" }, V7 = { key: 0 }, j7 = { class: "text-xs text-secondary mb-1" }, W7 = ["value"], q7 = { class: "text-xs text-secondary mb-1" }, G7 = /* @__PURE__ */ ye({
  __name: "AxesSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const { t } = jt();
    return (n, o) => {
      const i = Vt("a-radio-button"), r = Vt("a-radio-group"), a = Vt("a-switch");
      return ee(), ve("div", P7, [
        B("div", null, [
          B("div", O7, te(M(t)("config.field.axisPlacement")), 1),
          v(r, {
            size: "small",
            value: e.panel.axisPlacement ?? "left",
            onChange: o[0] || (o[0] = (l) => e.onChange({ axisPlacement: l.target.value }))
          }, {
            default: ce(() => [
              v(i, { value: "left" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.axis.placement.left")), 1)
                ]),
                _: 1
              }),
              v(i, { value: "right" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.axis.placement.right")), 1)
                ]),
                _: 1
              }),
              v(i, { value: "hidden" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.axis.placement.hidden")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        B("div", null, [
          B("div", I7, te(M(t)("config.field.axisLabel")), 1),
          v(M(ft), {
            size: "small",
            value: e.panel.axisLabel ?? "",
            placeholder: M(t)("config.axis.label.placeholder"),
            onChange: o[1] || (o[1] = (l) => e.onChange({ axisLabel: l.target.value }))
          }, null, 8, ["value", "placeholder"])
        ]),
        B("div", null, [
          B("div", M7, te(M(t)("config.field.axisName")), 1),
          v(M(ft), {
            size: "small",
            value: e.panel.axisName ?? "",
            placeholder: M(t)("config.axis.name.placeholder"),
            onChange: o[2] || (o[2] = (l) => e.onChange({ axisName: l.target.value }))
          }, null, 8, ["value", "placeholder"])
        ]),
        B("div", null, [
          B("div", T7, te(M(t)("config.field.axisWidth")), 1),
          v(M(fo), {
            size: "small",
            value: e.panel.axisWidth ?? void 0,
            min: 20,
            max: 300,
            style: { width: "100%" },
            onChange: o[3] || (o[3] = (l) => e.onChange({ axisWidth: l }))
          }, null, 8, ["value"])
        ]),
        B("div", null, [
          B("div", k7, te(M(t)("config.field.showGridLines")), 1),
          v(r, {
            size: "small",
            value: e.panel.showGridLines ?? "all",
            onChange: o[4] || (o[4] = (l) => e.onChange({ showGridLines: l.target.value }))
          }, {
            default: ce(() => [
              v(i, { value: "all" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.axis.grid.all")), 1)
                ]),
                _: 1
              }),
              v(i, { value: "x" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.axis.grid.x")), 1)
                ]),
                _: 1
              }),
              v(i, { value: "y" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.axis.grid.y")), 1)
                ]),
                _: 1
              }),
              v(i, { value: "hidden" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.axis.grid.hidden")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        B("div", null, [
          B("div", E7, te(M(t)("config.field.gridColor")), 1),
          B("input", {
            type: "color",
            value: e.panel.gridColor ?? "#e8e8e8",
            onInput: o[5] || (o[5] = (l) => e.onChange({ gridColor: l.target.value }))
          }, null, 40, _7)
        ]),
        B("div", null, [
          B("div", A7, te(M(t)("config.field.scaleDistribution")), 1),
          v(r, {
            size: "small",
            value: e.panel.scaleDistribution ?? "linear",
            onChange: o[6] || (o[6] = (l) => e.onChange({ scaleDistribution: l.target.value }))
          }, {
            default: ce(() => [
              v(i, { value: "linear" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.axis.scale.linear")), 1)
                ]),
                _: 1
              }),
              v(i, { value: "logarithmic" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.axis.scale.logarithmic")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        B("div", null, [
          B("div", D7, te(M(t)("config.field.softMin")), 1),
          v(M(fo), {
            size: "small",
            value: e.panel.softMin ?? void 0,
            style: { width: "100%" },
            onChange: o[7] || (o[7] = (l) => e.onChange({ softMin: l }))
          }, null, 8, ["value"])
        ]),
        B("div", null, [
          B("div", z7, te(M(t)("config.field.softMax")), 1),
          v(M(fo), {
            size: "small",
            value: e.panel.softMax ?? void 0,
            style: { width: "100%" },
            onChange: o[8] || (o[8] = (l) => e.onChange({ softMax: l }))
          }, null, 8, ["value"])
        ]),
        B("div", null, [
          B("div", R7, te(M(t)("config.field.centeredZero")), 1),
          v(a, {
            size: "small",
            checked: e.panel.centeredZero,
            onChange: o[9] || (o[9] = (l) => e.onChange({ centeredZero: l }))
          }, null, 8, ["checked"])
        ]),
        B("div", null, [
          B("div", N7, te(M(t)("config.field.axisLine")), 1),
          v(r, {
            size: "small",
            value: e.panel.axisLabel ?? "all",
            onChange: o[10] || (o[10] = (l) => e.onChange({ axisLabel: l.target.value }))
          }, {
            default: ce(() => [
              v(i, { value: "all" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.axis.grid.all")), 1)
                ]),
                _: 1
              }),
              v(i, { value: "x" }, {
                default: ce(() => [...o[16] || (o[16] = [
                  Ee(" X ", -1)
                ])]),
                _: 1
              }),
              v(i, { value: "y" }, {
                default: ce(() => [...o[17] || (o[17] = [
                  Ee(" Y ", -1)
                ])]),
                _: 1
              }),
              v(i, { value: "hidden" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.axis.grid.hidden")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        B("div", null, [
          B("div", B7, te(M(t)("config.field.axisLineColor")), 1),
          B("input", {
            type: "color",
            value: e.panel.axisLabelColor ?? "#666666",
            onInput: o[11] || (o[11] = (l) => e.onChange({ axisLabelColor: l.target.value }))
          }, null, 40, L7)
        ]),
        B("div", null, [
          B("div", F7, te(M(t)("config.field.axisTickShow")), 1),
          v(r, {
            size: "small",
            value: e.panel.axisTick ?? "hidden",
            onChange: o[12] || (o[12] = (l) => e.onChange({ axisTick: l.target.value }))
          }, {
            default: ce(() => [
              v(i, { value: "all" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.axis.grid.all")), 1)
                ]),
                _: 1
              }),
              v(i, { value: "x" }, {
                default: ce(() => [...o[18] || (o[18] = [
                  Ee(" X ", -1)
                ])]),
                _: 1
              }),
              v(i, { value: "y" }, {
                default: ce(() => [...o[19] || (o[19] = [
                  Ee(" Y ", -1)
                ])]),
                _: 1
              }),
              v(i, { value: "hidden" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.axis.grid.hidden")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        B("div", null, [
          B("div", H7, te(M(t)("config.field.axisBorder")), 1),
          v(r, {
            size: "small",
            value: e.panel.axisBorder ?? "hidden",
            onChange: o[13] || (o[13] = (l) => e.onChange({ axisBorder: l.target.value }))
          }, {
            default: ce(() => [
              v(i, { value: "all" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.axis.grid.all")), 1)
                ]),
                _: 1
              }),
              v(i, { value: "x" }, {
                default: ce(() => [...o[20] || (o[20] = [
                  Ee(" X ", -1)
                ])]),
                _: 1
              }),
              v(i, { value: "y" }, {
                default: ce(() => [...o[21] || (o[21] = [
                  Ee(" Y ", -1)
                ])]),
                _: 1
              }),
              v(i, { value: "hidden" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.axis.grid.hidden")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        e.panel.axisBorder && e.panel.axisBorder !== "hidden" ? (ee(), ve("div", V7, [
          B("div", j7, te(M(t)("config.field.axisBorderColor")), 1),
          B("input", {
            type: "color",
            value: e.panel.axisBorderColor ?? "#cccccc",
            onInput: o[14] || (o[14] = (l) => e.onChange({ axisBorderColor: l.target.value }))
          }, null, 40, W7)
        ])) : He("", !0),
        B("div", null, [
          B("div", q7, te(M(t)("config.field.logScale")), 1),
          v(a, {
            size: "small",
            checked: e.panel.scaleDistribution === "logarithmic",
            onChange: o[15] || (o[15] = (l) => e.onChange({ scaleDistribution: l ? "logarithmic" : "linear" }))
          }, null, 8, ["checked"])
        ])
      ]);
    };
  }
}), K7 = { class: "flex flex-col gap-3" }, Y7 = { class: "text-xs text-secondary mb-1" }, U7 = { class: "text-xs text-secondary mb-1" }, X7 = { class: "text-xs text-secondary mb-1" }, Q7 = { class: "text-xs text-secondary mb-1" }, Z7 = { class: "text-xs text-secondary mb-1" }, J7 = { class: "text-xs text-secondary mb-1" }, eW = { class: "text-xs text-secondary mb-1" }, tW = /* @__PURE__ */ ye({
  __name: "BarStyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const { t } = jt();
    return (n, o) => {
      const i = Vt("a-radio-button"), r = Vt("a-radio-group"), a = Vt("a-switch"), l = Vt("a-input-number");
      return ee(), ve("div", K7, [
        B("div", null, [
          B("div", Y7, te(M(t)("config.field.barShowValues")), 1),
          v(r, {
            size: "small",
            value: e.panel.barShowValues ?? "auto",
            onChange: o[0] || (o[0] = (s) => e.onChange({ barShowValues: s.target.value }))
          }, {
            default: ce(() => [
              v(i, { value: "auto" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.showValues.auto")), 1)
                ]),
                _: 1
              }),
              v(i, { value: "always" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.showValues.always")), 1)
                ]),
                _: 1
              }),
              v(i, { value: "never" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.showValues.never")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        B("div", null, [
          B("div", U7, te(M(t)("config.field.barGroupWidth")), 1),
          v(M(qo), {
            min: 0.1,
            max: 1,
            step: 0.05,
            value: e.panel.barGroupWidth ?? 0.7,
            onChange: o[1] || (o[1] = (s) => e.onChange({ barGroupWidth: s }))
          }, null, 8, ["value"])
        ]),
        B("div", null, [
          B("div", X7, te(M(t)("config.field.barWidth")), 1),
          v(M(qo), {
            min: 0.1,
            max: 1,
            step: 0.05,
            value: e.panel.barWidth ?? 1,
            onChange: o[2] || (o[2] = (s) => e.onChange({ barWidth: s }))
          }, null, 8, ["value"])
        ]),
        B("div", null, [
          B("div", Q7, te(M(t)("config.field.stacked")), 1),
          v(a, {
            size: "small",
            checked: e.panel.stacked,
            onChange: o[3] || (o[3] = (s) => e.onChange({ stacked: s }))
          }, null, 8, ["checked"])
        ]),
        B("div", null, [
          B("div", Z7, te(M(t)("config.field.lineWidth")), 1),
          v(l, {
            size: "small",
            min: 0,
            max: 10,
            value: e.panel.lineWidth,
            style: { width: "100%" },
            onChange: o[4] || (o[4] = (s) => e.onChange({ lineWidth: s ?? 1 }))
          }, null, 8, ["value"])
        ]),
        B("div", null, [
          B("div", J7, te(M(t)("config.field.fillOpacity")), 1),
          v(M(qo), {
            min: 0,
            max: 100,
            value: e.panel.fillOpacity,
            onChange: o[5] || (o[5] = (s) => e.onChange({ fillOpacity: s }))
          }, null, 8, ["value"])
        ]),
        B("div", null, [
          B("div", eW, te(M(t)("config.field.xTickRotation")), 1),
          v(a, {
            size: "small",
            checked: e.panel.barXTickRotation ?? !1,
            onChange: o[6] || (o[6] = (s) => e.onChange({ barXTickRotation: s }))
          }, null, 8, ["checked"])
        ])
      ]);
    };
  }
}), nW = { class: "flex flex-col gap-3" }, oW = { class: "text-xs text-secondary mb-1" }, iW = { class: "text-xs text-secondary mb-1" }, rW = { class: "text-xs text-secondary mb-1" }, aW = ["value"], lW = { class: "text-xs text-secondary mb-1" }, sW = { class: "text-xs text-secondary mb-1" }, uW = { class: "text-xs text-secondary mb-1" }, cW = { class: "text-xs text-secondary mb-1" }, dW = { class: "text-xs text-secondary mb-1" }, fW = { key: 0 }, pW = { class: "text-xs text-secondary mb-1" }, gW = ["value"], hW = { class: "text-xs text-secondary mb-1" }, vW = { class: "text-xs text-secondary mb-1" }, mW = { class: "text-xs text-secondary mb-1" }, bW = { class: "text-xs text-secondary mb-1" }, yW = { class: "text-xs text-secondary mb-1" }, xW = { class: "text-xs text-secondary mb-1" }, wW = /* @__PURE__ */ ye({
  __name: "GaugeStyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const { t } = jt();
    return (n, o) => {
      const i = Vt("a-switch"), r = Vt("a-radio-button"), a = Vt("a-radio-group");
      return ee(), ve("div", nW, [
        B("div", null, [
          B("div", oW, te(M(t)("config.gauge.fillWidth")), 1),
          v(M(qo), {
            min: 1,
            max: 100,
            value: e.panel.gaugeFillWidth ?? M($n).fillWidth,
            onChange: o[0] || (o[0] = (l) => e.onChange({ gaugeFillWidth: l }))
          }, null, 8, ["value"])
        ]),
        B("div", null, [
          B("div", iW, te(M(t)("config.gauge.trackWidth")), 1),
          v(M(qo), {
            min: 1,
            max: 100,
            value: e.panel.gaugeTrackWidth ?? M($n).trackWidth,
            onChange: o[1] || (o[1] = (l) => e.onChange({ gaugeTrackWidth: l }))
          }, null, 8, ["value"])
        ]),
        B("div", null, [
          B("div", rW, te(M(t)("config.gauge.trackColor")), 1),
          B("input", {
            type: "color",
            value: e.panel.gaugeTrackColor ?? "#222222",
            onInput: o[2] || (o[2] = (l) => e.onChange({ gaugeTrackColor: l.target.value }))
          }, null, 40, aW)
        ]),
        B("div", null, [
          B("div", lW, te(M(t)("config.gauge.arcSweep")), 1),
          v(M(qo), {
            min: 30,
            max: 360,
            value: e.panel.sweepAngle ?? M($n).sweepAngle,
            onChange: o[3] || (o[3] = (l) => e.onChange({ sweepAngle: l }))
          }, null, 8, ["value"])
        ]),
        B("div", null, [
          B("div", sW, te(M(t)("config.gauge.paddingX")), 1),
          v(M(qo), {
            min: 0,
            max: 0.5,
            step: 0.01,
            value: e.panel.gaugePaddingX ?? 0.05,
            onChange: o[4] || (o[4] = (l) => e.onChange({ gaugePaddingX: l }))
          }, null, 8, ["value"])
        ]),
        B("div", null, [
          B("div", uW, te(M(t)("config.gauge.paddingY")), 1),
          v(M(qo), {
            min: 0,
            max: 0.5,
            step: 0.01,
            value: e.panel.gaugePaddingY ?? 0.1,
            onChange: o[5] || (o[5] = (l) => e.onChange({ gaugePaddingY: l }))
          }, null, 8, ["value"])
        ]),
        B("div", null, [
          B("div", cW, te(M(t)("config.gauge.capRound")), 1),
          v(i, {
            size: "small",
            checked: e.panel.gaugeCapRound ?? M($n).capRound,
            onChange: o[6] || (o[6] = (l) => e.onChange({ gaugeCapRound: l }))
          }, null, 8, ["checked"])
        ]),
        B("div", null, [
          B("div", dW, te(M(t)("config.gauge.valueVisible")), 1),
          v(i, {
            size: "small",
            checked: e.panel.gaugeValueVisible ?? M($n).valueVisible,
            onChange: o[7] || (o[7] = (l) => e.onChange({ gaugeValueVisible: l }))
          }, null, 8, ["checked"])
        ]),
        e.panel.gaugeValueVisible !== !1 ? (ee(), ve("div", fW, [
          B("div", pW, te(M(t)("config.gauge.valueColor")), 1),
          B("input", {
            type: "color",
            value: e.panel.gaugeValueColor ?? "#ffffff",
            onInput: o[8] || (o[8] = (l) => e.onChange({ gaugeValueColor: l.target.value }))
          }, null, 40, gW)
        ])) : He("", !0),
        B("div", null, [
          B("div", hW, te(M(t)("config.gauge.valueSize")), 1),
          v(M(fo), {
            size: "small",
            min: 8,
            max: 80,
            value: e.panel.gaugeValueSize ?? M($n).valueSize,
            suffix: "px",
            style: { width: "100%" },
            onChange: o[9] || (o[9] = (l) => e.onChange({ gaugeValueSize: l ?? M($n).valueSize }))
          }, null, 8, ["value"])
        ]),
        B("div", null, [
          B("div", vW, te(M(t)("config.gauge.valueOffsetY")), 1),
          v(M(fo), {
            size: "small",
            min: -50,
            max: 50,
            value: e.panel.gaugeValueOffsetY ?? M($n).valueOffsetY,
            suffix: "px",
            style: { width: "100%" },
            onChange: o[10] || (o[10] = (l) => e.onChange({ gaugeValueOffsetY: l ?? M($n).valueOffsetY }))
          }, null, 8, ["value"])
        ]),
        B("div", null, [
          B("div", mW, te(M(t)("config.gauge.colorFromScheme")), 1),
          v(i, {
            size: "small",
            checked: e.panel.gaugeColorFromScheme ?? !1,
            onChange: o[11] || (o[11] = (l) => e.onChange({ gaugeColorFromScheme: l }))
          }, null, 8, ["checked"])
        ]),
        B("div", null, [
          B("div", bW, te(M(t)("config.gauge.thresholdDisplay")), 1),
          v(a, {
            size: "small",
            value: e.panel.gaugeThresholdDisplay ?? M($n).thresholdDisplay,
            onChange: o[12] || (o[12] = (l) => e.onChange({ gaugeThresholdDisplay: l.target.value }))
          }, {
            default: ce(() => [
              v(r, { value: "none" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.gauge.thresholdDisplayNone")), 1)
                ]),
                _: 1
              }),
              v(r, { value: "marker" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.gauge.thresholdDisplayMarker")), 1)
                ]),
                _: 1
              }),
              v(r, { value: "track" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.gauge.thresholdDisplayTrack")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        B("div", null, [
          B("div", yW, te(M(t)("config.gauge.thresholdLabelDisplay")), 1),
          v(a, {
            size: "small",
            value: e.panel.gaugeThresholdLabelDisplay ?? "none",
            onChange: o[13] || (o[13] = (l) => e.onChange({ gaugeThresholdLabelDisplay: l.target.value }))
          }, {
            default: ce(() => [
              v(r, { value: "none" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.gauge.thresholdLabelNone")), 1)
                ]),
                _: 1
              }),
              v(r, { value: "label" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.gauge.thresholdLabelLabel")), 1)
                ]),
                _: 1
              }),
              v(r, { value: "value" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.gauge.thresholdLabelValue")), 1)
                ]),
                _: 1
              }),
              v(r, { value: "both" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.gauge.thresholdLabelBoth")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        B("div", null, [
          B("div", xW, te(M(t)("config.gauge.orientation")), 1),
          v(a, {
            size: "small",
            value: e.panel.gaugeOrientation ?? M($n).orientation,
            onChange: o[14] || (o[14] = (l) => e.onChange({ gaugeOrientation: l.target.value }))
          }, {
            default: ce(() => [
              v(r, { value: "auto" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.gauge.orientationAuto")), 1)
                ]),
                _: 1
              }),
              v(r, { value: "horizontal" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.gauge.orientationHorizontal")), 1)
                ]),
                _: 1
              }),
              v(r, { value: "vertical" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.gauge.orientationVertical")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ])
      ]);
    };
  }
}), ot = {
  // Actions
  edit: "i-carbon:edit",
  delete: "i-carbon:trash-can",
  clone: "i-carbon:stickies ",
  plus: "i-carbon:add-large",
  save: "i-mdi-content-save",
  cancel: "i-mdi-cancel",
  refresh: "i-carbon:renew",
  download: "i-carbon:download",
  upload: "i-carbon:upload",
  export: "i-carbon:export",
  import: "i-carbon:document-import",
  search: "i-mdi-magnify",
  settings: "i-carbon:settings",
  config: "i-carbon:settings-adjust",
  link: "i-mdi-link",
  // Navigation
  fullscreen: "i-carbon:center-to-fit",
  chevronDown: "i-carbon:chevron-down",
  chevronRight: "i-carbon:chevron-right",
  dotsVertical: "i-mdi-dots-vertical",
  dragVertical: "i-carbon:draggable",
  closeCircle: "i-mdi-close-circle",
  chevronLeft: "i-carbon:chevron-left",
  // Info
  info: "i-carbon:information",
  // view
  view: "i-carbon:view",
  viewOff: "i-carbon:view-off",
  // Theme
  sun: "i-mdi-white-balance-sunny",
  moon: "i-mdi-weather-night",
  // Panel types
  chartLine: "i-mdi-chart-line",
  chartBar: "i-mdi-chart-bar",
  chartArea: "i-mdi-chart-areaspline",
  chartPie: "i-mdi-chart-pie",
  stat: "i-mdi-format-list-numbered",
  gauge: "i-mdi-alarm-panel",
  table: "i-mdi-table",
  databaseOff: "i-mdi-database-off"
}, SW = { class: "inline-flex gap-0.5 items-center" }, CW = /* @__PURE__ */ ye({
  __name: "PaletteSwatches",
  props: {
    colors: {}
  },
  setup(e) {
    return (t, n) => (ee(), ve("span", SW, [
      (ee(!0), ve(Ve, null, It(e.colors, (o, i) => (ee(), ve("span", {
        key: `${o}-${i}`,
        class: "inline-block rounded-sm flex-shrink-0",
        style: xt({ width: "12px", height: "12px", background: o })
      }, null, 4))), 128))
    ]));
  }
}), $W = [
  { value: "classic", colors: $a.slice(0, 8) },
  { value: "tableau10", colors: Si.tableau10.slice(0, 8) },
  { value: "grafana-classic", colors: Si["grafana-classic"].slice(0, 8) },
  { value: "green-yellow-red", colors: Si["green-yellow-red"] },
  { value: "red-yellow-green", colors: Si["red-yellow-green"] },
  { value: "blue-yellow-red", colors: Si["blue-yellow-red"] },
  { value: "blue-purple", colors: Si["blue-purple"] },
  { value: "yellow-blue", colors: Si["yellow-blue"] },
  { value: "blues", colors: Si.blues },
  { value: "reds", colors: Si.reds },
  { value: "GrYlRd", colors: Si.GrYlRd },
  { value: "purple-orange", colors: Si["purple-orange"] },
  { value: "fixed", colors: [] },
  { value: "thresholds", colors: [] }
], PW = { class: "flex flex-col gap-3" }, OW = { class: "text-xs text-secondary mb-1" }, IW = { class: "text-xs text-secondary mb-1" }, MW = { class: "text-xs text-secondary mb-1" }, TW = { class: "inline-flex items-center gap-1.5" }, kW = { key: 0 }, EW = { class: "text-xs text-secondary mb-1" }, _W = ["value"], AW = { key: 1 }, DW = { class: "text-xs text-secondary mb-1" }, zW = { class: "text-xs text-secondary mb-1" }, RW = { class: "flex gap-1 items-center" }, NW = { class: "flex items-center gap-1" }, BW = { class: "text-xs text-secondary" }, Q1 = /* @__PURE__ */ ye({
  __name: "GeneralSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = jt(), o = $W.map((l) => ({
      value: l.value,
      label: n(`config.scheme.${l.value}`),
      colors: l.colors
    }));
    function i() {
      const l = [...t.panel.links ?? [], { title: "", url: "", newTab: !0 }];
      t.onChange({ links: l });
    }
    function r(l) {
      const s = (t.panel.links ?? []).filter((u, c) => c !== l);
      t.onChange({ links: s });
    }
    function a(l, s) {
      const u = (t.panel.links ?? []).map((c, d) => d === l ? { ...c, ...s } : c);
      t.onChange({ links: u });
    }
    return (l, s) => {
      const u = Vt("a-switch");
      return ee(), ve("div", PW, [
        B("div", null, [
          B("div", OW, te(M(n)("config.field.title")), 1),
          v(M(ft), {
            size: "small",
            value: e.panel.title,
            onChange: s[0] || (s[0] = (c) => e.onChange({ title: c.target.value }))
          }, null, 8, ["value"])
        ]),
        B("div", null, [
          B("div", IW, te(M(n)("config.field.description")), 1),
          v(M(ft), {
            size: "small",
            value: e.panel.description,
            onChange: s[1] || (s[1] = (c) => e.onChange({ description: c.target.value }))
          }, null, 8, ["value"])
        ]),
        B("div", null, [
          B("div", MW, te(M(n)("config.field.colorScheme")), 1),
          v(M(bt), {
            size: "small",
            value: e.panel.colorScheme ?? "classic",
            "option-label-prop": "children",
            style: { width: "100%" },
            onChange: s[2] || (s[2] = (c) => e.onChange({ colorScheme: c }))
          }, {
            default: ce(() => [
              (ee(!0), ve(Ve, null, It(M(o), (c) => (ee(), Ze(M(bt).Option, {
                key: c.value,
                value: c.value
              }, {
                default: ce(() => [
                  B("span", TW, [
                    c.colors.length ? (ee(), Ze(CW, {
                      key: 0,
                      colors: c.colors
                    }, null, 8, ["colors"])) : He("", !0),
                    B("span", null, te(c.label), 1)
                  ])
                ]),
                _: 2
              }, 1032, ["value"]))), 128))
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        e.panel.colorScheme === "fixed" ? (ee(), ve("div", kW, [
          B("div", EW, te(M(n)("config.field.colorSingle")), 1),
          B("input", {
            type: "color",
            value: e.panel.colorSingleValue ?? "#4096ff",
            onInput: s[3] || (s[3] = (c) => e.onChange({ colorSingleValue: c.target.value }))
          }, null, 40, _W)
        ])) : He("", !0),
        e.panel.colorScheme && e.panel.colorScheme !== "fixed" && e.panel.colorScheme !== "thresholds" ? (ee(), ve("div", AW, [
          B("div", DW, te(M(n)("config.field.colorDistribution")), 1),
          v(M(bt), {
            size: "small",
            value: e.panel.colorDistribution ?? "sequential",
            options: [
              { value: "sequential", label: M(n)("config.colorDist.sequential") },
              { value: "distributed", label: M(n)("config.colorDist.distributed") }
            ],
            style: { width: "100%" },
            onChange: s[4] || (s[4] = (c) => e.onChange({ colorDistribution: c }))
          }, null, 8, ["value", "options"])
        ])) : He("", !0),
        B("div", null, [
          B("div", zW, te(M(n)("config.section.links", { n: (e.panel.links ?? []).length })), 1),
          (ee(!0), ve(Ve, null, It(e.panel.links ?? [], (c, d) => (ee(), ve("div", {
            key: d,
            class: "mb-2 flex flex-col gap-1"
          }, [
            B("div", RW, [
              v(M(ft), {
                size: "small",
                value: c.title,
                placeholder: "Title",
                style: { flex: "1" },
                onChange: (f) => a(d, { title: f.target.value })
              }, null, 8, ["value", "onChange"]),
              v(M($t), {
                type: "text",
                danger: "",
                size: "small",
                onClick: (f) => r(d)
              }, {
                default: ce(() => [
                  B("span", {
                    class: ct(M(ot).delete)
                  }, null, 2)
                ]),
                _: 1
              }, 8, ["onClick"])
            ]),
            v(M(ft), {
              size: "small",
              value: c.url,
              placeholder: "https://",
              onChange: (f) => a(d, { url: f.target.value })
            }, null, 8, ["value", "onChange"]),
            B("div", NW, [
              v(u, {
                size: "small",
                checked: c.newTab,
                onChange: (f) => a(d, { newTab: f })
              }, null, 8, ["checked", "onChange"]),
              B("span", BW, te(M(n)("config.link.newTab")), 1)
            ])
          ]))), 128)),
          v(M($t), {
            type: "dashed",
            size: "small",
            block: "",
            onClick: i
          }, {
            default: ce(() => [
              B("span", {
                class: ct([M(ot).plus, "mr-1"])
              }, null, 2),
              Ee(te(M(n)("config.link.add")), 1)
            ]),
            _: 1
          })
        ])
      ]);
    };
  }
}), LW = { class: "flex flex-col gap-3" }, FW = { class: "text-xs text-secondary mb-1" }, HW = { class: "text-xs text-secondary mb-1" }, VW = { class: "text-xs text-secondary mb-1" }, jW = { class: "text-xs text-secondary mb-1" }, WW = { class: "text-xs text-secondary mb-1" }, qW = { class: "text-xs text-secondary mb-1" }, GW = /* @__PURE__ */ ye({
  __name: "HistogramStyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const { t } = jt();
    return (n, o) => {
      const i = Vt("a-input-number"), r = Vt("a-switch");
      return ee(), ve("div", LW, [
        B("div", null, [
          B("div", FW, te(M(t)("config.field.histBucketCount")), 1),
          v(i, {
            size: "small",
            min: 1,
            max: 500,
            value: e.panel.histBucketCount ?? 30,
            style: { width: "100%" },
            onChange: o[0] || (o[0] = (a) => e.onChange({ histBucketCount: a ?? 30 }))
          }, null, 8, ["value"])
        ]),
        B("div", null, [
          B("div", HW, te(M(t)("config.field.histBucketSize")), 1),
          v(i, {
            size: "small",
            min: 0,
            value: e.panel.histBucketSize,
            placeholder: M(t)("config.hist.bucketSizePlaceholder"),
            style: { width: "100%" },
            onChange: o[1] || (o[1] = (a) => e.onChange({ histBucketSize: a }))
          }, null, 8, ["value", "placeholder"])
        ]),
        B("div", null, [
          B("div", VW, te(M(t)("config.field.histBucketOffset")), 1),
          v(i, {
            size: "small",
            min: 0,
            value: e.panel.histBucketOffset ?? 0,
            style: { width: "100%" },
            onChange: o[2] || (o[2] = (a) => e.onChange({ histBucketOffset: a ?? 0 }))
          }, null, 8, ["value"])
        ]),
        B("div", null, [
          B("div", jW, te(M(t)("config.field.histCombineSeries")), 1),
          v(r, {
            size: "small",
            checked: e.panel.histCombineSeries ?? !1,
            onChange: o[3] || (o[3] = (a) => e.onChange({ histCombineSeries: a }))
          }, null, 8, ["checked"])
        ]),
        B("div", null, [
          B("div", WW, te(M(t)("config.field.lineWidth")), 1),
          v(i, {
            size: "small",
            min: 0,
            max: 10,
            value: e.panel.lineWidth,
            style: { width: "100%" },
            onChange: o[4] || (o[4] = (a) => e.onChange({ lineWidth: a ?? 1 }))
          }, null, 8, ["value"])
        ]),
        B("div", null, [
          B("div", qW, te(M(t)("config.field.fillOpacity")), 1),
          v(M(qo), {
            min: 0,
            max: 100,
            value: e.panel.fillOpacity,
            onChange: o[5] || (o[5] = (a) => e.onChange({ fillOpacity: a }))
          }, null, 8, ["value"])
        ])
      ]);
    };
  }
}), KW = { class: "flex flex-col gap-3" }, YW = { class: "override-rule-header" }, UW = { class: "override-props" }, XW = /* @__PURE__ */ ye({
  __name: "OverridesSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = jt(), o = [
      { value: "byName", label: "Field name" },
      { value: "byType", label: "Field type" },
      { value: "byRegexp", label: "Field name by regex" }
    ], i = [
      { value: "displayName", label: "Display name" },
      { value: "unit", label: "Unit" },
      { value: "decimals", label: "Decimals" },
      { value: "color", label: "Color" },
      { value: "thresholds", label: "Thresholds" },
      { value: "min", label: "Min" },
      { value: "max", label: "Max" },
      { value: "noValue", label: "No value" }
    ], r = R(() => t.panel.fieldConfigOverrides ?? []);
    function a() {
      const f = {
        id: crypto.randomUUID(),
        matcher: { id: "byName", options: "" },
        properties: []
      };
      t.onChange({ fieldConfigOverrides: [...r.value, f] });
    }
    function l(f) {
      t.onChange({
        fieldConfigOverrides: r.value.filter((p) => p.id !== f)
      });
    }
    function s(f, p) {
      t.onChange({
        fieldConfigOverrides: r.value.map(
          (m) => m.id === f ? { ...m, matcher: { ...m.matcher, ...p } } : m
        )
      });
    }
    function u(f) {
      t.onChange({
        fieldConfigOverrides: r.value.map(
          (p) => p.id === f ? { ...p, properties: [...p.properties, { id: "displayName", value: "" }] } : p
        )
      });
    }
    function c(f, p, m) {
      t.onChange({
        fieldConfigOverrides: r.value.map(
          (b) => b.id === f ? {
            ...b,
            properties: b.properties.map(
              (y, S) => S === p ? { ...y, ...m } : y
            )
          } : b
        )
      });
    }
    function d(f, p) {
      t.onChange({
        fieldConfigOverrides: r.value.map(
          (m) => m.id === f ? { ...m, properties: m.properties.filter((b, y) => y !== p) } : m
        )
      });
    }
    return (f, p) => (ee(), ve("div", KW, [
      (ee(!0), ve(Ve, null, It(r.value, (m) => (ee(), ve("div", {
        key: m.id,
        class: "override-rule"
      }, [
        B("div", YW, [
          v(M(bt), {
            size: "small",
            value: m.matcher.id,
            options: o,
            style: { flex: "1" },
            onChange: (b) => s(m.id, { id: b })
          }, null, 8, ["value", "onChange"]),
          v(M(ft), {
            size: "small",
            value: m.matcher.options ?? "",
            placeholder: M(n)("editor.overrides.matcherValue"),
            style: { flex: "1" },
            onChange: (b) => s(m.id, { options: b.target.value })
          }, null, 8, ["value", "placeholder", "onChange"]),
          v(M($t), {
            type: "text",
            danger: "",
            size: "small",
            onClick: (b) => l(m.id)
          }, {
            default: ce(() => [
              B("span", {
                class: ct(M(ot).delete)
              }, null, 2)
            ]),
            _: 1
          }, 8, ["onClick"])
        ]),
        B("div", UW, [
          (ee(!0), ve(Ve, null, It(m.properties, (b, y) => (ee(), ve("div", {
            key: y,
            class: "override-prop-row"
          }, [
            v(M(bt), {
              size: "small",
              value: b.id,
              options: i,
              style: { width: "140px" },
              onChange: (S) => c(m.id, y, { id: S })
            }, null, 8, ["value", "onChange"]),
            v(M(ft), {
              size: "small",
              value: String(b.value ?? ""),
              placeholder: M(n)("editor.overrides.propValue"),
              style: { flex: "1" },
              onChange: (S) => c(m.id, y, { value: S.target.value })
            }, null, 8, ["value", "placeholder", "onChange"]),
            v(M($t), {
              type: "text",
              danger: "",
              size: "small",
              onClick: (S) => d(m.id, y)
            }, {
              default: ce(() => [
                B("span", {
                  class: ct(M(ot).closeCircle)
                }, null, 2)
              ]),
              _: 1
            }, 8, ["onClick"])
          ]))), 128)),
          v(M($t), {
            type: "dashed",
            size: "small",
            style: { width: "100%", "margin-top": "4px" },
            onClick: (b) => u(m.id)
          }, {
            default: ce(() => [
              B("span", {
                class: ct([M(ot).plus, "mr-1"])
              }, null, 2),
              Ee(" " + te(M(n)("editor.overrides.addProperty")), 1)
            ]),
            _: 1
          }, 8, ["onClick"])
        ])
      ]))), 128)),
      v(M($t), {
        type: "dashed",
        size: "small",
        style: { width: "100%" },
        onClick: a
      }, {
        default: ce(() => [
          B("span", {
            class: ct([M(ot).plus, "mr-1"])
          }, null, 2),
          Ee(" " + te(M(n)("editor.overrides.addOverride")), 1)
        ]),
        _: 1
      })
    ]));
  }
}), Yo = (e, t) => {
  const n = e.__vccOpts || e;
  for (const [o, i] of t)
    n[o] = i;
  return n;
}, Z1 = /* @__PURE__ */ Yo(XW, [["__scopeId", "data-v-2396374b"]]), QW = { class: "flex flex-col gap-3" }, ZW = { class: "text-xs text-secondary mb-1" }, JW = { class: "text-xs text-secondary mb-1" }, e9 = { class: "text-xs text-secondary mb-1" }, t9 = { class: "flex flex-col gap-1" }, n9 = { class: "text-xs" }, o9 = { class: "text-xs text-secondary mb-1" }, i9 = { key: 0 }, r9 = { class: "text-xs text-secondary mb-1" }, a9 = { class: "text-xs text-secondary mb-1" }, l9 = { class: "text-xs text-secondary mb-1" }, s9 = { class: "flex flex-col gap-1" }, u9 = { class: "text-xs" }, c9 = /* @__PURE__ */ ye({
  __name: "PieStyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = jt(), o = R(() => t.panel.pieLabels ?? []), i = R(() => t.panel.legendValues ?? []);
    function r(l, s) {
      const u = s ? [...o.value, l] : o.value.filter((c) => c !== l);
      t.onChange({ pieLabels: u });
    }
    function a(l, s) {
      const u = s ? [...i.value, l] : i.value.filter((c) => c !== l);
      t.onChange({ legendValues: u });
    }
    return (l, s) => {
      const u = Vt("a-radio-button"), c = Vt("a-radio-group"), d = Vt("a-checkbox");
      return ee(), ve("div", QW, [
        B("div", null, [
          B("div", ZW, te(M(n)("config.field.pieType")), 1),
          v(c, {
            size: "small",
            value: e.panel.pieType ?? "pie",
            onChange: s[0] || (s[0] = (f) => e.onChange({ pieType: f.target.value }))
          }, {
            default: ce(() => [
              v(u, { value: "pie" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.pieType.pie")), 1)
                ]),
                _: 1
              }),
              v(u, { value: "donut" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.pieType.donut")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        B("div", null, [
          B("div", JW, te(M(n)("config.field.pieSliceSorting")), 1),
          v(c, {
            size: "small",
            value: e.panel.pieSliceSorting ?? "desc",
            onChange: s[1] || (s[1] = (f) => e.onChange({ pieSliceSorting: f.target.value }))
          }, {
            default: ce(() => [
              v(u, { value: "desc" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.sort.desc")), 1)
                ]),
                _: 1
              }),
              v(u, { value: "asc" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.sort.asc")), 1)
                ]),
                _: 1
              }),
              v(u, { value: "none" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.sort.none")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        B("div", null, [
          B("div", e9, te(M(n)("config.field.pieLabels")), 1),
          B("div", t9, [
            (ee(), ve(Ve, null, It(["name", "percent", "value"], (f) => B("label", {
              key: f,
              class: "flex items-center gap-1"
            }, [
              v(d, {
                checked: o.value.includes(f),
                onChange: (p) => r(f, p.target.checked)
              }, null, 8, ["checked", "onChange"]),
              B("span", n9, te(M(n)(`config.pieLabel.${f}`)), 1)
            ])), 64))
          ])
        ]),
        B("div", null, [
          B("div", o9, te(M(n)("config.field.pieShow")), 1),
          v(c, {
            size: "small",
            value: e.panel.pieShow ?? "calculate",
            onChange: s[2] || (s[2] = (f) => e.onChange({ pieShow: f.target.value }))
          }, {
            default: ce(() => [
              v(u, { value: "calculate" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.pieShow.calculate")), 1)
                ]),
                _: 1
              }),
              v(u, { value: "all" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.pieShow.all")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        (e.panel.pieShow ?? "calculate") === "calculate" ? (ee(), ve("div", i9, [
          B("div", r9, te(M(n)("config.field.reducer")), 1),
          v(M(bt), {
            size: "small",
            value: e.panel.pieCalculation ?? "lastNotNull",
            options: [
              { value: "lastNotNull", label: M(n)("config.reducer.lastNotNull") },
              { value: "last", label: M(n)("config.reducer.last") },
              { value: "mean", label: M(n)("config.reducer.mean") },
              { value: "min", label: M(n)("config.reducer.min") },
              { value: "max", label: M(n)("config.reducer.max") },
              { value: "sum", label: M(n)("config.reducer.sum") }
            ],
            style: { width: "100%" },
            onChange: s[3] || (s[3] = (f) => e.onChange({ pieCalculation: f }))
          }, null, 8, ["value", "options"])
        ])) : He("", !0),
        B("div", null, [
          B("div", a9, te(M(n)("config.field.legendMode")), 1),
          v(c, {
            size: "small",
            value: e.panel.legendMode ?? "list",
            onChange: s[4] || (s[4] = (f) => e.onChange({ legendMode: f.target.value }))
          }, {
            default: ce(() => [
              v(u, { value: "list" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.legendMode.list")), 1)
                ]),
                _: 1
              }),
              v(u, { value: "table" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.legendMode.table")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        B("div", null, [
          B("div", l9, te(M(n)("config.field.legendValues")), 1),
          B("div", s9, [
            (ee(), ve(Ve, null, It(["min", "max", "mean", "sum", "last"], (f) => B("label", {
              key: f,
              class: "flex items-center gap-1"
            }, [
              v(d, {
                checked: i.value.includes(f),
                onChange: (p) => a(f, p.target.checked)
              }, null, 8, ["checked", "onChange"]),
              B("span", u9, te(M(n)(`config.legendValue.${f}`)), 1)
            ])), 64))
          ])
        ])
      ]);
    };
  }
}), d9 = { class: "flex flex-col gap-3" }, f9 = { class: "text-xs text-secondary mb-1" }, p9 = { class: "text-xs text-secondary mb-1" }, g9 = { class: "text-xs text-secondary mb-1" }, h9 = { class: "text-xs text-secondary mb-1" }, v9 = /* @__PURE__ */ ye({
  __name: "StatStyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const { t } = jt();
    return (n, o) => {
      const i = Vt("a-switch");
      return ee(), ve("div", d9, [
        B("div", null, [
          B("div", f9, te(M(t)("config.field.orientation")), 1),
          v(M(bt), {
            size: "small",
            value: e.panel.statOrientation ?? "vertical",
            options: [
              { value: "vertical", label: M(t)("config.orientation.vertical") },
              { value: "horizontal", label: M(t)("config.orientation.horizontal") }
            ],
            style: { width: "100%" },
            onChange: o[0] || (o[0] = (r) => e.onChange({ statOrientation: r }))
          }, null, 8, ["value", "options"])
        ]),
        B("div", null, [
          B("div", p9, te(M(t)("config.field.textMode")), 1),
          v(M(bt), {
            size: "small",
            value: e.panel.statTextMode ?? "value_and_name",
            options: [
              { value: "value_and_name", label: M(t)("config.textMode.valueAndName") },
              { value: "value", label: M(t)("config.textMode.value") },
              { value: "name", label: M(t)("config.textMode.name") },
              { value: "none", label: M(t)("config.textMode.none") }
            ],
            style: { width: "100%" },
            onChange: o[1] || (o[1] = (r) => e.onChange({ statTextMode: r }))
          }, null, 8, ["value", "options"])
        ]),
        B("div", null, [
          B("div", g9, te(M(t)("config.field.colorMode")), 1),
          v(M(bt), {
            size: "small",
            value: e.panel.statColorMode ?? "value",
            options: [
              { value: "value", label: M(t)("config.colorMode.value") },
              { value: "background_solid", label: M(t)("config.colorMode.backgroundSolid") },
              { value: "background", label: M(t)("config.colorMode.background") }
            ],
            style: { width: "100%" },
            onChange: o[2] || (o[2] = (r) => e.onChange({ statColorMode: r }))
          }, null, 8, ["value", "options"])
        ]),
        B("div", null, [
          B("div", h9, te(M(t)("config.field.percentChange")), 1),
          v(i, {
            size: "small",
            checked: e.panel.showPercentChange ?? !1,
            onChange: o[3] || (o[3] = (r) => e.onChange({ showPercentChange: r }))
          }, null, 8, ["checked"])
        ])
      ]);
    };
  }
}), m9 = { class: "flex flex-col gap-3" }, b9 = { key: 0 }, y9 = { class: "text-xs text-secondary mb-1" }, x9 = { key: 1 }, w9 = { class: "text-xs text-secondary mb-1" }, S9 = { key: 2 }, C9 = { class: "text-xs text-secondary mb-1" }, $9 = { key: 3 }, P9 = { class: "text-xs text-secondary mb-1" }, O9 = { class: "text-xs text-secondary mb-1" }, I9 = { class: "text-xs text-secondary mb-1" }, M9 = { class: "text-xs text-secondary mb-1" }, T9 = { class: "flex items-center gap-2" }, k9 = { class: "text-xs text-secondary mb-1" }, E9 = { class: "flex items-center gap-2" }, _9 = { key: 5 }, A9 = { class: "text-xs text-secondary mb-1" }, D9 = { key: 6 }, z9 = { class: "text-xs text-secondary mb-1" }, R9 = { class: "text-xs text-secondary mb-1" }, N9 = { key: 7 }, B9 = { class: "text-xs text-secondary mb-1" }, L9 = /* @__PURE__ */ ye({
  __name: "StyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = jt(), o = t.panel.type === "timeseries", i = t.panel.drawStyle ?? "lines", r = i === "lines", a = i === "points", l = t.panel.showPointsMode ?? "auto", s = t.panel.spanNulls ?? !1, u = t.panel.insertNulls ?? !1;
    return (c, d) => {
      const f = Vt("a-radio-button"), p = Vt("a-radio-group"), m = Vt("a-input-number"), b = Vt("a-switch");
      return ee(), ve("div", m9, [
        o ? (ee(), ve("div", b9, [
          B("div", y9, te(M(n)("config.field.drawStyle")), 1),
          v(p, {
            size: "small",
            value: e.panel.drawStyle ?? "lines",
            onChange: d[0] || (d[0] = (y) => e.onChange({ drawStyle: y.target.value }))
          }, {
            default: ce(() => [
              v(f, { value: "lines" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.drawStyle.lines")), 1)
                ]),
                _: 1
              }),
              v(f, { value: "bars" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.drawStyle.bars")), 1)
                ]),
                _: 1
              }),
              v(f, { value: "points" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.drawStyle.points")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ])) : He("", !0),
        a ? He("", !0) : (ee(), ve("div", x9, [
          B("div", w9, te(M(n)("config.field.lineWidth")), 1),
          v(M(qo), {
            min: 0.5,
            max: 4,
            step: 0.5,
            value: e.panel.lineWidth,
            onChange: d[1] || (d[1] = (y) => e.onChange({ lineWidth: y }))
          }, null, 8, ["value"])
        ])),
        a ? He("", !0) : (ee(), ve("div", S9, [
          B("div", C9, te(M(n)("config.field.fillOpacity")), 1),
          v(M(qo), {
            min: 0,
            max: 100,
            value: e.panel.fillOpacity,
            onChange: d[2] || (d[2] = (y) => e.onChange({ fillOpacity: y }))
          }, null, 8, ["value"])
        ])),
        a ? He("", !0) : (ee(), ve("div", $9, [
          B("div", P9, te(M(n)("config.field.gradientMode")), 1),
          v(p, {
            size: "small",
            value: e.panel.gradientMode ?? "none",
            onChange: d[3] || (d[3] = (y) => e.onChange({ gradientMode: y.target.value }))
          }, {
            default: ce(() => [
              v(f, { value: "none" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.gradient.none")), 1)
                ]),
                _: 1
              }),
              v(f, { value: "opacity" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.gradient.opacity")), 1)
                ]),
                _: 1
              }),
              v(f, { value: "hue" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.gradient.hue")), 1)
                ]),
                _: 1
              }),
              v(f, { value: "scheme" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.gradient.scheme")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ])),
        o && r ? (ee(), ve(Ve, { key: 4 }, [
          B("div", null, [
            B("div", O9, te(M(n)("config.field.interpolation")), 1),
            v(p, {
              size: "small",
              value: e.panel.lineInterpolation,
              onChange: d[4] || (d[4] = (y) => e.onChange({ lineInterpolation: y.target.value }))
            }, {
              default: ce(() => [
                v(f, { value: "linear" }, {
                  default: ce(() => [
                    Ee(te(M(n)("config.interp.linear")), 1)
                  ]),
                  _: 1
                }),
                v(f, { value: "smooth" }, {
                  default: ce(() => [
                    Ee(te(M(n)("config.interp.smooth")), 1)
                  ]),
                  _: 1
                }),
                v(f, { value: "step" }, {
                  default: ce(() => [
                    Ee(te(M(n)("config.interp.step")), 1)
                  ]),
                  _: 1
                })
              ]),
              _: 1
            }, 8, ["value"])
          ]),
          B("div", null, [
            B("div", I9, te(M(n)("config.field.lineStyle")), 1),
            v(p, {
              size: "small",
              value: e.panel.lineStyle,
              onChange: d[5] || (d[5] = (y) => e.onChange({ lineStyle: y.target.value }))
            }, {
              default: ce(() => [
                v(f, { value: "solid" }, {
                  default: ce(() => [
                    Ee(te(M(n)("config.linestyle.solid")), 1)
                  ]),
                  _: 1
                }),
                v(f, { value: "dashed" }, {
                  default: ce(() => [
                    Ee(te(M(n)("config.linestyle.dashed")), 1)
                  ]),
                  _: 1
                }),
                v(f, { value: "dotted" }, {
                  default: ce(() => [
                    Ee(te(M(n)("config.linestyle.dotted")), 1)
                  ]),
                  _: 1
                })
              ]),
              _: 1
            }, 8, ["value"])
          ]),
          B("div", null, [
            B("div", M9, te(M(n)("config.field.spanNulls")), 1),
            B("div", T9, [
              v(p, {
                size: "small",
                value: M(s) === !0 ? "always" : typeof M(s) == "number" ? "threshold" : "never",
                onChange: d[6] || (d[6] = (y) => {
                  y.target.value === "never" ? e.onChange({ spanNulls: !1 }) : y.target.value === "always" ? e.onChange({ spanNulls: !0 }) : e.onChange({ spanNulls: 3600 });
                })
              }, {
                default: ce(() => [
                  v(f, { value: "never" }, {
                    default: ce(() => [
                      Ee(te(M(n)("config.nulls.never")), 1)
                    ]),
                    _: 1
                  }),
                  v(f, { value: "always" }, {
                    default: ce(() => [
                      Ee(te(M(n)("config.nulls.always")), 1)
                    ]),
                    _: 1
                  }),
                  v(f, { value: "threshold" }, {
                    default: ce(() => [
                      Ee(te(M(n)("config.nulls.threshold")), 1)
                    ]),
                    _: 1
                  })
                ]),
                _: 1
              }, 8, ["value"]),
              typeof M(s) == "number" ? (ee(), Ze(m, {
                key: 0,
                size: "small",
                min: 1,
                value: M(s),
                suffix: "s",
                style: { width: "90px" },
                onChange: d[7] || (d[7] = (y) => e.onChange({ spanNulls: y ?? 3600 }))
              }, null, 8, ["value"])) : He("", !0)
            ])
          ]),
          B("div", null, [
            B("div", k9, te(M(n)("config.field.insertNulls")), 1),
            B("div", E9, [
              v(p, {
                size: "small",
                value: typeof M(u) == "number" ? "threshold" : "never",
                onChange: d[8] || (d[8] = (y) => {
                  y.target.value === "never" ? e.onChange({ insertNulls: !1 }) : e.onChange({ insertNulls: 3600 });
                })
              }, {
                default: ce(() => [
                  v(f, { value: "never" }, {
                    default: ce(() => [
                      Ee(te(M(n)("config.nulls.never")), 1)
                    ]),
                    _: 1
                  }),
                  v(f, { value: "threshold" }, {
                    default: ce(() => [
                      Ee(te(M(n)("config.nulls.threshold")), 1)
                    ]),
                    _: 1
                  })
                ]),
                _: 1
              }, 8, ["value"]),
              typeof M(u) == "number" ? (ee(), Ze(m, {
                key: 0,
                size: "small",
                min: 1,
                value: M(u),
                suffix: "s",
                style: { width: "90px" },
                onChange: d[9] || (d[9] = (y) => e.onChange({ insertNulls: y ?? 3600 }))
              }, null, 8, ["value"])) : He("", !0)
            ])
          ])
        ], 64)) : He("", !0),
        o && !a ? (ee(), ve("div", _9, [
          B("div", A9, te(M(n)("config.field.showPoints")), 1),
          v(p, {
            size: "small",
            value: M(l),
            onChange: d[10] || (d[10] = (y) => e.onChange({ showPointsMode: y.target.value, showPoints: y.target.value === "always" }))
          }, {
            default: ce(() => [
              v(f, { value: "auto" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.points.auto")), 1)
                ]),
                _: 1
              }),
              v(f, { value: "always" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.points.always")), 1)
                ]),
                _: 1
              }),
              v(f, { value: "never" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.points.never")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ])) : He("", !0),
        o ? (ee(), ve("div", D9, [
          B("div", z9, te(M(n)("config.field.stackSeries")), 1),
          v(p, {
            size: "small",
            value: e.panel.stackingMode ?? "none",
            onChange: d[11] || (d[11] = (y) => e.onChange({ stackingMode: y.target.value }))
          }, {
            default: ce(() => [
              v(f, { value: "none" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.stack.none")), 1)
                ]),
                _: 1
              }),
              v(f, { value: "normal" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.stack.normal")), 1)
                ]),
                _: 1
              }),
              v(f, { value: "percent" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.stack.percent")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ])) : He("", !0),
        B("div", null, [
          B("div", R9, te(M(n)("config.field.legendPosition")), 1),
          v(p, {
            size: "small",
            value: e.panel.legendPosition,
            onChange: d[12] || (d[12] = (y) => e.onChange({ legendPosition: y.target.value }))
          }, {
            default: ce(() => [
              v(f, { value: "bottom" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.legend.bottom")), 1)
                ]),
                _: 1
              }),
              v(f, { value: "right" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.legend.right")), 1)
                ]),
                _: 1
              }),
              v(f, { value: "hidden" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.legend.hidden")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        e.panel.type === "bar" ? (ee(), ve("div", N9, [
          B("div", B9, te(M(n)("config.field.stacked")), 1),
          v(b, {
            size: "small",
            checked: e.panel.stacked,
            onChange: d[13] || (d[13] = (y) => e.onChange({ stacked: y }))
          }, null, 8, ["checked"])
        ])) : He("", !0)
      ]);
    };
  }
}), F9 = { class: "flex flex-col gap-3" }, H9 = { class: "text-xs text-secondary mb-1" }, V9 = { class: "text-xs text-secondary mb-1" }, j9 = { class: "text-xs text-secondary mb-1" }, W9 = { class: "text-xs text-secondary mb-1" }, q9 = { class: "text-xs text-secondary mb-1" }, G9 = { class: "text-xs text-secondary mb-1" }, K9 = { key: 0 }, Y9 = { class: "text-xs text-secondary mb-1" }, U9 = { class: "text-xs text-secondary mb-1" }, X9 = { key: 1 }, Q9 = { class: "text-xs text-secondary mb-1" }, Z9 = { key: 2 }, J9 = { class: "text-xs text-secondary mb-1" }, eq = /* @__PURE__ */ ye({
  __name: "TableStyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = jt();
    function o(i) {
      t.onChange({ tableFooterReducers: i ? [i] : [] });
    }
    return (i, r) => {
      const a = Vt("a-switch"), l = Vt("a-radio-button"), s = Vt("a-radio-group");
      return ee(), ve("div", F9, [
        B("div", null, [
          B("div", H9, te(M(n)("config.field.tableShowHeader")), 1),
          v(a, {
            size: "small",
            checked: e.panel.tableShowHeader ?? !0,
            onChange: r[0] || (r[0] = (u) => e.onChange({ tableShowHeader: u }))
          }, null, 8, ["checked"])
        ]),
        B("div", null, [
          B("div", V9, te(M(n)("config.field.tableCellHeight")), 1),
          v(s, {
            size: "small",
            value: e.panel.tableCellHeight ?? "medium",
            onChange: r[1] || (r[1] = (u) => e.onChange({ tableCellHeight: u.target.value }))
          }, {
            default: ce(() => [
              v(l, { value: "small" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.tableHeight.small")), 1)
                ]),
                _: 1
              }),
              v(l, { value: "medium" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.tableHeight.medium")), 1)
                ]),
                _: 1
              }),
              v(l, { value: "large" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.tableHeight.large")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        B("div", null, [
          B("div", j9, te(M(n)("config.field.tableFrozenColumns")), 1),
          v(M(fo), {
            size: "small",
            min: 0,
            max: 10,
            value: e.panel.tableFrozenColumns ?? 0,
            style: { width: "100%" },
            onChange: r[2] || (r[2] = (u) => e.onChange({ tableFrozenColumns: u ?? 0 }))
          }, null, 8, ["value"])
        ]),
        B("div", null, [
          B("div", W9, te(M(n)("config.field.tableColumnFilter")), 1),
          v(a, {
            size: "small",
            checked: e.panel.tableColumnFilter ?? !1,
            onChange: r[3] || (r[3] = (u) => e.onChange({ tableColumnFilter: u }))
          }, null, 8, ["checked"])
        ]),
        B("div", null, [
          B("div", q9, te(M(n)("config.field.tableWrapText")), 1),
          v(a, {
            size: "small",
            checked: e.panel.tableWrapText ?? !1,
            onChange: r[4] || (r[4] = (u) => e.onChange({ tableWrapText: u }))
          }, null, 8, ["checked"])
        ]),
        B("div", null, [
          B("div", G9, te(M(n)("config.field.tableEnablePagination")), 1),
          v(a, {
            size: "small",
            checked: e.panel.tableEnablePagination ?? !1,
            onChange: r[5] || (r[5] = (u) => e.onChange({ tableEnablePagination: u }))
          }, null, 8, ["checked"])
        ]),
        e.panel.tableEnablePagination ? (ee(), ve("div", K9, [
          B("div", Y9, te(M(n)("config.field.tablePageSize")), 1),
          v(M(fo), {
            size: "small",
            min: 5,
            max: 500,
            value: e.panel.tablePageSize ?? 20,
            style: { width: "100%" },
            onChange: r[6] || (r[6] = (u) => e.onChange({ tablePageSize: u ?? 20 }))
          }, null, 8, ["value"])
        ])) : He("", !0),
        B("div", null, [
          B("div", U9, te(M(n)("config.field.tableFooterEnabled")), 1),
          v(a, {
            size: "small",
            checked: e.panel.tableFooterEnabled ?? !1,
            onChange: r[7] || (r[7] = (u) => e.onChange({ tableFooterEnabled: u }))
          }, null, 8, ["checked"])
        ]),
        e.panel.tableFooterEnabled ? (ee(), ve("div", X9, [
          B("div", Q9, te(M(n)("config.field.tableFooterReducers")), 1),
          v(M(bt), {
            size: "small",
            value: e.panel.tableFooterReducers?.[0],
            options: [
              { value: "min", label: M(n)("config.reducer.min") },
              { value: "max", label: M(n)("config.reducer.max") },
              { value: "mean", label: M(n)("config.reducer.mean") },
              { value: "sum", label: M(n)("config.reducer.sum") },
              { value: "count", label: M(n)("config.reducer.count") }
            ],
            "allow-clear": "",
            style: { width: "100%" },
            onChange: r[8] || (r[8] = (u) => o(u))
          }, null, 8, ["value", "options"])
        ])) : He("", !0),
        e.panel.tableFooterEnabled && e.panel.tableFooterReducers?.[0] ? (ee(), ve("div", Z9, [
          B("div", J9, te(M(n)("config.field.tableFooterFields")), 1),
          v(M(bt), {
            size: "small",
            mode: "multiple",
            "allow-clear": "",
            placeholder: M(n)("config.field.tableFooterFieldsPlaceholder"),
            value: e.panel.tableFooterFields ?? [],
            options: (e.numericFieldNames ?? []).map((u) => ({ value: u, label: u })),
            style: { width: "100%" },
            onChange: r[9] || (r[9] = (u) => e.onChange({ tableFooterFields: u.length > 0 ? u : void 0 }))
          }, null, 8, ["placeholder", "value", "options"])
        ])) : He("", !0)
      ]);
    };
  }
}), tq = { class: "flex flex-col gap-1" }, nq = { class: "mb-2" }, oq = { class: "text-xs text-secondary mb-1" }, iq = ["value", "onInput"], rq = { class: "flex items-center gap-1.5 mb-1" }, aq = ["value"], lq = { class: "text-xs text-secondary flex-1" }, sq = /* @__PURE__ */ ye({
  __name: "ThresholdsEditor",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = jt(), o = ["#52c41a", "#faad14", "#ff4d4f", "#1677ff", "#722ed1", "#13c2c2", "#fa8c16"], i = le(t.panel.thresholdMode ?? "absolute"), r = R(() => i.value === "percentage"), a = R(() => [...t.panel.thresholds].sort((f, p) => p.value - f.value));
    function l() {
      const f = [t.panel.thresholdBaseColor, ...t.panel.thresholds.map((p) => p.color)];
      return o.find((p) => !f.includes(p)) ?? "#cccccc";
    }
    function s() {
      const f = t.panel.thresholds.length > 0 ? Math.max(...t.panel.thresholds.map((y) => y.value)) : 0, m = { value: r.value ? Math.min(100, f + 20) : f + 10, color: l(), label: "" }, b = [...t.panel.thresholds, m].sort((y, S) => y.value - S.value);
      t.onChange({ thresholds: b });
    }
    function u(f) {
      t.onChange({ thresholds: t.panel.thresholds.filter((p) => p.value !== f) });
    }
    function c(f, p) {
      const m = t.panel.thresholds.map((b) => b.value === f ? { ...b, ...p } : b).sort((b, y) => b.value - y.value);
      t.onChange({ thresholds: m });
    }
    function d(f) {
      i.value = f, t.onChange({ thresholdMode: f });
    }
    return (f, p) => {
      const m = Vt("a-input");
      return ee(), ve("div", tq, [
        B("div", nq, [
          B("div", oq, te(M(n)("config.threshold.mode")), 1),
          v(M(zo).Group, {
            size: "small",
            value: i.value,
            onChange: p[0] || (p[0] = (b) => d(b.target.value))
          }, {
            default: ce(() => [
              v(M(zo).Button, { value: "absolute" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.threshold.modeAbsolute")), 1)
                ]),
                _: 1
              }),
              v(M(zo).Button, { value: "percentage" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.threshold.modePercentage")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        (ee(!0), ve(Ve, null, It(a.value, (b) => (ee(), ve("div", {
          key: b.value,
          class: "flex items-center gap-1.5 mb-1"
        }, [
          B("input", {
            type: "color",
            class: "w-7 h-7 border border-gray-300 rounded cursor-pointer",
            value: b.color,
            onInput: (y) => c(b.value, { color: y.target.value })
          }, null, 40, iq),
          v(M(fo), {
            size: "small",
            value: b.value,
            min: r.value ? 0 : void 0,
            max: r.value ? 100 : void 0,
            style: { width: "80px" },
            onChange: (y) => c(b.value, { value: y ?? 0 })
          }, null, 8, ["value", "min", "max", "onChange"]),
          v(m, {
            size: "small",
            value: b.label,
            placeholder: "Label",
            style: { flex: "1" },
            onChange: (y) => c(b.value, { label: y.target.value })
          }, null, 8, ["value", "onChange"]),
          v(M($t), {
            type: "text",
            danger: "",
            size: "small",
            onClick: (y) => u(b.value)
          }, {
            default: ce(() => [
              B("span", {
                class: ct(M(ot).delete)
              }, null, 2)
            ]),
            _: 1
          }, 8, ["onClick"])
        ]))), 128)),
        B("div", rq, [
          B("input", {
            type: "color",
            class: "w-7 h-7 border border-gray-300 rounded cursor-pointer",
            value: e.panel.thresholdBaseColor,
            onInput: p[1] || (p[1] = (b) => e.onChange({ thresholdBaseColor: b.target.value }))
          }, null, 40, aq),
          B("span", lq, te(M(n)("config.threshold.base")), 1)
        ]),
        v(M($t), {
          type: "dashed",
          size: "small",
          block: "",
          onClick: s
        }, {
          default: ce(() => [
            B("span", {
              class: ct([M(ot).plus, "mr-1"])
            }, null, 2),
            Ee(" " + te(M(n)("config.threshold.add")), 1)
          ]),
          _: 1
        })
      ]);
    };
  }
}), uq = { class: "flex flex-col gap-3" }, cq = { class: "text-xs text-secondary mb-1" }, dq = { key: 0 }, fq = { class: "text-xs text-secondary mb-1" }, pq = { key: 1 }, gq = { class: "text-xs text-secondary mb-1" }, hq = { class: "text-xs text-secondary mb-1" }, vq = /* @__PURE__ */ ye({
  __name: "TooltipSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const { t } = jt();
    return (n, o) => {
      const i = Vt("a-radio-button"), r = Vt("a-radio-group"), a = Vt("a-switch");
      return ee(), ve("div", uq, [
        B("div", null, [
          B("div", cq, te(M(t)("config.field.tooltipMode")), 1),
          v(r, {
            size: "small",
            value: e.panel.tooltipMode ?? "multi",
            onChange: o[0] || (o[0] = (l) => e.onChange({ tooltipMode: l.target.value }))
          }, {
            default: ce(() => [
              v(i, { value: "single" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.tooltip.single")), 1)
                ]),
                _: 1
              }),
              v(i, { value: "multi" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.tooltip.multi")), 1)
                ]),
                _: 1
              }),
              v(i, { value: "none" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.tooltip.none")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        (e.panel.tooltipMode ?? "multi") === "multi" ? (ee(), ve("div", dq, [
          B("div", fq, te(M(t)("config.field.tooltipSort")), 1),
          v(r, {
            size: "small",
            value: e.panel.tooltipSort ?? "none",
            onChange: o[1] || (o[1] = (l) => e.onChange({ tooltipSort: l.target.value }))
          }, {
            default: ce(() => [
              v(i, { value: "none" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.tooltip.sortNone")), 1)
                ]),
                _: 1
              }),
              v(i, { value: "asc" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.tooltip.sortAsc")), 1)
                ]),
                _: 1
              }),
              v(i, { value: "desc" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.tooltip.sortDesc")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ])) : He("", !0),
        (e.panel.tooltipMode ?? "multi") === "multi" ? (ee(), ve("div", pq, [
          B("div", gq, te(M(t)("config.field.tooltipMaxHeight")), 1),
          v(M(fo), {
            size: "small",
            min: 50,
            max: 800,
            value: e.panel.tooltipMaxHeight ?? 600,
            suffix: "px",
            style: { width: "100%" },
            onChange: o[2] || (o[2] = (l) => e.onChange({ tooltipMaxHeight: l ?? 600 }))
          }, null, 8, ["value"])
        ])) : He("", !0),
        B("div", null, [
          B("div", hq, te(M(t)("config.field.axisPointer")), 1),
          v(a, {
            size: "small",
            checked: e.panel.showAxisPointer ?? !0,
            onChange: o[3] || (o[3] = (l) => e.onChange({ showAxisPointer: l }))
          }, null, 8, ["checked"])
        ])
      ]);
    };
  }
}), mq = { class: "flex items-center gap-2" }, bq = /* @__PURE__ */ ye({
  __name: "SliderInput",
  props: {
    value: {},
    min: {},
    max: {},
    step: { default: 1 },
    shiftMultiplier: { default: 10 },
    unit: {},
    placeholder: {},
    allowClear: { type: Boolean, default: !1 }
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, { t: i } = jt();
    function r(p) {
      return Math.min(n.max, Math.max(n.min, p));
    }
    const a = R(() => n.value ?? n.min), l = R(() => n.placeholder ?? i("common.auto")), s = R(() => {
      const p = n.value !== void 0 ? n.unit ? `${n.value}${n.unit}` : String(n.value) : l.value;
      try {
        const m = document.createElement("canvas").getContext("2d");
        return m ? (m.font = "14px system-ui, -apple-system, sans-serif", `${Math.ceil(m.measureText(p).width) + 24}px`) : "6ch";
      } catch {
        return "6ch";
      }
    });
    function u(p) {
      typeof p == "number" && o("change", r(p));
    }
    function c(p) {
      p != null && o("change", r(Number(p)));
    }
    function d() {
      o("change", void 0);
    }
    function f(p) {
      const m = p.shiftKey, b = n.step * (m ? n.shiftMultiplier : 1);
      p.key === "ArrowRight" || p.key === "ArrowUp" ? (p.preventDefault(), o("change", r(a.value + b))) : (p.key === "ArrowLeft" || p.key === "ArrowDown") && (p.preventDefault(), o("change", r(a.value - b)));
    }
    return (p, m) => (ee(), ve("div", mq, [
      v(M(qo), {
        min: e.min,
        max: e.max,
        step: e.step,
        value: a.value,
        style: { flex: "1" },
        "tooltip-formatter": e.unit ? ((b) => `${b}${e.unit}`) : void 0,
        onChange: u
      }, null, 8, ["min", "max", "step", "value", "tooltip-formatter"]),
      v(M(vr).Compact, { size: "small" }, {
        default: ce(() => [
          v(M(fo), {
            size: "small",
            controls: !1,
            min: e.min,
            max: e.max,
            step: e.step,
            value: e.value ?? void 0,
            placeholder: l.value,
            style: xt({ width: s.value }),
            suffix: e.unit && e.value !== void 0 ? e.unit : void 0,
            onKeydown: f,
            onChange: c
          }, null, 8, ["min", "max", "step", "value", "placeholder", "style", "suffix"]),
          e.allowClear && e.value !== void 0 ? (ee(), Ze(M($t), {
            key: 0,
            onClick: d
          }, {
            default: ce(() => [
              B("span", {
                class: ct([M(ot).closeCircle, "text-xs text-gray-400 cursor-pointer"])
              }, null, 2)
            ]),
            _: 1
          })) : He("", !0)
        ]),
        _: 1
      })
    ]));
  }
}), yq = { class: "flex flex-col gap-3" }, xq = { key: 0 }, wq = { class: "text-xs text-secondary mb-1" }, Sq = { class: "text-xs text-secondary mb-1" }, Cq = { class: "text-xs text-secondary mb-1" }, $q = { key: 1 }, Pq = { class: "text-xs text-secondary mb-1" }, Oq = { key: 2 }, Iq = { class: "text-xs text-secondary mb-1" }, Mq = /* @__PURE__ */ ye({
  __name: "ValueSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = jt(), i = ["", "ms", "s", "bytes", "percent", "percentunit", "reqps", "ops", "bps", "Bps"].map((s) => ({
      value: s,
      label: n(s ? `config.unit.${s}` : "config.unit.none")
    })), r = [
      { value: "lastNotNull", label: n("config.reducer.lastNotNull") },
      { value: "last", label: n("config.reducer.last") },
      { value: "firstNotNull", label: n("config.reducer.firstNotNull") },
      { value: "first", label: n("config.reducer.first") },
      { value: "mean", label: n("config.reducer.mean") },
      { value: "min", label: n("config.reducer.min") },
      { value: "max", label: n("config.reducer.max") },
      { value: "sum", label: n("config.reducer.sum") },
      { value: "count", label: n("config.reducer.count") }
    ], a = t.panel.type === "gauge", l = t.panel.type !== "timeseries";
    return (s, u) => (ee(), ve("div", yq, [
      l ? (ee(), ve("div", xq, [
        B("div", wq, te(M(n)("config.field.reducer")), 1),
        v(M(bt), {
          size: "small",
          value: e.panel.statReducer ?? "lastNotNull",
          options: r,
          style: { width: "100%" },
          onChange: u[0] || (u[0] = (c) => e.onChange({ statReducer: c }))
        }, null, 8, ["value"])
      ])) : He("", !0),
      B("div", null, [
        B("div", Sq, te(M(n)("config.field.unit")), 1),
        v(M(bt), {
          size: "small",
          value: e.panel.unit || "",
          options: M(i),
          style: { width: "100%" },
          onChange: u[1] || (u[1] = (c) => e.onChange({ unit: c }))
        }, null, 8, ["value", "options"])
      ]),
      B("div", null, [
        B("div", Cq, te(M(n)("config.field.decimals")), 1),
        v(bq, {
          min: 0,
          max: 15,
          step: 1,
          value: e.panel.decimals,
          "allow-clear": !0,
          onChange: u[2] || (u[2] = (c) => e.onChange({ decimals: c }))
        }, null, 8, ["value"])
      ]),
      a ? (ee(), ve("div", $q, [
        B("div", Pq, te(M(n)("config.field.min")), 1),
        v(M(fo), {
          size: "small",
          value: e.panel.min,
          style: { width: "100%" },
          onChange: u[3] || (u[3] = (c) => e.onChange({ min: c ?? 0 }))
        }, null, 8, ["value"])
      ])) : He("", !0),
      a ? (ee(), ve("div", Oq, [
        B("div", Iq, te(M(n)("config.field.max")), 1),
        v(M(fo), {
          size: "small",
          value: e.panel.max,
          style: { width: "100%" },
          onChange: u[4] || (u[4] = (c) => e.onChange({ max: c ?? 100 }))
        }, null, 8, ["value"])
      ])) : He("", !0)
    ]));
  }
}), Tq = { class: "h-full flex flex-col overflow-hidden" }, kq = {
  class: "flex-shrink-0 px-2 bg-primary/10 py-1",
  style: { "border-bottom": "1px solid #eee" }
}, Eq = { class: "flex-1 overflow-y-auto" }, _q = /* @__PURE__ */ ye({
  __name: "OptionsPane",
  setup(e) {
    const t = [
      "timeseries",
      "bar",
      "histogram",
      "stat",
      "gauge",
      "table",
      "pie"
    ], { t: n } = jt(), { panel: o, onChange: i, numericFieldNames: r, allFieldNames: a } = qs(), l = R(
      () => t.map((p) => ({
        value: p,
        label: n(`config.type.${p}`)
      }))
    ), s = le(""), u = {
      general: Q1,
      style: L9,
      tooltip: vq,
      axes: G7,
      value: Mq,
      // timeseries / bar / histogram
      "bar-style": tW,
      "histogram-style": GW,
      // stat
      "stat-style": v9,
      // gauge
      "gauge-style": wW,
      // pie
      "pie-style": c9,
      // table
      "table-style": eq,
      // overrides
      overrides: Z1
    }, c = R(() => {
      const m = (xI(o.value.type)?.optionCategories ?? []).map((b) => ({
        key: b.key,
        label: n(b.labelKey),
        component: u[b.key] ?? Q1
      }));
      return m.push({
        key: "thresholds",
        label: n("config.section.thresholds", { n: o.value.thresholds.length }),
        component: sq
      }), m.push({
        key: "overrides",
        label: n("config.section.overrides"),
        component: Z1
      }), m;
    }), d = R(() => {
      if (!s.value.trim())
        return c.value;
      const p = s.value.toLowerCase();
      return c.value.filter(
        (m) => typeof m.label == "string" && m.label.toLowerCase().includes(p)
      );
    }), f = le(["general"]);
    return (p, m) => (ee(), ve("div", Tq, [
      B("div", kq, [
        v(M(bt), {
          class: "text-primary",
          bordered: !1,
          value: M(o).type,
          size: "small",
          variant: "filled",
          options: l.value,
          "onUpdate:value": m[0] || (m[0] = (b) => M(i)({ type: b }))
        }, null, 8, ["value", "options"])
      ]),
      B("div", Eq, [
        v(M(Pa), {
          "active-key": f.value,
          "onUpdate:activeKey": m[1] || (m[1] = (b) => f.value = b),
          bordered: !1,
          accordion: "",
          size: "small"
        }, {
          default: ce(() => [
            (ee(!0), ve(Ve, null, It(d.value, (b) => (ee(), Ze(M(Pa).Panel, {
              key: b.key,
              header: b.label
            }, {
              default: ce(() => [
                (ee(), Ze(uw(b.component), {
                  panel: M(o),
                  "on-change": M(i),
                  "numeric-field-names": M(r),
                  "all-field-names": M(a)
                }, null, 40, ["panel", "on-change", "numeric-field-names", "all-field-names"]))
              ]),
              _: 2
            }, 1032, ["header"]))), 128))
          ]),
          _: 1
        }, 8, ["active-key"])
      ])
    ]));
  }
}), sO = /* @__PURE__ */ ye({
  __name: "PanelLinksIcon",
  props: {
    links: {},
    iconColor: {}
  },
  setup(e) {
    const t = e;
    function n(i) {
      i.url && window.open(i.url, i.newTab ? "_blank" : "_self", "noopener,noreferrer");
    }
    const o = R(() => t.links.filter((i) => i.url));
    return (i, r) => o.value.length === 0 ? (ee(), ve(Ve, { key: 0 }, [], 64)) : o.value.length === 1 ? (ee(), Ze(M(xo), {
      key: 1,
      title: o.value[0].title || o.value[0].url,
      placement: "bottom"
    }, {
      default: ce(() => [
        B("span", {
          class: ct([M(ot).link, "flex-shrink-0 cursor-pointer text-xs"]),
          style: xt({ color: e.iconColor }),
          onClick: r[0] || (r[0] = No((a) => n(o.value[0]), ["stop"]))
        }, null, 6)
      ]),
      _: 1
    }, 8, ["title"])) : (ee(), Ze(M(Ui), {
      key: 2,
      trigger: ["hover", "click"],
      placement: "bottomLeft"
    }, {
      overlay: ce(() => [
        v(M(lo), null, {
          default: ce(() => [
            (ee(!0), ve(Ve, null, It(o.value, (a, l) => (ee(), Ze(M(lo).Item, {
              key: l,
              onClick: (s) => n(a)
            }, {
              default: ce(() => [
                Ee(te(a.title || a.url), 1)
              ]),
              _: 2
            }, 1032, ["onClick"]))), 128))
          ]),
          _: 1
        })
      ]),
      default: ce(() => [
        B("span", {
          class: ct([M(ot).link, "flex-shrink-0 cursor-pointer text-xs"]),
          style: xt({ color: e.iconColor }),
          onClick: r[1] || (r[1] = No(() => {
          }, ["stop"]))
        }, null, 6)
      ]),
      _: 1
    }));
  }
}), Aq = {
  key: 0,
  class: "legend-search-container"
}, Dq = ["value"], zq = { class: "legend-table-wrap" }, Rq = { class: "legend-table" }, Nq = ["data-legend-item-id"], Bq = { class: "legend-table-td legend-table-name-col" }, Lq = ["data-legend-tooltip"], Fq = { class: "legend-label" }, Hq = {
  key: 0,
  class: "legend-search-container"
}, Vq = ["value"], jq = {
  key: 1,
  class: "legend-empty-state"
}, Wq = { class: "virtuoso-grid-list" }, qq = ["data-legend-item-id"], Gq = ["data-legend-tooltip"], Kq = { class: "legend-label" }, Yq = {
  key: 0,
  class: "legend-item-values"
}, Uq = { class: "legend-item-value-key" }, Xq = { class: "legend-item-value-num" }, Qq = ["data-legend-tooltip", "onClick"], Zq = {
  key: 0,
  width: "12",
  height: "12",
  viewBox: "0 0 24 24",
  fill: "none",
  stroke: "currentColor",
  "stroke-width": "2"
}, Jq = {
  key: 1,
  width: "12",
  height: "12",
  viewBox: "0 0 24 24",
  fill: "none",
  stroke: "currentColor",
  "stroke-width": "2"
}, eG = /* @__PURE__ */ ye({
  __name: "ChartLegend",
  props: {
    items: {},
    uPlotInstance: {},
    position: { default: "bottom" },
    mode: { default: "list" },
    unit: {},
    decimals: {},
    averageLegendWidth: { default: 40 },
    values: { default: () => [] },
    data: {}
  },
  setup(e) {
    const t = e, n = le(null), o = le(""), i = le(null), r = le(!1), a = le(), l = le({});
    function s(z) {
      const N = {};
      z.series.forEach((D, W) => {
        W !== 0 && (N[W] = D.show ?? !0);
      }), l.value = { ...N };
    }
    function u(z, N, D) {
      !N || typeof D.show != "boolean" || (l.value = { ...l.value, [N]: D.show });
    }
    Ie(
      () => t.uPlotInstance,
      (z, N) => {
        if (N && (N.hooks.setSeries = (N.hooks.setSeries ?? []).filter(
          (D) => D.__legendSync !== !0
        )), z) {
          s(z);
          const D = (W, H, L) => u(W, H, L);
          D.__legendSync = !0, z.hooks.setSeries = [...z.hooks.setSeries ?? [], D];
        } else
          l.value = {};
      },
      { immediate: !0 }
    );
    const c = {
      last: "Last *",
      first: "First *",
      min: "Min",
      max: "Max",
      mean: "Avg",
      sum: "Sum"
    };
    function d(z) {
      const N = z.filter(
        (W) => W != null && !Number.isNaN(W)
      );
      if (N.length === 0)
        return { last: null, first: null, min: null, max: null, mean: null, sum: null };
      const D = N.reduce((W, H) => W + H, 0);
      return {
        last: N[N.length - 1],
        first: N[0],
        min: Math.min(...N),
        max: Math.max(...N),
        mean: D / N.length,
        sum: D
      };
    }
    function f(z, N) {
      return z === null ? "—" : Math.abs(z) >= 1e6 ? N !== void 0 ? `${(z / 1e6).toFixed(N)}M` : `${z / 1e6}M` : Math.abs(z) >= 1e3 ? N !== void 0 ? `${(z / 1e3).toFixed(N)}K` : `${z / 1e3}K` : N !== void 0 ? z.toFixed(N) : String(z);
    }
    const p = R(
      () => Object.values(t.items).map((z) => ({
        ...z,
        show: l.value[z.seriesIndex] ?? z.show ?? !0
      }))
    ), m = R(() => {
      if (t.position !== "right" || !o.value.trim())
        return p.value;
      const z = o.value.trim().toLowerCase();
      return p.value.filter((N) => N.label?.toLowerCase().includes(z));
    }), b = R(() => t.position !== "right" || !o.value.trim() ? !1 : m.value.length === 0), y = R(() => {
      if (!t.data || t.values.length === 0)
        return {};
      const z = {};
      return p.value.forEach((N) => {
        const D = t.data[N.seriesIndex];
        z[N.seriesIndex] = d(D ?? []);
      }), z;
    }), { onToggleSeriesOnOff: S, onToggleSeriesVisibility: C } = {
      onToggleSeriesOnOff(z) {
        const N = t.uPlotInstance;
        if (!N)
          return;
        const D = N.series[z];
        D && N.setSeries(z, { show: !D.show });
      },
      onToggleSeriesVisibility(z) {
        const N = t.uPlotInstance;
        if (!N)
          return;
        const D = n.value === z;
        N.series.forEach((W, H) => {
          H !== 0 && N.setSeries(H, { show: D || H === z });
        }), n.value = D ? null : z;
      }
    };
    function O(z) {
      const N = z.target.closest("[data-legend-item-id]");
      if (!N)
        return null;
      const D = Number(N.dataset.legendItemId);
      return Number.isNaN(D) ? null : D;
    }
    function $(z) {
      const N = O(z);
      if (N === null)
        return;
      if (!!z.target.dataset.isLegendMarker) {
        S(N);
        return;
      }
      C(N);
    }
    async function P(z, N) {
      try {
        await navigator.clipboard.writeText(N), i.value = z, setTimeout(() => {
          i.value = null;
        }, 2e3);
      } catch {
      }
    }
    function k(z) {
      const N = z.target;
      o.value = N.value;
    }
    function x() {
      if (!a.value || t.position !== "bottom") {
        r.value = !1;
        return;
      }
      const N = a.value.clientWidth;
      if (N === 0)
        return;
      const D = p.value.length * (t.averageLegendWidth + 16);
      r.value = Math.ceil(D / N) <= 1;
    }
    let E = null;
    return Pt(() => {
      x(), a.value && t.position === "bottom" && (E = new ResizeObserver(x), E.observe(a.value));
    }), Lo(() => {
      E && E.disconnect();
    }), Ie([() => t.averageLegendWidth, () => p.value.length, () => t.position], () => {
      x();
    }), (z, N) => e.mode === "table" && e.values.length > 0 ? (ee(), ve("div", {
      key: 0,
      ref_key: "legendContainerRef",
      ref: a,
      class: "legend-container legend-table-mode",
      onClick: $
    }, [
      e.position === "right" ? (ee(), ve("div", Aq, [
        B("input", {
          type: "text",
          placeholder: "Search...",
          value: o.value,
          class: "legend-search-input",
          onInput: k
        }, null, 40, Dq)
      ])) : He("", !0),
      B("div", zq, [
        B("table", Rq, [
          B("thead", null, [
            B("tr", null, [
              N[0] || (N[0] = B("th", { class: "legend-table-th legend-table-name-col" }, " Name ", -1)),
              (ee(!0), ve(Ve, null, It(e.values, (D) => (ee(), ve("th", {
                key: D,
                class: "legend-table-th legend-table-val-col"
              }, te(c[D]), 1))), 128))
            ])
          ]),
          B("tbody", null, [
            (ee(!0), ve(Ve, null, It(m.value, (D) => (ee(), ve("tr", {
              key: D.seriesIndex,
              "data-legend-item-id": D.seriesIndex,
              class: ct(["legend-table-row", [
                D.show ? "" : "legend-item-off",
                n.value === D.seriesIndex ? "legend-item-focused" : ""
              ]])
            }, [
              B("td", Bq, [
                B("div", {
                  class: "legend-item-label-trigger",
                  "data-legend-tooltip": D.label
                }, [
                  B("div", {
                    class: "legend-marker",
                    style: xt({ borderColor: D.color }),
                    "data-is-legend-marker": !0
                  }, null, 4),
                  B("span", Fq, te(D.label), 1)
                ], 8, Lq)
              ]),
              (ee(!0), ve(Ve, null, It(e.values, (W) => (ee(), ve("td", {
                key: W,
                class: "legend-table-td legend-table-val-col"
              }, te(y.value[D.seriesIndex] ? f(y.value[D.seriesIndex][W], e.decimals) : "—"), 1))), 128))
            ], 10, Nq))), 128))
          ])
        ])
      ])
    ], 512)) : (ee(), ve("div", {
      key: 1,
      ref_key: "legendContainerRef",
      ref: a,
      class: ct(["legend-container", [e.position === "bottom" ? "legend-container-bottom" : ""]]),
      style: xt({ "--legend-average-width": `${e.averageLegendWidth + 16}px` }),
      onClick: $
    }, [
      e.position === "right" ? (ee(), ve("div", Hq, [
        B("input", {
          type: "text",
          placeholder: "Search...",
          value: o.value,
          class: "legend-search-input",
          onInput: k
        }, null, 40, Vq)
      ])) : He("", !0),
      b.value ? (ee(), ve("div", jq, ' No series found matching "' + te(o.value) + '" ', 1)) : (ee(), ve("div", {
        key: 2,
        class: ct(["legend-virtuoso-container", [
          `legend-virtuoso-container-${e.position}`,
          r.value ? "legend-virtuoso-container-single-row" : ""
        ]])
      }, [
        B("div", Wq, [
          (ee(!0), ve(Ve, null, It(m.value, (D) => (ee(), ve("div", {
            key: D.seriesIndex,
            class: "virtuoso-grid-item"
          }, [
            B("div", {
              "data-legend-item-id": D.seriesIndex,
              class: ct(["legend-item", [
                `legend-item-${e.position}`,
                D.show ? "" : "legend-item-off",
                n.value === D.seriesIndex ? "legend-item-focused" : ""
              ]])
            }, [
              B("div", {
                class: "legend-item-label-trigger",
                "data-legend-tooltip": D.label
              }, [
                B("div", {
                  class: "legend-marker",
                  style: xt({ borderColor: D.color }),
                  "data-is-legend-marker": !0
                }, null, 4),
                B("span", Kq, te(D.label), 1)
              ], 8, Gq),
              y.value[D.seriesIndex] && e.values.length > 0 ? (ee(), ve("span", Yq, [
                (ee(!0), ve(Ve, null, It(e.values, (W) => (ee(), ve("span", {
                  key: W,
                  class: "legend-item-value-badge"
                }, [
                  B("span", Uq, te(c[W]) + ":", 1),
                  B("span", Xq, te(f(y.value[D.seriesIndex][W], e.decimals)), 1)
                ]))), 128))
              ])) : He("", !0),
              B("button", {
                type: "button",
                class: "legend-copy-button",
                "data-legend-tooltip": i.value === D.seriesIndex ? "Copied" : "Copy",
                onClick: No((W) => P(D.seriesIndex, D.label ?? ""), ["stop"])
              }, [
                i.value === D.seriesIndex ? (ee(), ve("svg", Zq, [...N[1] || (N[1] = [
                  B("path", { d: "M20 6L9 17l-5-5" }, null, -1)
                ])])) : (ee(), ve("svg", Jq, [...N[2] || (N[2] = [
                  B("rect", {
                    x: "9",
                    y: "9",
                    width: "13",
                    height: "13",
                    rx: "2",
                    ry: "2"
                  }, null, -1),
                  B("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, null, -1)
                ])]))
              ], 8, Qq)
            ], 10, qq)
          ]))), 128))
        ])
      ], 2))
    ], 6));
  }
}), tG = /* @__PURE__ */ Yo(eG, [["__scopeId", "data-v-85a1707f"]]), nG = { class: "footer" }, oG = {
  key: 0,
  class: "hint"
}, iG = { class: "kbd active" }, rG = {
  key: 1,
  class: "hint-list"
}, aG = {
  class: "hint",
  "data-active": "false"
}, lG = { class: "kbd" }, sG = /* @__PURE__ */ ye({
  __name: "TooltipFooter",
  props: {
    isPinned: { type: Boolean },
    pinKey: { default: "P" }
  },
  emits: ["dismiss"],
  setup(e, { emit: t }) {
    const n = t;
    return (o, i) => (ee(), ve("div", nG, [
      B("div", null, [
        e.isPinned ? (ee(), ve("div", oG, [
          i[1] || (i[1] = B("span", null, "按", -1)),
          B("kbd", iG, te(e.pinKey), 1),
          i[2] || (i[2] = B("span", null, "或", -1)),
          i[3] || (i[3] = B("kbd", { class: "kbd active" }, "Esc", -1)),
          i[4] || (i[4] = B("span", null, "取消固定", -1))
        ])) : (ee(), ve("div", rG, [
          B("div", aG, [
            i[5] || (i[5] = B("span", null, "按", -1)),
            B("kbd", lG, te(e.pinKey), 1),
            i[6] || (i[6] = B("span", null, "固定提示框", -1))
          ])
        ]))
      ]),
      e.isPinned ? (ee(), ve("button", {
        key: 0,
        class: "unpin-btn",
        onClick: i[0] || (i[0] = (r) => n("dismiss"))
      }, [...i[7] || (i[7] = [
        B("svg", {
          width: "10",
          height: "10",
          viewBox: "0 0 24 24",
          fill: "none",
          stroke: "currentColor",
          "stroke-width": "2"
        }, [
          B("path", { d: "M18 6L6 18" }),
          B("path", { d: "M6 6l12 12" })
        ], -1),
        B("span", null, "取消固定", -1)
      ])])) : He("", !0)
    ]));
  }
}), uG = /* @__PURE__ */ Yo(sG, [["__scopeId", "data-v-75c52e2f"]]), cG = ["data-is-active"], dG = { class: "tooltip-item-label" }, fG = /* @__PURE__ */ ye({
  __name: "TooltipItem",
  props: {
    item: {},
    isItemActive: { type: Boolean }
  },
  setup(e) {
    return (t, n) => (ee(), ve("div", {
      class: "tooltip-item",
      "data-is-active": e.isItemActive
    }, [
      B("div", {
        class: "tooltip-item-marker",
        style: xt({ borderColor: e.item.color })
      }, null, 4),
      B("div", {
        class: "tooltip-item-content",
        style: xt({ color: e.item.color })
      }, [
        B("span", dG, te(e.item.label), 1),
        B("span", {
          class: "tooltip-item-separator",
          style: xt({ borderColor: e.item.color })
        }, null, 4),
        B("span", null, te(e.item.tooltipValue), 1)
      ], 4)
    ], 8, cG));
  }
}), uO = /* @__PURE__ */ Yo(fG, [["__scopeId", "data-v-3b1d92d5"]]), pG = { class: "header-container" }, gG = {
  key: 0,
  class: "header-row"
}, hG = {
  key: 0,
  class: "header-status"
}, vG = {
  key: 1,
  class: "header-pinned-item"
}, mG = /* @__PURE__ */ ye({
  __name: "TooltipHeader",
  props: {
    uPlotInstance: {},
    showTooltipHeader: { type: Boolean },
    isPinned: { type: Boolean },
    activeItem: {},
    headerTitle: {}
  },
  setup(e) {
    return (t, n) => (ee(), ve("div", pG, [
      e.showTooltipHeader && e.headerTitle ? (ee(), ve("div", gG, [
        B("span", null, te(e.headerTitle), 1),
        e.isPinned ? (ee(), ve("div", hG, [...n[0] || (n[0] = [
          B("svg", {
            width: "12",
            height: "12",
            viewBox: "0 0 24 24",
            fill: "none",
            stroke: "currentColor",
            "stroke-width": "2"
          }, [
            B("path", { d: "M12 2v4" }),
            B("path", { d: "M19 10h-7l-5 5v7h10v-7l-5-5z" })
          ], -1),
          B("span", null, "已固定", -1)
        ])])) : He("", !0)
      ])) : He("", !0),
      e.activeItem ? (ee(), ve("div", vG, [
        v(uO, {
          item: e.activeItem,
          "is-item-active": !0
        }, null, 8, ["item"])
      ])) : He("", !0)
    ]));
  }
}), bG = /* @__PURE__ */ Yo(mG, [["__scopeId", "data-v-efb4cf97"]]), yG = /* @__PURE__ */ ye({
  __name: "TooltipList",
  props: {
    content: {},
    maxHeight: { default: 300 }
  },
  setup(e) {
    return (t, n) => (ee(), ve("div", {
      class: "tooltip-list",
      style: xt({ maxHeight: `${e.maxHeight}px`, overflowY: "auto" })
    }, [
      (ee(!0), ve(Ve, null, It(e.content, (o) => (ee(), Ze(uO, {
        key: o.label,
        item: o,
        "is-item-active": !1
      }, null, 8, ["item"]))), 128))
    ], 4));
  }
}), xG = /* @__PURE__ */ Yo(yG, [["__scopeId", "data-v-fa17493a"]]), wG = {
  key: 1,
  class: "tooltip-divider"
}, SG = /* @__PURE__ */ ye({
  __name: "Tooltip",
  props: {
    uPlotInstance: {},
    content: {},
    headerTitle: {},
    isPinned: { type: Boolean },
    canPinTooltip: { type: Boolean, default: !0 },
    showTooltipHeader: { type: Boolean, default: !0 },
    tooltipMaxHeight: { default: 300 }
  },
  emits: ["dismiss"],
  setup(e, { emit: t }) {
    const n = e, o = t, i = R(() => n.content.find((s) => s.isActive) ?? null), r = R(() => n.showTooltipHeader || i.value != null), a = R(() => n.content.length > 1), l = R(() => a.value && r.value);
    return (s, u) => (ee(), ve("div", {
      class: ct(["tooltip-container", { pinned: e.isPinned }])
    }, [
      r.value ? (ee(), Ze(bG, {
        key: 0,
        "u-plot-instance": e.uPlotInstance,
        "show-tooltip-header": e.showTooltipHeader,
        "is-pinned": e.isPinned,
        "active-item": i.value,
        "header-title": e.headerTitle
      }, null, 8, ["u-plot-instance", "show-tooltip-header", "is-pinned", "active-item", "header-title"])) : He("", !0),
      l.value ? (ee(), ve("span", wG)) : He("", !0),
      a.value ? (ee(), Ze(xG, {
        key: 2,
        content: e.content,
        "max-height": e.tooltipMaxHeight
      }, null, 8, ["content", "max-height"])) : He("", !0),
      e.canPinTooltip ? (ee(), Ze(uG, {
        key: 3,
        "is-pinned": e.isPinned,
        style: xt({ pointerEvents: e.isPinned ? "auto" : "none" }),
        onDismiss: u[0] || (u[0] = (c) => o("dismiss"))
      }, null, 8, ["is-pinned", "style"])) : He("", !0)
    ], 2));
  }
}), CG = /* @__PURE__ */ Yo(SG, [["__scopeId", "data-v-4b92f289"]]), $G = /* @__PURE__ */ ye({
  __name: "ChartTooltip",
  props: {
    uPlotInstance: {},
    unit: { default: "" },
    decimals: {},
    canPinTooltip: { type: Boolean, default: !0 },
    tooltipMode: { default: "multi" },
    tooltipSort: { default: "none" },
    showTooltipHeader: { type: Boolean, default: !0 },
    tooltipMaxHeight: { default: 300 }
  },
  setup(e) {
    const t = e, n = le(), o = le(!1), i = le(!1), r = le(""), a = le([]), l = {
      hoverActive: !1,
      pinned: !1,
      focusedSeriesIndex: null,
      seriesIndexes: [],
      mouseWithinPlot: !1,
      windowWidth: window.innerWidth - 16,
      windowHeight: window.innerHeight - 16,
      tooltipW: 0,
      tooltipH: 0
    };
    let s = null;
    function u() {
      s === null && (s = requestAnimationFrame(() => {
        s = null, b();
      }));
    }
    function c(H, L, A) {
      return typeof H == "function" ? String(H(L, A)) : typeof H == "string" ? H : "#cccccc";
    }
    function d(H, L, A) {
      const U = A !== void 0 ? H.toFixed(A) : String(Math.round(H * 1e3) / 1e3);
      return L ? `${U} ${L}` : U;
    }
    function f(H) {
      if (t.tooltipMode === "none")
        return [];
      const L = H.cursor.idx, A = [];
      for (let U = 1; U < H.series.length; U++) {
        const j = H.series[U];
        if (!j?.show)
          continue;
        let re = l.seriesIndexes[U] ?? null;
        if (t.tooltipMode === "single") {
          if (U !== l.focusedSeriesIndex)
            continue;
          re = L ?? re;
        } else
          re = re ?? L ?? null;
        if (re === null)
          continue;
        const G = H.data[U]?.[re];
        G == null || !Number.isFinite(G) || A.push({
          label: String(j.label ?? `Series ${U}`),
          value: G,
          tooltipValue: d(G, t.unit, t.decimals),
          color: c(j.stroke, H, U),
          isActive: U === l.focusedSeriesIndex
        });
      }
      return t.tooltipSort === "asc" && A.sort((U, j) => U.value - j.value), t.tooltipSort === "desc" && A.sort((U, j) => j.value - U.value), A;
    }
    function p(H) {
      if (!t.showTooltipHeader)
        return "";
      const L = H.cursor.idx;
      if (L == null)
        return "";
      const A = H.data[0]?.[L];
      return A == null ? "" : H.scales.x?.time ? new Date(A * 1e3).toLocaleString() : String(A);
    }
    function m(H) {
      const L = n.value;
      if (!L)
        return;
      const { left: A = -1, top: U = -1 } = H.cursor;
      if (A < 0 || U < 0)
        return;
      const j = H.rect.left + A, re = H.rect.top + U, G = L.offsetWidth, Y = L.offsetHeight;
      l.tooltipW = G, l.tooltipH = Y;
      const K = j + 14 + G > l.windowWidth ? -(G + 14) : 14, J = re - 8 + Y > l.windowHeight ? -(Y - 8) : -8;
      L.style.transform = `translate(${j + K}px, ${re + J}px)`;
    }
    function b() {
      const H = t.uPlotInstance;
      if (!H || !l.hoverActive && !l.pinned) {
        o.value = !1;
        return;
      }
      const L = f(H);
      if (L.length === 0) {
        l.pinned || (o.value = !1);
        return;
      }
      a.value = L, r.value = p(H), i.value = l.pinned, l.pinned || m(H), o.value = !0;
    }
    function y(H) {
      if (l.pinned)
        return;
      const L = H.cursor.idxs;
      L && (l.seriesIndexes = [...L], l.hoverActive = l.seriesIndexes.some((A, U) => U > 0 && A != null) && l.focusedSeriesIndex != null, u());
    }
    function S(H, L, A) {
      !("focus" in A) || l.pinned || (l.focusedSeriesIndex = L ?? null, l.hoverActive = l.focusedSeriesIndex != null, u());
    }
    function C(H) {
      if (l.pinned || !l.hoverActive)
        return;
      const L = n.value;
      if (!L)
        return;
      const { left: A = -1, top: U = -1 } = H.cursor;
      if (A < 0 || U < 0)
        return;
      const j = H.rect.left + A, re = H.rect.top + U, G = L.offsetWidth, Y = L.offsetHeight;
      l.tooltipW = G, l.tooltipH = Y;
      const K = j + 14 + G > l.windowWidth ? -(G + 14) : 14, J = re - 8 + Y > l.windowHeight ? -(Y - 8) : -8;
      L.style.transform = `translate(${j + K}px, ${re + J}px)`;
    }
    function O() {
      const H = t.uPlotInstance;
      !H || !l.hoverActive || (l.pinned = !0, H.cursor._lock = !0, i.value = !0, document.addEventListener("mousedown", P, !0));
    }
    function $() {
      const H = t.uPlotInstance;
      l.pinned = !1, l.hoverActive = !1, H && (H.cursor._lock = !1), i.value = !1, o.value = !1, document.removeEventListener("mousedown", P, !0);
    }
    function P(H) {
      n.value && !n.value.contains(H.target) && $();
    }
    function k(H) {
      if (H.key === "Escape") {
        l.pinned && $();
        return;
      }
      H.key.toLowerCase() === "p" && l.mouseWithinPlot && (l.pinned ? $() : O());
    }
    function x() {
      l.mouseWithinPlot = !0;
    }
    function E() {
      l.mouseWithinPlot = !1;
    }
    function z() {
      l.windowWidth = window.innerWidth - 16, l.windowHeight = window.innerHeight - 16, l.pinned || (l.hoverActive = !1);
    }
    let N = [];
    function D(H) {
      const L = (j) => y(j), A = (j, re, G) => S(j, re, G), U = (j) => C(j);
      H.hooks.setLegend = [...H.hooks.setLegend ?? [], L], H.hooks.setSeries = [...H.hooks.setSeries ?? [], A], H.hooks.setCursor = [...H.hooks.setCursor ?? [], U], H.root.addEventListener("mouseenter", x), H.root.addEventListener("mouseleave", E), N = [
        () => {
          H.hooks.setLegend = (H.hooks.setLegend ?? []).filter(
            (j) => j !== L
          ), H.hooks.setSeries = (H.hooks.setSeries ?? []).filter(
            (j) => j !== A
          ), H.hooks.setCursor = (H.hooks.setCursor ?? []).filter(
            (j) => j !== U
          ), H.root.removeEventListener("mouseenter", x), H.root.removeEventListener("mouseleave", E);
        }
      ];
    }
    function W() {
      N.forEach((H) => H()), N = [], document.removeEventListener("mousedown", P, !0), l.hoverActive = !1, l.pinned = !1, l.focusedSeriesIndex = null, o.value = !1, i.value = !1, s !== null && (cancelAnimationFrame(s), s = null);
    }
    return Ie(
      () => t.uPlotInstance,
      (H, L) => {
        L && W(), H && D(H);
      },
      { immediate: !0 }
    ), Pt(() => {
      document.addEventListener("keydown", k, !0), window.addEventListener("resize", z);
    }), Lo(() => {
      W(), document.removeEventListener("keydown", k, !0), window.removeEventListener("resize", z);
    }), (H, L) => (ee(), Ze(Qd, { to: "body" }, [
      Zi(B("div", {
        ref_key: "containerRef",
        ref: n,
        style: { position: "fixed", top: "0", left: "0", "z-index": "1070", "pointer-events": "none" }
      }, [
        e.uPlotInstance ? (ee(), Ze(CG, {
          key: 0,
          "u-plot-instance": e.uPlotInstance,
          content: a.value,
          "header-title": r.value,
          "is-pinned": i.value,
          "can-pin-tooltip": e.canPinTooltip,
          "show-tooltip-header": e.showTooltipHeader,
          "tooltip-max-height": e.tooltipMaxHeight,
          onDismiss: $
        }, null, 8, ["u-plot-instance", "content", "header-title", "is-pinned", "can-pin-tooltip", "show-tooltip-header", "tooltip-max-height"])) : He("", !0)
      ], 512), [
        [mr, o.value && e.tooltipMode !== "none"]
      ])
    ]));
  }
}), cO = Symbol("plotContext");
function PG() {
  const e = le(null), t = le(""), n = le(!1);
  let o;
  function i(c) {
    e.value = c.uPlotInstance, c.id !== void 0 && (t.value = c.id), c.shouldSaveSelectionPreference !== void 0 && (n.value = c.shouldSaveSelectionPreference), o = void 0;
  }
  function r() {
    const c = e.value;
    if (!c || !t.value)
      return;
    const d = c.series.map((f) => ({
      label: f.label ?? "",
      show: f.show ?? !0
    }));
    LI(t.value, d);
  }
  function a(c) {
    const d = e.value;
    if (!d)
      return;
    const f = o === c;
    o = f ? void 0 : c, d.batch(() => {
      d.series.forEach((p, m) => {
        m !== 0 && d.setSeries(m, {
          show: f || m === c
        });
      }), t.value && n.value && r();
    });
  }
  function l(c) {
    const d = e.value;
    if (!d)
      return;
    const f = d.series[c];
    f && (d.setSeries(c, { show: !f.show }), t.value && n.value && r());
  }
  function s(c) {
    const d = e.value;
    d && d.batch(() => {
      d.series.forEach((f, p) => {
        p !== 0 && d.setSeries(p, {
          show: c === null || p === c
        });
      });
    });
  }
  const u = {
    uPlotInstance: e,
    id: t,
    shouldSaveSelectionPreference: n,
    setPlotContextInitialState: i,
    onToggleSeriesVisibility: a,
    onToggleSeriesOnOff: l,
    onFocusSeries: s,
    syncSeriesVisibilityToLocalStorage: r
  };
  return kt(cO, u), u;
}
function uZ() {
  const e = Tt(cO);
  if (!e)
    throw new Error("usePlotContext must be used within a PlotContextProvider");
  return e;
}
const OG = { style: { position: "relative", overflow: "hidden" } }, IG = /* @__PURE__ */ ye({
  __name: "UPlotChart",
  props: {
    config: {},
    data: {},
    width: {},
    height: {},
    plotRef: {},
    onDestroy: {}
  },
  emits: ["plotReady"],
  setup(e, { expose: t, emit: n }) {
    const o = e, i = n, { setPlotContextInitialState: r } = PG(), a = le(), l = le(null), s = le(""), u = le(""), c = le(0), d = le(0);
    function f() {
      l.value && (o.onDestroy && o.onDestroy(l.value), l.value.destroy(), l.value = null, r({ uPlotInstance: null }), o.plotRef && o.plotRef(null));
    }
    function p(P) {
      if (P === null || typeof P != "object")
        return P;
      const k = ii(P);
      if (k instanceof Date)
        return new Date(k.getTime());
      if (k instanceof RegExp)
        return new RegExp(k.source, k.flags);
      if (typeof k == "function")
        return k;
      if (Array.isArray(k)) {
        const E = [];
        for (let z = 0; z < k.length; z++)
          E.push(p(ii(k[z])));
        return E;
      }
      const x = {};
      for (const E in k)
        Object.prototype.hasOwnProperty.call(k, E) && (x[E] = p(ii(k[E])));
      return x;
    }
    function m() {
      if (f(), !a.value || o.width === 0 || o.height === 0)
        return;
      const P = o.config.getConfig(), x = p({
        ...P,
        width: Math.floor(o.width),
        height: Math.floor(o.height),
        series: P.series ?? []
      }), E = y(o.data, o.config), z = new Qn(x, E, a.value);
      o.plotRef && o.plotRef(z), r({
        uPlotInstance: z,
        id: o.config.getId(),
        shouldSaveSelectionPreference: o.config.getShouldSaveSelectionPreference()
      }), l.value = z, i("plotReady", z), s.value = JSON.stringify(o.config.getConfig()), u.value = JSON.stringify(o.data), c.value = o.width, d.value = o.height;
    }
    function b(P) {
      return JSON.parse(JSON.stringify(P));
    }
    function y(P, k) {
      const x = b(P), E = k.getSeriesSpanGapsOptions();
      return E.length > 0 ? rk(x, E) : x;
    }
    function S() {
      return o.width === c.value && o.height === d.value;
    }
    function C() {
      return JSON.stringify(o.data) === u.value;
    }
    function O() {
      return JSON.stringify(o.config.getConfig()) === s.value;
    }
    const $ = R(() => !!(o.data && o.data[0] && o.data[0].length === 0));
    return Ie($, (P) => {
      P && f();
    }), Lt((P) => {
      if (P(() => {
        f(), s.value = "", u.value = "", c.value = 0, d.value = 0;
      }), !a.value || o.width === 0 || o.height === 0)
        return;
      if (!s.value) {
        m();
        return;
      }
      const k = !!l.value && (!a.value || l.value.root.parentElement !== a.value);
      if (!S() && l.value && !k && l.value.setSize({
        width: Math.floor(o.width),
        height: Math.floor(o.height)
      }), !O() || k)
        m();
      else if (!C() && l.value) {
        const x = y(o.data, o.config);
        l.value.setData(x);
      }
    }), At(() => {
      f();
    }), t({ plotInstance: l }), (P, k) => (ee(), ve("div", OG, [
      $.value ? (ee(), ve("div", {
        key: 0,
        class: "flex flex-col items-center justify-center not-found",
        style: xt({
          width: `${e.width}px`,
          height: `${e.height}px`
        })
      }, [
        B("div", {
          class: ct([M(ot).chartLine, "mb-2"]),
          style: { "font-size": "48px" }
        }, null, 2),
        k[0] || (k[0] = B("div", { class: "text-gray-400 text-sm" }, " No Data ", -1))
      ], 4)) : (ee(), ve("div", {
        key: 1,
        ref_key: "containerRef",
        ref: a,
        class: "w-full h-full"
      }, null, 512)),
      Wr(P.$slots, "default")
    ]));
  }
}), MG = {
  key: 0,
  class: "flex items-center justify-center h-full text-gray-400 select-none"
}, eb = /* @__PURE__ */ ye({
  __name: "AgChart",
  props: {
    data: {},
    unit: {},
    decimals: {},
    colorScheme: {},
    colorSingleValue: {},
    colorDistribution: {},
    thresholds: {},
    thresholdBaseColor: {},
    fillOpacity: { default: 10 },
    lineWidth: { default: 1.5 },
    lineInterpolation: { default: "linear" },
    lineStyle: { default: "solid" },
    drawStyle: { default: "lines" },
    gradientMode: { default: "none" },
    spanNulls: { type: [Boolean, Number], default: !1 },
    showPoints: { type: Boolean, default: !1 },
    showPointsMode: { default: "auto" },
    stackingMode: { default: "none" },
    legendPosition: { default: "bottom" },
    legendMode: { default: "list" },
    legendValues: { default: () => [] },
    syncKey: {},
    panelId: {},
    tooltipMode: { default: "multi" },
    tooltipSort: { default: "none" },
    tooltipMaxHeight: {},
    showAxisPointer: { type: Boolean, default: !0 },
    softMin: {},
    softMax: {},
    axisPlacement: { default: "left" },
    axisName: {},
    axisWidth: {},
    showGridLines: { default: "all" },
    gridColor: {},
    axisLabel: { default: "all" },
    axisLabelColor: {},
    axisTick: { default: "hidden" },
    axisTickColor: {},
    axisBorder: { default: "hidden" },
    axisBorderColor: {},
    scaleDistribution: { default: "linear" },
    centeredZero: { type: Boolean, default: !1 },
    xAxisTime: { type: Boolean, default: !0 },
    barGroupWidth: {},
    barWidth: {}
  },
  setup(e) {
    const t = e, n = le(), o = le({ width: 0, height: 0 });
    let i = null;
    function r(y) {
      i = new ResizeObserver((S) => {
        const C = S[0];
        if (C) {
          const { width: O, height: $ } = C.contentRect;
          setTimeout(() => {
            o.value = { width: Math.floor(O), height: Math.floor($) };
          }, 300);
        }
      }), i.observe(y), requestAnimationFrame(() => {
        const { width: S, height: C } = y.getBoundingClientRect();
        o.value = { width: Math.floor(S), height: Math.floor(C) };
      });
    }
    Pt(() => {
      n.value && r(n.value);
    }), Ie(n, (y) => {
      i?.disconnect(), y && r(y);
    }), At(() => {
      i?.disconnect();
    });
    const a = R(() => {
      const y = new ok({ id: t.panelId ?? "chart" }), S = t.scaleDistribution ?? "linear", C = t.stackingMode !== "none";
      y.addScale({ scaleKey: "x", time: t.xAxisTime }), y.addScale({
        scaleKey: "y",
        distribution: S === "logarithmic" ? ul.Logarithmic : S === "symlog" ? ul.Symlog : ul.Linear,
        softMin: C && t.stackingMode === "percent" ? 0 : t.softMin ?? void 0,
        softMax: C && t.stackingMode === "percent" ? 100 : t.softMax ?? void 0,
        ...t.centeredZero ? {
          range: (se, he, Me) => {
            const ke = Math.max(Math.abs(he), Math.abs(Me));
            return [-ke, ke];
          }
        } : {}
      });
      const O = t.gridColor ?? "#E8E9EA", $ = t.showGridLines === "all" || t.showGridLines === "x", P = t.showGridLines === "all" || t.showGridLines === "y", k = t.axisLabel === "all" || t.axisLabel === "x", x = t.axisLabel === "all" || t.axisLabel === "y", E = k ? t.axisLabelColor ?? "#666666" : "transparent", z = x ? t.axisLabelColor ?? "#666666" : "transparent", N = t.axisTick === "all" || t.axisTick === "x", D = t.axisTick === "all" || t.axisTick === "y", W = N ? t.axisTickColor ?? "#666666" : "transparent", H = D ? t.axisTickColor ?? "#666666" : "transparent", L = t.axisBorder === "all" || t.axisBorder === "x", A = t.axisBorder === "all" || t.axisBorder === "y", U = t.axisBorderColor ?? "#666666";
      y.addAxis({
        scaleKey: "x",
        side: 2,
        size: 28,
        stroke: E,
        grid: { show: $, stroke: O },
        ticks: { show: N, stroke: W, width: 0.5 },
        border: { show: L, stroke: U }
      });
      const j = t.axisPlacement === "right" ? 1 : 3, re = t.axisPlacement !== "hidden", G = (() => {
        if (t.axisWidth !== void 0 && t.axisWidth !== null)
          return t.axisWidth;
        const se = t.data.series.reduce((Re, We) => Re.concat(We.values.filter((et) => et !== null && Number.isFinite(et))), []);
        if (se.length === 0)
          return 56;
        const he = Math.max(...se.map(Math.abs)), Me = t.decimals === void 0 || t.decimals === null ? void 0 : t.decimals <= 15 ? t.decimals : 15, Le = ((Re) => {
          if (Math.abs(Re) >= 1e6) {
            const et = Me !== void 0 ? (Re / 1e6).toFixed(Me) : String(Re / 1e6);
            return t.unit ? `${et}M ${t.unit}` : `${et}M`;
          }
          if (Math.abs(Re) >= 1e3) {
            const et = Me !== void 0 ? (Re / 1e3).toFixed(Me) : String(Re / 1e3);
            return t.unit ? `${et}K ${t.unit}` : `${et}K`;
          }
          const We = Me !== void 0 ? Re.toFixed(Me) : String(Math.round(Re * 100) / 100);
          return t.unit ? `${We} ${t.unit}` : We;
        })(he);
        try {
          const Re = document.createElement("canvas").getContext("2d");
          if (!Re)
            return 56;
          Re.font = "12px system-ui, sans-serif";
          const We = Re.measureText(Le).width;
          return Math.ceil(We) + 14;
        } catch {
          return 56;
        }
      })(), Y = t.decimals === void 0 || t.decimals === null ? void 0 : t.decimals <= 15 ? t.decimals : 15;
      y.addAxis({
        scaleKey: "y",
        side: j,
        show: re,
        label: t.axisName || void 0,
        size: G,
        stroke: z,
        grid: { show: P, stroke: O },
        ticks: { show: D, stroke: H, width: 0.5 },
        border: { show: A, stroke: U },
        isDarkMode: !0,
        yAxisUnit: t.unit,
        decimalPrecision: Y,
        isLogScale: S === "logarithmic" || S === "symlog"
      });
      const K = vI(
        t.colorScheme,
        t.data.series.length,
        t.colorDistribution ?? "sequential",
        t.colorSingleValue
      ), J = t.drawStyle === "bars", be = t.drawStyle === "points", xe = t.data.series.length, ge = t.barGroupWidth ?? 0.7, de = t.barWidth ?? (t.stackingMode !== "none" ? 1 : 1 / Math.max(xe, 1)), ne = J ? ge * de : void 0, we = be || t.showPointsMode === "always" ? !0 : t.showPointsMode === "never" ? !1 : t.showPoints, ae = C ? "none" : t.fillOpacity > 0 ? t.gradientMode !== "none" ? "gradient" : "solid" : "none";
      if (t.data.series.forEach((se, he) => {
        const Me = K[he] ?? $a[he % $a.length];
        y.addSeries({
          scaleKey: "y",
          label: se.label,
          drawStyle: J ? "bars" : be ? "points" : "lines",
          lineColor: Me,
          lineWidth: t.lineWidth,
          lineInterpolation: t.lineInterpolation,
          lineStyle: t.lineStyle,
          fillColor: Me,
          fillOpacity: t.fillOpacity,
          fillMode: ae,
          showPoints: we,
          pointSize: we ? 4 : 0,
          spanGaps: t.spanNulls ?? !1,
          ...ne !== void 0 ? { barWidthFactor: ne } : {}
        });
      }), C && t.data.series.length > 0 && t.fillOpacity > 0) {
        const se = K.length > 0 ? K : [...$a], he = Math.round(Math.min(t.fillOpacity, 100) / 100 * 255).toString(16).padStart?.(2, "0") || Math.round(Math.min(t.fillOpacity, 100) / 100 * 255).toString(16), Me = t.data.series.map((ke, Le) => ({
          series: [Le + 1, Le],
          fill: `${se[Le % se.length]}${he}`
        }));
        Me.length > 0 && (Me[0] = { series: [1, 0], fill: `${se[0]}${he}` }), y.setBands(Me);
      }
      return t.syncKey && y.setCursor({ sync: { key: t.syncKey, setSeries: !0 } }), t.showAxisPointer || y.setCursor({ x: !1, y: !1 }), y.setCursor({
        drag: { setScale: !0 },
        points: {
          one: !0,
          size: (se, he) => (se.series[he]?.points?.size ?? 0) * 3,
          width: (se, he, Me) => Me / 4,
          stroke: (se, he) => {
            const Me = se.series[he]?.points, ke = typeof Me?.stroke == "function" ? Me.stroke : void 0;
            return `${ke !== void 0 ? ke(se, he) : typeof Me?.stroke == "string" ? Me.stroke : ""}90`;
          },
          fill: "#fff"
        },
        focus: {
          prox: 30
        },
        hover: {
          prox: 30,
          bias: 0
        }
      }), y;
    }), l = R(() => {
      const y = t.data?.timestamps ?? [], S = JSON.parse(JSON.stringify(y));
      if (S.length === 0 || !t.data)
        return [[]];
      const C = t.data.series.map((O) => JSON.parse(JSON.stringify(O.values.map(($) => $ ?? 0))));
      if (t.stackingMode !== "none" && t.data.series.length > 0) {
        const O = S.length, $ = Array.from({ length: O }, () => 0), P = [];
        for (const k of t.data.series) {
          const x = Array.from({ length: O });
          for (let E = 0; E < O; E++) {
            if (t.stackingMode === "percent") {
              let z = 0;
              for (const N of t.data.series)
                z += N.values[E] ?? 0;
              $[E] = $[E] + (k.values[E] ?? 0) / (z || 1) * 100;
            } else
              $[E] = $[E] + (k.values[E] ?? 0);
            x[E] = $[E];
          }
          P.push(x);
        }
        return [S, ...P];
      }
      return [S, ...C];
    }), s = R(() => !t.data || t.data.timestamps.length === 0 || t.data.series.length === 0), u = le(null);
    function c(y) {
      u.value = y;
    }
    const d = R(() => t.decimals === void 0 || t.decimals === null ? void 0 : t.decimals <= 15 ? t.decimals : 15), f = R(() => t.legendPosition === "right"), p = R(() => t.legendPosition !== "hidden" && t.data.series.length > 0), m = R(() => f.value && p.value ? Math.max(o.value.width - 160, 100) : o.value.width), b = R(() => Math.max(o.value.height, 50));
    return (y, S) => (ee(), ve("div", {
      class: ct(["w-full h-full flex overflow-hidden relative", f.value ? "flex-row" : "flex-col"])
    }, [
      s.value ? (ee(), ve("div", MG, [...S[0] || (S[0] = [
        B("span", { class: "text-xs" }, "No data", -1)
      ])])) : He("", !0),
      B("div", {
        ref_key: "chartAreaRef",
        ref: n,
        class: "flex-1 min-h-0 min-w-0 relative overflow-hidden"
      }, [
        v(IG, {
          config: a.value,
          data: l.value,
          width: m.value,
          height: b.value,
          onPlotReady: c
        }, {
          default: ce(() => [
            v($G, {
              "u-plot-instance": u.value,
              unit: t.unit,
              decimals: d.value,
              "can-pin-tooltip": !0,
              "tooltip-mode": t.tooltipMode,
              "tooltip-sort": t.tooltipSort,
              "tooltip-max-height": t.tooltipMaxHeight
            }, null, 8, ["u-plot-instance", "unit", "decimals", "tooltip-mode", "tooltip-sort", "tooltip-max-height"])
          ]),
          _: 1
        }, 8, ["config", "data", "width", "height"])
      ], 512),
      p.value ? (ee(), ve("div", {
        key: 1,
        style: xt(
          f.value ? { width: "160px", flexShrink: 0, height: "100%", padding: "4px 8px", overflow: "auto", zIndex: 10, position: "relative", pointerEvents: "auto" } : { flexShrink: 0, padding: "2px 4px", overflow: "auto", maxHeight: "140px", zIndex: 10, position: "relative", pointerEvents: "auto" }
        )
      }, [
        v(tG, {
          items: a.value.getLegendItems(),
          "u-plot-instance": u.value,
          position: f.value ? "right" : "bottom",
          mode: t.legendMode ?? "list",
          values: t.legendValues ?? [],
          data: l.value,
          decimals: d.value,
          unit: t.unit
        }, null, 8, ["items", "u-plot-instance", "position", "mode", "values", "data", "decimals", "unit"])
      ], 4)) : He("", !0)
    ], 2));
  }
}), TG = /* @__PURE__ */ ye({
  __name: "BarPanel",
  props: {
    data: {},
    stacked: { type: Boolean, default: !1 },
    colorScheme: {},
    colorSingleValue: {},
    colorDistribution: {},
    barWidth: {},
    barGroupWidth: { default: 0.7 },
    showValues: { default: "auto" },
    unit: {},
    decimals: { default: 0 },
    legendPosition: { default: "bottom" },
    legendMode: { default: "list" },
    legendValues: { default: () => [] },
    tooltipMode: { default: "multi" },
    tooltipSort: { default: "none" }
  },
  setup(e) {
    return (t, n) => (ee(), Ze(eb, {
      data: e.data,
      "draw-style": "bars",
      "stacking-mode": e.stacked ? "normal" : "none",
      "color-scheme": e.colorScheme,
      "color-single-value": e.colorSingleValue,
      "color-distribution": e.colorDistribution,
      unit: e.unit,
      decimals: e.decimals,
      "fill-opacity": 80,
      "bar-group-width": e.barGroupWidth,
      "bar-width": e.barWidth,
      "legend-position": e.legendPosition,
      "legend-mode": e.legendMode,
      "legend-values": e.legendValues,
      "tooltip-mode": e.tooltipMode,
      "tooltip-sort": e.tooltipSort
    }, null, 8, ["data", "stacking-mode", "color-scheme", "color-single-value", "color-distribution", "unit", "decimals", "bar-group-width", "bar-width", "legend-position", "legend-mode", "legend-values", "tooltip-mode", "tooltip-sort"]));
  }
}), kG = {
  key: 0,
  style: { "text-align": "center", "font-size": "11px", color: "#888", padding: "2px 4px 4px", overflow: "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" }
}, hg = 2, EG = /* @__PURE__ */ ye({
  __name: "GaugePanel",
  props: {
    series: {},
    value: { default: 0 },
    title: {},
    min: { default: $n.min },
    max: { default: $n.max },
    unit: {},
    thresholds: {},
    thresholdBaseColor: {},
    capRound: { type: Boolean, default: $n.capRound },
    trackWidth: { default: $n.trackWidth },
    fillWidth: { default: $n.fillWidth },
    trackColor: { default: $n.trackColor },
    sweepAngle: { default: $n.sweepAngle },
    valueColor: { default: $n.valueColor },
    valueSize: { default: $n.valueSize },
    valueVisible: { type: Boolean, default: $n.valueVisible },
    paddingX: { default: $n.paddingX },
    paddingY: { default: $n.paddingY },
    activeColorOverride: {},
    thresholdDisplay: { default: $n.thresholdDisplay },
    thresholdLabelDisplay: { default: $n.thresholdLabelDisplay },
    valueOffsetY: { default: $n.valueOffsetY },
    orientation: { default: $n.orientation }
  },
  setup(e) {
    const t = e, n = le(), o = le({ w: 0, h: 0 });
    let i = null;
    function r(C, O, $ = 2) {
      const P = C.toFixed($);
      return O === "percent" ? `${P}%` : O === "bytes" ? C >= 1024 * 1024 ? `${(C / 1024 / 1024).toFixed(1)} MB` : C >= 1024 ? `${(C / 1024).toFixed(1)} KB` : `${C} B` : O ? `${P} ${O}` : P;
    }
    function a(C, O, $) {
      const P = [...$].sort((x, E) => x.value - E.value);
      let k = O;
      for (const x of P)
        C >= x.value && (k = x.color);
      return k;
    }
    function l(C, O) {
      const $ = C.match(/^#([0-9a-f]{6})([0-9a-f]{2})?$/i);
      if ($) {
        const k = Number.parseInt($[1].slice(0, 2), 16), x = Number.parseInt($[1].slice(2, 4), 16), E = Number.parseInt($[1].slice(4, 6), 16);
        return `rgba(${k},${x},${E},${O})`;
      }
      const P = C.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/i);
      return P ? `rgba(${P[1]},${P[2]},${P[3]},${O})` : C;
    }
    function s(C, O, $, P, k, x, E, z, N, D, W, H, L, A, U, j, re, G, Y, K, J, be) {
      const xe = C.getContext("2d");
      if (!xe)
        return;
      const ge = window.devicePixelRatio || 1, de = C.clientWidth, ne = C.clientHeight;
      if (de === 0 || ne === 0)
        return;
      C.width = de * ge, C.height = ne * ge, xe.scale(ge, ge), xe.clearRect(0, 0, de, ne);
      const we = H * Math.PI / 180, ae = (H + L) * Math.PI / 180;
      let se, he, Me, ke;
      if (L >= 360)
        se = -1, he = 1, Me = -1, ke = 1;
      else {
        se = Math.cos(we), he = Math.cos(we), Me = Math.sin(we), ke = Math.sin(we);
        const Kt = (rn) => {
          se = Math.min(se, Math.cos(rn)), he = Math.max(he, Math.cos(rn)), Me = Math.min(Me, Math.sin(rn)), ke = Math.max(ke, Math.sin(rn));
        };
        Kt(ae);
        const Mn = [0, 90, 180, 270, 360, 450, 540].map((rn) => rn * Math.PI / 180);
        for (const rn of Mn) {
          const gn = (qn) => (qn % (2 * Math.PI) + 2 * Math.PI) % (2 * Math.PI), Hn = gn(we), Co = gn(ae), ut = gn(rn);
          (Hn <= Co ? ut >= Hn && ut <= Co : ut >= Hn || ut <= Co) && Kt(rn);
        }
      }
      const Le = he - se, Re = ke - Me, We = Math.min(de, ne), et = We / 300, Fe = re * et, Ne = G * et, Ge = Math.max(0, de - 2 * Fe), it = Math.max(0, ne - 2 * Ne), Ke = Fe, Oe = Ne, je = N * et, De = D * et, Je = K === "marker", wt = K === "track", lt = Je ? Math.max(2, We * 0.04) : 0, qe = Je ? Math.max(je, De) / 2 + 2 + lt : Math.max(je, De) / 2, rt = Math.min((Ge - qe * 2) / Le, (it - qe * 2) / Re);
      if (rt < 10)
        return;
      const dt = Ke + Ge / 2 - (se + he) / 2 * rt, vt = Oe + it / 2 - (Me + ke) / 2 * rt, Rt = P - $ || 1, Xt = Math.max($, Math.min(P, O)), vn = (Xt - $) / Rt, Dt = we + vn * (ae - we), zn = Y ?? a(Xt, E, x), on = z ? "round" : "butt";
      xe.beginPath(), xe.arc(dt, vt, rt, we, ae), xe.strokeStyle = W, xe.lineWidth = je, xe.lineCap = on, xe.stroke();
      const Qt = [...x].sort((Kt, Mn) => Kt.value - Mn.value), mn = [];
      if (Qt.length === 0)
        mn.push({ from: $, to: P, color: E });
      else {
        mn.push({ from: $, to: Qt[0].value, color: E });
        for (let Kt = 0; Kt < Qt.length; Kt++)
          mn.push({ from: Qt[Kt].value, to: Kt + 1 < Qt.length ? Qt[Kt + 1].value : P, color: Qt[Kt].color });
      }
      if (wt) {
        const Kt = (ae - we) / (2 * Math.PI), Mn = xe.createConicGradient(we, dt, vt);
        for (const rn of mn) {
          const gn = Math.min(1, (Math.max($, rn.from) - $) / Rt * Kt), Hn = Math.min(1, (Math.min(P, rn.to) - $) / Rt * Kt);
          Mn.addColorStop(gn, l(rn.color, 0.25)), Mn.addColorStop(Hn, l(rn.color, 0.25));
        }
        Mn.addColorStop(1, l(mn[0].color, 0.25)), xe.beginPath(), xe.arc(dt, vt, rt, we, ae), xe.strokeStyle = Mn, xe.lineWidth = je, xe.lineCap = on, xe.stroke();
      }
      if (vn > 0 && (xe.beginPath(), xe.arc(dt, vt, rt, we, Dt), xe.strokeStyle = zn, xe.lineWidth = De, xe.lineCap = on, xe.stroke()), Je && mn.length > 0) {
        const Kt = rt + Math.max(je, De) / 2 + lt / 2 + 2, Mn = (ae - we) / (2 * Math.PI), rn = xe.createConicGradient(we, dt, vt);
        for (const gn of mn) {
          const Hn = Math.min(1, (Math.max($, gn.from) - $) / Rt * Mn), Co = Math.min(1, (Math.min(P, gn.to) - $) / Rt * Mn);
          rn.addColorStop(Hn, gn.color), rn.addColorStop(Co, gn.color);
        }
        rn.addColorStop(1, mn[0].color), xe.beginPath(), xe.arc(dt, vt, Kt, we, ae), xe.strokeStyle = rn, xe.lineWidth = lt, xe.lineCap = on, xe.stroke();
      }
      if (be !== "none" && x.length > 0) {
        const Kt = Math.max(8, 11 * et), Mn = rt + Math.max(je, De) / 2 + (Je ? lt + 4 : 4) + Kt * 0.6, rn = P - $ || 1;
        xe.font = `${Kt}px system-ui, sans-serif`, xe.textBaseline = "middle";
        for (const gn of x) {
          const Hn = (gn.value - $) / rn;
          if (Hn < 0 || Hn > 1)
            continue;
          const Co = we + Hn * (ae - we), ut = dt + Math.cos(Co) * Mn, qn = vt + Math.sin(Co) * Mn, bn = ut - dt;
          if (xe.textAlign = bn > 1 ? "left" : bn < -1 ? "right" : "center", xe.fillStyle = gn.color, be === "label" || be === "both") {
            const Gn = gn.label || String(gn.value);
            be === "both" ? (xe.fillText(Gn, ut, qn - Kt * 0.6), xe.fillText(r(gn.value, k, 1), ut, qn + Kt * 0.6)) : xe.fillText(Gn, ut, qn);
          } else
            xe.fillText(r(gn.value, k, 1), ut, qn);
        }
      }
      if (j) {
        const Kt = Math.max(4, U * et), Mn = r(Xt, k, 2), rn = vt + Me * rt - De / 2, gn = vt + ke * rt + De / 2, Hn = (rn + gn) / 2;
        xe.textAlign = "center", xe.textBaseline = "middle", xe.fillStyle = A, xe.font = `600 ${Kt}px system-ui, sans-serif`, xe.fillText(Mn, dt, Hn + J * et);
      }
    }
    function u(C, O, $) {
      const P = Math.ceil(Math.sqrt($ * C / O));
      return Math.floor(P * O / C) * P < $ ? O / Math.ceil(P * O / C) : C / P;
    }
    function c(C, O, $, P) {
      const k = Math.max(u(C, O, P), u(O, C, P));
      let x = Math.max(1, Math.floor(C / k));
      const E = Math.ceil(P / x);
      return x = Math.ceil(P / E), { xCount: x, yCount: E, cellW: C / x - $ + $ / x, cellH: O / E - $ + $ / E };
    }
    const d = R(
      () => t.series && t.series.length > 0 ? t.series : [{ label: t.title ?? "", value: t.value ?? 0, activeColorOverride: t.activeColorOverride }]
    ), f = R(() => d.value.length), p = R(() => t.thresholds && t.thresholds.length > 0 ? t.thresholds : []), m = R(() => t.thresholdBaseColor ?? "#52c41a"), b = R(() => {
      const C = o.value.w, O = o.value.h;
      return C <= 0 || O <= 0 ? { xCount: 1, yCount: 1, cellW: 0, cellH: 0 } : t.orientation === "horizontal" ? { xCount: f.value, yCount: 1, cellW: (C - hg * (f.value - 1)) / f.value, cellH: O } : t.orientation === "vertical" ? { xCount: 1, yCount: f.value, cellW: C, cellH: (O - hg * (f.value - 1)) / f.value } : c(C, O, hg, f.value);
    });
    Pt(() => {
      n.value && (i = new ResizeObserver((C) => {
        const O = C[0].contentRect;
        o.value = { w: O.width, h: O.height };
      }), i.observe(n.value));
    }), Lo(() => {
      i?.disconnect();
    });
    const y = le({});
    function S() {
      Nt(() => {
        for (let C = 0; C < d.value.length; C++) {
          const O = y.value[C];
          if (!O)
            continue;
          const $ = d.value[C];
          s(
            O,
            $.value,
            t.min,
            t.max,
            t.unit,
            p.value,
            m.value,
            t.capRound,
            t.trackWidth,
            t.fillWidth,
            t.trackColor,
            270 - t.sweepAngle / 2,
            t.sweepAngle,
            t.valueColor,
            t.valueSize,
            t.valueVisible,
            t.paddingX,
            t.paddingY,
            $.activeColorOverride ?? t.activeColorOverride,
            t.thresholdDisplay,
            t.valueOffsetY,
            t.thresholdLabelDisplay
          );
        }
      });
    }
    return Ie(() => [
      d.value,
      t.min,
      t.max,
      t.unit,
      t.thresholds,
      t.thresholdBaseColor,
      t.capRound,
      t.trackWidth,
      t.fillWidth,
      t.trackColor,
      t.sweepAngle,
      t.valueColor,
      t.valueSize,
      t.valueVisible,
      t.paddingX,
      t.paddingY,
      t.thresholdDisplay,
      t.valueOffsetY,
      t.thresholdLabelDisplay,
      o.value
    ], S, { deep: !0, immediate: !0 }), (C, O) => (ee(), ve("div", {
      ref_key: "containerRef",
      ref: n,
      style: xt([{ width: "100%", height: "100%", display: "grid", gap: "2px" }, {
        gridTemplateColumns: `repeat(${b.value.xCount}, 1fr)`,
        gridTemplateRows: `repeat(${b.value.yCount}, 1fr)`
      }])
    }, [
      (ee(!0), ve(Ve, null, It(d.value, ($, P) => (ee(), ve("div", {
        key: `${$.label}-${P}`,
        style: { width: "100%", height: "100%", display: "flex", "flex-direction": "column", overflow: "hidden" }
      }, [
        B("canvas", {
          ref_for: !0,
          ref: (k) => {
            k && (y.value[P] = k);
          },
          style: { flex: "1", width: "100%", height: "0", display: "block", "min-height": "0" }
        }, null, 512),
        f.value > 1 && $.label ? (ee(), ve("div", kG, te($.label), 1)) : He("", !0)
      ]))), 128))
    ], 4));
  }
}), _G = /* @__PURE__ */ ye({
  __name: "HistogramPanel",
  props: {
    seriesValues: {},
    seriesLabels: {},
    bucketSize: {},
    bucketCount: {},
    bucketOffset: {},
    combineSeries: { type: Boolean, default: !1 },
    colorScheme: {},
    colorSingleValue: {},
    colorDistribution: {},
    lineWidth: { default: 1 },
    fillOpacity: { default: 80 },
    unit: {}
  },
  setup(e) {
    const t = e;
    function n(a, l) {
      const s = a.filter((O) => Number.isFinite(O));
      if (s.length === 0)
        return { bucketStarts: [], counts: [] };
      const u = Math.min(...s), c = Math.max(...s), d = c - u || 1, f = l.bucketOffset ?? 0, p = l.bucketCount ?? 30, m = l.bucketSize ?? d / p, b = Math.floor((u - f) / m) * m + f, y = [], S = [];
      let C = b;
      for (; C <= c; )
        y.push(C), S.push(0), C += m;
      for (const O of s) {
        const $ = Math.floor((O - b) / m), P = Math.min($, S.length - 1);
        P >= 0 && S[P]++;
      }
      return { bucketStarts: y, counts: S };
    }
    function o(a, l) {
      const s = a.flat();
      return n(s, l);
    }
    const i = R(() => {
      const a = { bucketSize: t.bucketSize, bucketCount: t.bucketCount, bucketOffset: t.bucketOffset };
      if (t.combineSeries || t.seriesValues.length === 0) {
        const { bucketStarts: d, counts: f } = o(t.seriesValues, a);
        return { bucketStarts: d, countSeries: [f], labels: ["combined"] };
      }
      const l = t.seriesValues.flat(), { bucketStarts: s } = n(l, a), u = s.length > 1 ? s[1] - s[0] : void 0, c = t.seriesValues.map((d) => {
        const { counts: f } = n(d, { ...a, bucketSize: u });
        return Array.from({ length: s.length }, (p, m) => f[m] ?? 0);
      });
      return { bucketStarts: s, countSeries: c, labels: t.seriesLabels };
    }), r = R(() => ({
      timestamps: i.value.bucketStarts,
      series: i.value.labels.map((a, l) => ({
        label: a,
        values: i.value.countSeries[l] ?? []
      }))
    }));
    return (a, l) => (ee(), Ze(eb, {
      data: r.value,
      "fill-opacity": e.fillOpacity,
      "line-width": e.lineWidth,
      "draw-style": "bars",
      unit: e.unit,
      "color-scheme": e.colorScheme,
      "color-single-value": e.colorSingleValue,
      "color-distribution": e.colorDistribution,
      "scale-distribution": "linear",
      "show-grid-lines": "y",
      "axis-label": "y",
      "axis-tick": "hidden",
      "axis-border": "hidden",
      "tooltip-mode": "multi",
      "legend-position": !e.combineSeries && i.value.countSeries.length > 1 ? "bottom" : "hidden",
      "legend-mode": "list",
      "stacking-mode": "none",
      "x-axis-time": !1
    }, null, 8, ["data", "fill-opacity", "line-width", "unit", "color-scheme", "color-single-value", "color-distribution", "legend-position"]));
  }
}), AG = ["width", "height"], DG = ["d", "fill", "stroke", "opacity", "onMousemove"], zG = ["x", "y"], RG = ["onClick"], NG = { style: { width: "100%", "border-collapse": "collapse" } }, BG = ["onClick"], LG = { class: "flex items-center gap-1" }, FG = {
  class: "overflow-hidden text-ellipsis whitespace-nowrap",
  style: { "max-width": "80px" }
}, HG = { class: "flex items-center gap-1.5" }, VG = /* @__PURE__ */ ye({
  __name: "PiePanel",
  props: {
    slices: {},
    pieType: { default: "pie" },
    pieLabels: { default: () => [] },
    unit: {},
    decimals: { default: 2 },
    legendPosition: { default: "bottom" },
    legendMode: { default: "list" },
    legendValues: { default: () => [] },
    tooltipMode: { default: "single" },
    tooltipSort: { default: "none" }
  },
  setup(e) {
    const t = e, n = qr(), o = le(), i = le({ width: 0, height: 0 });
    let r = null;
    Pt(() => {
      if (!o.value)
        return;
      r = new ResizeObserver((K) => {
        const { width: J, height: be } = K[0].contentRect;
        i.value = { width: Math.floor(J), height: Math.floor(be) };
      }), r.observe(o.value);
      const { width: G, height: Y } = o.value.getBoundingClientRect();
      i.value = { width: Math.floor(G), height: Math.floor(Y) };
    }), At(() => {
      r?.disconnect();
    });
    const a = R(() => n.isDark), l = R(() => a.value ? "#d9d9d9" : "#141414"), s = R(() => a.value ? "#8c8c8c" : "#595959"), u = R(() => a.value ? "rgba(255,255,255,0.08)" : "rgba(0,0,0,0.08)"), c = R(() => a.value ? "rgba(0,0,0,0.6)" : "rgba(255,255,255,0.8)"), d = R(() => {
      const G = t.legendValues.length > 0;
      return t.legendMode === "table" ? G ? 120 + t.legendValues.length * 64 : 160 : 140;
    }), f = R(
      () => t.legendPosition === "bottom" ? t.legendMode === "table" ? Math.min(t.slices.length * 24 + 28, 120) : 28 : 0
    ), p = R(() => t.legendPosition === "right" ? d.value : 0), m = R(() => Math.max(i.value.width - p.value, 10)), b = R(() => Math.max(i.value.height - f.value, 10)), y = R(() => m.value / 2), S = R(() => b.value / 2), C = R(() => Math.min(y.value, S.value) * 0.85), O = R(() => t.pieType === "donut" ? C.value * 0.55 : 0), $ = le(null), P = le({ x: 0, y: 0 }), k = le(/* @__PURE__ */ new Set()), x = R(() => t.slices.filter((G) => !k.value.has(G.label))), E = R(() => x.value.reduce((G, Y) => G + Y.value, 0));
    function z(G, Y, K, J) {
      const be = (J - 90) * Math.PI / 180;
      return { x: G + K * Math.cos(be), y: Y + K * Math.sin(be) };
    }
    function N(G, Y, K, J, be, xe) {
      const ge = Math.min(xe - be, 359.9999), de = ge > 180 ? 1 : 0, ne = z(G, Y, K, be), we = z(G, Y, K, be + ge);
      if (J <= 0)
        return [
          `M ${G} ${Y}`,
          `L ${ne.x} ${ne.y}`,
          `A ${K} ${K} 0 ${de} 1 ${we.x} ${we.y}`,
          "Z"
        ].join(" ");
      const ae = z(G, Y, J, be + ge), se = z(G, Y, J, be);
      return [
        `M ${ne.x} ${ne.y}`,
        `A ${K} ${K} 0 ${de} 1 ${we.x} ${we.y}`,
        `L ${ae.x} ${ae.y}`,
        `A ${J} ${J} 0 ${de} 0 ${se.x} ${se.y}`,
        "Z"
      ].join(" ");
    }
    const D = R(() => {
      const G = E.value;
      if (G === 0 || i.value.width === 0)
        return [];
      let Y = 0;
      return x.value.map((K) => {
        const J = K.value / G * 360, be = K.value / G * 100, xe = Y;
        Y += J;
        const ge = Y, de = xe + J / 2, ne = (C.value + O.value) / 2 || C.value * 0.65, we = z(y.value, S.value, ne, de), ae = N(y.value, S.value, C.value, O.value, xe, ge);
        return { ...K, angle: J, pct: be, startAngle: xe, endAngle: ge, midAngle: de, labelPos: we, path: ae };
      });
    });
    function W(G) {
      const Y = G.toFixed(t.decimals);
      return t.unit ? `${Y} ${t.unit}` : Y;
    }
    function H(G, Y) {
      return G.rawValues && G.rawValues.length > 0 ? fu(G.rawValues, Y) : G.value;
    }
    function L(G) {
      const Y = new Set(k.value);
      if (Y.has(G))
        Y.delete(G);
      else {
        if (t.slices.filter((J) => !Y.has(J.label)).length <= 1)
          return;
        Y.add(G);
      }
      k.value = Y;
    }
    function A(G, Y) {
      $.value = Y;
      const K = o.value?.getBoundingClientRect();
      K && (P.value = { x: G.clientX - K.left, y: G.clientY - K.top });
    }
    function U() {
      $.value = null;
    }
    const j = R(() => {
      if (!$.value || t.tooltipMode === "none")
        return [];
      const G = E.value;
      if (t.tooltipMode === "single") {
        const K = x.value.find((J) => J.label === $.value);
        return K ? [{ ...K, percent: G > 0 ? K.value / G * 100 : 0 }] : [];
      }
      let Y = x.value.map((K) => ({ ...K, percent: G > 0 ? K.value / G * 100 : 0 }));
      return t.tooltipSort === "desc" && (Y = [...Y].sort((K, J) => J.value - K.value)), t.tooltipSort === "asc" && (Y = [...Y].sort((K, J) => K.value - J.value)), Y;
    }), re = R(() => {
      const G = t.tooltipMode === "multi" ? 180 : 140, Y = t.tooltipMode === "multi" ? j.value.length * 22 + 32 : 72, K = Math.min(P.value.x + 14, i.value.width - G - 4), J = Math.min(P.value.y - 8, i.value.height - Y - 4);
      return { left: Math.max(4, K), top: Math.max(4, J) };
    });
    return (G, Y) => (ee(), ve("div", {
      ref_key: "containerRef",
      ref: o,
      class: "w-full h-full relative overflow-hidden",
      style: xt({
        display: "flex",
        flexDirection: e.legendPosition === "bottom" ? "column" : "row"
      })
    }, [
      i.value.width > 0 ? (ee(), ve("svg", {
        key: 0,
        width: m.value,
        height: b.value,
        style: { "flex-shrink": "0" }
      }, [
        (ee(!0), ve(Ve, null, It(D.value, (K) => (ee(), ve("g", {
          key: K.label
        }, [
          K.angle > 0.3 ? (ee(), ve("path", {
            key: 0,
            d: K.path,
            fill: K.color,
            stroke: c.value,
            "stroke-width": "1.5",
            opacity: $.value && $.value !== K.label ? 0.6 : 1,
            style: { cursor: "pointer", transition: "opacity 0.15s" },
            onMousemove: (J) => A(J, K.label),
            onMouseleave: U
          }, null, 40, DG)) : He("", !0),
          e.pieLabels.length > 0 && K.angle > 20 ? (ee(), ve("text", {
            key: 1,
            x: K.labelPos.x,
            y: K.labelPos.y,
            "text-anchor": "middle",
            "dominant-baseline": "middle",
            fill: "#fff",
            "font-size": "11",
            style: { "pointer-events": "none", "user-select": "none", "text-shadow": "0 1px 2px rgba(0,0,0,0.6)" }
          }, te([
            e.pieLabels.includes("name") ? K.label : null,
            e.pieLabels.includes("percent") ? `${K.pct.toFixed(1)}%` : null,
            e.pieLabels.includes("value") ? W(K.value) : null
          ].filter(Boolean).join(" ")), 9, zG)) : He("", !0)
        ]))), 128))
      ], 8, AG)) : He("", !0),
      e.legendPosition !== "hidden" && e.legendMode === "list" ? (ee(), ve("div", {
        key: 1,
        style: xt({
          display: "flex",
          flexDirection: e.legendPosition === "bottom" ? "row" : "column",
          flexWrap: "wrap",
          alignItems: e.legendPosition === "bottom" ? "center" : "flex-start",
          justifyContent: e.legendPosition === "bottom" ? "center" : "flex-start",
          gap: "4px 12px",
          padding: e.legendPosition === "right" ? "8px 4px" : "2px 8px",
          overflowY: e.legendPosition === "right" ? "auto" : "hidden",
          width: e.legendPosition === "right" ? `${p.value}px` : void 0,
          height: e.legendPosition === "bottom" ? `${f.value}px` : void 0
        })
      }, [
        (ee(!0), ve(Ve, null, It(e.slices, (K) => (ee(), ve("div", {
          key: K.label,
          class: "flex items-center gap-1 text-xs whitespace-nowrap cursor-pointer select-none",
          style: xt({
            color: l.value,
            opacity: k.value.has(K.label) ? 0.35 : 1,
            textDecoration: k.value.has(K.label) ? "line-through" : "none"
          }),
          onClick: (J) => L(K.label)
        }, [
          B("span", {
            class: "inline-block w-2 h-2 rounded-sm flex-shrink-0",
            style: xt({ background: K.color })
          }, null, 4),
          B("span", null, te(K.label), 1),
          e.legendValues.length > 0 ? (ee(), ve("span", {
            key: 0,
            class: "ml-1",
            style: xt({ color: s.value })
          }, te(e.legendValues.map((J) => W(H(K, J))).join(" / ")), 5)) : He("", !0)
        ], 12, RG))), 128))
      ], 4)) : He("", !0),
      e.legendPosition !== "hidden" && e.legendMode === "table" ? (ee(), ve("div", {
        key: 2,
        style: xt({
          width: e.legendPosition === "right" ? `${p.value}px` : void 0,
          height: e.legendPosition === "bottom" ? `${f.value}px` : void 0,
          overflowY: "auto",
          flexShrink: 0,
          fontSize: "11px"
        })
      }, [
        B("table", NG, [
          B("thead", null, [
            B("tr", null, [
              B("th", {
                style: xt({ textAlign: "left", padding: "2px 6px", color: s.value, fontWeight: 500, borderBottom: `1px solid ${u.value}` })
              }, " Name ", 4),
              B("th", {
                style: xt({ textAlign: "right", padding: "2px 6px", color: s.value, fontWeight: 500, borderBottom: `1px solid ${u.value}` })
              }, " Value ", 4),
              (ee(!0), ve(Ve, null, It(e.legendValues, (K) => (ee(), ve("th", {
                key: K,
                style: xt({ textAlign: "right", padding: "2px 6px", color: s.value, fontWeight: 500, borderBottom: `1px solid ${u.value}`, minWidth: "56px" })
              }, te(K.charAt(0).toUpperCase() + K.slice(1)), 5))), 128))
            ])
          ]),
          B("tbody", null, [
            (ee(!0), ve(Ve, null, It(e.slices, (K) => (ee(), ve("tr", {
              key: K.label,
              class: "cursor-pointer select-none",
              style: xt({ opacity: k.value.has(K.label) ? 0.35 : 1 }),
              onClick: (J) => L(K.label)
            }, [
              B("td", {
                style: xt({ padding: "2px 6px", color: l.value })
              }, [
                B("div", LG, [
                  B("span", {
                    class: "inline-block w-2 h-2 rounded-sm flex-shrink-0",
                    style: xt({ background: K.color })
                  }, null, 4),
                  B("span", FG, te(K.label), 1)
                ])
              ], 4),
              B("td", {
                style: xt({ textAlign: "right", padding: "2px 6px", color: l.value, fontVariantNumeric: "tabular-nums" })
              }, te(W(K.value)), 5),
              (ee(!0), ve(Ve, null, It(e.legendValues, (J) => (ee(), ve("td", {
                key: J,
                style: xt({ textAlign: "right", padding: "2px 6px", color: s.value, fontVariantNumeric: "tabular-nums" })
              }, te(W(H(K, J))), 5))), 128))
            ], 12, BG))), 128))
          ])
        ])
      ], 4)) : He("", !0),
      $.value && e.tooltipMode !== "none" && j.value.length > 0 ? (ee(), ve("div", {
        key: 3,
        class: "absolute z-50 pointer-events-none rounded shadow-lg text-xs",
        style: xt({
          left: `${re.value.left}px`,
          top: `${re.value.top}px`,
          background: a.value ? "#1f1f1f" : "#fff",
          border: a.value ? "1px solid #333" : "1px solid #e8e8e8",
          minWidth: "140px"
        })
      }, [
        B("div", {
          class: "px-2 pt-1.5 pb-0 text-xs font-medium",
          style: xt({ color: a.value ? "#d9d9d9" : "#141414" })
        }, te(e.tooltipMode === "multi" ? `${W(E.value)} total` : j.value[0]?.label), 5),
        B("div", {
          class: "border-t my-1",
          style: xt({ borderColor: a.value ? "#333" : "#e8e8e8" })
        }, null, 4),
        (ee(!0), ve(Ve, null, It(j.value, (K) => (ee(), ve("div", {
          key: K.label,
          class: "px-2 py-0.5 flex items-center justify-between gap-2"
        }, [
          B("div", HG, [
            B("span", {
              class: "inline-block w-2 h-2 rounded-sm",
              style: xt({ background: K.color })
            }, null, 4),
            B("span", {
              style: xt({ color: a.value ? "#d9d9d9" : "#141414" })
            }, te(e.tooltipMode === "multi" ? K.label : `${K.percent.toFixed(1)}%`), 5)
          ]),
          B("span", {
            class: "font-mono",
            style: xt({ color: K.color })
          }, te(W(K.value)), 5)
        ]))), 128))
      ], 4)) : He("", !0)
    ], 4));
  }
}), ed = 36, Qa = 1.2, J1 = 1, jG = /* @__PURE__ */ ye({
  __name: "StatPanel",
  props: {
    title: {},
    unit: {},
    series: {},
    trend: {},
    thresholds: {},
    thresholdBaseColor: {},
    orientation: {},
    textMode: {},
    colorMode: {}
  },
  setup(e) {
    const t = e, n = qr(), o = le(), i = le({ w: 0, h: 0 });
    let r = null;
    const a = ["#1677ff", "#52c41a", "#fa8c16", "#f5222d", "#722ed1", "#13c2c2", "#eb2f96", "#faad14"];
    function l($) {
      return $ >= 1e6 ? `${($ / 1e6).toFixed(1)}M` : $ >= 1e3 ? `${($ / 1e3).toFixed(1)}K` : $ % 1 === 0 ? String($) : $.toFixed(1);
    }
    function s($, P, k, x) {
      const E = k ?? x ?? a[0];
      if (P && P.length > 0) {
        let z = E;
        for (const N of P)
          $ >= N.value && (z = N.color);
        return z;
      }
      return E;
    }
    function u($, P) {
      if ($.startsWith("rgb("))
        return $.replace("rgb(", "rgba(").replace(")", `, ${P})`);
      if ($.startsWith("rgba("))
        return $.replace(/,\s*[\d.]+\)$/, `, ${P})`);
      const k = $.replace("#", ""), x = k.length === 3 ? k.split("").map((D) => D + D).join("") : k.slice(0, 6), E = Number.parseInt(x.slice(0, 2), 16), z = Number.parseInt(x.slice(2, 4), 16), N = Number.parseInt(x.slice(4, 6), 16);
      return `rgba(${E}, ${z}, ${N}, ${P})`;
    }
    function c($, P, k) {
      switch (P) {
        case "background_solid":
          return gt($).toString();
        case "background": {
          const x = k ? 1 : -0.7, E = gt($).darken(15 * x).spin(8).toRgbString(), z = gt($).darken(5 * x).spin(-8).toRgbString();
          return `linear-gradient(120deg, ${E}, ${z})`;
        }
        default:
          return "transparent";
      }
    }
    function d($) {
      return gt($).isLight() ? "#1a1a1a" : "#ffffff";
    }
    function f($, P, k) {
      if ($ === 0 || P === 0)
        return { isWide: !1, showSparkline: !1, valueFontSize: 24, titleFontSize: 12, chartHeight: 0, padding: 8 };
      const x = P > 100 ? 12 : 8, E = $ - x * 2, z = P - x * 2, N = $ / P > 2.5, D = k && (N ? P > 50 : P > 100), W = Math.max(10, Math.min(13, z * (N ? 0.22 : 0.18)));
      let H, L = 0;
      if (N)
        H = D ? Math.min(z * 0.62, E * 0.42, ed) : Math.min(z * 0.7, E * 0.38, ed), D && (L = P * 0.5);
      else {
        const A = W * Qa;
        H = Math.min(D ? (z - A) * 0.65 : (z - A) * 0.85, E * 0.9, ed), D && (L = Math.max(0, Math.min(P - W * Qa - H * Qa - x, P * 0.5)));
      }
      return {
        isWide: N,
        showSparkline: D,
        valueFontSize: Math.max(11, H),
        titleFontSize: W,
        chartHeight: L,
        padding: x
      };
    }
    function p($, P, k) {
      const x = Math.ceil(Math.sqrt(k * $ / P));
      return Math.floor(x * P / $) * x < k ? P / Math.ceil(x * P / $) : $ / x;
    }
    function m($, P, k, x) {
      const E = Math.max(p($, P, x), p(P, $, x));
      let z = Math.max(1, Math.floor($ / E));
      const N = Math.ceil(x / z);
      return z = Math.ceil(x / N), {
        xCount: z,
        yCount: N,
        cellW: $ / z - k + k / z,
        cellH: P / N - k + k / N
      };
    }
    function b($, P, k) {
      const x = $.getContext("2d");
      if (!x)
        return;
      const E = window.devicePixelRatio || 1, z = $.getBoundingClientRect();
      if (z.width === 0 || z.height === 0)
        return;
      $.width = z.width * E, $.height = z.height * E, x.scale(E, E);
      const N = z.width, D = z.height, W = Math.min(...P), L = Math.max(...P) - W || 1;
      x.clearRect(0, 0, N, D);
      const A = x.createLinearGradient(0, 0, 0, D);
      A.addColorStop(0, u(k, 0.25)), A.addColorStop(1, u(k, 0));
      const U = P.map((j, re) => ({
        x: re / (P.length - 1) * N,
        y: D - 2 - (j - W) / L * (D - 4)
      }));
      x.beginPath(), U.forEach(({ x: j, y: re }, G) => G === 0 ? x.moveTo(j, re) : x.lineTo(j, re)), x.lineTo(N, D), x.lineTo(0, D), x.fillStyle = A, x.fill(), x.beginPath(), U.forEach(({ x: j, y: re }, G) => G === 0 ? x.moveTo(j, re) : x.lineTo(j, re)), x.strokeStyle = k, x.lineWidth = 1.5, x.stroke();
    }
    const y = R(() => Math.max(t.series.length, 1)), S = R(() => {
      const $ = i.value.w, P = i.value.h;
      return $ <= 0 || P <= 0 ? { xCount: 1, yCount: 1, cellW: 0, cellH: 0 } : t.orientation === "horizontal" ? { xCount: 1, yCount: y.value, cellW: $, cellH: (P - J1 * (y.value - 1)) / y.value } : m($, P, J1, y.value);
    }), C = R(() => n.isDark ? "#303030" : "#fff");
    Pt(() => {
      o.value && (r = new ResizeObserver(($) => {
        const P = $[0].contentRect;
        (i.value.w !== P.width || i.value.h !== P.height) && (i.value = { w: P.width, h: P.height });
      }), r.observe(o.value));
    }), Lo(() => {
      r?.disconnect();
    });
    const O = ye({
      props: {
        label: String,
        value: Number,
        unit: String,
        mappedLabel: String,
        sparkline: Array,
        percentChange: [Number, null],
        textMode: { type: String, default: "value_and_name" },
        colorMode: String,
        color: String,
        width: Number,
        height: Number
      },
      setup($) {
        const P = le(), k = qr();
        function x() {
          Nt(() => {
            P.value && $.sparkline && $.sparkline.length > 1 && b(P.value, $.sparkline, $.color ?? "#1677ff");
          });
        }
        return Ie(() => [$.sparkline, $.color, $.width, $.height], x, { immediate: !0 }), () => {
          const E = $, z = k.isDark, N = E.sparkline != null && E.sparkline.length > 1, D = f(E.width ?? 0, E.height ?? 0, N), W = E.textMode === "value_and_name" || E.textMode === "name", H = E.textMode === "value_and_name" || E.textMode === "value", L = Math.max(10, D.valueFontSize * 0.44), A = E.colorMode === "background_solid" || E.colorMode === "background", U = A ? c(E.color ?? "#1677ff", E.colorMode ?? "value", z) : "transparent", j = A ? d(E.color ?? "#1677ff") : E.color ?? "#d9d9d9", re = A ? j : "#888", G = A ? j : "#666", Y = E.percentChange != null ? (E.percentChange > 0 ? "+" : "") + E.percentChange.toLocaleString(void 0, { style: "percent", minimumFractionDigits: 1, maximumFractionDigits: 2 }) : null, K = E.percentChange != null ? E.percentChange > 0 ? "#52c41a" : E.percentChange < 0 ? "#ff4d4f" : "#888" : "", J = E.percentChange != null ? E.percentChange > 0 ? "↑" : E.percentChange < 0 ? "↓" : "" : "", be = E.mappedLabel ?? l(E.value ?? 0), xe = [
            ro("span", {
              style: {
                color: j,
                fontSize: `${D.valueFontSize}px`,
                fontWeight: 500,
                fontFamily: "monospace",
                lineHeight: Qa
              }
            }, be)
          ];
          E.mappedLabel || xe.push(ro("span", {
            style: { color: G, fontSize: `${L}px`, lineHeight: Qa }
          }, E.unit)), Y && xe.push(ro("span", {
            style: { color: K, fontSize: `${L}px`, marginLeft: "2px", lineHeight: Qa }
          }, `${J}${Y}`));
          const ge = W ? ro("div", {
            style: {
              color: re,
              fontSize: `${D.titleFontSize}px`,
              lineHeight: Qa,
              ...D.isWide ? { whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" } : { marginBottom: "2px" }
            }
          }, E.label) : null, de = H ? ro("div", {
            style: {
              display: "flex",
              alignItems: "baseline",
              gap: D.isWide ? "3px" : "4px",
              flexWrap: "wrap"
            }
          }, xe) : null, ne = ro("div", {
            style: D.isWide ? { flex: 1, minWidth: 0, position: "relative", zIndex: 1 } : { position: "relative", zIndex: 1 }
          }, [ge, de]), we = D.showSparkline ? ro("canvas", {
            ref: (se) => {
              P.value = se;
            },
            style: D.isWide ? { position: "absolute", right: 0, bottom: 0, left: 0, width: "100%", height: `${D.chartHeight}px`, opacity: 0.7 } : { position: "absolute", bottom: 0, left: 0, right: 0, width: "100%", height: `${D.chartHeight}px`, opacity: 0.6 }
          }) : null, ae = D.isWide ? {
            width: "100%",
            height: "100%",
            display: "flex",
            alignItems: "center",
            padding: `0 ${D.padding}px`,
            gap: "8px",
            overflow: "hidden",
            position: "relative",
            background: U
          } : {
            width: "100%",
            height: "100%",
            display: "flex",
            flexDirection: "column",
            justifyContent: "center",
            padding: `${D.padding}px`,
            overflow: "hidden",
            position: "relative",
            background: U
          };
          return ro("div", { style: ae }, D.isWide ? [we, ne] : [we, ne]);
        };
      }
    });
    return ($, P) => (ee(), ve("div", {
      ref_key: "containerRef",
      ref: o,
      style: xt([{ width: "100%", height: "100%", display: "grid", gap: "1px" }, {
        gridTemplateColumns: e.orientation === "horizontal" ? "1fr" : `repeat(${S.value.xCount}, 1fr)`,
        gridTemplateRows: e.orientation === "horizontal" ? `repeat(${y.value}, 1fr)` : `repeat(${S.value.yCount}, 1fr)`,
        background: C.value
      }])
    }, [
      (ee(!0), ve(Ve, null, It(e.series, (k, x) => (ee(), Ze(M(O), {
        key: `${k.label}-${x}`,
        label: y.value === 1 ? e.title : k.label,
        value: k.displayValue ?? (k.values.length > 0 ? k.values[k.values.length - 1] ?? 0 : 0),
        unit: k.units ?? e.unit,
        "mapped-label": k.valueMap !== void 0 ? k.valueMap[String(k.displayValue ?? (k.values.length > 0 ? k.values[k.values.length - 1] ?? 0 : 0))] : void 0,
        sparkline: k.values.length > 1 ? k.values : void 0,
        "percent-change": k.percentChange,
        "text-mode": e.textMode,
        "color-mode": e.colorMode,
        color: s(
          k.displayValue ?? k.values[k.values.length - 1] ?? 0,
          e.thresholds,
          e.thresholdBaseColor,
          a[x % a.length]
        ),
        width: S.value.cellW,
        height: S.value.cellH
      }, null, 8, ["label", "value", "unit", "mapped-label", "sparkline", "percent-change", "text-mode", "color-mode", "color", "width", "height"]))), 128))
    ], 4));
  }
}), WG = {
  key: 0,
  class: "flex-center h-full text-secondary"
}, qG = {
  key: 1,
  class: "flex-center h-full"
}, GG = {
  key: 2,
  class: "flex-center h-full text-red-500 text-xs"
}, KG = {
  key: 3,
  class: "w-full h-full relative"
}, YG = {
  key: 0,
  class: "absolute inset-0 z-10 flex items-center justify-center",
  style: { "backdrop-filter": "blur(1px)", "border-radius": "4px" }
}, UG = {
  key: 0,
  class: "w-full h-full"
}, XG = {
  key: 0,
  class: "w-full h-full overflow-auto"
}, qh = /* @__PURE__ */ ye({
  __name: "PanelRenderer",
  props: {
    panelId: {},
    panelConfig: { default: void 0 }
  },
  setup(e) {
    const t = e, n = wr(), { t: o } = jt(), i = R(() => t.panelConfig ?? n.panels[t.panelId]), r = le(!1), a = le(null), l = le(null), s = le(null), u = le(null), c = le(null), d = le(null), f = le(null);
    let p = null;
    const m = le(null), b = ["#1677ff", "#52c41a", "#fa8c16", "#f5222d", "#722ed1", "#13c2c2", "#eb2f96", "#faad14"];
    function y($, P) {
      S();
      const k = $.seriesCount ?? 1, x = Xl(
        { from: P.from / 1e3, to: P.to / 1e3 },
        15,
        k,
        $.pattern,
        $.labels
      ), E = Array.from({ length: k }, (N, D) => 20 + (D * 37 + 13) % 60), z = Array.from({ length: k }, (N, D) => 10 + (D * 53 + 7) % 40);
      m.value = {
        timestamps: [...x.timestamps],
        seriesValues: x.series.map((N) => [...N.values])
      }, p = setInterval(() => {
        const N = m.value;
        if (!N)
          return;
        const D = Math.floor(Date.now() / 1e3), W = [...N.timestamps.slice(1), D], H = N.seriesValues.map((L, A) => {
          const U = L[L.length - 1], j = pI(U, E[A], z[A] * 0.1, z[A] + E[A] * 1.8);
          return [...L.slice(1), j];
        });
        m.value = { timestamps: W, seriesValues: H };
      }, 1e3);
    }
    function S() {
      p && (clearInterval(p), p = null), m.value = null;
    }
    Lo(S);
    async function C() {
      const $ = i.value;
      if ($) {
        r.value = !0, a.value = null, S();
        try {
          const P = $.queries.filter((N) => N.enabled !== !1).map((N) => N.dataSource).filter((N) => !!N && N.type === "mock");
          if (P.length === 0)
            return;
          const k = n.timeRange, x = { from: k.from / 1e3, to: k.to / 1e3 }, E = P[0];
          if (E.pattern === "live") {
            y(E, k);
            return;
          }
          if ($.type === "timeseries" || $.type === "bar") {
            const N = P.map(
              (W) => Xl(x, 15, W.seriesCount ?? 1, W.pattern, W.labels)
            ), D = {
              timestamps: N[0].timestamps,
              series: N.flatMap((W) => W.series)
            };
            $.type === "timeseries" ? l.value = D : s.value = D;
            return;
          }
          if ($.type === "histogram") {
            const N = P.map(
              (D) => Xl(x, 15, D.seriesCount ?? 1, D.pattern, D.labels)
            );
            f.value = {
              seriesValues: N.flatMap((D) => D.series.map((W) => W.values)),
              seriesLabels: N.flatMap((D) => D.series.map((W) => W.label))
            };
            return;
          }
          const z = await Promise.all(
            P.map(async (N) => Xl(x, 15, 1, N.pattern, N.labels).series[0] ?? { label: N.metric || "series", values: [] })
          );
          if ($.type === "stat" || $.type === "gauge")
            u.value = {
              value: z[0]?.values[z[0].values.length - 1] ?? 0,
              values: z.map((N) => N.values[N.values.length - 1] ?? 0),
              series: z.map((N) => ({
                label: N.label,
                values: N.values,
                displayValue: fu(N.values, $.statReducer ?? "lastNotNull"),
                percentChange: $.showPercentChange ? xc(N.values) : void 0
              })),
              unit: $.unit ?? $.statUnit ?? "",
              trend: $.statTrend ?? "flat",
              percentChange: $.showPercentChange ? xc(z[0]?.values ?? []) : void 0
            };
          else if ($.type === "pie")
            d.value = z.map((N, D) => ({
              label: N.label,
              value: fu(N.values, $.statReducer ?? "lastNotNull"),
              color: b[D % b.length],
              rawValues: N.values
            }));
          else if ($.type === "table") {
            const N = Xl(x, 15, E.seriesCount ?? 1, E.pattern, E.labels);
            c.value = {
              columns: [
                { key: "time", title: "Time", dataIndex: "time" },
                ...N.series.map((D) => ({ key: D.label, title: D.label, dataIndex: D.label }))
              ],
              dataSource: N.timestamps.map((D, W) => {
                const H = { time: new Date(D * 1e3).toLocaleString(), key: W };
                return N.series.forEach((L) => {
                  H[L.label] = L.values[W];
                }), H;
              })
            };
          }
        } catch (P) {
          a.value = P?.message ?? String(P);
        } finally {
          r.value = !1;
        }
      }
    }
    Ie(m, ($) => {
      if (!$)
        return;
      const P = i.value;
      P && (P.type === "timeseries" ? l.value = {
        timestamps: $.timestamps,
        series: $.seriesValues.map((k, x) => ({
          label: `series-${x}`,
          values: k
        }))
      } : P.type === "stat" || P.type === "gauge" ? u.value = {
        value: $.seriesValues[0]?.[$.seriesValues[0].length - 1] ?? 0,
        values: $.seriesValues.map((k) => k[k.length - 1] ?? 0),
        series: $.seriesValues.map((k, x) => ({
          label: `series-${x}`,
          values: k,
          displayValue: fu(k, P.statReducer ?? "lastNotNull"),
          percentChange: P.showPercentChange ? xc(k) : void 0
        })),
        unit: P.statUnit ?? "",
        trend: P.statTrend ?? "flat",
        percentChange: P.showPercentChange ? xc($.seriesValues[0] ?? []) : void 0
      } : P.type === "pie" ? d.value = $.seriesValues.map((k, x) => ({
        label: `series-${x}`,
        value: fu(k, P.statReducer ?? "lastNotNull"),
        color: b[x % b.length],
        rawValues: k
      })) : P.type === "histogram" && (f.value = {
        seriesValues: $.seriesValues,
        seriesLabels: $.seriesValues.map((k, x) => `series-${x}`)
      }));
    }, { deep: !0 }), Ie(() => n.panelRefreshKeys[t.panelId], C, { immediate: !0 }), Ie(() => n.timeRange, C, { deep: !0 });
    const O = ye({
      name: "NoDataPlaceholder",
      setup() {
        const { t: $ } = jt();
        return () => ro("div", { class: "flex flex-col items-center justify-center h-full gap-1.5 text-gray-400 select-none" }, [
          ro("span", { class: [ot.databaseOff, "text-7", "opacity-50"] }),
          ro("span", { class: "text-xs" }, $("panel.noData"))
        ]);
      }
    });
    return ($, P) => {
      const k = Vt("a-table");
      return i.value ? r.value && !m.value ? (ee(), ve("div", qG, [
        v(M(Do))
      ])) : a.value ? (ee(), ve("div", GG, te(a.value), 1)) : (ee(), ve("div", KG, [
        r.value && m.value ? (ee(), ve("div", YG, [
          v(M(Do))
        ])) : He("", !0),
        i.value.type === "timeseries" ? (ee(), ve(Ve, { key: 1 }, [
          l.value && l.value.series.length > 0 ? (ee(), ve("div", UG, [
            v(eb, {
              data: l.value,
              unit: i.value.unit,
              decimals: i.value.decimals,
              "color-scheme": i.value.colorScheme,
              "color-single-value": i.value.colorSingleValue,
              "color-distribution": i.value.colorDistribution,
              thresholds: i.value.thresholds,
              "threshold-base-color": i.value.thresholdBaseColor,
              "fill-opacity": i.value.fillOpacity,
              "line-width": i.value.lineWidth,
              "line-interpolation": i.value.lineInterpolation,
              "line-style": i.value.lineStyle,
              "draw-style": i.value.drawStyle,
              "gradient-mode": i.value.gradientMode,
              "span-nulls": i.value.spanNulls,
              "show-points": i.value.showPoints,
              "show-points-mode": i.value.showPointsMode,
              "stacking-mode": i.value.stackingMode,
              "legend-position": i.value.legendPosition,
              "legend-mode": i.value.legendMode,
              "legend-values": i.value.legendValues,
              "panel-id": i.value.id,
              "tooltip-mode": i.value.tooltipMode,
              "tooltip-sort": i.value.tooltipSort,
              "tooltip-max-height": i.value.tooltipMaxHeight,
              "show-axis-pointer": i.value.showAxisPointer,
              "soft-min": i.value.softMin,
              "soft-max": i.value.softMax,
              "axis-placement": i.value.axisPlacement,
              "axis-name": i.value.axisName,
              "axis-width": i.value.axisWidth,
              "show-grid-lines": i.value.showGridLines,
              "grid-color": i.value.gridColor,
              "axis-label": i.value.axisLabel,
              "axis-label-color": i.value.axisLabelColor,
              "axis-tick": i.value.axisTick,
              "axis-tick-color": i.value.axisTickColor,
              "axis-border": i.value.axisBorder,
              "axis-border-color": i.value.axisBorderColor,
              "scale-distribution": i.value.scaleDistribution,
              "centered-zero": i.value.centeredZero
            }, null, 8, ["data", "unit", "decimals", "color-scheme", "color-single-value", "color-distribution", "thresholds", "threshold-base-color", "fill-opacity", "line-width", "line-interpolation", "line-style", "draw-style", "gradient-mode", "span-nulls", "show-points", "show-points-mode", "stacking-mode", "legend-position", "legend-mode", "legend-values", "panel-id", "tooltip-mode", "tooltip-sort", "tooltip-max-height", "show-axis-pointer", "soft-min", "soft-max", "axis-placement", "axis-name", "axis-width", "show-grid-lines", "grid-color", "axis-label", "axis-label-color", "axis-tick", "axis-tick-color", "axis-border", "axis-border-color", "scale-distribution", "centered-zero"])
          ])) : (ee(), Ze(M(O), { key: 1 }))
        ], 64)) : i.value.type === "bar" ? (ee(), ve(Ve, { key: 2 }, [
          s.value && s.value.series.length > 0 ? (ee(), Ze(TG, {
            key: 0,
            data: s.value,
            stacked: i.value.stacked,
            "bar-width": i.value.barWidth,
            "bar-group-width": i.value.barGroupWidth,
            "show-values": i.value.barShowValues,
            unit: i.value.unit,
            decimals: i.value.decimals,
            "color-scheme": i.value.colorScheme,
            "color-single-value": i.value.colorSingleValue,
            "color-distribution": i.value.colorDistribution,
            "legend-position": i.value.legendPosition,
            "legend-mode": i.value.legendMode,
            "legend-values": i.value.legendValues,
            "tooltip-mode": i.value.tooltipMode,
            "tooltip-sort": i.value.tooltipSort
          }, null, 8, ["data", "stacked", "bar-width", "bar-group-width", "show-values", "unit", "decimals", "color-scheme", "color-single-value", "color-distribution", "legend-position", "legend-mode", "legend-values", "tooltip-mode", "tooltip-sort"])) : (ee(), Ze(M(O), { key: 1 }))
        ], 64)) : i.value.type === "stat" ? (ee(), ve(Ve, { key: 3 }, [
          u.value ? (ee(), Ze(jG, {
            key: 0,
            title: i.value.title,
            unit: u.value.unit,
            series: u.value.series,
            trend: u.value.trend,
            thresholds: i.value.thresholds,
            "threshold-base-color": i.value.thresholdBaseColor,
            orientation: i.value.statOrientation,
            "text-mode": i.value.statTextMode,
            "color-mode": i.value.statColorMode
          }, null, 8, ["title", "unit", "series", "trend", "thresholds", "threshold-base-color", "orientation", "text-mode", "color-mode"])) : (ee(), Ze(M(O), { key: 1 }))
        ], 64)) : i.value.type === "gauge" ? (ee(), ve(Ve, { key: 4 }, [
          u.value ? (ee(), Ze(EG, {
            key: 0,
            series: u.value.series.map((x, E) => ({
              label: x.label,
              value: x.displayValue ?? x.values[x.values.length - 1] ?? 0,
              activeColorOverride: b[E % b.length]
            })),
            title: i.value.title,
            min: i.value.min ?? 0,
            max: i.value.max ?? 100,
            unit: i.value.unit,
            thresholds: i.value.thresholds,
            "threshold-base-color": i.value.thresholdBaseColor,
            "cap-round": i.value.gaugeCapRound,
            "track-width": i.value.gaugeTrackWidth,
            "fill-width": i.value.gaugeFillWidth,
            "track-color": i.value.gaugeTrackColor,
            "sweep-angle": i.value.sweepAngle,
            "value-color": i.value.gaugeValueColor,
            "value-size": i.value.gaugeValueSize,
            "value-visible": i.value.gaugeValueVisible,
            "padding-x": i.value.gaugePaddingX,
            "padding-y": i.value.gaugePaddingY,
            "threshold-display": i.value.gaugeThresholdDisplay,
            "threshold-label-display": i.value.gaugeThresholdLabelDisplay,
            "value-offset-y": i.value.gaugeValueOffsetY,
            orientation: i.value.gaugeOrientation
          }, null, 8, ["series", "title", "min", "max", "unit", "thresholds", "threshold-base-color", "cap-round", "track-width", "fill-width", "track-color", "sweep-angle", "value-color", "value-size", "value-visible", "padding-x", "padding-y", "threshold-display", "threshold-label-display", "value-offset-y", "orientation"])) : (ee(), Ze(M(O), { key: 1 }))
        ], 64)) : i.value.type === "table" ? (ee(), ve(Ve, { key: 5 }, [
          c.value ? (ee(), ve("div", XG, [
            v(k, {
              columns: c.value.columns,
              "data-source": c.value.dataSource,
              pagination: { pageSize: i.value.tablePageSize ?? 20 },
              size: "small",
              scroll: { y: "100%" },
              "show-header": i.value.tableShowHeader !== !1
            }, null, 8, ["columns", "data-source", "pagination", "show-header"])
          ])) : (ee(), Ze(M(O), { key: 1 }))
        ], 64)) : i.value.type === "pie" ? (ee(), ve(Ve, { key: 6 }, [
          d.value && d.value.length > 0 ? (ee(), Ze(VG, {
            key: 0,
            slices: d.value,
            "pie-type": i.value.pieType,
            "pie-labels": i.value.pieLabels,
            unit: i.value.unit,
            decimals: i.value.decimals,
            "legend-position": i.value.legendPosition,
            "legend-mode": i.value.legendMode,
            "legend-values": i.value.legendValues,
            "tooltip-mode": i.value.tooltipMode,
            "tooltip-sort": i.value.tooltipSort
          }, null, 8, ["slices", "pie-type", "pie-labels", "unit", "decimals", "legend-position", "legend-mode", "legend-values", "tooltip-mode", "tooltip-sort"])) : (ee(), Ze(M(O), { key: 1 }))
        ], 64)) : i.value.type === "histogram" ? (ee(), ve(Ve, { key: 7 }, [
          f.value && f.value.seriesValues.length > 0 ? (ee(), Ze(_G, {
            key: 0,
            "series-values": f.value.seriesValues,
            "series-labels": f.value.seriesLabels,
            "bucket-size": i.value.histBucketSize,
            "bucket-count": i.value.histBucketCount,
            "bucket-offset": i.value.histBucketOffset,
            "combine-series": i.value.histCombineSeries,
            "line-width": i.value.lineWidth,
            "fill-opacity": i.value.fillOpacity,
            unit: i.value.unit
          }, null, 8, ["series-values", "series-labels", "bucket-size", "bucket-count", "bucket-offset", "combine-series", "line-width", "fill-opacity", "unit"])) : (ee(), Ze(M(O), { key: 1 }))
        ], 64)) : He("", !0)
      ])) : (ee(), ve("div", WG, te(M(o)("panel.noData")), 1));
    };
  }
}), QG = { class: "w-full h-full flex flex-col" }, ZG = { class: "flex-1 min-h-0" }, JG = {
  key: 1,
  class: "flex-center h-full text-secondary text-sm"
}, eK = /* @__PURE__ */ ye({
  __name: "ChartPreview",
  setup(e) {
    const { panel: t } = qs(), n = R(() => {
      const o = t.value;
      return [
        o.type,
        JSON.stringify(o.queries),
        o.colorScheme,
        o.statReducer,
        o.unit,
        o.decimals,
        o.lineWidth,
        o.fillOpacity,
        o.stacked,
        o.thresholds?.length,
        o.sweepAngle
      ].join("|");
    });
    return (o, i) => (ee(), ve("div", QG, [
      B("div", ZG, [
        M(t).id ? (ee(), Ze(qh, {
          key: n.value,
          "panel-id": M(t).id,
          "panel-config": M(t)
        }, null, 8, ["panel-id", "panel-config"])) : (ee(), ve("div", JG, " No preview available "))
      ])
    ]));
  }
}), tK = { class: "w-full h-full flex flex-col" }, nK = { class: "flex-1 min-h-0" }, oK = /* @__PURE__ */ ye({
  __name: "PanelChrome",
  setup(e) {
    const t = qr(), { panel: n } = qs(), o = R(() => t.isDark), i = R(() => o.value ? "#303030" : "#e8e8e8"), r = R(() => o.value ? "#d9d9d9" : "#141414"), a = R(() => o.value ? "#666" : "#bbb");
    return (l, s) => (ee(), ve("div", tK, [
      B("div", {
        class: "flex items-center px-2.5 py-1.5 flex-shrink-0 gap-1.5 h-32px",
        style: xt({ borderBottom: `1px solid ${i.value}` })
      }, [
        B("span", {
          class: "text-xs font-medium truncate",
          style: xt({ color: r.value })
        }, te(M(n).title || "—"), 5),
        M(n).description ? (ee(), Ze(M(xo), {
          key: 0,
          title: M(n).description,
          placement: "bottom"
        }, {
          default: ce(() => [
            B("span", {
              class: ct([M(ot).info, "text-xs"]),
              style: xt({ color: a.value })
            }, null, 6)
          ]),
          _: 1
        }, 8, ["title"])) : He("", !0),
        v(sO, {
          links: M(n).links ?? [],
          "icon-color": a.value
        }, null, 8, ["links", "icon-color"])
      ], 4),
      B("div", nK, [
        v(eK)
      ])
    ]));
  }
}), dO = /* @__PURE__ */ ye({
  __name: "TimeRangePicker",
  setup(e) {
    const { RangePicker: t } = zL, n = wr(), o = [
      { label: "最近 5 分钟", minutes: 5 },
      { label: "最近 15 分钟", minutes: 15 },
      { label: "最近 30 分钟", minutes: 30 },
      { label: "最近 1 小时", minutes: 60 },
      { label: "最近 3 小时", minutes: 180 },
      { label: "最近 6 小时", minutes: 360 },
      { label: "最近 12 小时", minutes: 720 },
      { label: "最近 24 小时", minutes: 1440 },
      { label: "最近 7 天", minutes: 10080 },
      { label: "最近 30 天", minutes: 43200 },
      { label: "最近 90 天", minutes: 129600 }
    ], i = [
      { label: "关闭", value: 0 },
      { label: "5 秒", value: 5 },
      { label: "10 秒", value: 10 },
      { label: "30 秒", value: 30 },
      { label: "1 分钟", value: 60 },
      { label: "5 分钟", value: 300 }
    ], r = le(!1), a = Math.round((n.timeRange.to - n.timeRange.from) / 6e4), l = o.find((c) => c.minutes === a);
    function s(c) {
      const d = Date.now();
      n.setTimeRange({ from: d - c * 60 * 1e3, to: d }), r.value = !1;
    }
    function u() {
      const c = Date.now(), d = n.timeRange.to - n.timeRange.from;
      n.setTimeRange({ from: c - d, to: c });
    }
    return (c, d) => (ee(), Ze(M(vr), null, {
      default: ce(() => [
        v(M(vr).Compact, null, {
          default: ce(() => [
            r.value ? (ee(), Ze(M(t), {
              key: 1,
              "show-time": "",
              "allow-clear": !1,
              style: { width: "320px" },
              value: [M(Xn)(M(n).timeRange.from), M(Xn)(M(n).timeRange.to)],
              onChange: d[1] || (d[1] = (f) => {
                f?.[0] && f?.[1] && M(n).setTimeRange({ from: f[0].valueOf(), to: f[1].valueOf() });
              })
            }, null, 8, ["value"])) : (ee(), Ze(M(bt), {
              key: 0,
              value: M(l)?.minutes,
              options: o.map((f) => ({ value: f.minutes, label: f.label })),
              "popup-match-select-width": "false",
              placeholder: "快速选择",
              onChange: d[0] || (d[0] = (f) => s(f))
            }, null, 8, ["value", "options"])),
            v(M($t), {
              onClick: d[2] || (d[2] = (f) => r.value = !r.value)
            }, {
              default: ce(() => [
                Ee(te(r.value ? "收起" : "自定义"), 1)
              ]),
              _: 1
            })
          ]),
          _: 1
        }),
        v(M(vr).Compact, null, {
          default: ce(() => [
            v(M($t), { onClick: u }, {
              default: ce(() => [
                B("span", {
                  class: ct([M(ot).refresh, "mr-1"])
                }, null, 2),
                d[4] || (d[4] = Ee(" 刷新 ", -1))
              ]),
              _: 1
            }),
            v(M(bt), {
              value: M(n).autoRefresh,
              options: i,
              "popup-match-select-width": "false",
              onChange: d[3] || (d[3] = (f) => M(n).setAutoRefresh(f))
            }, null, 8, ["value"])
          ]),
          _: 1
        })
      ]),
      _: 1
    }));
  }
}), iK = { class: "font-semibold mb-3" }, rK = /* @__PURE__ */ ye({
  __name: "ConstantOptionsSection",
  props: {
    config: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t, { t: o } = jt();
    return (i, r) => {
      const a = Vt("a-form-item");
      return ee(), ve("div", null, [
        B("div", iK, te(M(o)("variable.constant.title")), 1),
        v(a, {
          label: M(o)("variable.constant.value"),
          required: ""
        }, {
          default: ce(() => [
            v(M(ft), {
              size: "small",
              value: e.config.constantValue,
              onChange: r[0] || (r[0] = (l) => n("change", { constantValue: l.target.value }))
            }, null, 8, ["value"])
          ]),
          _: 1
        }, 8, ["label"]),
        v(M(ai), {
          checked: e.config.hide,
          onChange: r[1] || (r[1] = (l) => n("change", { hide: l.target.checked }))
        }, {
          default: ce(() => [
            Ee(te(M(o)("variable.constant.hide")), 1)
          ]),
          _: 1
        }, 8, ["checked"])
      ]);
    };
  }
}), aK = { class: "font-semibold mb-3" }, lK = { class: "mt-3" }, sK = { class: "mt-2" }, uK = /* @__PURE__ */ ye({
  __name: "CustomOptionsSection",
  props: {
    config: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, { t: i } = jt();
    function r() {
      const a = [...n.config.customOptions ?? []];
      o("change", { customOptions: a });
    }
    return (a, l) => {
      const s = Vt("a-form-item");
      return ee(), ve("div", null, [
        B("div", aK, te(M(i)("variable.custom.title")), 1),
        (ee(!0), ve(Ve, null, It(e.config.customOptions ?? [], (u, c) => (ee(), ve("div", {
          key: c,
          class: "flex gap-2 mb-2"
        }, [
          v(M(ft), {
            size: "small",
            value: u.text,
            placeholder: "Text",
            onChange: (d) => {
              const f = [...e.config.customOptions ?? []];
              f[c] = { ...f[c], text: d.target.value }, o("change", { customOptions: f });
            }
          }, null, 8, ["value", "onChange"]),
          v(M(ft), {
            size: "small",
            value: u.value,
            placeholder: "Value",
            onChange: (d) => {
              const f = [...e.config.customOptions ?? []];
              f[c] = { ...f[c], value: d.target.value }, o("change", { customOptions: f });
            }
          }, null, 8, ["value", "onChange"]),
          v(M($t), {
            type: "text",
            danger: "",
            size: "small",
            onClick: (d) => o("change", { customOptions: (e.config.customOptions ?? []).filter((f, p) => p !== c) })
          }, {
            default: ce(() => [
              B("span", {
                class: ct(M(ot).delete)
              }, null, 2)
            ]),
            _: 1
          }, 8, ["onClick"])
        ]))), 128)),
        v(M($t), {
          type: "dashed",
          size: "small",
          block: "",
          onClick: r
        }, {
          default: ce(() => [
            B("span", {
              class: ct([M(ot).plus, "mr-1"])
            }, null, 2),
            Ee(" " + te(M(i)("variable.custom.add")), 1)
          ]),
          _: 1
        }),
        B("div", lK, [
          v(s, {
            label: M(i)("variable.custom.allValue")
          }, {
            default: ce(() => [
              v(M(ft), {
                size: "small",
                value: e.config.allValue,
                placeholder: "$_all",
                onChange: l[0] || (l[0] = (u) => o("change", { allValue: u.target.value }))
              }, null, 8, ["value"])
            ]),
            _: 1
          }, 8, ["label"])
        ]),
        B("div", sK, [
          v(M(ai), {
            checked: e.config.multi,
            onChange: l[1] || (l[1] = (u) => o("change", { multi: u.target.checked }))
          }, {
            default: ce(() => [
              Ee(te(M(i)("variable.query.multi")), 1)
            ]),
            _: 1
          }, 8, ["checked"])
        ]),
        B("div", null, [
          v(M(ai), {
            checked: e.config.includeAll,
            onChange: l[2] || (l[2] = (u) => o("change", { includeAll: u.target.checked }))
          }, {
            default: ce(() => [
              Ee(te(M(i)("variable.query.includeAll")), 1)
            ]),
            _: 1
          }, 8, ["checked"])
        ])
      ]);
    };
  }
}), cK = { class: "font-semibold mb-3" }, dK = /* @__PURE__ */ ye({
  __name: "DataSourceOptionsSection",
  props: {
    config: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t, { t: o } = jt(), i = [
      { label: "Zabbix", value: "zabbix" },
      { label: "Prometheus", value: "prometheus" },
      { label: "MySQL", value: "mysql" }
    ];
    return (r, a) => {
      const l = Vt("a-form-item");
      return ee(), ve("div", null, [
        B("div", cK, te(M(o)("variable.ds.title")), 1),
        v(l, {
          label: M(o)("variable.ds.type")
        }, {
          default: ce(() => [
            v(M(bt), {
              value: e.config.dsType,
              options: i,
              placeholder: M(o)("variable.ds.type.placeholder"),
              onChange: a[0] || (a[0] = (s) => n("change", { dsType: s }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"]),
        v(l, {
          label: M(o)("variable.ds.filterRegex")
        }, {
          default: ce(() => [
            v(M(ft), {
              value: e.config.instanceFilterRegex ?? "",
              placeholder: "/regex/",
              onChange: a[1] || (a[1] = (s) => n("change", { instanceFilterRegex: s.target.value }))
            }, null, 8, ["value"])
          ]),
          _: 1
        }, 8, ["label"]),
        v(l, null, {
          default: ce(() => [
            v(M(ai), {
              checked: e.config.multi,
              onChange: a[2] || (a[2] = (s) => n("change", { multi: s.target.checked }))
            }, {
              default: ce(() => [
                Ee(te(M(o)("variable.ds.multi")), 1)
              ]),
              _: 1
            }, 8, ["checked"])
          ]),
          _: 1
        }),
        v(l, null, {
          default: ce(() => [
            v(M(ai), {
              checked: e.config.includeAll,
              onChange: a[3] || (a[3] = (s) => n("change", { includeAll: s.target.checked }))
            }, {
              default: ce(() => [
                Ee(te(M(o)("variable.ds.includeAll")), 1)
              ]),
              _: 1
            }, 8, ["checked"])
          ]),
          _: 1
        })
      ]);
    };
  }
}), fK = { class: "font-semibold mb-3" }, pK = { class: "grid grid-cols-2 gap-x-4" }, gK = /* @__PURE__ */ ye({
  __name: "GeneralSection",
  props: {
    config: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t, { t: o } = jt(), i = [
      { label: o("variable.type.custom"), value: "custom" },
      { label: o("variable.type.query"), value: "query" },
      { label: o("variable.type.textbox"), value: "textbox" },
      { label: o("variable.type.constant"), value: "constant" }
    ], r = [
      { label: o("variable.general.showOn.labelAndValue"), value: "label-and-value" },
      { label: o("variable.general.showOn.value"), value: "value" },
      { label: o("variable.general.showOn.nothing"), value: "nothing" }
    ];
    function a(l) {
      n("change", {
        type: l,
        queryType: void 0,
        extractRegex: void 0,
        sortMode: void 0,
        customOptions: void 0,
        allValue: void 0,
        constantValue: void 0
      });
    }
    return (l, s) => {
      const u = Vt("a-form-item");
      return ee(), ve("div", null, [
        B("div", fK, te(M(o)("variable.general.title")), 1),
        B("div", pK, [
          v(u, {
            label: M(o)("variable.general.type"),
            required: ""
          }, {
            default: ce(() => [
              v(M(bt), {
                value: e.config.type,
                options: i,
                style: { width: "100%" },
                onChange: a
              }, null, 8, ["value"])
            ]),
            _: 1
          }, 8, ["label"]),
          v(u, {
            label: M(o)("variable.general.name"),
            required: ""
          }, {
            default: ce(() => [
              v(M(ft), {
                value: e.config.name,
                placeholder: "variable_name",
                onChange: s[0] || (s[0] = (c) => n("change", { name: c.target.value }))
              }, null, 8, ["value"])
            ]),
            _: 1
          }, 8, ["label"]),
          v(u, {
            label: M(o)("variable.general.label")
          }, {
            default: ce(() => [
              v(M(ft), {
                value: e.config.label,
                placeholder: M(o)("variable.general.label.placeholder"),
                onChange: s[1] || (s[1] = (c) => n("change", { label: c.target.value }))
              }, null, 8, ["value", "placeholder"])
            ]),
            _: 1
          }, 8, ["label"]),
          v(u, {
            label: M(o)("variable.general.showOn")
          }, {
            default: ce(() => [
              v(M(bt), {
                value: e.config.showOnDashboard ?? "label-and-value",
                options: r,
                style: { width: "100%" },
                onChange: s[2] || (s[2] = (c) => n("change", { showOnDashboard: c }))
              }, null, 8, ["value"])
            ]),
            _: 1
          }, 8, ["label"])
        ]),
        v(u, {
          label: M(o)("variable.general.description")
        }, {
          default: ce(() => [
            v(M(ft), {
              value: e.config.description ?? "",
              placeholder: M(o)("variable.general.description.placeholder"),
              onChange: s[3] || (s[3] = (c) => n("change", { description: c.target.value }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"])
      ]);
    };
  }
}), hK = { class: "font-semibold mb-3" }, vK = { class: "grid grid-cols-2 gap-x-4" }, mK = { class: "mb-2" }, bK = { class: "mb-2" }, yK = {
  class: "p-2 text-xs text-secondary rounded",
  style: { background: "var(--ant-color-fill-tertiary)", border: "1px solid var(--ant-color-border-secondary)", "min-height": "32px" }
}, xK = /* @__PURE__ */ ye({
  __name: "QueryOptionsSection",
  props: {
    config: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t, { t: o } = jt(), i = [
      { label: o("variable.query.queryType.group"), value: "group" },
      { label: o("variable.query.queryType.host"), value: "host" },
      { label: o("variable.query.queryType.item"), value: "item" },
      { label: o("variable.query.queryType.labelValues"), value: "label_values" }
    ], r = [
      { label: o("variable.query.sort.disabled"), value: "disabled" },
      { label: o("variable.query.sort.alphabetical"), value: "alphabetical" },
      { label: o("variable.query.sort.numeric"), value: "numeric" }
    ], a = [
      { label: o("variable.query.refresh.onLoad"), value: "onLoad" },
      { label: o("variable.query.refresh.onTimeChange"), value: "onTimeChange" }
    ];
    return (l, s) => {
      const u = Vt("a-form-item");
      return ee(), ve("div", null, [
        B("div", hK, te(M(o)("variable.query.title")), 1),
        v(u, {
          label: M(o)("variable.query.dsUid")
        }, {
          default: ce(() => [
            v(M(ft), {
              size: "small",
              value: e.config.targetDsUid ?? "",
              placeholder: M(o)("variable.query.dsUid.placeholder"),
              onChange: s[0] || (s[0] = (c) => n("change", { targetDsUid: c.target.value }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"]),
        v(u, {
          label: M(o)("variable.query.queryType")
        }, {
          default: ce(() => [
            v(M(bt), {
              size: "small",
              value: e.config.queryType,
              options: i,
              style: { width: "100%" },
              placeholder: M(o)("variable.query.queryType.placeholder"),
              onChange: s[1] || (s[1] = (c) => n("change", { queryType: c }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"]),
        v(u, {
          label: M(o)("variable.query.query")
        }, {
          default: ce(() => [
            v(M(ft), {
              size: "small",
              value: e.config.query ?? "",
              placeholder: M(o)("variable.query.query.placeholder"),
              onChange: s[2] || (s[2] = (c) => n("change", { query: c.target.value }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"]),
        v(u, {
          label: M(o)("variable.query.regex")
        }, {
          default: ce(() => [
            v(M(ft), {
              size: "small",
              value: e.config.extractRegex ?? "",
              placeholder: M(o)("variable.query.regex.placeholder"),
              onChange: s[3] || (s[3] = (c) => n("change", { extractRegex: c.target.value }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"]),
        B("div", vK, [
          v(u, {
            label: M(o)("variable.query.sort")
          }, {
            default: ce(() => [
              v(M(bt), {
                size: "small",
                value: e.config.sortMode ?? "disabled",
                options: r,
                style: { width: "100%" },
                onChange: s[4] || (s[4] = (c) => n("change", { sortMode: c }))
              }, null, 8, ["value"])
            ]),
            _: 1
          }, 8, ["label"]),
          v(u, {
            label: M(o)("variable.query.refresh")
          }, {
            default: ce(() => [
              v(M(bt), {
                size: "small",
                value: e.config.refresh,
                options: a,
                style: { width: "100%" },
                onChange: s[5] || (s[5] = (c) => n("change", { refresh: c }))
              }, null, 8, ["value"])
            ]),
            _: 1
          }, 8, ["label"])
        ]),
        B("div", mK, [
          v(M(ai), {
            checked: e.config.multi,
            onChange: s[6] || (s[6] = (c) => n("change", { multi: c.target.checked }))
          }, {
            default: ce(() => [
              Ee(te(M(o)("variable.query.multi")), 1)
            ]),
            _: 1
          }, 8, ["checked"])
        ]),
        B("div", bK, [
          v(M(ai), {
            checked: e.config.includeAll,
            onChange: s[7] || (s[7] = (c) => n("change", { includeAll: c.target.checked }))
          }, {
            default: ce(() => [
              Ee(te(M(o)("variable.query.includeAll")), 1)
            ]),
            _: 1
          }, 8, ["checked"])
        ]),
        v(u, {
          label: M(o)("variable.query.preview")
        }, {
          default: ce(() => [
            B("div", yK, te(M(o)("variable.query.preview.placeholder")), 1)
          ]),
          _: 1
        }, 8, ["label"])
      ]);
    };
  }
}), wK = { class: "font-semibold mb-3" }, SK = /* @__PURE__ */ ye({
  __name: "TextBoxOptionsSection",
  props: {
    config: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t, { t: o } = jt();
    return (i, r) => {
      const a = Vt("a-form-item");
      return ee(), ve("div", null, [
        B("div", wK, te(M(o)("variable.textbox.title")), 1),
        v(a, {
          label: M(o)("variable.textbox.defaultValue")
        }, {
          default: ce(() => [
            v(M(ft), {
              size: "small",
              value: e.config.defaultValue,
              onChange: r[0] || (r[0] = (l) => n("change", { defaultValue: l.target.value }))
            }, null, 8, ["value"])
          ]),
          _: 1
        }, 8, ["label"])
      ]);
    };
  }
}), CK = /* @__PURE__ */ ye({
  __name: "VariableForm",
  props: {
    draft: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t;
    jt();
    function o(i) {
      n("change", i);
    }
    return (i, r) => (ee(), Ze(M(ba), {
      layout: "vertical",
      class: "px-5 py-4 overflow-y-auto flex-1"
    }, {
      default: ce(() => [
        v(gK, {
          config: e.draft.config,
          onChange: o
        }, null, 8, ["config"]),
        r[0] || (r[0] = B("div", {
          class: "my-4",
          style: { "border-top": "1px solid var(--ant-color-border-secondary)" }
        }, null, -1)),
        e.draft.config.type === "query" ? (ee(), Ze(xK, {
          key: 0,
          config: e.draft.config,
          onChange: o
        }, null, 8, ["config"])) : He("", !0),
        e.draft.config.type === "datasource" ? (ee(), Ze(dK, {
          key: 1,
          config: e.draft.config,
          onChange: o
        }, null, 8, ["config"])) : He("", !0),
        e.draft.config.type === "custom" ? (ee(), Ze(uK, {
          key: 2,
          config: e.draft.config,
          onChange: o
        }, null, 8, ["config"])) : He("", !0),
        e.draft.config.type === "textbox" ? (ee(), Ze(SK, {
          key: 3,
          config: e.draft.config,
          onChange: o
        }, null, 8, ["config"])) : He("", !0),
        e.draft.config.type === "constant" ? (ee(), Ze(rK, {
          key: 4,
          config: e.draft.config,
          onChange: o
        }, null, 8, ["config"])) : He("", !0)
      ]),
      _: 1
    }));
  }
}), $K = {
  class: "w-45 flex flex-col h-full",
  style: { "border-right": "1px solid var(--ant-color-border-secondary)" }
}, PK = {
  class: "px-3 py-2 text-xs text-secondary",
  style: { "border-bottom": "1px solid var(--ant-color-border-secondary)" }
}, OK = { class: "flex-1 overflow-y-auto" }, IK = ["onClick"], MK = { key: 0 }, TK = {
  key: 1,
  class: "text-secondary"
}, kK = {
  class: "p-2",
  style: { "border-top": "1px solid var(--ant-color-border-secondary)" }
}, EK = /* @__PURE__ */ ye({
  __name: "VariableNavList",
  props: {
    drafts: {},
    selectedId: {}
  },
  emits: ["select", "add"],
  setup(e, { emit: t }) {
    const n = t, { t: o } = jt();
    return (i, r) => (ee(), ve("div", $K, [
      B("div", PK, te(M(o)("variable.nav.count", { n: e.drafts.length })), 1),
      B("div", OK, [
        (ee(!0), ve(Ve, null, It(e.drafts, (a) => (ee(), ve("div", {
          key: a.id,
          class: ct(["px-3 py-2 cursor-pointer text-sm transition-colors", a.id === e.selectedId ? "bg-blue-50 dark:bg-blue-900/30 border-l-3 border-primary" : "border-l-3 border-transparent"]),
          onClick: (l) => n("select", a.id)
        }, [
          a.config.name ? (ee(), ve("span", MK, te(a.config.name), 1)) : (ee(), ve("span", TK, te(M(o)("variable.nav.unnamed")), 1))
        ], 10, IK))), 128))
      ]),
      B("div", kK, [
        v(M($t), {
          type: "dashed",
          block: "",
          onClick: r[0] || (r[0] = (a) => n("add"))
        }, {
          default: ce(() => [
            B("span", {
              class: ct([M(ot).plus, "mr-1"])
            }, null, 2),
            Ee(" " + te(M(o)("variable.modal.add")), 1)
          ]),
          _: 1
        })
      ])
    ]));
  }
}), _K = { class: "flex flex-1 overflow-hidden" }, AK = { class: "flex-1 overflow-hidden flex flex-col" }, DK = {
  key: 1,
  class: "flex-1 flex-center text-secondary text-sm"
}, zK = {
  class: "flex items-center justify-between px-4 py-3",
  style: { "border-top": "1px solid var(--ant-color-border-secondary)" }
}, RK = { class: "flex gap-2" }, NK = /* @__PURE__ */ ye({
  __name: "VariableConfigModal",
  props: {
    open: { type: Boolean }
  },
  emits: ["close"],
  setup(e, { emit: t }) {
    const n = e, o = t, i = xs(), { t: r } = jt(), a = le([]), l = le(""), s = () => `new-${Date.now()}-${Math.random().toString(36).slice(2, 6)}`;
    function u(b) {
      return {
        id: "",
        name: b,
        label: "",
        type: "custom",
        hide: !1,
        refresh: "onLoad",
        multi: !1,
        includeAll: !1,
        showOnDashboard: "label-and-value"
      };
    }
    Ie(
      () => n.open,
      (b) => {
        if (b) {
          const y = Object.values(i.variables).map((S) => ({
            id: S.config.id,
            isNew: !1,
            config: JSON.parse(JSON.stringify(S.config))
          }));
          a.value = y, l.value = y[0]?.id ?? "";
        }
      }
    );
    const c = R(
      () => a.value.find((b) => b.id === l.value) ?? null
    );
    function d() {
      const y = `variable_${a.value.length + 1}`, S = s(), C = {
        id: S,
        isNew: !0,
        config: u(y)
      };
      a.value = [...a.value, C], l.value = S;
    }
    function f() {
      if (!c.value)
        return;
      const b = a.value.findIndex((y) => y.id === l.value);
      a.value = a.value.filter((y) => y.id !== l.value), a.value.length > 0 ? l.value = a.value[Math.min(b, a.value.length - 1)].id : l.value = "";
    }
    function p(b) {
      c.value && (a.value = a.value.map(
        (y) => y.id === l.value ? { ...y, config: { ...y.config, ...b } } : y
      ));
    }
    function m() {
      const b = i.variables, y = new Set(a.value.map((C) => C.id)), S = new Set(Object.keys(b));
      for (const C of S)
        y.has(C) || i.removeVariable(C);
      for (const C of a.value) {
        const O = C.config;
        C.isNew || !S.has(C.id) ? i.addVariable(O) : i.updateVariable(C.id, O);
      }
      o("close");
    }
    return (b, y) => (ee(), Ze(M(po), {
      open: e.open,
      title: M(r)("variable.modal.title"),
      width: 780,
      footer: null,
      "body-style": { padding: 0, height: "480px", display: "flex", flexDirection: "column" },
      onCancel: y[2] || (y[2] = (S) => o("close"))
    }, {
      default: ce(() => [
        B("div", _K, [
          v(EK, {
            drafts: a.value,
            "selected-id": l.value,
            onSelect: y[0] || (y[0] = (S) => l.value = S),
            onAdd: d
          }, null, 8, ["drafts", "selected-id"]),
          B("div", AK, [
            c.value ? (ee(), Ze(CK, {
              key: 0,
              draft: c.value,
              onChange: p
            }, null, 8, ["draft"])) : (ee(), ve("div", DK, te(M(r)("variable.modal.placeholder")), 1))
          ])
        ]),
        B("div", zK, [
          v(M($t), {
            danger: "",
            disabled: !c.value,
            onClick: f
          }, {
            default: ce(() => [
              Ee(te(M(r)("variable.modal.delete")), 1)
            ]),
            _: 1
          }, 8, ["disabled"]),
          B("div", RK, [
            v(M($t), {
              onClick: y[1] || (y[1] = (S) => o("close"))
            }, {
              default: ce(() => [
                Ee(te(M(r)("variable.modal.cancel")), 1)
              ]),
              _: 1
            }),
            v(M($t), {
              type: "primary",
              onClick: m
            }, {
              default: ce(() => [
                Ee(te(M(r)("variable.modal.save")), 1)
              ]),
              _: 1
            })
          ])
        ])
      ]),
      _: 1
    }, 8, ["open", "title"]));
  }
}), BK = {
  key: 0,
  class: "flex items-center gap-3 flex-wrap",
  style: { padding: "0 8px" }
}, LK = {
  key: 0,
  class: "flex items-center gap-1"
}, FK = {
  key: 1,
  class: "flex items-center gap-1"
}, HK = {
  key: 2,
  class: "flex items-center gap-1"
}, fO = /* @__PURE__ */ ye({
  __name: "VariableBar",
  setup(e) {
    const t = xs(), n = wr(), o = qr(), i = le(!1), r = R(
      () => Object.entries(t.variables).filter(([, s]) => !s.config.hide).map(([s, u]) => ({ id: s, ...u })).sort((s, u) => s.config.name.localeCompare(u.config.name))
    ), a = R(() => o.isDark ? "#888" : "#555");
    function l(s, u) {
      t.setValue(s, u);
      const c = t.variables[s];
      if (c) {
        const d = t.getDependents(c.config.name);
        for (const f of d)
          for (const [p, m] of Object.entries(t.variables))
            if (m.config.name === f) {
              t.refreshVariable(p);
              break;
            }
      }
    }
    return (s, u) => r.value.length > 0 || M(n).isEditing ? (ee(), ve("div", BK, [
      (ee(!0), ve(Ve, null, It(r.value, (c) => (ee(), ve(Ve, {
        key: c.id
      }, [
        c.config.type === "textbox" ? (ee(), ve("div", LK, [
          B("span", {
            class: "text-sm",
            style: xt({ color: a.value, whiteSpace: "nowrap" })
          }, te(c.config.label), 5),
          v(M(ft), {
            size: "small",
            style: { width: "160px" },
            value: Array.isArray(c.current) ? c.current[0] || "" : c.current,
            placeholder: "Enter value...",
            onChange: (d) => l(c.id, d.target.value)
          }, null, 8, ["value", "onChange"])
        ])) : c.config.type === "constant" ? (ee(), ve("div", FK, [
          c.config.label ? (ee(), ve("span", {
            key: 0,
            class: "text-sm",
            style: xt({ color: a.value, whiteSpace: "nowrap" })
          }, te(c.config.label), 5)) : He("", !0),
          v(M(Xi), { style: { margin: "0", "font-size": "12px" } }, {
            default: ce(() => [
              Ee(te(c.config.constantValue ?? ""), 1)
            ]),
            _: 2
          }, 1024)
        ])) : (ee(), ve("div", HK, [
          B("span", {
            class: "text-sm",
            style: xt({ color: a.value, whiteSpace: "nowrap" })
          }, te(c.config.label || c.config.name) + ": ", 5),
          v(M(bt), {
            value: c.current,
            mode: c.config.multi ? "multiple" : void 0,
            options: c.options.map((d) => ({ label: d.label === "$__all" ? "All" : d.label, value: d.value })),
            loading: c.loading,
            style: { minWidth: "120px" },
            size: "small",
            "show-search": "",
            "allow-clear": !c.config.multi,
            "filter-option": (d, f) => (f?.label ?? "").toLowerCase().includes(d.toLowerCase()),
            placeholder: `Select ${c.config.label}`,
            onChange: (d) => l(c.id, d)
          }, null, 8, ["value", "mode", "options", "loading", "allow-clear", "filter-option", "placeholder", "onChange"]),
          c.error ? (ee(), Ze(M(Xi), {
            key: 0,
            color: "red",
            style: { "font-size": "10px", margin: "0" }
          }, {
            default: ce(() => [
              Ee(te(c.error), 1)
            ]),
            _: 2
          }, 1024)) : He("", !0)
        ]))
      ], 64))), 128)),
      M(n).isEditing ? (ee(), Ze(M($t), {
        key: 0,
        size: "small",
        type: "text",
        class: "ml-auto",
        onClick: u[0] || (u[0] = (c) => i.value = !0)
      }, {
        default: ce(() => [
          B("span", {
            class: ct([M(ot).settings, "text-base"])
          }, null, 2)
        ]),
        _: 1
      })) : He("", !0),
      v(NK, {
        open: i.value,
        onClose: u[1] || (u[1] = (c) => i.value = !1)
      }, null, 8, ["open"])
    ])) : He("", !0);
  }
}), VK = /* @__PURE__ */ ye({
  __name: "DatasourceSelect",
  props: {
    value: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t, { config: o } = Uu(), i = R(() => {
      const l = [{ value: "mock", label: "Mock", type: "mock", uid: "" }], s = o.value.datasourceConfig ?? [];
      return s.filter((u) => u.type === "zabbix").forEach((u, c) => {
        const d = u.uid || String(c);
        l.push({ value: `zabbix:${d}`, label: `${u.name}`, type: "zabbix", uid: d });
      }), s.filter((u) => u.type === "argus").forEach((u, c) => {
        const d = u.uid || String(c);
        l.push({ value: `argus:${d}`, label: `${u.name}`, type: "argus", uid: d });
      }), l;
    }), r = R(
      () => i.value.map((l) => ({ value: l.value, label: l.label }))
    );
    function a(l) {
      const s = i.value.find((u) => u.value === l);
      s && n("change", s);
    }
    return (l, s) => (ee(), Ze(M(bt), {
      size: "small",
      style: { "min-width": "140px" },
      value: e.value,
      options: r.value,
      onChange: a
    }, null, 8, ["value", "options"]));
  }
}), jK = {
  key: 0,
  class: ""
}, WK = {
  key: 1,
  class: "pt-2 px-2 text-xs text-secondary"
}, qK = /* @__PURE__ */ ye({
  __name: "QueryEditorRow",
  props: {
    entry: {},
    index: {},
    isChart: { type: Boolean },
    canDelete: { type: Boolean }
  },
  emits: ["update", "remove"],
  setup(e, { emit: t }) {
    const n = e, o = t, i = R(() => "ABCDEFGHIJKLMNOPQRSTUVWXYZ"[n.index] ?? String(n.index + 1)), r = R(() => xg(n.entry.dataSource.type)), a = R(() => r.value?.QueryEditor ?? null), l = R(() => {
      const c = n.entry.dataSource;
      if (c.type === "mock")
        return "mock";
      const d = "datasourceId" in c ? c.datasourceId : "";
      return d ? `${c.type}:${d}` : c.type;
    });
    function s(c) {
      const d = xg(c.type);
      if (!d?.defaultQuery)
        return;
      const f = { ...d.defaultQuery(), ...c.uid ? { datasourceId: c.uid } : {} };
      o("update", { dataSource: f });
    }
    function u(c) {
      o("update", { dataSource: c });
    }
    return (c, d) => (ee(), Ze(M(Pa), {
      size: "small",
      collapsible: "icon",
      bordered: !0,
      "default-active-key": [e.entry.id]
    }, {
      default: ce(() => [
        (ee(), Ze(M(Pa).Panel, {
          key: e.entry.id
        }, {
          header: ce(() => [
            B("div", {
              class: "flex items-center gap-2",
              onClick: d[3] || (d[3] = No(() => {
              }, ["stop"]))
            }, [
              v(M(Xi), {
                color: "blue",
                style: { "font-size": "12px", "font-weight": "600", margin: "0", "min-width": "24px", "text-align": "center", "line-height": "20px" }
              }, {
                default: ce(() => [
                  Ee(te(i.value), 1)
                ]),
                _: 1
              }),
              v(M(Rr), {
                size: "small",
                checked: e.entry.enabled,
                onChange: d[0] || (d[0] = (f) => o("update", { enabled: f })),
                onClick: d[1] || (d[1] = No(() => {
                }, ["stop"]))
              }, null, 8, ["checked"]),
              d[5] || (d[5] = B("div", { class: "flex-1" }, null, -1)),
              d[6] || (d[6] = B("span", { style: { "font-size": "11px", color: "var(--ant-color-text-secondary)" } }, "数据源", -1)),
              v(VK, {
                value: l.value,
                onClick: d[2] || (d[2] = No(() => {
                }, ["stop"])),
                onChange: s
              }, null, 8, ["value"])
            ])
          ]),
          extra: ce(() => [
            e.canDelete ? (ee(), Ze(M($t), {
              key: 0,
              type: "text",
              danger: "",
              size: "small",
              onClick: d[4] || (d[4] = No((f) => o("remove"), ["stop"]))
            }, {
              default: ce(() => [
                B("span", {
                  class: ct(M(ot).delete)
                }, null, 2)
              ]),
              _: 1
            })) : He("", !0)
          ]),
          default: ce(() => [
            e.entry.enabled && a.value ? (ee(), ve("div", jK, [
              (ee(), Ze(uw(a.value), {
                query: e.entry.dataSource,
                "datasource-id": "datasourceId" in e.entry.dataSource ? e.entry.dataSource.datasourceId : "",
                "is-chart": e.isChart,
                onChange: u
              }, null, 40, ["query", "datasource-id", "is-chart"]))
            ])) : e.entry.enabled && !a.value ? (ee(), ve("div", WK, " No query editor available for datasource type: " + te(e.entry.dataSource.type), 1)) : He("", !0)
          ]),
          _: 1
        }))
      ]),
      _: 1
    }, 8, ["default-active-key"]));
  }
}), GK = {
  class: "px-4 py-3 flex flex-col gap-2",
  style: { "min-width": "300px" }
}, KK = { class: "flex items-center gap-2" }, YK = {
  class: "text-xs text-secondary flex-shrink-0",
  style: { width: "120px" }
}, UK = { class: "flex items-center gap-2" }, XK = {
  class: "text-xs text-secondary flex-shrink-0",
  style: { width: "120px" }
}, QK = { class: "flex items-center gap-2" }, ZK = {
  class: "text-xs text-secondary flex-shrink-0",
  style: { width: "120px" }
}, JK = {
  class: "text-xs",
  style: { color: "var(--ant-color-text-quaternary)" }
}, eY = { class: "flex items-center gap-2" }, tY = {
  class: "text-xs text-secondary flex-shrink-0",
  style: { width: "120px" }
}, nY = { class: "flex items-center gap-2" }, oY = {
  class: "text-xs text-secondary flex-shrink-0",
  style: { width: "120px" }
}, ew = 1e3, iY = /* @__PURE__ */ ye({
  __name: "QueryOptionsPanel",
  setup(e) {
    const { t } = jt(), { panel: n, onChange: o } = qs(), i = wr();
    function r(u) {
      return u >= 36e5 ? `${Math.round(u / 36e5)}h` : u >= 6e4 ? `${Math.round(u / 6e4)}m` : u >= 1e3 ? `${Math.round(u / 1e3)}s` : `${u}ms`;
    }
    function a(u) {
      const c = u.trim().match(/^(\d+(?:\.\d+)?)(ms|[smh])?$/i);
      if (!c)
        return;
      const d = Number.parseFloat(c[1]), f = (c[2] ?? "s").toLowerCase();
      return f === "ms" ? d : f === "s" ? d * 1e3 : f === "m" ? d * 6e4 : d * 36e5;
    }
    const l = R(() => {
      const u = n.value.queryOptions?.maxDataPoints ?? ew, c = i.timeRange, d = c.to - c.from;
      return Math.max(Math.ceil(d / u), 1e3);
    }), s = R(() => {
      const u = n.value.queryOptions?.minIntervalMs;
      return u != null ? r(u) : "";
    });
    return (u, c) => (ee(), ve("div", GK, [
      B("div", KK, [
        B("span", YK, [
          v(M(xo), {
            title: M(t)("qb.queryOptions.maxDataPoints")
          }, {
            default: ce(() => [
              B("span", {
                class: ct([M(ot).info, "mr-1 opacity-50 text-xs"])
              }, null, 2)
            ]),
            _: 1
          }, 8, ["title"]),
          Ee(" " + te(M(t)("qb.queryOptions.maxDataPoints")), 1)
        ]),
        v(M(fo), {
          size: "small",
          style: { width: "100px" },
          min: 1,
          value: M(n).queryOptions?.maxDataPoints,
          placeholder: String(ew),
          onChange: c[0] || (c[0] = (d) => M(o)({ queryOptions: { ...M(n).queryOptions, maxDataPoints: d ?? void 0 } }))
        }, null, 8, ["value", "placeholder"])
      ]),
      B("div", UK, [
        B("span", XK, [
          v(M(xo), {
            title: M(t)("qb.queryOptions.minInterval")
          }, {
            default: ce(() => [
              B("span", {
                class: ct([M(ot).info, "mr-1 opacity-50 text-xs"])
              }, null, 2)
            ]),
            _: 1
          }, 8, ["title"]),
          Ee(" " + te(M(t)("qb.queryOptions.minInterval")), 1)
        ]),
        v(M(ft), {
          size: "small",
          style: { width: "100px" },
          value: s.value,
          placeholder: M(t)("qb.queryOptions.minIntervalPlaceholder"),
          onChange: c[1] || (c[1] = (d) => {
            const f = d.target.value.trim();
            if (!f) {
              M(o)({ queryOptions: { ...M(n).queryOptions, minIntervalMs: void 0 } });
              return;
            }
            const p = a(f);
            p !== void 0 && M(o)({ queryOptions: { ...M(n).queryOptions, minIntervalMs: p } });
          })
        }, null, 8, ["value", "placeholder"])
      ]),
      B("div", QK, [
        B("span", ZK, [
          v(M(xo), {
            title: M(t)("qb.queryOptions.interval")
          }, {
            default: ce(() => [
              B("span", {
                class: ct([M(ot).info, "mr-1 opacity-50 text-xs"])
              }, null, 2)
            ]),
            _: 1
          }, 8, ["title"]),
          Ee(" " + te(M(t)("qb.queryOptions.interval")), 1)
        ]),
        v(M(ft), {
          size: "small",
          style: { width: "100px" },
          value: r(l.value),
          readonly: ""
        }, null, 8, ["value"]),
        B("span", JK, " = " + te(M(t)("qb.queryOptions.intervalHint")), 1)
      ]),
      B("div", eY, [
        B("span", tY, [
          v(M(xo), {
            title: M(t)("qb.queryOptions.relativeTime")
          }, {
            default: ce(() => [
              B("span", {
                class: ct([M(ot).info, "mr-1 opacity-50 text-xs"])
              }, null, 2)
            ]),
            _: 1
          }, 8, ["title"]),
          Ee(" " + te(M(t)("qb.queryOptions.relativeTime")), 1)
        ]),
        v(M(ft), {
          size: "small",
          style: { width: "100px" },
          placeholder: "1h",
          value: M(n).queryOptions?.relativeTime ?? "",
          onChange: c[2] || (c[2] = (d) => M(o)({ queryOptions: { ...M(n).queryOptions, relativeTime: d.target.value || void 0 } }))
        }, null, 8, ["value"])
      ]),
      B("div", nY, [
        B("span", oY, [
          v(M(xo), {
            title: M(t)("qb.queryOptions.timeShift")
          }, {
            default: ce(() => [
              B("span", {
                class: ct([M(ot).info, "mr-1 opacity-50 text-xs"])
              }, null, 2)
            ]),
            _: 1
          }, 8, ["title"]),
          Ee(" " + te(M(t)("qb.queryOptions.timeShift")), 1)
        ]),
        v(M(ft), {
          size: "small",
          style: { width: "100px" },
          placeholder: "1h",
          value: M(n).queryOptions?.timeShift ?? "",
          onChange: c[3] || (c[3] = (d) => M(o)({ queryOptions: { ...M(n).queryOptions, timeShift: d.target.value || void 0 } }))
        }, null, 8, ["value"])
      ])
    ]));
  }
}), rY = { class: "flex flex-col h-full" }, aY = {
  class: "flex items-center gap-2 px-3 py-1.5 flex-shrink-0 flex-wrap",
  style: { "border-bottom": "1px solid var(--ant-color-border-secondary)" }
}, lY = { class: "flex-1 overflow-y-auto px-3 py-2 flex flex-col gap-2" }, sY = {
  key: 0,
  class: "text-center text-secondary text-sm py-8"
}, uY = /* @__PURE__ */ ye({
  __name: "QueryEditorPane",
  setup(e) {
    const { t } = jt(), { panel: n, onChange: o } = qs(), i = R(() => ["timeseries", "bar", "histogram"].includes(n.value.type)), r = R(() => n.value.queries ?? []), a = le(!1), l = le("mock");
    function s(d, f) {
      o({ queries: r.value.map((p, m) => m === d ? { ...p, ...f } : p) });
    }
    function u(d) {
      o({ queries: r.value.filter((f, p) => p !== d) });
    }
    function c() {
      if (r.value.length >= 26)
        return;
      const d = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"[r.value.length] ?? String(r.value.length + 1), [f, p = ""] = l.value.split(":"), m = xg(f);
      if (!m?.defaultQuery)
        return;
      const b = {
        ...m.defaultQuery(),
        ...p ? { datasourceId: p } : {},
        // Non-chart types: each query = 1 series; seriesCount controlled by query count
        ...!i.value && "seriesCount" in m.defaultQuery() ? { seriesCount: 1 } : {}
      };
      o({
        queries: [...r.value, { id: d, enabled: !0, dataSource: b }]
      });
    }
    return (d, f) => (ee(), ve("div", rY, [
      B("div", aY, [
        v(fO),
        f[1] || (f[1] = B("div", { class: "flex-1" }, null, -1)),
        v(dO),
        v(M(FL), {
          type: "vertical",
          style: { margin: "0" }
        }),
        v(M(vr).Compact, null, {
          default: ce(() => [
            v(M($t), {
              type: "primary",
              disabled: r.value.length >= 26,
              onClick: c
            }, {
              default: ce(() => [
                B("span", {
                  class: ct([M(ot).plus, "mr-1"])
                }, null, 2),
                Ee(" " + te(M(t)("qb.addQuery")), 1)
              ]),
              _: 1
            }, 8, ["disabled"]),
            v(M(u4), {
              open: a.value,
              "onUpdate:open": f[0] || (f[0] = (p) => a.value = p),
              trigger: "click",
              placement: "bottomRight",
              "overlay-inner-style": { padding: 0, minWidth: "320px" }
            }, {
              content: ce(() => [
                v(iY)
              ]),
              default: ce(() => [
                v(M($t), { class: "text-12px cursor-pointer hover:op-90 active:op-80 underline" }, {
                  default: ce(() => [
                    Ee(te(M(t)("qb.queryOptions")) + " ", 1),
                    B("span", {
                      class: ct([M(ot).chevronDown, ""])
                    }, null, 2)
                  ]),
                  _: 1
                })
              ]),
              _: 1
            }, 8, ["open"])
          ]),
          _: 1
        })
      ]),
      B("div", lY, [
        (ee(!0), ve(Ve, null, It(r.value, (p, m) => (ee(), Ze(qK, {
          key: p.id,
          entry: p,
          index: m,
          "is-chart": i.value,
          "can-delete": r.value.length > 1,
          onUpdate: (b) => s(m, b),
          onRemove: () => u(m)
        }, null, 8, ["entry", "index", "is-chart", "can-delete", "onUpdate", "onRemove"]))), 128)),
        r.value.length === 0 ? (ee(), ve("div", sY, ' No queries. Click "' + te(M(t)("qb.addQuery")) + '" to start. ', 1)) : He("", !0)
      ])
    ]));
  }
}), cY = { class: "w-full h-full" }, dY = { class: "w-full h-full" }, fY = /* @__PURE__ */ ye({
  __name: "PanelEditorLayout",
  setup(e) {
    const n = qr().isDark ? "#303030" : "#e8e8e8";
    return (o, i) => (ee(), Ze(M(X1), { style: { height: "100%" } }, {
      default: ce(() => [
        v(M(Jc), { "min-size": 200 }, {
          default: ce(() => [
            v(M(X1), {
              vertical: "",
              "default-sizes": [100, 200]
            }, {
              default: ce(() => [
                v(M(Jc), { "min-size": 100 }, {
                  default: ce(() => [
                    B("div", cY, [
                      v(oK)
                    ])
                  ]),
                  _: 1
                }),
                v(M(Jc), { "min-size": 60 }, {
                  default: ce(() => [
                    B("div", dY, [
                      v(uY)
                    ])
                  ]),
                  _: 1
                })
              ]),
              _: 1
            })
          ]),
          _: 1
        }),
        v(M(Jc), {
          "preferred-size": "35%",
          "min-size": 200
        }, {
          default: ce(() => [
            B("div", {
              class: "w-full h-full overflow-y-auto",
              style: xt({ borderLeft: `1px solid ${M(n)}` })
            }, [
              v(_q)
            ], 4)
          ]),
          _: 1
        })
      ]),
      _: 1
    }));
  }
}), pY = { class: "flex items-center gap-2" }, gY = { class: "font-medium text-sm" }, hY = { class: "flex justify-end gap-2 py-1" }, vY = /* @__PURE__ */ ye({
  __name: "PanelEditorModal",
  setup(e) {
    const t = wr(), { t: n } = jt(), o = le(null), i = le(null), r = R(() => {
      const m = t.editingPanelId;
      return m ? t.panels[m] : null;
    }), a = R(() => o.value ?? r.value), l = R(() => {
      const m = i.value?.data?.[0];
      return m ? m.fields.filter((b) => b.type === "number").map((b) => b.name) : [];
    }), s = R(() => {
      const m = i.value?.data?.[0];
      return m ? m.fields.map((b) => b.config?.displayNameFromDS ?? b.name) : [];
    });
    function u(m) {
      a.value && (o.value = { ...a.value, ...m });
    }
    function c() {
      o.value && t.editingPanelId && t.updatePanel(t.editingPanelId, o.value), o.value = null, t.setEditingPanel(null);
    }
    function d() {
      o.value = null, t.setEditingPanel(null);
    }
    Ie(() => t.editingPanelId, (m) => {
      m || (o.value = null);
    });
    const f = R(() => !!t.editingPanelId && !!r.value), p = le(!1);
    return Ie(f, (m) => {
      m && !p.value && setTimeout(() => {
        p.value = !0;
      }, 0);
    }), yj({
      panel: R(() => a.value),
      onChange: u,
      previewData: i,
      numericFieldNames: l,
      allFieldNames: s
    }), (m, b) => (ee(), Ze(M(tF), {
      open: f.value,
      closable: !0,
      mask: !1,
      placement: "right",
      width: "71vw",
      "body-style": { padding: 0 },
      "destroy-on-close": !1,
      onClose: d
    }, {
      title: ce(() => [
        B("div", pY, [
          B("span", gY, "Edit: " + te(a.value?.title ?? ""), 1)
        ])
      ]),
      footer: ce(() => [
        B("div", hY, [
          v(M($t), { onClick: d }, {
            default: ce(() => [
              Ee(te(M(n)("dashboard.cancel")), 1)
            ]),
            _: 1
          }),
          v(M($t), {
            type: "primary",
            onClick: c
          }, {
            default: ce(() => [
              Ee(te(M(n)("dashboard.save")), 1)
            ]),
            _: 1
          })
        ])
      ]),
      default: ce(() => [
        a.value && p.value ? (ee(), Ze(fY, { key: 0 })) : He("", !0)
      ]),
      _: 1
    }, 8, ["open"]));
  }
}), mY = {
  key: 0,
  class: "panel-container w-full h-full flex flex-col rounded-lg overflow-hidden bg-white dark:bg-[#1f1f1f] border border-[#e8e8e8] dark:border-[#303030]"
}, bY = { class: "flex items-center gap-2 min-w-0 lh-1 flex-1 text-[#666] dark:text-[#666]" }, yY = {
  key: 0,
  class: "drag-handle flex-shrink-0 cursor-grab"
}, xY = { class: "text-sm truncate text-[#141414] dark:text-[#d9d9d9]" }, wY = { class: "panel-actions flex items-center gap-10px lh-1 flex-shrink-0 text-[#444] dark:text-[#666]" }, SY = { class: "panel-content flex-1 overflow-hidden" }, CY = { class: "w-full h-full flex flex-col rounded-lg overflow-hidden bg-white dark:bg-[#1f1f1f]" }, $Y = { class: "panel-content flex-1 overflow-hidden" }, PY = /* @__PURE__ */ ye({
  __name: "PanelContainer",
  props: {
    panelId: {},
    menuMode: { default: "inline" }
  },
  setup(e) {
    const t = e, n = wr(), o = qr(), { t: i } = jt(), r = le(!1), a = le(!1), l = R(() => n.panels[t.panelId]), s = R(() => o.isDark), u = R(() => s.value ? "#666" : "#bbb"), c = R(() => {
      const m = (b) => ro("span", { class: b });
      return n.isEditing ? [
        { key: "edit", label: i("panel.menu.edit"), icon: () => m(ot.edit) },
        { key: "clone", label: i("panel.menu.clone"), icon: () => m(ot.clone) },
        { key: "fullscreen", label: i("panel.menu.fullscreen"), icon: () => m(ot.fullscreen) },
        { type: "divider" },
        { key: "remove", label: i("panel.menu.remove"), icon: () => m(ot.delete), danger: !0 }
      ] : [
        { key: "fullscreen", label: i("panel.menu.fullscreen"), icon: () => m(ot.fullscreen) }
      ];
    });
    function d(m) {
      switch (m) {
        case "edit":
          n.setEditingPanel(t.panelId);
          break;
        case "clone":
          n.clonePanel(t.panelId);
          break;
        case "remove":
          po.confirm({
            title: i("panel.remove.title", { title: l.value?.title ?? "" }),
            content: i("panel.remove.content"),
            okText: i("panel.remove.ok"),
            okButtonProps: { danger: !0 },
            onOk: () => n.removePanel(t.panelId)
          });
          break;
        case "fullscreen":
          r.value = !0;
          break;
      }
    }
    function f(m) {
      a.value = !1, d(String(m.key));
    }
    function p(m) {
      m.stopPropagation(), n.refreshPanel(t.panelId);
    }
    return (m, b) => (ee(), ve(Ve, null, [
      l.value && !r.value ? (ee(), ve("div", mY, [
        B("div", {
          class: "panel-header flex items-center px-3 py-2 flex-shrink-0 border-b border-[#e8e8e8] dark:border-[#303030]",
          onDblclick: b[6] || (b[6] = (y) => M(n).isEditing && M(n).setEditingPanel(t.panelId))
        }, [
          B("div", bY, [
            M(n).isEditing ? (ee(), ve("span", yY, [
              B("span", {
                class: ct(M(ot).dragVertical)
              }, null, 2)
            ])) : He("", !0),
            B("span", xY, te(l.value.title), 1),
            l.value.description ? (ee(), Ze(M(xo), {
              key: 1,
              title: l.value.description,
              placement: "bottom"
            }, {
              default: ce(() => [
                B("span", {
                  class: ct([M(ot).info, "flex-shrink-0"])
                }, null, 2)
              ]),
              _: 1
            }, 8, ["title"])) : He("", !0),
            v(sO, {
              links: l.value.links ?? [],
              "icon-color": u.value
            }, null, 8, ["links", "icon-color"])
          ]),
          B("div", wY, [
            v(M(xo), {
              title: M(i)("panel.menu.refresh")
            }, {
              default: ce(() => [
                B("span", {
                  class: ct([M(ot).refresh, "panel-refresh-btn cursor-pointer"]),
                  onMousedown: b[0] || (b[0] = No(() => {
                  }, ["stop"])),
                  onClick: p
                }, null, 34)
              ]),
              _: 1
            }, 8, ["title"]),
            t.menuMode === "inline" ? (ee(), ve(Ve, { key: 0 }, [
              M(n).isEditing ? (ee(), Ze(M(xo), {
                key: 0,
                title: M(i)("panel.menu.edit")
              }, {
                default: ce(() => [
                  B("span", {
                    class: ct([M(ot).edit, "cursor-pointer"]),
                    onClick: b[1] || (b[1] = (y) => d("edit"))
                  }, null, 2)
                ]),
                _: 1
              }, 8, ["title"])) : He("", !0),
              M(n).isEditing ? (ee(), Ze(M(xo), {
                key: 1,
                title: M(i)("panel.menu.clone")
              }, {
                default: ce(() => [
                  B("span", {
                    class: ct([M(ot).clone, "cursor-pointer"]),
                    onClick: b[2] || (b[2] = (y) => d("clone"))
                  }, null, 2)
                ]),
                _: 1
              }, 8, ["title"])) : He("", !0),
              M(n).isEditing ? (ee(), Ze(M(xo), {
                key: 2,
                title: M(i)("panel.menu.remove")
              }, {
                default: ce(() => [
                  B("span", {
                    class: ct([M(ot).delete, "cursor-pointer text-red-500"]),
                    onClick: b[3] || (b[3] = (y) => d("remove"))
                  }, null, 2)
                ]),
                _: 1
              }, 8, ["title"])) : He("", !0)
            ], 64)) : (ee(), Ze(M(Ui), {
              key: 1,
              open: a.value,
              "onUpdate:open": b[5] || (b[5] = (y) => a.value = y),
              trigger: "click"
            }, {
              overlay: ce(() => [
                v(M(lo), {
                  items: c.value,
                  onClick: f
                }, null, 8, ["items"])
              ]),
              default: ce(() => [
                B("span", {
                  class: "cursor-pointer p-[2px_4px]",
                  onClick: b[4] || (b[4] = No(() => {
                  }, ["prevent"]))
                }, [
                  B("span", {
                    class: ct(M(ot).dotsVertical)
                  }, null, 2)
                ])
              ]),
              _: 1
            }, 8, ["open"]))
          ])
        ], 32),
        B("div", SY, [
          Wr(m.$slots, "default", {}, void 0, !0)
        ])
      ])) : He("", !0),
      r.value ? (ee(), Ze(M(po), {
        key: 1,
        open: !0,
        title: l.value?.title,
        footer: null,
        width: "92vw",
        "body-style": { height: "82vh", padding: 0 },
        closable: !1,
        onCancel: b[7] || (b[7] = (y) => r.value = !1)
      }, {
        default: ce(() => [
          B("div", CY, [
            B("div", $Y, [
              Wr(m.$slots, "default", {}, void 0, !0)
            ])
          ])
        ]),
        _: 3
      }, 8, ["title"])) : He("", !0)
    ], 64));
  }
}), tw = /* @__PURE__ */ Yo(PY, [["__scopeId", "data-v-2c616ca4"]]), OY = { class: "font-medium text-sm" }, IY = { class: "text-xs text-secondary mt-1" }, MY = /* @__PURE__ */ ye({
  __name: "AddPanelModal",
  setup(e) {
    const t = wr(), { t: n } = jt(), o = [
      { type: "timeseries", icon: ot.chartLine, descKey: "panel.type.desc.timeseries" },
      { type: "bar", icon: ot.chartBar, descKey: "panel.type.desc.bar" },
      { type: "histogram", icon: ot.chartArea, descKey: "panel.type.desc.histogram" },
      { type: "stat", icon: ot.stat, descKey: "panel.type.desc.stat" },
      { type: "gauge", icon: ot.gauge, descKey: "panel.type.desc.gauge" },
      { type: "table", icon: ot.table, descKey: "panel.type.desc.table" },
      { type: "pie", icon: ot.chartPie, descKey: "panel.type.desc.pie" }
    ];
    function i(r) {
      t.addPanel(r);
    }
    return (r, a) => (ee(), Ze(M(po), {
      open: M(t).addPanelModalOpen,
      title: M(n)("dashboard.addPanel"),
      footer: null,
      onCancel: a[0] || (a[0] = (l) => M(t).addPanelModalOpen = !1)
    }, {
      default: ce(() => [
        v(M(kH), {
          gutter: [16, 16],
          class: "mt-4"
        }, {
          default: ce(() => [
            (ee(), ve(Ve, null, It(o, (l) => v(M(m6), {
              key: l.type,
              span: 8
            }, {
              default: ce(() => [
                v(M(ds), {
                  hoverable: "",
                  class: "text-center cursor-pointer",
                  onClick: (s) => i(l.type)
                }, {
                  default: ce(() => [
                    B("div", {
                      class: ct(["text-2xl mb-2", l.icon])
                    }, null, 2),
                    B("div", OY, te(M(n)(`config.type.${l.type}`)), 1),
                    B("div", IY, te(M(n)(l.descKey)), 1)
                  ]),
                  _: 2
                }, 1032, ["onClick"])
              ]),
              _: 2
            }, 1024)), 64))
          ]),
          _: 1
        })
      ]),
      _: 1
    }, 8, ["open", "title"]));
  }
}), TY = { style: { display: "flex", "align-items": "center", "flex-wrap": "wrap", gap: "8px", padding: "0 4px" } }, kY = { class: "" }, EY = { style: { margin: "0" } }, _Y = { style: { margin: "0" } }, AY = /* @__PURE__ */ ye({
  __name: "DashboardHeader",
  setup(e) {
    const t = wr(), { t: n } = jt(), { config: o } = Uu(), { message: i } = ps.useApp(), r = le(!1), a = le(!1), l = le(null);
    function s() {
      t.confirmSave(o.value.onSave);
    }
    function u() {
      t.isDirty ? r.value = !0 : t.discardChanges();
    }
    function c() {
      r.value = !1, t.discardChanges();
    }
    function d() {
      const C = t.exportJSON(), O = new Blob([C], { type: "application/json" }), $ = URL.createObjectURL(O), P = document.createElement("a");
      P.href = $, P.download = "dashboard.json", P.click(), URL.revokeObjectURL($), i.success(n("dashboard.exportSuccess"));
    }
    function f() {
      l.value?.click();
    }
    function p(C) {
      const O = C.target.files?.[0];
      O && (O.text().then(($) => {
        t.importJSON($) ? i.success(n("dashboard.importSuccess")) : i.error(n("dashboard.importError"));
      }), C.target.value = "");
    }
    function m(C) {
      t.importJSON(C) ? i.success(n("dashboard.importSuccess")) : i.error(n("dashboard.importError"));
    }
    const b = R(() => {
      const C = yI(), O = (o.value.presets ?? []).map(($) => ({ label: $.label, value: $.config }));
      return [{ label: "内置模板", value: C }, ...O];
    }), y = R(() => [
      { key: "export", label: n("dashboard.export"), icon: ot.export },
      { key: "import", label: n("dashboard.import"), icon: ot.import },
      { type: "divider" },
      { key: "clear", label: n("dashboard.clearPanels"), icon: ot.delete, danger: !0 }
    ]);
    function S(C) {
      C === "export" ? d() : C === "import" ? f() : C === "clear" && (a.value = !0);
    }
    return (C, O) => (ee(), ve("div", TY, [
      M(t).isEditing ? (ee(), ve(Ve, { key: 0 }, [
        v(M(vr).Compact, null, {
          default: ce(() => [
            v(M($t), {
              onClick: O[0] || (O[0] = ($) => M(t).addPanelModalOpen = !0)
            }, {
              default: ce(() => [
                B("span", {
                  class: ct([M(ot).plus, "mr-1"])
                }, null, 2),
                Ee(" " + te(M(n)("dashboard.addPanel")), 1)
              ]),
              _: 1
            }),
            v(M(bt), {
              placeholder: "预设",
              "popup-match-select-width": !1,
              options: b.value,
              style: { "min-width": "80px" },
              onSelect: O[1] || (O[1] = ($) => m($))
            }, null, 8, ["options"]),
            B("input", {
              ref_key: "fileInputRef",
              ref: l,
              type: "file",
              accept: ".json",
              style: { display: "none" },
              onChange: p
            }, null, 544),
            v(M(Ui), { trigger: ["click"] }, {
              overlay: ce(() => [
                v(M(lo), {
                  onClick: O[2] || (O[2] = ({ key: $ }) => S($))
                }, {
                  default: ce(() => [
                    (ee(!0), ve(Ve, null, It(y.value, ($) => (ee(), ve(Ve, {
                      key: $.key ?? $.type
                    }, [
                      $.type === "divider" ? (ee(), Ze(M(lo).Divider, { key: 0 })) : (ee(), Ze(M(lo).Item, {
                        key: $.key,
                        danger: $.danger
                      }, {
                        default: ce(() => [
                          B("span", {
                            class: ct([$.icon, "mr-1"])
                          }, null, 2),
                          Ee(te($.label), 1)
                        ]),
                        _: 2
                      }, 1032, ["danger"]))
                    ], 64))), 128))
                  ]),
                  _: 1
                })
              ]),
              default: ce(() => [
                v(M($t), null, {
                  default: ce(() => [
                    B("span", {
                      class: ct(M(ot).dotsVertical)
                    }, null, 2)
                  ]),
                  _: 1
                })
              ]),
              _: 1
            })
          ]),
          _: 1
        }),
        v(M($t), {
          type: "primary",
          ghost: "",
          onClick: s
        }, {
          default: ce(() => [
            B("span", {
              class: ct([M(ot).save, "mr-1"])
            }, null, 2),
            Ee(" " + te(M(n)("dashboard.save")), 1)
          ]),
          _: 1
        }),
        v(M($t), {
          danger: M(t).isDirty,
          onClick: u
        }, {
          default: ce(() => [
            B("span", {
              class: ct([M(ot).cancel, "mr-1"])
            }, null, 2),
            Ee(" " + te(M(n)("dashboard.cancel")), 1)
          ]),
          _: 1
        }, 8, ["danger"])
      ], 64)) : (ee(), Ze(M($t), {
        key: 1,
        onClick: M(t).startEditing
      }, {
        default: ce(() => [
          B("span", {
            class: ct([M(ot).edit, "mr-1"])
          }, null, 2),
          B("span", kY, te(M(n)("dashboard.edit")), 1)
        ]),
        _: 1
      }, 8, ["onClick"])),
      v(M(po), {
        open: r.value,
        "onUpdate:open": O[3] || (O[3] = ($) => r.value = $),
        title: M(n)("dashboard.cancelConfirmTitle"),
        "ok-text": M(n)("dashboard.cancelConfirmOk"),
        "cancel-text": M(n)("dashboard.cancelConfirmCancel"),
        "ok-button-props": { danger: !0 },
        onOk: c,
        onCancel: O[4] || (O[4] = ($) => r.value = !1)
      }, {
        default: ce(() => [
          B("p", EY, te(M(n)("dashboard.cancelConfirmTitle")), 1)
        ]),
        _: 1
      }, 8, ["open", "title", "ok-text", "cancel-text"]),
      v(M(po), {
        open: a.value,
        "onUpdate:open": O[5] || (O[5] = ($) => a.value = $),
        title: M(n)("dashboard.clearConfirmTitle"),
        "ok-text": M(n)("dashboard.clearConfirmOk"),
        "ok-button-props": { danger: !0 },
        onOk: O[6] || (O[6] = () => {
          M(t).clearPanels(), a.value = !1;
        }),
        onCancel: O[7] || (O[7] = ($) => a.value = !1)
      }, {
        default: ce(() => [
          B("p", _Y, te(M(n)("dashboard.clearConfirmTitle")), 1)
        ]),
        _: 1
      }, 8, ["open", "title", "ok-text"])
    ]));
  }
}), DY = { class: "w-full min-h-screen flex flex-col" }, zY = {
  key: 1,
  class: "p-2"
}, RY = {
  key: 1,
  class: "flex-center h-64"
}, NY = 30, vg = 8, BY = 768, LY = /* @__PURE__ */ ye({
  __name: "DashboardPage",
  setup(e) {
    const t = wr(), n = qr(), { config: o } = Uu(), i = R(() => o.value.canEdit !== !1), r = Pe([...t.layouts]);
    Ie(
      () => t.layouts,
      (m) => {
        const b = r.value;
        b.length === m.length && b.every(
          (y, S) => y.i === m[S].i && y.x === m[S].x && y.y === m[S].y && y.w === m[S].w && y.h === m[S].h
        ) || (r.value = [...m]);
      }
    );
    function a(m) {
      r.value = m, t.setLayouts(m);
    }
    const l = le(), s = le(0), u = R(() => s.value > 0 && s.value < BY);
    let c = null;
    Pt(() => {
      l.value && (c = new ResizeObserver((m) => {
        s.value = m[0].contentRect.width;
      }), c.observe(l.value), s.value = l.value.getBoundingClientRect().width);
    }), Lo(() => {
      c?.disconnect();
    });
    let d = null;
    function f() {
      p(), t.autoRefresh > 0 && (d = setInterval(() => {
        t.refresh();
      }, t.autoRefresh * 1e3));
    }
    function p() {
      d && (clearInterval(d), d = null);
    }
    return Ie(() => t.autoRefresh, f), (m, b) => (ee(), ve("div", DY, [
      B("div", {
        class: "flex items-center gap-2 flex-wrap px-2 sticky top-0 z-10",
        style: xt({
          background: M(n).isDark ? "#1a1a1a" : "#f5f5f5",
          border: `1px solid ${M(n).isDark ? "#303030" : "#e8e8e8"}`,
          height: "42px"
        })
      }, [
        v(fO),
        b[0] || (b[0] = B("div", { class: "flex-1" }, null, -1)),
        v(dO),
        i.value ? (ee(), Ze(AY, { key: 0 })) : He("", !0)
      ], 4),
      B("div", {
        ref_key: "containerRef",
        ref: l,
        class: "flex-1 overflow-auto"
      }, [
        u.value ? (ee(), ve("div", {
          key: 0,
          class: "flex flex-col",
          style: xt({ gap: `${vg}px`, padding: "8px" })
        }, [
          (ee(!0), ve(Ve, null, It(Object.keys(M(t).panels), (y) => (ee(), ve("div", { key: y }, [
            v(tw, { "panel-id": y }, {
              default: ce(() => [
                v(qh, { "panel-id": y }, null, 8, ["panel-id"])
              ]),
              _: 2
            }, 1032, ["panel-id"])
          ]))), 128))
        ], 4)) : (ee(), ve("div", zY, [
          s.value > 0 ? (ee(), Ze(M(bj), {
            key: 0,
            layout: r.value,
            "col-num": 12,
            "row-height": NY,
            margin: [vg, vg],
            "is-draggable": i.value && M(t).isEditing,
            "is-resizable": i.value && M(t).isEditing,
            "vertical-compact": !0,
            onLayoutUpdated: a
          }, {
            item: ce(({ item: y }) => [
              v(tw, {
                "panel-id": String(y.i)
              }, {
                default: ce(() => [
                  v(qh, {
                    "panel-id": String(y.i)
                  }, null, 8, ["panel-id"])
                ]),
                _: 2
              }, 1032, ["panel-id"])
            ]),
            _: 1
          }, 8, ["layout", "margin", "is-draggable", "is-resizable"])) : He("", !0),
          Object.keys(M(t).panels).length === 0 ? (ee(), ve("div", RY, [...b[1] || (b[1] = [
            B("div", { class: "text-center text-secondary" }, [
              B("div", { class: "text-4xl mb-4" }, " 📊 "),
              B("div", null, "No panels yet"),
              B("div", { class: "text-sm mt-2" }, ' Click "Edit" then "Add Panel" to get started ')
            ], -1)
          ])])) : He("", !0)
        ]))
      ], 512),
      v(MY),
      v(vY)
    ]));
  }
}), FY = { class: "flex justify-between items-center gap-2" }, HY = { style: { "font-size": "12px" } }, VY = { style: { "font-size": "10px", color: "var(--ant-color-text-quaternary)" } }, mg = /* @__PURE__ */ ye({
  __name: "ArgusGroupBy",
  props: {
    groupBy: {},
    cfg: {},
    signal: {},
    metricName: {},
    disabled: { type: Boolean, default: !1 }
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, i = le(""), r = le([]), a = le(!1), l = le(!1);
    let s = null;
    Ie(
      [i, l, () => n.cfg?.url, () => n.cfg?.token, () => n.signal, () => n.metricName],
      () => {
        !n.cfg || !l.value || (s && clearTimeout(s), s = setTimeout(async () => {
          a.value = !0;
          try {
            const f = new Set(n.groupBy.map((m) => m.name)), p = await LO(n.cfg, {
              signal: n.signal,
              metricName: n.metricName,
              search: i.value
            });
            r.value = p.filter((m) => !f.has(m.name));
          } catch {
            r.value = [];
          } finally {
            a.value = !1;
          }
        }, 300));
      }
    );
    const u = R(() => n.groupBy.map((f) => f.name));
    function c(f) {
      const m = (Array.isArray(f) ? f : [f]).map((b) => {
        const y = r.value.find((C) => C.name === b), S = n.groupBy.find((C) => C.name === b);
        return y ?? S ?? { name: b, fieldDataType: "string", fieldContext: "tag" };
      });
      o("change", m);
    }
    const d = R(() => a.value ? ro(Do, { size: "small" }) : null);
    return (f, p) => (ee(), Ze(M(bt), {
      mode: "tags",
      size: "small",
      style: { flex: "1", "min-width": "160px" },
      placeholder: "不分组（全量汇总）",
      value: u.value,
      disabled: e.disabled,
      "filter-option": !1,
      "not-found-content": d.value,
      onSearch: p[0] || (p[0] = (m) => i.value = m),
      onFocus: p[1] || (p[1] = () => l.value = !0),
      onBlur: p[2] || (p[2] = () => {
        l.value = !1, i.value = "";
      }),
      onChange: c
    }, {
      default: ce(() => [
        (ee(!0), ve(Ve, null, It(r.value, (m) => (ee(), Ze(M(bt).Option, {
          key: m.name,
          value: m.name
        }, {
          default: ce(() => [
            B("div", FY, [
              B("span", HY, te(m.name), 1),
              B("span", VY, te([m.fieldContext, m.fieldDataType].filter(Boolean).join(" · ")), 1)
            ])
          ]),
          _: 2
        }, 1032, ["value"]))), 128))
      ]),
      _: 1
    }, 8, ["value", "disabled", "not-found-content"]));
  }
}), jY = { class: "flex flex-wrap gap-1 items-center" }, WY = { class: "font-medium" }, nw = /* @__PURE__ */ ye({
  __name: "ArgusQueryFunctions",
  props: {
    functions: {},
    signal: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, i = [
      { value: "cutOffMin", label: "Cut Off Min" },
      { value: "cutOffMax", label: "Cut Off Max" },
      { value: "clampMin", label: "Clamp Min" },
      { value: "clampMax", label: "Clamp Max" },
      { value: "absolute", label: "Absolute" },
      { value: "runningDiff", label: "Running Diff" },
      { value: "log2", label: "Log2" },
      { value: "log10", label: "Log10" },
      { value: "cumulativeSum", label: "Cumulative Sum" },
      { value: "ewma3", label: "EWMA 3" },
      { value: "ewma5", label: "EWMA 5" },
      { value: "ewma7", label: "EWMA 7" },
      { value: "median3", label: "Median 3" },
      { value: "median5", label: "Median 5" },
      { value: "median7", label: "Median 7" },
      { value: "timeShift", label: "Time Shift" },
      { value: "fillZero", label: "Fill Zero" }
    ], r = [{ value: "timeShift", label: "Time Shift" }], a = {
      cutOffMin: { showInput: !0, placeholder: "阈值" },
      cutOffMax: { showInput: !0, placeholder: "阈值" },
      clampMin: { showInput: !0, placeholder: "阈值" },
      clampMax: { showInput: !0, placeholder: "阈值" },
      absolute: { showInput: !1 },
      runningDiff: { showInput: !1 },
      log2: { showInput: !1 },
      log10: { showInput: !1 },
      cumulativeSum: { showInput: !1 },
      ewma3: { showInput: !0, placeholder: "Alpha" },
      ewma5: { showInput: !0, placeholder: "Alpha" },
      ewma7: { showInput: !0, placeholder: "Alpha" },
      median3: { showInput: !1 },
      median5: { showInput: !1 },
      median7: { showInput: !1 },
      timeShift: { showInput: !0, placeholder: "如 -1h" },
      fillZero: { showInput: !1 }
    }, l = R(
      () => n.signal === "logs" || n.signal === "traces" ? r : i
    );
    function s(d) {
      const f = a[d];
      o("change", [...n.functions, { name: d, args: f?.showInput ? [{ value: "" }] : [] }]);
    }
    function u(d) {
      o("change", n.functions.filter((f, p) => p !== d));
    }
    function c(d, f) {
      o("change", n.functions.map((p, m) => m === d ? { ...p, args: [{ value: f }] } : p));
    }
    return (d, f) => (ee(), ve("div", jY, [
      (ee(!0), ve(Ve, null, It(e.functions, (p, m) => (ee(), ve("div", {
        key: m,
        class: "inline-flex items-center gap-1 rounded px-1.5",
        style: { background: "#eee", "font-size": "12px" }
      }, [
        B("span", WY, te(p.name) + "(", 1),
        a[p.name]?.showInput ? (ee(), Ze(M(ft), {
          key: 0,
          class: "text-center",
          size: "small",
          bordered: !1,
          variant: "borderless",
          style: { width: "40px", padding: "0 2px", height: "20px" },
          placeholder: a[p.name]?.placeholder ?? "value",
          value: p.args[0]?.value ?? "",
          onChange: (b) => c(m, b.target.value)
        }, null, 8, ["placeholder", "value", "onChange"])) : He("", !0),
        f[1] || (f[1] = B("span", null, ")", -1)),
        v(M($t), {
          class: "p-0!",
          type: "link",
          size: "small",
          danger: "",
          onClick: (b) => u(m)
        }, {
          default: ce(() => [
            B("span", {
              class: ct(M(ot).delete)
            }, null, 2)
          ]),
          _: 1
        }, 8, ["onClick"])
      ]))), 128)),
      v(M(Ui), { trigger: "click" }, {
        overlay: ce(() => [
          v(M(lo), {
            onClick: f[0] || (f[0] = ({ key: p }) => s(String(p)))
          }, {
            default: ce(() => [
              (ee(!0), ve(Ve, null, It(l.value, (p) => (ee(), Ze(M(lo).Item, {
                key: p.value
              }, {
                default: ce(() => [
                  Ee(te(p.label), 1)
                ]),
                _: 2
              }, 1024))), 128))
            ]),
            _: 1
          })
        ]),
        default: ce(() => [
          v(M($t), {
            size: "small",
            type: "dashed"
          }, {
            default: ce(() => [
              B("span", {
                class: ct([M(ot).plus, "mr-0.5"])
              }, null, 2),
              f[2] || (f[2] = Ee("函数 ", -1))
            ]),
            _: 1
          })
        ]),
        _: 1
      })
    ]));
  }
}), qY = {
  class: "bg-white p-2",
  style: { border: "1px solid #eee", "border-radius": "6px", "margin-bottom": "6px" }
}, GY = { class: "flex items-center gap-1 select-none" }, KY = { class: "flex gap-2 ml-1" }, YY = {
  key: 0,
  style: { "border-top": "1px solid var(--ant-color-border)" }
}, UY = {
  key: 0,
  class: "flex flex-col gap-2 p-2"
}, XY = { class: "flex flex-col gap-0.5" }, QY = { class: "flex items-center gap-1.5" }, ZY = { class: "flex flex-col gap-0.5" }, JY = {
  class: "grid gap-2",
  style: { "grid-template-columns": "1fr 1fr" }
}, eU = { class: "flex flex-col gap-0.5" }, tU = { class: "flex flex-col gap-0.5" }, nU = { class: "flex flex-col gap-0.5" }, oU = {
  class: "grid gap-2",
  style: { "grid-template-columns": "1fr 1fr" }
}, iU = { class: "flex flex-col gap-0.5" }, rU = { class: "flex items-center gap-1" }, aU = { class: "flex flex-col gap-0.5" }, lU = { class: "flex items-center gap-1" }, sU = {
  class: "grid gap-2",
  style: { "grid-template-columns": "1fr auto" }
}, uU = { class: "flex flex-col gap-0.5" }, cU = { class: "flex flex-col gap-0.5" }, dU = {
  class: "grid gap-2",
  style: { "grid-template-columns": "1fr 1fr" }
}, fU = { class: "flex flex-col gap-0.5" }, pU = { class: "flex flex-col gap-0.5" }, gU = {
  key: 1,
  class: "flex flex-col gap-2 p-2"
}, hU = { class: "flex flex-col gap-0.5" }, vU = { class: "flex flex-col gap-0.5" }, mU = { class: "flex flex-col gap-1" }, bU = { class: "flex flex-col gap-0.5" }, yU = {
  class: "grid gap-2",
  style: { "grid-template-columns": "1fr auto" }
}, xU = { class: "flex flex-col gap-0.5" }, wU = { class: "flex flex-col gap-0.5" }, SU = { class: "flex flex-col gap-0.5" }, CU = {
  key: 2,
  class: "flex flex-col gap-1.5 p-2"
}, $U = { class: "flex items-center gap-1.5" }, PU = {
  key: 3,
  class: "flex flex-col gap-2 p-2"
}, OU = { class: "flex flex-col gap-0.5" }, IU = {
  class: "grid gap-2",
  style: { "grid-template-columns": "1fr auto" }
}, MU = { class: "flex flex-col gap-0.5" }, TU = { class: "flex flex-col gap-0.5" }, kU = /* @__PURE__ */ ye({
  __name: "QueryItemRow",
  props: {
    item: {},
    cfg: {},
    collapsed: { type: Boolean },
    canDelete: { type: Boolean }
  },
  emits: ["toggleCollapse", "toggleDisabled", "delete", "change"],
  setup(e, { emit: t }) {
    const n = e, o = t, i = R(() => n.item.type === "builder_formula"), r = R(() => n.item.spec.disabled), a = R(() => n.item.spec.name), l = le(
      n.item.type === "builder_query" ? n.item.queryType ?? "builder" : "builder"
    ), s = [
      { label: "查询构建器", value: "builder" },
      { label: "PromQL", value: "promql" },
      { label: "ClickHouse SQL", value: "clickhouse_sql" }
    ], u = [
      { value: "metrics", label: "指标" },
      { value: "logs", label: "日志" },
      { value: "traces", label: "链路" }
    ];
    function c(H) {
      o("change", H);
    }
    function d(H) {
      if (n.item.type !== "builder_query")
        return;
      const L = H === "metrics" ? [{ metricName: "", metricType: "", timeAggregation: "rate", spaceAggregation: "sum" }] : [{ expression: "count()" }];
      c({ ...n.item, spec: { ...n.item.spec, signal: H, aggregations: L } });
    }
    function f(H) {
      n.item.type === "builder_query" && (l.value = H, c({ ...n.item, queryType: H }));
    }
    const p = le([]), m = le(!1);
    Ie(
      [() => n.cfg?.url, () => n.cfg?.token],
      async ([H, L]) => {
        m.value = !0;
        try {
          p.value = await BO({ url: H ?? "", token: L ?? "" });
        } catch {
          p.value = [];
        } finally {
          m.value = !1;
        }
      },
      { immediate: !0 }
    );
    const b = R(
      () => n.item.type === "builder_query" ? n.item.spec : null
    ), y = R(
      () => b.value?.aggregations?.[0] ?? { metricName: "", metricType: "", timeAggregation: "rate", spaceAggregation: "sum" }
    ), S = R(
      () => y.value.metricType === "histogram" || y.value.metricType === "exponential_histogram"
    ), C = R(
      () => S.value ? [{ value: "p50", label: "P50" }, { value: "p75", label: "P75" }, { value: "p90", label: "P90" }, { value: "p95", label: "P95" }, { value: "p99", label: "P99" }] : [{ value: "sum", label: "Sum" }, { value: "avg", label: "Avg" }, { value: "min", label: "Min" }, { value: "max", label: "Max" }]
    ), O = R(() => S.value ? [] : y.value.metricType === "gauge" ? [{ value: "latest", label: "Latest" }, { value: "sum", label: "Sum" }, { value: "avg", label: "Avg" }, { value: "min", label: "Min" }, { value: "max", label: "Max" }, { value: "count", label: "Count" }, { value: "count_distinct", label: "Count Distinct" }] : [{ value: "increase", label: "Increase" }, { value: "rate", label: "Rate" }]);
    function $(H, L) {
      b.value && c({ ...n.item, spec: { ...b.value, [H]: L } });
    }
    function P(H) {
      b.value && $("aggregations", [{ ...y.value, ...H }]);
    }
    function k(H) {
      const A = p.value.find((U) => U.metricName === H)?.type ?? "";
      P({
        metricName: H,
        metricType: A,
        timeAggregation: A === "" ? "" : A === "gauge" ? "latest" : "rate",
        spaceAggregation: A === "histogram" || A === "exponential_histogram" ? "p99" : "sum"
      });
    }
    const x = R(
      () => b.value?.aggregations ?? []
    );
    function E() {
      b.value && $("aggregations", [...x.value, { expression: "count()" }]);
    }
    function z(H) {
      b.value && $("aggregations", x.value.filter((L, A) => A !== H));
    }
    function N(H, L) {
      b.value && $("aggregations", x.value.map((A, U) => U === H ? { expression: L } : A));
    }
    function D(H) {
      if (!H) {
        $("order", []);
        return;
      }
      const L = H.split(" "), A = L[L.length - 1], j = { key: { name: L.slice(0, -1).join(" ") }, direction: A };
      $("order", [j]);
    }
    function W(H) {
      n.item.type === "builder_formula" && o("change", { ...n.item, spec: { ...n.item.spec, ...H } });
    }
    return (H, L) => (ee(), ve("div", qY, [
      B("div", GY, [
        B("span", {
          class: "flex items-center gap-1.5 flex-1 cursor-pointer",
          onClick: L[2] || (L[2] = (A) => o("toggleCollapse"))
        }, [
          B("span", {
            class: ct([e.collapsed ? M(ot).chevronRight : M(ot).chevronDown, "text-16px"])
          }, null, 2),
          v(M(Xi), {
            color: i.value ? "purple" : "cyan",
            style: { margin: "0", "font-weight": "600", "font-size": "12px", "line-height": "18px", padding: "0 6px" }
          }, {
            default: ce(() => [
              Ee(te(a.value), 1)
            ]),
            _: 1
          }, 8, ["color"]),
          i.value ? He("", !0) : (ee(), ve(Ve, { key: 0 }, [
            B("div", KY, [
              (ee(), ve(Ve, null, It(s, (A) => v(M($t), {
                key: A.value,
                size: "small",
                type: l.value === A.value ? "primary" : "default",
                style: { "font-size": "12px", height: "22px" },
                onClick: No((U) => f(A.value), ["stop"])
              }, {
                default: ce(() => [
                  Ee(te(A.label), 1)
                ]),
                _: 2
              }, 1032, ["type", "onClick"])), 64))
            ]),
            l.value === "builder" ? (ee(), Ze(M(bt), {
              key: 0,
              size: "small",
              style: { width: "80px" },
              value: e.item.spec.signal,
              options: u,
              onClick: L[0] || (L[0] = No(() => {
              }, ["stop"])),
              onChange: L[1] || (L[1] = (A) => d(A))
            }, null, 8, ["value"])) : He("", !0),
            L[32] || (L[32] = B("div", { class: "flex-1" }, null, -1))
          ], 64))
        ]),
        v(M($t), {
          class: "p-0!",
          size: "small",
          type: "link",
          onClick: L[3] || (L[3] = No((A) => o("toggleDisabled"), ["stop"]))
        }, {
          default: ce(() => [
            B("span", {
              class: ct(r.value ? M(ot).viewOff : M(ot).view)
            }, null, 2)
          ]),
          _: 1
        }),
        v(M($t), {
          class: "p-0!",
          size: "small",
          type: "link",
          danger: "",
          disabled: !e.canDelete,
          onClick: L[4] || (L[4] = (A) => o("delete"))
        }, {
          default: ce(() => [
            B("span", {
              class: ct(M(ot).delete)
            }, null, 2)
          ]),
          _: 1
        }, 8, ["disabled"])
      ]),
      e.collapsed ? He("", !0) : (ee(), ve("div", YY, [
        e.item.type === "builder_query" && l.value === "builder" && e.item.spec.signal === "metrics" && b.value ? (ee(), ve("div", UY, [
          B("div", XY, [
            L[33] || (L[33] = B("span", { class: "text-xs text-secondary" }, "指标名称", -1)),
            B("div", QY, [
              Ee(te(m.value) + " ", 1),
              v(M(bt), {
                "show-search": "",
                "allow-clear": "",
                loading: m.value,
                size: "small",
                style: { flex: "1" },
                placeholder: "指标名称",
                value: y.value.metricName || void 0,
                options: p.value.map((A) => ({
                  value: A.metricName,
                  label: A.metricName
                })),
                "filter-option": (A, U) => String(U?.value ?? "").toLowerCase().includes(A.toLowerCase()),
                onChange: L[5] || (L[5] = (A) => k(A)),
                onClear: L[6] || (L[6] = () => P({
                  metricName: "",
                  metricType: "",
                  timeAggregation: "rate",
                  spaceAggregation: "sum"
                }))
              }, null, 8, ["loading", "value", "options", "filter-option"]),
              y.value.metricType ? (ee(), Ze(M(Xi), {
                key: 0,
                style: { "font-size": "10px", margin: "0" }
              }, {
                default: ce(() => [
                  Ee(te(y.value.metricType), 1)
                ]),
                _: 1
              })) : He("", !0)
            ])
          ]),
          B("div", ZY, [
            L[34] || (L[34] = B("span", { class: "text-xs text-secondary" }, "源数据筛选", -1)),
            v(M(ft), {
              size: "small",
              placeholder: "如 host.name = 'my-host'",
              value: b.value.filter.expression,
              onChange: L[7] || (L[7] = (A) => $("filter", { expression: A.target.value }))
            }, null, 8, ["value"])
          ]),
          S.value ? (ee(), ve(Ve, { key: 0 }, [
            B("div", JY, [
              B("div", eU, [
                L[35] || (L[35] = B("span", { class: "text-xs text-secondary" }, "跨时序聚合", -1)),
                v(M(bt), {
                  size: "small",
                  value: y.value.spaceAggregation || void 0,
                  options: C.value,
                  disabled: !y.value.metricType,
                  onChange: L[8] || (L[8] = (A) => P({ spaceAggregation: A }))
                }, null, 8, ["value", "options", "disabled"])
              ]),
              B("div", tU, [
                L[36] || (L[36] = B("span", { class: "text-xs text-secondary" }, "分组", -1)),
                v(mg, {
                  "group-by": b.value.groupBy,
                  cfg: e.cfg,
                  signal: "metrics",
                  "metric-name": y.value.metricName,
                  disabled: !y.value.metricName,
                  onChange: L[9] || (L[9] = (A) => $("groupBy", A))
                }, null, 8, ["group-by", "cfg", "metric-name", "disabled"])
              ])
            ]),
            B("div", nU, [
              L[37] || (L[37] = B("span", { class: "text-xs text-secondary" }, "步长（秒）", -1)),
              v(M(fo), {
                size: "small",
                style: { width: "100%" },
                placeholder: "自动",
                value: b.value.stepInterval ?? void 0,
                min: 1,
                onChange: L[10] || (L[10] = (A) => $("stepInterval", A ?? null))
              }, null, 8, ["value"])
            ])
          ], 64)) : (ee(), ve(Ve, { key: 1 }, [
            B("div", oU, [
              B("div", iU, [
                L[40] || (L[40] = B("span", { class: "text-xs text-secondary" }, "时序内聚合", -1)),
                B("div", rU, [
                  v(M(bt), {
                    size: "small",
                    style: { flex: "1" },
                    value: y.value.timeAggregation || void 0,
                    options: O.value,
                    disabled: !y.value.metricType,
                    onChange: L[11] || (L[11] = (A) => P({ timeAggregation: A }))
                  }, null, 8, ["value", "options", "disabled"]),
                  L[38] || (L[38] = B("span", { class: "text-xs text-secondary whitespace-nowrap" }, "每隔", -1)),
                  v(M(fo), {
                    size: "small",
                    style: { width: "60px" },
                    placeholder: "自动",
                    value: b.value.stepInterval ?? void 0,
                    min: 1,
                    onChange: L[12] || (L[12] = (A) => $("stepInterval", A ?? null))
                  }, null, 8, ["value"]),
                  L[39] || (L[39] = B("span", { class: "text-xs text-secondary" }, "秒", -1))
                ])
              ]),
              B("div", aU, [
                L[41] || (L[41] = B("span", { class: "text-xs text-secondary" }, "跨时序聚合", -1)),
                B("div", lU, [
                  v(M(bt), {
                    size: "small",
                    style: { width: "80px" },
                    value: y.value.spaceAggregation || void 0,
                    options: C.value,
                    disabled: !y.value.metricType,
                    onChange: L[13] || (L[13] = (A) => P({ spaceAggregation: A }))
                  }, null, 8, ["value", "options", "disabled"]),
                  v(mg, {
                    "group-by": b.value.groupBy,
                    cfg: e.cfg,
                    signal: "metrics",
                    "metric-name": y.value.metricName,
                    disabled: !y.value.metricName,
                    onChange: L[14] || (L[14] = (A) => $("groupBy", A))
                  }, null, 8, ["group-by", "cfg", "metric-name", "disabled"])
                ])
              ])
            ]),
            B("div", sU, [
              B("div", uU, [
                L[42] || (L[42] = B("span", { class: "text-xs text-secondary" }, "聚合结果筛选", -1)),
                v(M(ft), {
                  size: "small",
                  placeholder: "如 sum > 100",
                  value: b.value.having?.expression ?? "",
                  onChange: L[15] || (L[15] = (A) => $("having", { expression: A.target.value }))
                }, null, 8, ["value"])
              ]),
              B("div", cU, [
                L[43] || (L[43] = B("span", { class: "text-xs text-secondary" }, "条数", -1)),
                v(M(fo), {
                  size: "small",
                  style: { width: "80px" },
                  placeholder: "∞",
                  value: b.value.limit ?? void 0,
                  min: 1,
                  onChange: L[16] || (L[16] = (A) => $("limit", A ?? void 0))
                }, null, 8, ["value"])
              ])
            ]),
            B("div", dU, [
              B("div", fU, [
                L[44] || (L[44] = B("span", { class: "text-xs text-secondary" }, "排序", -1)),
                v(M(bt), {
                  size: "small",
                  "allow-clear": "",
                  placeholder: "字段 升序/降序",
                  value: b.value.order[0] ? `${b.value.order[0].key.name} ${b.value.order[0].direction}` : void 0,
                  options: [
                    { value: "value asc", label: "值 升序" },
                    { value: "value desc", label: "值 降序" }
                  ],
                  onChange: L[17] || (L[17] = (A) => D(A)),
                  onClear: L[18] || (L[18] = () => $("order", []))
                }, null, 8, ["value"])
              ]),
              B("div", pU, [
                L[45] || (L[45] = B("span", { class: "text-xs text-secondary" }, "图例", -1)),
                v(M(ft), {
                  size: "small",
                  placeholder: "{{label}}",
                  value: b.value.legend,
                  onChange: L[19] || (L[19] = (A) => $("legend", A.target.value))
                }, null, 8, ["value"])
              ])
            ])
          ], 64)),
          v(nw, {
            functions: b.value.functions,
            signal: b.value.signal,
            onChange: L[20] || (L[20] = (A) => $("functions", A))
          }, null, 8, ["functions", "signal"])
        ])) : e.item.type === "builder_query" && l.value === "builder" && b.value ? (ee(), ve("div", gU, [
          B("div", hU, [
            L[46] || (L[46] = B("span", { class: "text-xs text-secondary" }, "过滤条件", -1)),
            v(M(ft), {
              size: "small",
              placeholder: "过滤表达式",
              value: b.value.filter.expression,
              onChange: L[21] || (L[21] = (A) => $("filter", { expression: A.target.value }))
            }, null, 8, ["value"])
          ]),
          B("div", vU, [
            L[49] || (L[49] = B("span", { class: "text-xs text-secondary" }, "聚合表达式", -1)),
            B("div", mU, [
              (ee(!0), ve(Ve, null, It(x.value, (A, U) => (ee(), ve("div", {
                key: U,
                class: "flex items-center gap-1"
              }, [
                v(M(ft), {
                  size: "small",
                  style: { flex: "1" },
                  placeholder: "如 count() / avg(body)",
                  value: A.expression,
                  onChange: (j) => N(U, j.target.value)
                }, null, 8, ["value", "onChange"]),
                x.value.length > 1 ? (ee(), Ze(M($t), {
                  key: 0,
                  size: "small",
                  type: "text",
                  danger: "",
                  onClick: (j) => z(U)
                }, {
                  default: ce(() => [...L[47] || (L[47] = [
                    Ee(" × ", -1)
                  ])]),
                  _: 1
                }, 8, ["onClick"])) : He("", !0)
              ]))), 128)),
              v(M($t), {
                size: "small",
                type: "dashed",
                style: { "align-self": "flex-start" },
                onClick: E
              }, {
                default: ce(() => [
                  B("span", {
                    class: ct([M(ot).plus, "mr-0.5"])
                  }, null, 2),
                  L[48] || (L[48] = Ee("添加聚合 ", -1))
                ]),
                _: 1
              })
            ])
          ]),
          B("div", bU, [
            L[50] || (L[50] = B("span", { class: "text-xs text-secondary" }, "分组", -1)),
            v(mg, {
              "group-by": b.value.groupBy,
              cfg: e.cfg,
              signal: b.value.signal,
              onChange: L[22] || (L[22] = (A) => $("groupBy", A))
            }, null, 8, ["group-by", "cfg", "signal"])
          ]),
          B("div", yU, [
            B("div", xU, [
              L[51] || (L[51] = B("span", { class: "text-xs text-secondary" }, "聚合结果筛选", -1)),
              v(M(ft), {
                size: "small",
                placeholder: "如 count > 100",
                value: b.value.having?.expression ?? "",
                onChange: L[23] || (L[23] = (A) => $("having", { expression: A.target.value }))
              }, null, 8, ["value"])
            ]),
            B("div", wU, [
              L[52] || (L[52] = B("span", { class: "text-xs text-secondary" }, "条数", -1)),
              v(M(fo), {
                size: "small",
                style: { width: "80px" },
                placeholder: "∞",
                value: b.value.limit ?? void 0,
                min: 1,
                onChange: L[24] || (L[24] = (A) => $("limit", A ?? void 0))
              }, null, 8, ["value"])
            ])
          ]),
          B("div", SU, [
            L[53] || (L[53] = B("span", { class: "text-xs text-secondary" }, "图例", -1)),
            v(M(ft), {
              size: "small",
              placeholder: "{{label}}",
              value: b.value.legend,
              onChange: L[25] || (L[25] = (A) => $("legend", A.target.value))
            }, null, 8, ["value"])
          ]),
          v(nw, {
            functions: b.value.functions,
            signal: b.value.signal,
            onChange: L[26] || (L[26] = (A) => $("functions", A))
          }, null, 8, ["functions", "signal"])
        ])) : e.item.type === "builder_query" && l.value !== "builder" ? (ee(), ve("div", CU, [
          v(M(ft).TextArea, {
            rows: 4,
            placeholder: l.value === "promql" ? "输入 PromQL 查询语句…" : "输入 ClickHouse SQL 查询语句…",
            value: e.item.rawQuery ?? "",
            style: { "font-family": "monospace", "font-size": "12px" },
            onChange: L[27] || (L[27] = (A) => o("change", { ...e.item, rawQuery: A.target.value }))
          }, null, 8, ["placeholder", "value"]),
          B("div", $U, [
            L[54] || (L[54] = B("span", { class: "text-xs text-secondary whitespace-nowrap" }, "图例格式", -1)),
            v(M(ft), {
              size: "small",
              style: { flex: "1" },
              placeholder: "{{label}}",
              value: e.item.rawLegend ?? "",
              onChange: L[28] || (L[28] = (A) => o("change", { ...e.item, rawLegend: A.target.value }))
            }, null, 8, ["value"])
          ])
        ])) : e.item.type === "builder_formula" ? (ee(), ve("div", PU, [
          B("div", OU, [
            L[55] || (L[55] = B("span", { class: "text-xs text-secondary" }, "表达式", -1)),
            v(M(ft), {
              size: "small",
              placeholder: "如 A + B",
              value: e.item.spec.expression,
              onChange: L[29] || (L[29] = (A) => o("change", {
                ...e.item,
                spec: { ...e.item.spec, expression: A.target.value }
              }))
            }, null, 8, ["value"])
          ]),
          B("div", IU, [
            B("div", MU, [
              L[56] || (L[56] = B("span", { class: "text-xs text-secondary" }, "图例", -1)),
              v(M(ft), {
                size: "small",
                placeholder: "图例格式",
                value: e.item.spec.legend,
                onChange: L[30] || (L[30] = (A) => W({ legend: A.target.value }))
              }, null, 8, ["value"])
            ]),
            B("div", TU, [
              L[57] || (L[57] = B("span", { class: "text-xs text-secondary" }, "条数", -1)),
              v(M(fo), {
                size: "small",
                style: { width: "80px" },
                placeholder: "∞",
                value: e.item.spec.limit ?? void 0,
                min: 1,
                onChange: L[31] || (L[31] = (A) => W({ limit: A ?? void 0 }))
              }, null, 8, ["value"])
            ])
          ])
        ])) : He("", !0)
      ]))
    ]));
  }
}), EU = { class: "flex flex-col gap-2 p-1" }, _U = {
  key: 0,
  class: "flex items-center gap-2 mb-1"
}, AU = { class: "flex gap-1.5 mt-1" }, DU = "ABCDEFGHIJKLMNOPQRSTUVWXYZ", zU = /* @__PURE__ */ ye({
  __name: "ArgusQueryEditor",
  props: {
    query: {},
    datasourceId: {},
    isChart: { type: Boolean }
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, { config: i } = Uu(), r = R(
      () => (i.value.datasourceConfig ?? []).filter((S) => S.type === "argus")
    ), a = le(/* @__PURE__ */ new Set());
    function l(S) {
      return {
        name: S,
        signal: "metrics",
        stepInterval: null,
        disabled: !1,
        filter: { expression: "" },
        having: { expression: "" },
        groupBy: [],
        order: [],
        legend: "",
        functions: [],
        aggregations: [{ metricName: "", metricType: "", timeAggregation: "rate", spaceAggregation: "sum" }]
      };
    }
    function s(S) {
      return { name: S, expression: "", disabled: !1, legend: "", order: [] };
    }
    function u(S, C) {
      o("change", { ...n.query, [S]: C });
    }
    function c() {
      const S = n.query.queries.filter(($) => $.type === "builder_query"), C = DU[S.length] ?? `Q${S.length}`, O = { type: "builder_query", spec: l(C) };
      o("change", { ...n.query, queries: [...n.query.queries, O] });
    }
    function d() {
      const C = `F${n.query.queries.filter(($) => $.type === "builder_formula").length + 1}`, O = { type: "builder_formula", spec: s(C) };
      o("change", { ...n.query, queries: [...n.query.queries, O] });
    }
    function f(S) {
      o("change", { ...n.query, queries: n.query.queries.filter((C) => C.spec.name !== S) });
    }
    function p(S) {
      o("change", {
        ...n.query,
        queries: n.query.queries.map((C) => C.spec.name === S.spec.name ? S : C)
      });
    }
    function m(S) {
      const C = new Set(a.value);
      C.has(S) ? C.delete(S) : C.add(S), a.value = C;
    }
    function b(S) {
      p({ ...S, spec: { ...S.spec, disabled: !S.spec.disabled } });
    }
    const y = R(() => {
      const S = (i.value.datasourceConfig ?? []).filter((O) => O.type === "argus");
      if (!S.length)
        return null;
      const C = S.find((O) => O.uid === n.datasourceId) ?? S.find((O) => O.default) ?? S[0];
      return { url: C.url, token: C.token };
    });
    return (S, C) => (ee(), ve("div", EU, [
      r.value.length > 1 ? (ee(), ve("div", _U, [
        C[1] || (C[1] = B("span", { class: "text-xs text-secondary whitespace-nowrap" }, "数据源", -1)),
        v(M(bt), {
          size: "small",
          style: { width: "180px" },
          value: e.query.datasourceId,
          options: r.value.map((O) => ({ value: O.uid, label: O.name })),
          onChange: C[0] || (C[0] = (O) => u("datasourceId", O))
        }, null, 8, ["value", "options"])
      ])) : He("", !0),
      (ee(!0), ve(Ve, null, It(e.query.queries, (O) => (ee(), Ze(kU, {
        key: O.spec.name,
        item: O,
        cfg: y.value,
        collapsed: a.value.has(O.spec.name),
        "can-delete": e.query.queries.length > 1,
        onToggleCollapse: () => m(O.spec.name),
        onToggleDisabled: () => b(O),
        onDelete: () => f(O.spec.name),
        onChange: p
      }, null, 8, ["item", "cfg", "collapsed", "can-delete", "onToggleCollapse", "onToggleDisabled", "onDelete"]))), 128)),
      B("div", AU, [
        v(M($t), {
          size: "small",
          type: "dashed",
          onClick: c
        }, {
          default: ce(() => [
            B("span", {
              class: ct([M(ot).plus, "mr-1"])
            }, null, 2),
            C[2] || (C[2] = Ee("基础查询 ", -1))
          ]),
          _: 1
        }),
        v(M($t), {
          size: "small",
          type: "dashed",
          onClick: d
        }, {
          default: ce(() => [
            B("span", {
              class: ct([M(ot).plus, "mr-1"])
            }, null, 2),
            C[3] || (C[3] = Ee("衍生算式 ", -1))
          ]),
          _: 1
        })
      ])
    ]));
  }
}), RU = { style: { "padding-top": "6px" } }, NU = { class: "inline-flex items-center gap-1.5 mb-2" }, BU = { class: "text-xs text-secondary" }, LU = {
  key: 0,
  class: "inline-flex items-center gap-1.5 mb-0 ml-2"
}, FU = { class: "text-xs text-secondary" }, HU = {
  key: 1,
  class: "inline-flex items-center gap-1.5 mb-0 ml-2"
}, VU = { class: "text-xs text-secondary" }, jU = {
  class: "text-xs text-secondary",
  style: { "min-width": "28px" }
}, WU = /* @__PURE__ */ ye({
  __name: "MockQueryEditor",
  props: {
    query: {},
    datasourceId: {},
    isChart: { type: Boolean }
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t, { t: o } = jt(), i = R(() => [
      { value: "sine", label: o("qb.pattern.sine") },
      { value: "spike", label: o("qb.pattern.spike") },
      { value: "step", label: o("qb.pattern.step") },
      { value: "sawtooth", label: o("qb.pattern.sawtooth") },
      { value: "noise", label: o("qb.pattern.noise") },
      { value: "trend-up", label: o("qb.pattern.trendUp") },
      { value: "trend-down", label: o("qb.pattern.trendDown") },
      { value: "plateau", label: o("qb.pattern.plateau") },
      { value: "random-walk", label: o("qb.pattern.randomWalk") },
      { value: "live", label: o("qb.pattern.live") }
    ]);
    return (r, a) => (ee(), ve("div", RU, [
      B("div", NU, [
        B("span", BU, te(M(o)("qb.pattern")), 1),
        v(M(bt), {
          size: "small",
          style: { width: "140px" },
          value: e.query.pattern,
          options: i.value,
          onChange: a[0] || (a[0] = (l) => n("change", { ...e.query, pattern: l }))
        }, null, 8, ["value", "options"])
      ]),
      e.isChart ? (ee(), ve("div", LU, [
        B("span", FU, te(M(o)("qb.seriesCount")), 1),
        v(M(qo), {
          min: 1,
          max: 8,
          value: e.query.seriesCount ?? 1,
          style: { width: "200px" },
          onChange: a[1] || (a[1] = (l) => n("change", { ...e.query, seriesCount: l }))
        }, null, 8, ["value"])
      ])) : He("", !0),
      e.query.pattern === "live" ? (ee(), ve("div", HU, [
        B("span", VU, te(M(o)("qb.liveAmplitude")), 1),
        v(M(qo), {
          min: 0.1,
          max: 5,
          step: 0.1,
          value: e.query.liveAmplitude ?? 1,
          style: { width: "160px" },
          onChange: a[2] || (a[2] = (l) => n("change", { ...e.query, liveAmplitude: l }))
        }, null, 8, ["value"]),
        B("span", jU, te((e.query.liveAmplitude ?? 1).toFixed(1)) + "x ", 1)
      ])) : He("", !0)
    ]));
  }
}), Za = /* @__PURE__ */ ye({
  __name: "ComboSelect",
  props: {
    value: {},
    displayValue: {},
    placeholder: {},
    groups: {},
    allowCustom: { type: Boolean, default: !0 },
    loading: { type: Boolean, default: !1 },
    disabled: { type: Boolean, default: !1 }
  },
  emits: ["change", "clear"],
  setup(e, { emit: t }) {
    const n = e, o = t, i = le(n.displayValue ?? n.value ?? "");
    Ie(
      [() => n.value, () => n.displayValue],
      ([s, u]) => {
        i.value = u ?? s ?? "";
      }
    );
    function r(s, u) {
      return s.toLowerCase().includes(u.toLowerCase());
    }
    const a = R(() => {
      const s = i.value, u = n.groups.flatMap((f) => f.options), c = n.allowCustom && s && !u.some((f) => f.value === s || f.label === s) ? [{ label: "── 自定义 ──", options: [{ value: s, label: s }] }] : [], d = s ? n.groups.map((f) => ({ ...f, options: f.options.filter((p) => r(p.label, s)) })).filter((f) => f.options.length > 0) : n.groups;
      return [...c, ...d];
    }), l = R(
      () => a.value.map((s) => ({
        label: s.label,
        options: s.options
      }))
    );
    return (s, u) => (ee(), Ze(M(bt), {
      size: "small",
      style: { width: "100%" },
      "show-search": "",
      "allow-clear": "",
      "filter-option": !1,
      value: e.value || void 0,
      "search-value": i.value,
      placeholder: e.placeholder,
      loading: e.loading,
      disabled: e.disabled,
      options: l.value,
      onFocus: u[0] || (u[0] = () => {
        i.value = e.displayValue ?? e.value ?? "";
      }),
      onSearch: u[1] || (u[1] = (c) => {
        i.value = c;
      }),
      onChange: u[2] || (u[2] = (c) => {
        i.value = String(c ?? ""), o("change", String(c));
      }),
      onClear: u[3] || (u[3] = () => {
        i.value = "", o("clear");
      })
    }, null, 8, ["value", "search-value", "placeholder", "loading", "disabled", "options"]));
  }
}), qU = { class: "flex flex-wrap items-center gap-1.5 mt-1" }, GU = { class: "text-xs text-secondary" }, KU = { class: "font-medium text-blue lh-1" }, YU = /* @__PURE__ */ ye({
  __name: "FunctionsEditor",
  props: {
    functions: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, { t: i } = jt();
    function r(p, m) {
      return m.length === 0 ? `${p.name}()` : `${p.name}(${m.join(", ")})`;
    }
    function a(p) {
      return { def: p, params: [...p.defaultParams], text: r(p, p.defaultParams) };
    }
    function l(p) {
      const m = p.filter((y) => y.def.category === "Alias");
      return [...p.filter((y) => y.def.category !== "Alias"), ...m];
    }
    function s(p) {
      const m = n0.find((y) => y.name === p);
      if (!m)
        return;
      const b = a(m);
      o("change", l([...n.functions, b]));
    }
    function u(p, m, b) {
      const y = n.functions.map((S, C) => {
        if (C !== p)
          return S;
        const O = [...S.params];
        return O[m] = b, { ...S, params: O, text: r(S.def, O) };
      });
      o("change", y);
    }
    function c(p) {
      o("change", n.functions.filter((m, b) => b !== p));
    }
    function d(p, m) {
      const b = p + m;
      if (b < 0 || b >= n.functions.length)
        return;
      const y = [...n.functions];
      [y[p], y[b]] = [y[b], y[p]], o("change", y);
    }
    const f = R(
      () => yk.map((p) => ({
        key: p,
        label: p,
        children: n0.filter((m) => m.category === p).map((m) => ({ key: m.name, label: m.name }))
      }))
    );
    return (p, m) => (ee(), ve("div", qU, [
      B("span", GU, te(M(i)("qb.functions")), 1),
      (ee(!0), ve(Ve, null, It(e.functions, (b, y) => (ee(), ve("div", {
        key: y,
        class: "inline-flex items-center gap-0.5 rounded px-1",
        style: { background: "#eee", "font-size": "12px" }
      }, [
        v(M($t), {
          type: "text",
          size: "small",
          class: "p-0!",
          disabled: y === 0,
          onClick: (S) => d(y, -1)
        }, {
          default: ce(() => [
            B("span", {
              class: ct(M(ot).chevronLeft)
            }, null, 2)
          ]),
          _: 1
        }, 8, ["disabled", "onClick"]),
        B("span", KU, te(b.def.name), 1),
        m[1] || (m[1] = B("span", { class: "text-yellow" }, "(", -1)),
        (ee(!0), ve(Ve, null, It(b.def.params, (S, C) => (ee(), ve(Ve, { key: C }, [
          S.options ? (ee(), Ze(M(bt), {
            key: 0,
            size: "small",
            value: String(b.params[C] ?? S.options[0]),
            options: S.options.map((O) => ({ value: String(O), label: String(O) })),
            "popup-match-select-width": "false",
            bordered: !1,
            variant: "borderless",
            style: { "min-width": "60px" },
            onChange: (O) => u(y, C, O)
          }, null, 8, ["value", "options", "onChange"])) : (ee(), Ze(M(ft), {
            key: 1,
            class: "text-green text-center",
            size: "small",
            bordered: !1,
            value: String(b.params[C] ?? ""),
            style: { width: "40px", padding: "0 4px", height: "20px" },
            variant: "borderless",
            onChange: (O) => u(y, C, O.target.value)
          }, null, 8, ["value", "onChange"]))
        ], 64))), 128)),
        m[2] || (m[2] = B("span", { class: "text-yellow font-medium" }, ")", -1)),
        v(M($t), {
          type: "text",
          size: "small",
          class: "p-0!",
          disabled: y === e.functions.length - 1,
          onClick: (S) => d(y, 1)
        }, {
          default: ce(() => [
            B("span", {
              class: ct(M(ot).chevronRight)
            }, null, 2)
          ]),
          _: 1
        }, 8, ["disabled", "onClick"]),
        v(M($t), {
          type: "text",
          size: "small",
          class: "p-0!",
          danger: "",
          onClick: (S) => c(y)
        }, {
          default: ce(() => [
            B("span", {
              class: ct(M(ot).delete)
            }, null, 2)
          ]),
          _: 1
        }, 8, ["onClick"])
      ]))), 128)),
      v(M(Ui), { trigger: ["click"] }, {
        overlay: ce(() => [
          v(M(lo), {
            onClick: m[0] || (m[0] = ({ key: b }) => s(String(b)))
          }, {
            default: ce(() => [
              (ee(!0), ve(Ve, null, It(f.value, (b) => (ee(), Ze(M(lo).SubMenu, {
                key: b.key,
                title: b.label
              }, {
                default: ce(() => [
                  (ee(!0), ve(Ve, null, It(b.children, (y) => (ee(), Ze(M(lo).Item, {
                    key: y.key
                  }, {
                    default: ce(() => [
                      Ee(te(y.label), 1)
                    ]),
                    _: 2
                  }, 1024))), 128))
                ]),
                _: 2
              }, 1032, ["title"]))), 128))
            ]),
            _: 1
          })
        ]),
        default: ce(() => [
          v(M($t), {
            size: "small",
            type: "dashed"
          }, {
            default: ce(() => [
              Ee(" + " + te(M(i)("qb.functions.add")), 1)
            ]),
            _: 1
          })
        ]),
        _: 1
      })
    ]));
  }
}), UU = { class: "flex flex-wrap items-center gap-0 mt-3" }, XU = { class: "text-xs text-secondary font-medium" }, QU = { class: "text-xs" }, ZU = { class: "inline-flex items-center gap-1.5 mr-3" }, JU = { class: "text-xs text-secondary whitespace-nowrap" }, eX = { class: "inline-flex items-center gap-1.5 mr-3" }, tX = { class: "text-xs text-secondary whitespace-nowrap" }, nX = { class: "inline-flex items-center gap-1.5 mr-3" }, oX = { class: "text-xs text-secondary whitespace-nowrap" }, iX = { class: "inline-flex items-center gap-1.5 mr-3" }, rX = { class: "text-xs text-secondary whitespace-nowrap" }, aX = {
  key: 1,
  class: "inline-flex items-center gap-1.5 mr-3"
}, lX = { class: "text-xs text-secondary whitespace-nowrap" }, sX = { class: "inline-flex items-center gap-1.5 mr-3" }, uX = { class: "text-xs text-secondary whitespace-nowrap" }, cX = { class: "inline-flex items-center gap-1.5 mr-3" }, dX = { class: "text-xs text-secondary whitespace-nowrap" }, fX = { class: "inline-flex items-center gap-1.5 mr-3" }, pX = { class: "text-xs text-secondary whitespace-nowrap" }, gX = { class: "inline-flex items-center gap-1.5 mr-3" }, hX = { class: "text-xs text-secondary whitespace-nowrap" }, vX = { class: "inline-flex items-center gap-1.5 mr-3" }, mX = { class: "text-xs text-secondary whitespace-nowrap" }, bX = { class: "inline-flex items-center gap-1.5 mr-3" }, yX = { class: "text-xs text-secondary whitespace-nowrap" }, xX = { class: "inline-flex items-center gap-1.5 mr-3" }, wX = { class: "text-xs text-secondary whitespace-nowrap" }, SX = { class: "inline-flex items-center gap-1.5 mr-3" }, CX = { class: "text-xs text-secondary whitespace-nowrap" }, $X = /* @__PURE__ */ ye({
  __name: "OptionsEditor",
  props: {
    queryType: {},
    options: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, { t: i } = jt(), r = le(!0);
    function a(c) {
      o("change", { ...n.options, ...c });
    }
    const l = [
      { value: 2, label: i("qb.ack.all") },
      { value: 0, label: i("qb.ack.unack") },
      { value: 1, label: i("qb.ack.ack") }
    ], s = [
      { value: "default", label: i("qb.sort.default") },
      { value: "lastchange", label: i("qb.sort.lastchange") },
      { value: "severity", label: i("qb.sort.severity") }
    ], u = [
      { value: "default", label: i("qb.trends.default") },
      { value: "true", label: i("qb.trends.true") },
      { value: "false", label: i("qb.trends.false") }
    ];
    return (c, d) => (ee(), ve("div", UU, [
      B("div", {
        class: "inline-flex items-center gap-1.5 cursor-pointer py-1 mr-2 select-none flex-shrink-0",
        onClick: d[0] || (d[0] = (f) => r.value = !r.value)
      }, [
        B("span", XU, te(M(i)("qb.options")), 1),
        B("span", QU, te(r.value ? "▸" : "▾"), 1)
      ]),
      B("div", {
        class: "flex flex-wrap items-center overflow-hidden transition-all",
        style: xt({ maxHeight: r.value ? "200px" : "0" })
      }, [
        e.queryType === "metrics" || e.queryType === "itemid" || e.queryType === "services" ? (ee(), ve(Ve, { key: 0 }, [
          B("div", ZU, [
            B("span", JU, te(M(i)("qb.options.trends")), 1),
            v(M(bt), {
              size: "small",
              style: { width: "100px" },
              value: e.options.useTrends ?? "default",
              options: u,
              onChange: d[1] || (d[1] = (f) => a({ useTrends: f }))
            }, null, 8, ["value"])
          ]),
          B("div", eX, [
            B("span", tX, te(M(i)("qb.options.showDisabled")), 1),
            v(M(Rr), {
              size: "small",
              checked: !!e.options.showDisabledItems,
              onChange: d[2] || (d[2] = (f) => a({ showDisabledItems: f }))
            }, null, 8, ["checked"])
          ]),
          B("div", nX, [
            B("span", oX, te(M(i)("qb.options.valueMapping")), 1),
            v(M(Rr), {
              size: "small",
              checked: !!e.options.useZabbixValueMapping,
              onChange: d[3] || (d[3] = (f) => a({ useZabbixValueMapping: f }))
            }, null, 8, ["checked"])
          ]),
          B("div", iX, [
            B("span", rX, te(M(i)("qb.options.disableAlignment")), 1),
            v(M(Rr), {
              size: "small",
              checked: !!e.options.disableDataAlignment,
              onChange: d[4] || (d[4] = (f) => a({ disableDataAlignment: f }))
            }, null, 8, ["checked"])
          ])
        ], 64)) : He("", !0),
        e.queryType === "text" ? (ee(), ve("div", aX, [
          B("span", lX, te(M(i)("qb.options.showDisabled")), 1),
          v(M(Rr), {
            size: "small",
            checked: !!e.options.showDisabledItems,
            onChange: d[5] || (d[5] = (f) => a({ showDisabledItems: f }))
          }, null, 8, ["checked"])
        ])) : He("", !0),
        e.queryType === "problems" ? (ee(), ve(Ve, { key: 2 }, [
          B("div", sX, [
            B("span", uX, te(M(i)("qb.options.acknowledged")), 1),
            v(M(bt), {
              size: "small",
              style: { width: "140px" },
              value: e.options.acknowledged ?? 2,
              options: l,
              onChange: d[6] || (d[6] = (f) => a({ acknowledged: f }))
            }, null, 8, ["value"])
          ]),
          B("div", cX, [
            B("span", dX, te(M(i)("qb.options.sortBy")), 1),
            v(M(bt), {
              size: "small",
              style: { width: "120px" },
              value: e.options.sortProblems ?? "default",
              options: s,
              onChange: d[7] || (d[7] = (f) => a({ sortProblems: f }))
            }, null, 8, ["value"])
          ]),
          B("div", fX, [
            B("span", pX, te(M(i)("qb.options.useTimeRange")), 1),
            v(M(Rr), {
              size: "small",
              checked: !!e.options.useTimeRange,
              onChange: d[8] || (d[8] = (f) => a({ useTimeRange: f }))
            }, null, 8, ["checked"])
          ]),
          B("div", gX, [
            B("span", hX, te(M(i)("qb.options.hostsInMaintenance")), 1),
            v(M(Rr), {
              size: "small",
              checked: !!e.options.hostsInMaintenance,
              onChange: d[9] || (d[9] = (f) => a({ hostsInMaintenance: f }))
            }, null, 8, ["checked"])
          ]),
          B("div", vX, [
            B("span", mX, te(M(i)("qb.options.hostProxy")), 1),
            v(M(Rr), {
              size: "small",
              checked: !!e.options.hostProxy,
              onChange: d[10] || (d[10] = (f) => a({ hostProxy: f }))
            }, null, 8, ["checked"])
          ]),
          B("div", bX, [
            B("span", yX, te(M(i)("qb.options.limit")), 1),
            v(M(ft), {
              size: "small",
              type: "number",
              style: { width: "80px" },
              value: e.options.limit ?? 100,
              onChange: d[11] || (d[11] = (f) => a({ limit: Number(f.target.value) }))
            }, null, 8, ["value"])
          ])
        ], 64)) : He("", !0),
        e.queryType === "triggers" ? (ee(), ve(Ve, { key: 3 }, [
          B("div", xX, [
            B("span", wX, te(M(i)("qb.options.acknowledged")), 1),
            v(M(bt), {
              size: "small",
              style: { width: "140px" },
              value: e.options.acknowledged ?? 2,
              options: l,
              onChange: d[12] || (d[12] = (f) => a({ acknowledged: f }))
            }, null, 8, ["value"])
          ]),
          B("div", SX, [
            B("span", CX, te(M(i)("qb.options.useTimeRange")), 1),
            v(M(Rr), {
              size: "small",
              checked: !!e.options.useTimeRange,
              onChange: d[13] || (d[13] = (f) => a({ useTimeRange: f }))
            }, null, 8, ["checked"])
          ])
        ], 64)) : He("", !0)
      ], 4)
    ]));
  }
});
function pO(e) {
  const t = xs();
  return R(() => {
    const n = e();
    if (!n)
      return [];
    if (!n.startsWith("$"))
      return [n];
    const o = n.slice(1), i = Object.values(t.variables).find(
      (l) => l.config.name === o
    );
    if (!i)
      return [];
    const r = i.current, a = Array.isArray(r) ? r : [r];
    return a.includes("$__all") ? i.options.map((l) => l.value).filter((l) => l !== "$__all") : a.filter(Boolean);
  });
}
function PX(e, t) {
  const n = le([]), o = le([]), i = le(!1), r = le(!1), a = pO(() => e().groupId);
  return Ie(
    () => ({ url: t().url, token: t().token }),
    async ({ url: l, token: s }) => {
      if (l) {
        i.value = !0, n.value = [];
        try {
          n.value = await ck({ url: l, token: s });
        } catch {
        } finally {
          i.value = !1;
        }
      }
    },
    { immediate: !0, deep: !0 }
  ), Ie(
    [a, () => t().url, () => t().token],
    async ([l, s, u]) => {
      if (!s || l.length === 0) {
        o.value = [];
        return;
      }
      r.value = !0, o.value = [];
      try {
        o.value = await dk(l, void 0, { url: s, token: u });
      } catch {
      } finally {
        r.value = !1;
      }
    },
    { immediate: !0 }
  ), { groups: n, hosts: o, loadingGroups: i, loadingHosts: r, resolvedGroupIds: a };
}
function OX(e) {
  const { config: t } = Uu(), n = R(() => (t.value.datasourceConfig ?? []).filter((a) => a.type === "zabbix").map((a, l) => ({
    uid: a.uid || String(l),
    name: a.name,
    url: a.url,
    token: a.token,
    isDefault: !!a.default
  }))), o = R(() => {
    const r = wO(e);
    return n.value.find((l) => l.uid === r) ?? n.value[0] ?? { url: "", token: "" };
  }), i = R(
    () => n.value.find((r) => r.isDefault)?.uid ?? n.value[0]?.uid ?? ""
  );
  return { sources: n, cfg: o, defaultUid: i };
}
const IX = {
  class: "flex flex-col gap-3 p-2",
  style: { "font-size": "12px" }
}, MX = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, TX = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, kX = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, EX = { key: 0 }, _X = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, AX = {
  key: 1,
  style: { "max-width": "400px" }
}, DX = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, zX = {
  class: "grid gap-3",
  style: { "grid-template-columns": "1fr 1fr" }
}, RX = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, NX = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, BX = { class: "flex items-center gap-2" }, LX = {
  class: "text-secondary",
  style: { "font-size": "11px" }
}, FX = { key: 3 }, HX = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, VX = { key: 4 }, jX = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, WX = {
  class: "grid gap-3",
  style: { "grid-template-columns": "1fr 1fr 1fr" }
}, qX = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, GX = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, KX = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, YX = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, UX = { class: "flex flex-wrap gap-1" }, XX = {
  key: 6,
  class: "grid gap-3",
  style: { "grid-template-columns": "1fr 1fr 1fr" }
}, QX = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, ZX = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, JX = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, eQ = { key: 7 }, tQ = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, nQ = {
  key: 8,
  class: "grid gap-3",
  style: { "grid-template-columns": "1fr 1fr" }
}, oQ = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, iQ = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, rQ = /* @__PURE__ */ ye({
  __name: "ZabbixQueryEditor",
  props: {
    query: {},
    datasourceId: {},
    isChart: { type: Boolean }
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, { t: i } = jt(), { cfg: r } = OX(() => n.datasourceId), a = xs();
    function l(ge) {
      o("change", { ...n.query, ...ge });
    }
    const s = R(
      () => Object.values(a.variables).map((ge) => ({
        value: `$${ge.config.name}`,
        label: `$${ge.config.name}`
      }))
    );
    function u(ge, de) {
      const ne = [];
      return s.value.length > 0 && ne.push({ label: "── 变量 ──", options: s.value }), ne.push({ label: ge, options: de }), ne;
    }
    function c(ge) {
      return typeof ge == "string" && ge.startsWith("$");
    }
    const { groups: d, hosts: f, loadingGroups: p, loadingHosts: m } = PX(
      () => n.query,
      () => r.value
    ), b = pO(() => n.query.hostId), y = R(
      () => d.value.map((ge) => ({ value: ge.groupid, label: ge.name }))
    ), S = R(
      () => f.value.map((ge) => ({ value: ge.hostid, label: ge.name || ge.host }))
    ), C = le([]), O = le(!1);
    Ie(
      [
        b,
        () => r.value.url,
        () => r.value.token,
        () => n.query.queryType
      ],
      async ([ge, de, ne, we]) => {
        if (we !== "metrics") {
          C.value = [];
          return;
        }
        if (!ge.length || !de) {
          C.value = [];
          return;
        }
        O.value = !0;
        try {
          C.value = (await Promise.all(
            ge.map(
              (ae) => fk([ae], void 0, void 0, { url: de, token: ne })
            )
          )).flat();
        } catch {
          C.value = [];
        } finally {
          O.value = !1;
        }
      },
      { immediate: !0 }
    );
    const $ = R(() => {
      const ge = /* @__PURE__ */ new Set();
      return C.value.flatMap(
        (de) => (de.tags ?? []).map((ne) => pk(ne))
      ).filter((de) => ge.has(de) ? !1 : (ge.add(de), !0)).map((de) => ({ value: de, label: de }));
    }), P = R(() => {
      if (!n.query.itemTagsFilter)
        return C.value;
      const [ge, de] = n.query.itemTagsFilter.split(":").map((ne) => ne.trim());
      return C.value.filter(
        (ne) => (ne.tags ?? []).some(
          (we) => we.tag === ge && (de ? we.value === de : !0)
        )
      );
    }), k = R(() => {
      const ge = /* @__PURE__ */ new Set();
      return P.value.map((de) => de.name).filter((de) => ge.has(de) ? !1 : (ge.add(de), !0)).map((de) => ({ value: de, label: de }));
    }), x = le([]), E = le(!1);
    Ie(
      [
        () => n.query.hostId,
        () => r.value.url,
        () => r.value.token,
        () => n.query.queryType
      ],
      async ([ge, de, ne, we]) => {
        if (we !== "text" || !ge || !de) {
          x.value = [];
          return;
        }
        E.value = !0;
        try {
          x.value = await gk([ge], void 0, { url: de, token: ne });
        } catch {
          x.value = [];
        } finally {
          E.value = !1;
        }
      },
      { immediate: !0 }
    );
    const z = R(() => {
      const ge = /* @__PURE__ */ new Set();
      return x.value.map((de) => de.name).filter((de) => ge.has(de) ? !1 : (ge.add(de), !0)).map((de) => ({ value: de, label: de }));
    }), N = le([]), D = le(!1);
    Ie(
      [() => r.value.url, () => r.value.token, () => n.query.queryType],
      async ([ge, de, ne]) => {
        if (!(ne !== "services" || !ge)) {
          D.value = !0;
          try {
            N.value = await vk({ url: ge, token: de });
          } catch {
            N.value = [];
          } finally {
            D.value = !1;
          }
        }
      },
      { immediate: !0 }
    );
    const W = le([]), H = le(!1);
    Ie(
      [
        () => n.query.hostId,
        () => r.value.url,
        () => r.value.token,
        () => n.query.queryType
      ],
      async ([ge, de, ne, we]) => {
        if (we !== "macros" || !ge || !de) {
          W.value = [];
          return;
        }
        H.value = !0;
        try {
          W.value = await hk([ge], { url: de, token: ne });
        } catch {
          W.value = [];
        } finally {
          H.value = !1;
        }
      },
      { immediate: !0 }
    );
    const L = le([]), A = le(!1), U = le([]), j = le(!1);
    Ie(
      [
        () => n.query.hostId,
        () => r.value.url,
        () => r.value.token,
        () => n.query.queryType
      ],
      async ([ge, de, ne, we]) => {
        if (we !== "lld" || !ge || ge.startsWith("$") || !de) {
          L.value = [];
          return;
        }
        A.value = !0;
        try {
          L.value = await mk([ge], { url: de, token: ne });
        } catch {
          L.value = [];
        } finally {
          A.value = !1;
        }
      },
      { immediate: !0 }
    ), Ie(
      [() => n.query.lldRuleId, () => r.value.url, () => r.value.token],
      async ([ge, de, ne]) => {
        if (!ge || !de) {
          U.value = [];
          return;
        }
        j.value = !0;
        try {
          const we = /* @__PURE__ */ new Set();
          U.value = (await bk(ge, { url: de, token: ne })).map((ae) => {
            const se = ae.key_.includes("[") ? ae.key_.slice(0, ae.key_.indexOf("[")) : ae.key_;
            return { value: se, label: `${ae.name} (${se})` };
          }).filter((ae) => we.has(ae.value) ? !1 : (we.add(ae.value), !0));
        } catch {
          U.value = [];
        } finally {
          j.value = !1;
        }
      },
      { immediate: !0 }
    );
    const re = [
      "metrics",
      "text",
      "services",
      "itemid",
      "triggers",
      "problems",
      "macros",
      "lld"
    ], G = [
      "problems",
      "recent",
      "history"
    ], Y = {
      problems: "Problems",
      recent: "Recent problems",
      history: "History"
    }, K = [
      { value: 0, label: "Not classified", color: "#97aab3" },
      { value: 1, label: "Information", color: "#7499ff" },
      { value: 2, label: "Warning", color: "#ffc859" },
      { value: 3, label: "Average", color: "#ffa059" },
      { value: 4, label: "High", color: "#e97659" },
      { value: 5, label: "Disaster", color: "#e45959" }
    ], J = [
      { value: "status", label: "Status" },
      { value: "sli", label: "SLI" },
      { value: "uptime", label: "Uptime" },
      { value: "downtime", label: "Downtime" },
      { value: "error_budget", label: "Error budget" }
    ], be = [
      { value: "none", label: "No interval" },
      { value: "auto", label: "Auto" },
      { value: "1h", label: "1 hour" },
      { value: "12h", label: "12 hours" },
      { value: "1d", label: "24 hours" },
      { value: "1w", label: "1 week" },
      { value: "1M", label: "1 month" }
    ], xe = R(
      () => ["metrics", "text", "triggers", "problems", "macros", "lld"].includes(
        n.query.queryType
      )
    );
    return (ge, de) => (ee(), ve("div", IX, [
      B("div", null, [
        B("div", MX, te(M(i)("qb.queryType")), 1),
        v(M(bt), {
          size: "small",
          style: { width: "100%" },
          value: e.query.queryType,
          options: re.map((ne) => ({
            value: ne,
            label: M(i)(`qb.queryType.${ne}`)
          })),
          onChange: de[0] || (de[0] = (ne) => l({ queryType: ne, itemIds: [], itemNames: [], itemids: "" }))
        }, null, 8, ["value", "options"])
      ]),
      xe.value ? (ee(), ve("div", {
        key: 0,
        class: "grid gap-3",
        style: xt({ gridTemplateColumns: e.query.queryType === "metrics" ? "repeat(3, 1fr)" : "repeat(2, 1fr)" })
      }, [
        B("div", null, [
          B("div", TX, te(M(i)("panel.group")), 1),
          v(M(Do), {
            spinning: M(p),
            size: "small"
          }, {
            default: ce(() => [
              v(Za, {
                value: e.query.groupId || void 0,
                "display-value": e.query.groupName || void 0,
                placeholder: M(i)("panel.group.placeholder"),
                groups: u("── 主机组 ──", y.value),
                onChange: de[1] || (de[1] = (ne) => l({ groupId: ne, groupName: c(ne) ? ne : M(d).find((we) => we.groupid === ne)?.name ?? ne, hostId: "", hostName: "", itemIds: [], itemNames: [] })),
                onClear: de[2] || (de[2] = () => l({ groupId: "", groupName: "", hostId: "", hostName: "", itemIds: [], itemNames: [] }))
              }, null, 8, ["value", "display-value", "placeholder", "groups"])
            ]),
            _: 1
          }, 8, ["spinning"])
        ]),
        B("div", null, [
          B("div", kX, te(M(i)("panel.host")), 1),
          v(M(Do), {
            spinning: M(m),
            size: "small"
          }, {
            default: ce(() => [
              v(Za, {
                value: e.query.hostId || void 0,
                "display-value": e.query.hostName || void 0,
                placeholder: M(i)("panel.host.placeholder"),
                groups: u("── 主机 ──", S.value),
                onChange: de[3] || (de[3] = (ne) => l({ hostId: ne, hostName: c(ne) ? ne : M(f).find((we) => we.hostid === ne)?.name ?? ne, itemIds: [], itemNames: [] })),
                onClear: de[4] || (de[4] = () => l({ hostId: "", hostName: "", itemIds: [], itemNames: [] }))
              }, null, 8, ["value", "display-value", "placeholder", "groups"])
            ]),
            _: 1
          }, 8, ["spinning"])
        ]),
        e.query.queryType === "metrics" ? (ee(), ve("div", EX, [
          B("div", _X, te(M(i)("panel.itemTag")), 1),
          v(M(Do), {
            spinning: O.value,
            size: "small"
          }, {
            default: ce(() => [
              v(Za, {
                value: e.query.itemTagsFilter || void 0,
                placeholder: M(i)("panel.itemTag.placeholder"),
                groups: u("── 标签 ──", $.value),
                onChange: de[5] || (de[5] = (ne) => l({ itemTagsFilter: ne ?? "", itemIds: [], itemNames: [] })),
                onClear: de[6] || (de[6] = () => l({ itemTagsFilter: "", itemIds: [], itemNames: [] }))
              }, null, 8, ["value", "placeholder", "groups"])
            ]),
            _: 1
          }, 8, ["spinning"])
        ])) : He("", !0)
      ], 4)) : He("", !0),
      e.query.queryType === "metrics" ? (ee(), ve("div", AX, [
        B("div", DX, te(M(i)("panel.items")), 1),
        v(Za, {
          value: e.query.itemNames[0] || void 0,
          placeholder: M(i)("panel.items.placeholder"),
          groups: u("── 监控项 ──", k.value),
          onChange: de[7] || (de[7] = (ne) => l({ itemNames: [ne], itemIds: [] })),
          onClear: de[8] || (de[8] = () => l({ itemNames: [], itemIds: [] }))
        }, null, 8, ["value", "placeholder", "groups"])
      ])) : He("", !0),
      e.query.queryType === "text" ? (ee(), ve(Ve, { key: 2 }, [
        B("div", zX, [
          B("div", null, [
            B("div", RX, te(M(i)("panel.items")), 1),
            v(M(Do), {
              spinning: E.value,
              size: "small"
            }, {
              default: ce(() => [
                v(Za, {
                  value: e.query.itemNames[0] || void 0,
                  placeholder: M(i)("panel.items.placeholder"),
                  disabled: !e.query.hostId,
                  groups: u("── 监控项 ──", z.value),
                  onChange: de[9] || (de[9] = (ne) => l({ itemNames: [ne], itemIds: [] })),
                  onClear: de[10] || (de[10] = () => l({ itemNames: [], itemIds: [] }))
                }, null, 8, ["value", "placeholder", "disabled", "groups"])
              ]),
              _: 1
            }, 8, ["spinning"])
          ]),
          B("div", null, [
            B("div", NX, te(M(i)("qb.textFilter")), 1),
            v(M(ft), {
              size: "small",
              style: { width: "100%" },
              value: e.query.textFilter,
              onChange: de[11] || (de[11] = (ne) => l({ textFilter: ne.target.value }))
            }, null, 8, ["value"])
          ])
        ]),
        B("div", BX, [
          v(M(ai), {
            checked: e.query.useCaptureGroups,
            onChange: de[12] || (de[12] = (ne) => l({ useCaptureGroups: ne.target.checked }))
          }, null, 8, ["checked"]),
          B("span", LX, te(M(i)("qb.useCaptureGroups")), 1)
        ])
      ], 64)) : He("", !0),
      e.query.queryType === "itemid" ? (ee(), ve("div", FX, [
        B("div", HX, te(M(i)("qb.itemIds")), 1),
        v(M(ft), {
          size: "small",
          style: { width: "100%" },
          value: e.query.itemids,
          placeholder: M(i)("qb.itemIds.placeholder"),
          onChange: de[13] || (de[13] = (ne) => l({ itemids: ne.target.value }))
        }, null, 8, ["value", "placeholder"])
      ])) : He("", !0),
      e.query.queryType === "triggers" ? (ee(), ve("div", VX, [
        B("div", jX, te(M(i)("qb.triggerFilter")), 1),
        v(M(ft), {
          size: "small",
          style: { width: "100%" },
          value: e.query.triggerFilter,
          onChange: de[14] || (de[14] = (ne) => l({ triggerFilter: ne.target.value }))
        }, null, 8, ["value"])
      ])) : He("", !0),
      e.query.queryType === "problems" ? (ee(), ve(Ve, { key: 5 }, [
        B("div", WX, [
          B("div", null, [
            B("div", qX, te(M(i)("qb.problemName")), 1),
            v(M(ft), {
              size: "small",
              style: { width: "100%" },
              value: e.query.triggerFilter,
              onChange: de[15] || (de[15] = (ne) => l({ triggerFilter: ne.target.value }))
            }, null, 8, ["value"])
          ]),
          B("div", null, [
            B("div", GX, te(M(i)("qb.tags")), 1),
            v(M(ft), {
              size: "small",
              style: { width: "100%" },
              value: e.query.tagsFilter,
              onChange: de[16] || (de[16] = (ne) => l({ tagsFilter: ne.target.value }))
            }, null, 8, ["value"])
          ]),
          B("div", null, [
            B("div", KX, te(M(i)("qb.show")), 1),
            v(M(bt), {
              size: "small",
              style: { width: "100%" },
              value: e.query.showProblems,
              options: G.map((ne) => ({ value: ne, label: Y[ne] })),
              onChange: de[17] || (de[17] = (ne) => l({ showProblems: ne }))
            }, null, 8, ["value", "options"])
          ])
        ]),
        B("div", null, [
          B("div", YX, te(M(i)("qb.severity")), 1),
          B("div", UX, [
            (ee(), ve(Ve, null, It(K, (ne) => v(M(Xi), {
              key: ne.value,
              color: e.query.severities.includes(ne.value) ? ne.color : void 0,
              class: "cursor-pointer select-none",
              style: xt({ opacity: e.query.severities.includes(ne.value) ? 1 : 0.4 }),
              onClick: () => l({ severities: e.query.severities.includes(ne.value) ? e.query.severities.filter((we) => we !== ne.value) : [...e.query.severities, ne.value] })
            }, {
              default: ce(() => [
                Ee(te(ne.label), 1)
              ]),
              _: 2
            }, 1032, ["color", "style", "onClick"])), 64))
          ])
        ])
      ], 64)) : He("", !0),
      e.query.queryType === "services" ? (ee(), ve("div", XX, [
        B("div", null, [
          B("div", QX, te(M(i)("qb.itService")), 1),
          v(M(Do), {
            spinning: D.value,
            size: "small"
          }, {
            default: ce(() => [
              v(Za, {
                value: e.query.itServiceFilter || void 0,
                placeholder: M(i)("qb.itService.placeholder"),
                groups: u("── 服务 ──", N.value.map((ne) => ({ value: ne.name, label: ne.name }))),
                onChange: de[18] || (de[18] = (ne) => l({ itServiceFilter: ne })),
                onClear: de[19] || (de[19] = () => l({ itServiceFilter: "" }))
              }, null, 8, ["value", "placeholder", "groups"])
            ]),
            _: 1
          }, 8, ["spinning"])
        ]),
        B("div", null, [
          B("div", ZX, te(M(i)("qb.slaProperty")), 1),
          v(M(bt), {
            size: "small",
            style: { width: "100%" },
            value: e.query.slaProperty,
            options: J,
            onChange: de[20] || (de[20] = (ne) => l({ slaProperty: ne }))
          }, null, 8, ["value"])
        ]),
        B("div", null, [
          B("div", JX, te(M(i)("qb.slaInterval")), 1),
          v(M(bt), {
            size: "small",
            style: { width: "100%" },
            value: e.query.slaInterval,
            options: be,
            onChange: de[21] || (de[21] = (ne) => l({ slaInterval: ne }))
          }, null, 8, ["value"])
        ])
      ])) : He("", !0),
      e.query.queryType === "macros" ? (ee(), ve("div", eQ, [
        B("div", tQ, te(M(i)("qb.macroFilter")), 1),
        v(M(Do), {
          spinning: H.value,
          size: "small"
        }, {
          default: ce(() => [
            v(Za, {
              value: e.query.macroFilter || void 0,
              placeholder: "{$MACRO_NAME}",
              disabled: !e.query.hostId,
              groups: [{ label: "── 宏 ──", options: W.value.map((ne) => ({ value: ne.macro, label: `${ne.macro} = ${ne.value}` })) }],
              onChange: de[22] || (de[22] = (ne) => l({ macroFilter: ne })),
              onClear: de[23] || (de[23] = () => l({ macroFilter: "" }))
            }, null, 8, ["value", "disabled", "groups"])
          ]),
          _: 1
        }, 8, ["spinning"])
      ])) : He("", !0),
      e.query.queryType === "lld" ? (ee(), ve("div", nQ, [
        B("div", null, [
          B("div", oQ, te(M(i)("qb.lld.rule")), 1),
          v(M(Do), {
            spinning: A.value,
            size: "small"
          }, {
            default: ce(() => [
              v(M(bt), {
                size: "small",
                style: { width: "100%" },
                "allow-clear": "",
                "show-search": "",
                value: e.query.lldRuleId || void 0,
                placeholder: M(i)("qb.lld.rule.placeholder"),
                options: L.value.map((ne) => ({ value: ne.itemid, label: ne.name })),
                onChange: de[24] || (de[24] = (ne) => l({ lldRuleId: ne, lldRuleName: L.value.find((we) => we.itemid === ne)?.name ?? ne, lldItemKeys: [] })),
                onClear: de[25] || (de[25] = () => l({ lldRuleId: "", lldRuleName: "", lldItemKeys: [] }))
              }, null, 8, ["value", "placeholder", "options"])
            ]),
            _: 1
          }, 8, ["spinning"])
        ]),
        B("div", null, [
          B("div", iQ, te(M(i)("qb.lld.itemKeys")), 1),
          v(M(Do), {
            spinning: j.value,
            size: "small"
          }, {
            default: ce(() => [
              v(M(bt), {
                size: "small",
                style: { width: "100%" },
                mode: "multiple",
                "allow-clear": "",
                value: e.query.lldItemKeys ?? [],
                options: U.value,
                onChange: de[26] || (de[26] = (ne) => l({ lldItemKeys: ne }))
              }, null, 8, ["value", "options"])
            ]),
            _: 1
          }, 8, ["spinning"])
        ])
      ])) : He("", !0),
      ["metrics", "itemid", "services"].includes(e.query.queryType) ? (ee(), Ze(YU, {
        key: 9,
        functions: e.query.functions ?? [],
        onChange: de[27] || (de[27] = (ne) => l({ functions: ne }))
      }, null, 8, ["functions"])) : He("", !0),
      ["macros", "lld"].includes(e.query.queryType) ? He("", !0) : (ee(), Ze($X, {
        key: 10,
        "query-type": e.query.queryType,
        options: e.query.options ?? {},
        onChange: de[28] || (de[28] = (ne) => l({ options: ne }))
      }, null, 8, ["query-type", "options"]))
    ]));
  }
});
class aQ {
  type = "argus";
  meta = { type: "argus", displayName: "Argus", icon: "📊" };
  QueryEditor = zU;
  defaultQuery = () => ({
    type: "argus",
    datasourceId: "",
    queries: [
      {
        type: "builder_query",
        spec: {
          name: "A",
          signal: "metrics",
          stepInterval: null,
          disabled: !1,
          filter: { expression: "" },
          having: { expression: "" },
          groupBy: [],
          order: [],
          legend: "",
          functions: [],
          aggregations: [{ metricName: "", metricType: "", timeAggregation: "rate", spaceAggregation: "sum" }]
        }
      }
    ]
  });
  async query() {
    return { data: [], state: "Done" };
  }
}
class lQ {
  type = "zabbix";
  meta = { type: "zabbix", displayName: "Zabbix", icon: "" };
  QueryEditor = rQ;
  defaultQuery = () => ({
    type: "zabbix",
    datasourceId: "",
    queryType: "metrics",
    groupId: "",
    groupName: "",
    hostId: "",
    hostName: "",
    appId: "",
    appName: "",
    itemIds: [],
    itemNames: [],
    textFilter: "",
    useCaptureGroups: !1,
    itemTagsFilter: "",
    itemids: "",
    triggerFilter: "",
    tagsFilter: "",
    showProblems: "problems",
    severities: [],
    itServiceFilter: "",
    slaFilter: "",
    slaProperty: "sli",
    slaInterval: "none",
    macroFilter: "",
    lldRuleId: "",
    lldRuleName: "",
    lldItemKeys: [],
    functions: [],
    options: {
      useTrends: "default",
      showDisabledItems: !1,
      useZabbixValueMapping: !1,
      disableDataAlignment: !1,
      acknowledged: 2,
      sortProblems: "default",
      useTimeRange: !1,
      hostsInMaintenance: !1,
      hostProxy: !1,
      limit: 100
    }
  });
  async query() {
    return { data: [], state: "Done" };
  }
}
let ow = !1;
function sQ() {
  if (ow)
    return;
  ow = !0, MI();
  const e = new gI();
  e.QueryEditor = WU, tp(e), tp(new aQ()), tp(new lQ());
}
const cZ = /* @__PURE__ */ ye({
  __name: "ArgusBoard",
  props: {
    config: { default: () => ({
      hideHeader: !1,
      canEdit: !0,
      theme: null,
      lang: null,
      isEditing: !0,
      initialEditingPanelId: null,
      datasourceConfig: null
    }) }
  },
  emits: ["save"],
  setup(e, { emit: t }) {
    const n = e, o = t;
    sQ(), NO({
      ...n.config,
      onSave: (d) => o("save", d)
    });
    const i = qr();
    n.config.theme && i.setTheme(n.config.theme);
    const r = R(() => n.config.theme ?? i.theme);
    Ie(r, (d) => {
      document.documentElement.dataset.theme = d, document.body.dataset.theme = d;
    }, { immediate: !0 });
    const a = le(n.config.lang ?? "zh");
    zO(a), Ie(() => n.config.lang, (d) => {
      d && (a.value = d);
    });
    const l = wr();
    Pt(() => {
      n.config.canEdit === !1 ? l.setEditing(!1) : n.config.isEditing !== null && l.setEditing(n.config.isEditing), n.config.initialConfig ? l.importJSON(
        typeof n.config.initialConfig == "string" ? n.config.initialConfig : JSON.stringify(n.config.initialConfig)
      ) : n.config.renderDefaultDashboard === !1 && l.importJSON(JSON.stringify({ title: "", panels: {}, layouts: [] })), n.config.initialEditingPanelId && l.setEditingPanel(n.config.initialEditingPanelId);
    });
    const s = R(() => ({
      algorithm: r.value === "dark" ? d1.darkAlgorithm : d1.defaultAlgorithm,
      token: { colorPrimary: "#1677ff", borderRadius: 4 },
      getPopupContainer: () => document.body
    })), u = R(() => r.value === "dark"), c = R(() => u.value ? "#141414" : "#f0f2f5");
    return (d, f) => (ee(), Ze(M(pl), { theme: s.value }, {
      default: ce(() => [
        v(M(ps), null, {
          default: ce(() => [
            v(M(t1), {
              style: xt({ minHeight: "100%", background: c.value })
            }, {
              default: ce(() => [
                v(M(t1).Content, { style: { padding: 0, flex: 1, minHeight: 0 } }, {
                  default: ce(() => [
                    v(LY)
                  ]),
                  _: 1
                })
              ]),
              _: 1
            }, 8, ["style"])
          ]),
          _: 1
        })
      ]),
      _: 1
    }, 8, ["theme"]));
  }
}), uQ = { class: "log-toolbar" }, cQ = { class: "log-scroller" }, dQ = { class: "log-time" }, fQ = { class: "log-message" }, pQ = {
  key: 0,
  class: "log-empty"
}, gQ = /* @__PURE__ */ ye({
  __name: "LogViewer",
  props: {
    logs: {},
    maxHeight: { default: 400 }
  },
  setup(e) {
    const t = e, n = le(""), o = le([]), i = R(() => t.logs.filter((a) => !(o.value.length > 0 && !o.value.includes(a.level) || n.value && !a.message.toLowerCase().includes(n.value.toLowerCase())))), r = {
      error: "#ff4d4f",
      warn: "#faad14",
      info: "#52c41a",
      debug: "#8c8c8c"
    };
    return (a, l) => {
      const s = Vt("a-input"), u = Vt("a-select");
      return ee(), ve("div", {
        class: "log-viewer",
        style: xt({ maxHeight: `${e.maxHeight}px` })
      }, [
        B("div", uQ, [
          v(s, {
            value: n.value,
            "onUpdate:value": l[0] || (l[0] = (c) => n.value = c),
            size: "small",
            placeholder: "Search logs...",
            "allow-clear": "",
            style: { flex: "1" }
          }, null, 8, ["value"]),
          v(u, {
            value: o.value,
            "onUpdate:value": l[1] || (l[1] = (c) => o.value = c),
            mode: "multiple",
            size: "small",
            placeholder: "Level",
            style: { "min-width": "160px" },
            options: [
              { value: "error", label: "Error" },
              { value: "warn", label: "Warn" },
              { value: "info", label: "Info" },
              { value: "debug", label: "Debug" }
            ]
          }, null, 8, ["value"])
        ]),
        B("div", cQ, [
          (ee(!0), ve(Ve, null, It(i.value, (c) => (ee(), ve("div", {
            key: c.id,
            class: "log-entry"
          }, [
            B("span", dQ, te(new Date(c.timestamp).toLocaleTimeString()), 1),
            B("span", {
              class: "log-level",
              style: xt({ color: r[c.level] })
            }, te(c.level.toUpperCase()), 5),
            B("span", fQ, te(c.message), 1)
          ]))), 128))
        ]),
        i.value.length === 0 ? (ee(), ve("div", pQ, " No log entries ")) : He("", !0)
      ], 4);
    };
  }
}), dZ = /* @__PURE__ */ Yo(gQ, [["__scopeId", "data-v-22a0d40d"]]), hQ = {
  key: 0,
  class: "topology-empty"
}, vQ = ["width", "height"], mQ = { class: "edges" }, bQ = ["x1", "y1", "x2", "y2"], yQ = ["cx", "cy", "fill", "stroke"], xQ = ["x", "y"], wQ = ["x", "y"], SQ = /* @__PURE__ */ ye({
  __name: "ServiceTopology",
  props: {
    nodes: { default: () => [] },
    edges: { default: () => [] },
    width: { default: 800 },
    height: { default: 500 }
  },
  setup(e) {
    const t = e, n = le(), o = le({});
    function i() {
      if (t.nodes.length === 0)
        return;
      const a = Math.ceil(Math.sqrt(t.nodes.length)), l = t.width / a, s = t.height / Math.ceil(t.nodes.length / a), u = {};
      t.nodes.forEach((c, d) => {
        const f = d % a, p = Math.floor(d / a);
        u[c.id] = {
          x: f * l + l / 2,
          y: p * s + s / 2
        };
      }), o.value = u;
    }
    Pt(i);
    function r(a) {
      return a ? a > 0.05 ? "#ff4d4f" : a > 0.01 ? "#faad14" : "#52c41a" : "#52c41a";
    }
    return (a, l) => (ee(), ve("div", {
      class: "service-topology",
      style: xt({ width: `${e.width}px`, height: `${e.height}px` })
    }, [
      e.nodes.length === 0 ? (ee(), ve("div", hQ, " No topology data ")) : (ee(), ve("svg", {
        key: 1,
        ref_key: "svgRef",
        ref: n,
        width: e.width,
        height: e.height
      }, [
        B("g", mQ, [
          (ee(!0), ve(Ve, null, It(e.edges, (s) => (ee(), ve("line", {
            key: `${s.source}-${s.target}`,
            x1: o.value[s.source]?.x ?? 0,
            y1: o.value[s.source]?.y ?? 0,
            x2: o.value[s.target]?.x ?? 0,
            y2: o.value[s.target]?.y ?? 0,
            stroke: "var(--ant-color-border)",
            "stroke-width": "1.5",
            "marker-end": "url(#arrowhead)"
          }, null, 8, bQ))), 128))
        ]),
        l[0] || (l[0] = B("defs", null, [
          B("marker", {
            id: "arrowhead",
            markerWidth: "10",
            markerHeight: "7",
            refX: "10",
            refY: "3.5",
            orient: "auto"
          }, [
            B("polygon", {
              points: "0 0, 10 3.5, 0 7",
              fill: "var(--ant-color-border)"
            })
          ])
        ], -1)),
        (ee(!0), ve(Ve, null, It(e.nodes, (s) => (ee(), ve("g", {
          key: s.id,
          class: "topology-node"
        }, [
          B("circle", {
            cx: o.value[s.id]?.x ?? 0,
            cy: o.value[s.id]?.y ?? 0,
            r: "24",
            fill: r(s.errorRate),
            "fill-opacity": "0.15",
            stroke: r(s.errorRate),
            "stroke-width": "2"
          }, null, 8, yQ),
          B("text", {
            x: o.value[s.id]?.x ?? 0,
            y: (o.value[s.id]?.y ?? 0) + 4,
            "text-anchor": "middle",
            "font-size": "10",
            fill: "var(--ant-color-text)"
          }, te(s.name), 9, xQ),
          s.latency !== void 0 ? (ee(), ve("text", {
            key: 0,
            x: o.value[s.id]?.x ?? 0,
            y: (o.value[s.id]?.y ?? 0) + 36,
            "text-anchor": "middle",
            "font-size": "9",
            fill: "var(--ant-color-text-secondary)"
          }, te(s.latency) + "ms ", 9, wQ)) : He("", !0)
        ]))), 128))
      ], 8, vQ))
    ], 4));
  }
}), fZ = /* @__PURE__ */ Yo(SQ, [["__scopeId", "data-v-da85d863"]]), CQ = { class: "trace-waterfall" }, $Q = {
  key: 0,
  class: "trace-empty"
}, PQ = { class: "trace-name-col" }, OQ = { class: "trace-service" }, IQ = { class: "trace-op" }, MQ = { class: "trace-bar-col" }, TQ = { class: "trace-dur-col" }, kQ = /* @__PURE__ */ ye({
  __name: "TraceWaterfall",
  props: {
    spans: { default: () => [] },
    startTime: {},
    endTime: {}
  },
  setup(e) {
    const t = e, n = R(() => t.startTime ?? Math.min(...t.spans.map((u) => u.startTime))), o = R(() => t.endTime ?? Math.max(...t.spans.map((u) => u.startTime + u.duration))), i = R(() => o.value - n.value);
    function r(u) {
      return (u.startTime - n.value) / i.value * 100;
    }
    function a(u) {
      return Math.max(u.duration / i.value * 100, 0.5);
    }
    function l(u) {
      return u >= 1e6 ? `${(u / 1e6).toFixed(2)}s` : u >= 1e3 ? `${(u / 1e3).toFixed(2)}ms` : `${u}μs`;
    }
    const s = {
      ok: "#52c41a",
      error: "#ff4d4f",
      unset: "#1677ff"
    };
    return (u, c) => (ee(), ve("div", CQ, [
      e.spans.length === 0 ? (ee(), ve("div", $Q, " No trace data ")) : (ee(), ve(Ve, { key: 1 }, [
        c[0] || (c[0] = B("div", { class: "trace-header" }, [
          B("div", { class: "trace-name-col" }, " Operation "),
          B("div", { class: "trace-bar-col" }, " Timeline "),
          B("div", { class: "trace-dur-col" }, " Duration ")
        ], -1)),
        (ee(!0), ve(Ve, null, It(e.spans, (d) => (ee(), ve("div", {
          key: d.spanId,
          class: "trace-row"
        }, [
          B("div", PQ, [
            B("span", OQ, te(d.serviceName), 1),
            B("span", IQ, te(d.operationName), 1)
          ]),
          B("div", MQ, [
            B("div", {
              class: "trace-bar",
              style: xt({
                left: `${r(d)}%`,
                width: `${a(d)}%`,
                background: s[d.status ?? "unset"]
              })
            }, null, 4)
          ]),
          B("div", TQ, te(l(d.duration)), 1)
        ]))), 128))
      ], 64))
    ]));
  }
}), pZ = /* @__PURE__ */ Yo(kQ, [["__scopeId", "data-v-0212681c"]]), gZ = /* @__PURE__ */ ye({
  __name: "SimpleChart",
  props: {
    options: {},
    data: {}
  },
  setup(e) {
    const t = e, n = le(), o = le(null), i = le({ width: 0, height: 0 });
    let r = null;
    function a() {
      o.value && (o.value.destroy(), o.value = null);
    }
    return At(() => {
      r?.disconnect(), a();
    }), Lt((l) => {
      n.value && (r = new ResizeObserver((s) => {
        const { width: u, height: c } = s[0].contentRect;
        u > 0 && c > 0 && (i.value = { width: Math.floor(u), height: Math.floor(c) });
      }), r.observe(n.value), i.value = {
        width: Math.floor(n.value.getBoundingClientRect().width),
        height: Math.floor(n.value.getBoundingClientRect().height)
      }, l(() => {
        r?.disconnect();
      }));
    }), Lt((l) => {
      !n.value || i.value.width <= 0 || i.value.height <= 0 || (a(), o.value = new Qn(
        { ...t.options, width: i.value.width, height: i.value.height },
        t.data,
        n.value
      ), l(() => {
        a();
      }));
    }), (l, s) => (ee(), ve("div", {
      ref_key: "containerRef",
      ref: n,
      class: "w-full h-full"
    }, null, 512));
  }
}), EQ = { class: "kbd-key" }, _Q = /* @__PURE__ */ ye({
  __name: "Kbd",
  props: {
    char: {}
  },
  setup(e) {
    return (t, n) => (ee(), ve("kbd", EQ, [
      Wr(t.$slots, "default", {}, () => [
        Ee(te(e.char), 1)
      ], !0)
    ]));
  }
}), hZ = /* @__PURE__ */ Yo(_Q, [["__scopeId", "data-v-94fb4749"]]), AQ = ["href", "target"], DQ = {
  key: 1,
  class: "panel-links-icon",
  style: { cursor: "pointer" }
}, zQ = { style: { "font-size": "10px", "margin-left": "2px" } }, RQ = /* @__PURE__ */ ye({
  __name: "PanelLinksIcon",
  props: {
    panel: {}
  },
  setup(e) {
    return (t, n) => e.panel.links && e.panel.links.length > 0 ? (ee(), Ze(M(xo), {
      key: 0,
      title: e.panel.links.map((o) => o.title ?? o.url).join(", ")
    }, {
      default: ce(() => [
        e.panel.links.length === 1 ? (ee(), ve("a", {
          key: 0,
          href: e.panel.links[0].url,
          target: e.panel.links[0].newTab ? "_blank" : "_self",
          class: "panel-links-icon",
          onClick: n[0] || (n[0] = No(() => {
          }, ["stop"]))
        }, [...n[1] || (n[1] = [
          B("span", {
            class: "i-mdi-link",
            style: { "font-size": "14px" }
          }, null, -1)
        ])], 8, AQ)) : (ee(), ve("span", DQ, [
          n[2] || (n[2] = B("span", {
            class: "i-mdi-link-variant",
            style: { "font-size": "14px" }
          }, null, -1)),
          B("span", zQ, te(e.panel.links.length), 1)
        ]))
      ]),
      _: 1
    }, 8, ["title"])) : He("", !0);
  }
}), vZ = /* @__PURE__ */ Yo(RQ, [["__scopeId", "data-v-6925a5a2"]]), NQ = { class: "viz-picker" }, BQ = { class: "viz-picker-title" }, LQ = { class: "viz-picker-grid" }, FQ = ["onClick"], HQ = { class: "viz-picker-label" }, VQ = /* @__PURE__ */ ye({
  __name: "VizPickerPane",
  setup(e) {
    const { t } = jt(), { panel: n, onChange: o } = qs(), i = [
      { type: "timeseries", icon: ot.chartLine, labelKey: "config.type.timeseries" },
      { type: "bar", icon: ot.chartBar, labelKey: "config.type.bar" },
      { type: "stat", icon: ot.stat, labelKey: "config.type.stat" },
      { type: "gauge", icon: ot.gauge, labelKey: "config.type.gauge" },
      { type: "pie", icon: ot.chartPie, labelKey: "config.type.pie" },
      { type: "table", icon: ot.table, labelKey: "config.type.table" },
      { type: "histogram", icon: ot.chartArea, labelKey: "config.type.histogram" }
    ];
    return (r, a) => (ee(), ve("div", NQ, [
      B("div", BQ, te(M(t)("editor.vizPicker.title")), 1),
      B("div", LQ, [
        (ee(), ve(Ve, null, It(i, (l) => B("button", {
          key: l.type,
          class: ct(["viz-picker-item", { "viz-picker-item--active": M(n).type === l.type }]),
          onClick: (s) => M(o)({ type: l.type })
        }, [
          B("span", {
            class: ct(["viz-picker-icon", [l.icon]])
          }, null, 2),
          B("span", HQ, te(M(t)(l.labelKey)), 1)
        ], 10, FQ)), 64))
      ])
    ]));
  }
}), mZ = /* @__PURE__ */ Yo(VQ, [["__scopeId", "data-v-1d0d144f"]]);
export {
  MY as AddPanelModal,
  eb as AgChart,
  cZ as ArgusBoard,
  zU as ArgusQueryEditor,
  AY as DashboardHeader,
  LY as DashboardPage,
  hZ as Kbd,
  dZ as LogViewer,
  WU as MockQueryEditor,
  tw as PanelContainer,
  fY as PanelEditorLayout,
  vY as PanelEditorModal,
  vZ as PanelLinksIcon,
  qh as PanelRenderer,
  fZ as ServiceTopology,
  gZ as SimpleChart,
  dO as TimeRangePicker,
  pZ as TraceWaterfall,
  IG as UPlotChart,
  fO as VariableBar,
  NK as VariableConfigModal,
  mZ as VizPickerPane,
  NO as provideArgusBoardConfig,
  PG as providePlotContext,
  sQ as registerAllPlugins,
  Uu as useArgusBoardConfig,
  uZ as usePlotContext
};
