import { inject as zt, ref as le, provide as Bt, readonly as ME, computed as E, reactive as $n, Fragment as Je, isVNode as dr, Comment as EP, Text as Zb, defineComponent as be, getCurrentInstance as pr, onMounted as At, onUpdated as Ya, onUnmounted as Vo, watch as Ie, unref as _, shallowRef as $e, watchEffect as It, onBeforeUnmount as qt, triggerRef as EE, createVNode as h, h as ko, Transition as Dr, withDirectives as ti, resolveDirective as DE, cloneVNode as Ml, render as El, nextTick as Yt, toRef as Kt, withModifiers as cr, vShow as Oi, onBeforeMount as nh, Teleport as oh, createTextVNode as Le, isRef as DP, toRefs as ys, toRaw as fr, useAttrs as AE, onBeforeUpdate as Jb, getCurrentScope as AP, onScopeDispose as NP, TransitionGroup as ey, onActivated as RP, openBlock as ne, createElementBlock as xe, normalizeStyle as Ht, normalizeClass as Pt, renderSlot as lr, createCommentVNode as nt, renderList as Ut, createBlock as dt, mergeProps as NE, withCtx as he, createSlots as Bx, createElementVNode as B, toDisplayString as oe, useSlots as RE, resolveComponent as yn, resolveDynamicComponent as zP, toValue as zE } from "vue";
import { merge as Lx, isEmpty as FP } from "lodash-es";
import { defineStore as ty } from "pinia";
import BP from "lodash-es/isPlainObject";
import ny from "lodash-es/isEqual";
import Sg from "lodash-es/uniq";
import FE from "lodash-es/fromPairs";
import LP from "lodash-es/debounce";
import yo from "dayjs";
import BE from "dayjs/plugin/weekday";
import LE from "dayjs/plugin/localeData";
import HE from "dayjs/plugin/weekOfYear";
import VE from "dayjs/plugin/weekYear";
import jE from "dayjs/plugin/quarterOfYear";
import WE from "dayjs/plugin/advancedFormat";
import KE from "dayjs/plugin/customParseFormat";
import Kf from "lodash-es/cloneDeep";
import qE from "lodash-es/find";
import YE from "lodash-es/intersection";
import GE from "lodash-es/omit";
import HP from "lodash-es/pick";
import { isNumber as UE, isString as Zv, isBoolean as XE } from "lodash";
const QE = {
  "common.auto": "Auto",
  "common.all": "All",
  "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",
  "panel.remove.cancel": "Cancel",
  "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",
  "dashboard.empty": "No panels yet",
  "dashboard.emptyHint": 'Click "Edit" then "Add Panel" to get started',
  "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",
  "variable.custom.allValue.placeholder": "$_all",
  "variable.custom.col.text": "Display text",
  "variable.custom.col.value": "Value",
  "variable.custom.text.placeholder": "Display text",
  "variable.custom.value.placeholder": "Value",
  "variable.custom.addOption": "Add option",
  "variable.custom.allowCustomValue": "Allow custom values",
  "variable.custom.allowClear": "Allow clear",
  "variable.custom.multi": "Multi-value",
  "variable.custom.includeAll": "Include All option",
  "variable.general.label.placeholder": "Display label",
  "variable.general.description": "Description",
  "variable.general.description.placeholder": "Variable description",
  "variable.general.name.required": "Name is required",
  "variable.general.type.required": "Please select a type",
  "variable.general.showOn": "Show on dashboard",
  "variable.general.showOn.labelAndValue": "Label and value",
  "variable.general.showOn.value": "Value only",
  "variable.general.showOn.nothing": "Nothing",
  "variable.textbox.title": "Text box options",
  "variable.textbox.default": "Default value",
  "variable.textbox.default.placeholder": "Default value",
  "variable.textbox.width": "Input width",
  "variable.constant.title": "Constant options",
  "variable.constant.value": "Value",
  "variable.constant.value.required": "Value is required",
  "variable.constant.value.notNumber": "Please enter a valid number",
  "variable.constant.valueType": "Value type",
  "variable.constant.valueType.string": "String",
  "variable.constant.valueType.number": "Number",
  "variable.constant.hideFromList": "Hide from variable list",
  "variable.query.dsUid": "Datasource UID",
  "variable.query.dsUid.placeholder": "Enter datasource UID",
  "variable.query.queryType": "Query type",
  "variable.query.queryType.placeholder": "Select query type",
  "variable.query.queryType.group": "Host group",
  "variable.query.queryType.host": "Host",
  "variable.query.queryType.item": "Item",
  "variable.query.queryType.labelValues": "Label values",
  "variable.query.query": "Query",
  "variable.query.query.placeholder": "Query expression",
  "variable.query.regex": "Regex filter",
  "variable.query.regex.placeholder": "/regex/",
  "variable.query.sort": "Sort",
  "variable.query.sort.disabled": "Disabled",
  "variable.query.sort.alphabetical": "Alphabetical",
  "variable.query.sort.numeric": "Numerical",
  "variable.query.preview": "Preview",
  "variable.query.preview.placeholder": "(Refresh after save)",
  "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.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"
}, VP = {
  "panel.noData": "暂无数据",
  "common.auto": "自动",
  "common.all": "全部",
  "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": "删除",
  "panel.remove.cancel": "取消",
  "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": "刷新",
  "dashboard.empty": "暂无面板",
  "dashboard.emptyHint": '点击"编辑"后选择"添加面板"开始',
  "variable.modal.placeholder": '点击左侧"新增变量"开始配置',
  "variable.custom.title": "自定义选项",
  "variable.custom.add": "添加选项",
  "variable.custom.allValue": "全部值",
  "variable.custom.allValue.placeholder": "自定义全选值",
  "variable.custom.col.text": "显示文本",
  "variable.custom.col.value": "值",
  "variable.custom.text.placeholder": "显示文本",
  "variable.custom.value.placeholder": "值",
  "variable.custom.addOption": "添加选项",
  "variable.custom.allowCustomValue": "允许输入自定义值",
  "variable.custom.allowClear": "允许清空",
  "variable.custom.multi": "多选",
  "variable.custom.includeAll": "包含全选项",
  "variable.general.label.placeholder": "显示标签",
  "variable.general.description": "描述",
  "variable.general.description.placeholder": "变量描述",
  "variable.general.name.required": "名称不能为空",
  "variable.general.type.required": "请选择类型",
  "variable.general.showOn": "显示方式",
  "variable.general.showOn.labelAndValue": "标签和值",
  "variable.general.showOn.value": "仅值",
  "variable.general.showOn.nothing": "不显示",
  "variable.textbox.title": "文本框选项",
  "variable.textbox.default": "默认值",
  "variable.textbox.default.placeholder": "默认值",
  "variable.textbox.width": "输入框宽度",
  "variable.constant.title": "常量选项",
  "variable.constant.value": "值",
  "variable.constant.value.required": "值不能为空",
  "variable.constant.value.notNumber": "请输入有效数字",
  "variable.constant.valueType": "值类型",
  "variable.constant.valueType.string": "字符串",
  "variable.constant.valueType.number": "数字",
  "variable.constant.hideFromList": "从变量列表隐藏",
  "variable.query.dsUid": "数据源 UID",
  "variable.query.dsUid.placeholder": "输入数据源 UID",
  "variable.query.queryType": "查询类型",
  "variable.query.queryType.placeholder": "选择查询类型",
  "variable.query.queryType.group": "主机组",
  "variable.query.queryType.host": "主机",
  "variable.query.queryType.item": "监控项",
  "variable.query.queryType.labelValues": "标签值",
  "variable.query.query": "查询语句",
  "variable.query.query.placeholder": "查询表达式",
  "variable.query.regex": "提取正则",
  "variable.query.regex.placeholder": "/regex/",
  "variable.query.sort": "排序",
  "variable.query.sort.disabled": "禁用",
  "variable.query.sort.alphabetical": "字母顺序",
  "variable.query.sort.numeric": "数字顺序",
  "variable.query.preview": "预览结果",
  "variable.query.preview.placeholder": "（保存后刷新预览）",
  "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.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": "数量限制"
}, ZE = { zh: VP, en: QE }, jP = Symbol("lang");
function JE(e) {
  Bt(jP, e);
}
function sn() {
  const e = zt(jP, le("zh"));
  function t(n, o) {
    let i = ZE[e.value][n] ?? VP[n] ?? n;
    if (o)
      for (const [a, l] of Object.entries(o))
        i = i.replace(`{${a}}`, String(l));
    return i;
  }
  return { t, lang: e };
}
const eD = {
  hideHeader: !1,
  canEdit: !0,
  theme: null,
  lang: null,
  isEditing: null,
  initialEditingPanelId: null,
  datasourceConfig: null
}, WP = Symbol("argusBoardConfig");
function KP(e) {
  return { config: ME(E(e)) };
}
function tD(e) {
  const t = KP(e);
  return Bt(WP, t), t;
}
function tc() {
  const e = zt(WP);
  return e || KP(() => eD);
}
async function nD(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 oD(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 ?? [];
}
function rD(e, t) {
  if (e.type === "builder_formula") {
    const { name: i, expression: a, disabled: l, legend: s, limit: u, order: c } = e.spec;
    return {
      type: e.type,
      spec: {
        name: i,
        expression: a,
        disabled: l,
        ...s ? { legend: s } : {},
        ...u != null ? { limit: u } : {},
        ...c && c.length > 0 ? { order: c } : {}
      }
    };
  }
  if (e.queryType === "promql")
    return {
      type: "promql",
      spec: {
        name: e.spec.name,
        query: e.rawQuery ?? "",
        disabled: e.spec.disabled,
        ...e.rawLegend ? { legend: e.rawLegend } : {},
        stats: !1
      }
    };
  if (e.queryType === "clickhouse_sql")
    return {
      type: "clickhouse_sql",
      spec: {
        name: e.spec.name,
        query: e.rawQuery ?? "",
        disabled: e.spec.disabled,
        ...e.rawLegend ? { legend: e.rawLegend } : {}
      }
    };
  const n = e.spec, o = n.signal === "metrics", r = n.aggregations.map((i) => {
    if (o && "metricName" in i) {
      const a = t.get(i.metricName);
      return { ...Object.fromEntries(Object.entries(i).filter(([s]) => s !== "metricType")), temporality: a?.temporality ?? "" };
    }
    return i;
  });
  return {
    type: e.type,
    spec: {
      name: n.name,
      signal: n.signal,
      ...n.source !== null && n.source !== void 0 ? { source: n.source } : {},
      stepInterval: n.stepInterval,
      disabled: n.disabled,
      filter: n.filter,
      aggregations: r,
      ...n.groupBy && n.groupBy.length > 0 ? { groupBy: n.groupBy } : {},
      ...n.having?.expression ? { having: n.having } : {},
      ...n.order && n.order.length > 0 ? { order: n.order } : {},
      ...n.functions && n.functions.length > 0 ? { functions: n.functions } : {},
      ...n.limit !== null && n.limit !== void 0 ? { limit: n.limit } : {},
      ...n.legend ? { legend: n.legend } : {}
    }
  };
}
async function ffe(e, t, n, o, r) {
  const i = e.filter((f) => !f.spec.disabled);
  if (i.length === 0)
    return { data: { results: [] } };
  const a = r ?? /* @__PURE__ */ new Map(), l = t * 1e3, s = n * 1e3, u = {
    schemaVersion: "v1",
    start: l,
    end: s,
    requestType: "time_series",
    compositeQuery: {
      queries: i.map((f) => rD(f, a))
    },
    formatOptions: { formatTableResultForUI: !1, fillGaps: !1 },
    variables: {
      SIGNOZ_START_TIME: { value: l },
      SIGNOZ_END_TIME: { value: s }
    }
  }, c = await fetch(`${o.url}/v5/query_range`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      ...o.token ? { Authorization: `Bearer ${o.token}` } : {}
    },
    body: JSON.stringify(u)
  });
  if (!c.ok)
    throw new Error(`Argus API HTTP error: ${c.status}`);
  const d = await c.json();
  if (d.error)
    throw new Error(`Argus API error: ${d.error}`);
  return d;
}
//! moment.js
//! version : 2.30.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
var qP;
function mt() {
  return qP.apply(null, arguments);
}
function iD(e) {
  qP = e;
}
function ki(e) {
  return e instanceof Array || Object.prototype.toString.call(e) === "[object Array]";
}
function xs(e) {
  return e != null && Object.prototype.toString.call(e) === "[object Object]";
}
function Tn(e, t) {
  return Object.prototype.hasOwnProperty.call(e, t);
}
function oy(e) {
  if (Object.getOwnPropertyNames)
    return Object.getOwnPropertyNames(e).length === 0;
  var t;
  for (t in e)
    if (Tn(e, t))
      return !1;
  return !0;
}
function vr(e) {
  return e === void 0;
}
function Ba(e) {
  return typeof e == "number" || Object.prototype.toString.call(e) === "[object Number]";
}
function Od(e) {
  return e instanceof Date || Object.prototype.toString.call(e) === "[object Date]";
}
function YP(e, t) {
  var n = [], o, r = e.length;
  for (o = 0; o < r; ++o)
    n.push(t(e[o], o));
  return n;
}
function wl(e, t) {
  for (var n in t)
    Tn(t, n) && (e[n] = t[n]);
  return Tn(t, "toString") && (e.toString = t.toString), Tn(t, "valueOf") && (e.valueOf = t.valueOf), e;
}
function ra(e, t, n, o) {
  return vO(e, t, n, o, !0).utc();
}
function aD() {
  return {
    empty: !1,
    unusedTokens: [],
    unusedInput: [],
    overflow: -2,
    charsLeftOver: 0,
    nullInput: !1,
    invalidEra: null,
    invalidMonth: null,
    invalidFormat: !1,
    userInvalidated: !1,
    iso: !1,
    parsedDateParts: [],
    era: null,
    meridiem: null,
    rfc2822: !1,
    weekdayMismatch: !1
  };
}
function nn(e) {
  return e._pf == null && (e._pf = aD()), e._pf;
}
var Jv;
Array.prototype.some ? Jv = Array.prototype.some : Jv = function(e) {
  var t = Object(this), n = t.length >>> 0, o;
  for (o = 0; o < n; o++)
    if (o in t && e.call(this, t[o], o, t))
      return !0;
  return !1;
};
function ry(e) {
  var t = null, n = !1, o = e._d && !isNaN(e._d.getTime());
  if (o && (t = nn(e), n = Jv.call(t.parsedDateParts, function(r) {
    return r != null;
  }), o = t.overflow < 0 && !t.empty && !t.invalidEra && !t.invalidMonth && !t.invalidWeekday && !t.weekdayMismatch && !t.nullInput && !t.invalidFormat && !t.userInvalidated && (!t.meridiem || t.meridiem && n), e._strict && (o = o && t.charsLeftOver === 0 && t.unusedTokens.length === 0 && t.bigHour === void 0)), Object.isFrozen == null || !Object.isFrozen(e))
    e._isValid = o;
  else
    return o;
  return e._isValid;
}
function rh(e) {
  var t = ra(NaN);
  return e != null ? wl(nn(t), e) : nn(t).userInvalidated = !0, t;
}
var Hx = mt.momentProperties = [], Cg = !1;
function iy(e, t) {
  var n, o, r, i = Hx.length;
  if (vr(t._isAMomentObject) || (e._isAMomentObject = t._isAMomentObject), vr(t._i) || (e._i = t._i), vr(t._f) || (e._f = t._f), vr(t._l) || (e._l = t._l), vr(t._strict) || (e._strict = t._strict), vr(t._tzm) || (e._tzm = t._tzm), vr(t._isUTC) || (e._isUTC = t._isUTC), vr(t._offset) || (e._offset = t._offset), vr(t._pf) || (e._pf = nn(t)), vr(t._locale) || (e._locale = t._locale), i > 0)
    for (n = 0; n < i; n++)
      o = Hx[n], r = t[o], vr(r) || (e[o] = r);
  return e;
}
function kd(e) {
  iy(this, e), this._d = new Date(e._d != null ? e._d.getTime() : NaN), this.isValid() || (this._d = /* @__PURE__ */ new Date(NaN)), Cg === !1 && (Cg = !0, mt.updateOffset(this), Cg = !1);
}
function Ii(e) {
  return e instanceof kd || e != null && e._isAMomentObject != null;
}
function GP(e) {
  mt.suppressDeprecationWarnings === !1 && typeof console < "u" && console.warn && console.warn("Deprecation warning: " + e);
}
function oi(e, t) {
  var n = !0;
  return wl(function() {
    if (mt.deprecationHandler != null && mt.deprecationHandler(null, e), n) {
      var o = [], r, i, a, l = arguments.length;
      for (i = 0; i < l; i++) {
        if (r = "", typeof arguments[i] == "object") {
          r += `
[` + i + "] ";
          for (a in arguments[0])
            Tn(arguments[0], a) && (r += a + ": " + arguments[0][a] + ", ");
          r = r.slice(0, -2);
        } else
          r = arguments[i];
        o.push(r);
      }
      GP(
        e + `
Arguments: ` + Array.prototype.slice.call(o).join("") + `
` + new Error().stack
      ), n = !1;
    }
    return t.apply(this, arguments);
  }, t);
}
var Vx = {};
function UP(e, t) {
  mt.deprecationHandler != null && mt.deprecationHandler(e, t), Vx[e] || (GP(t), Vx[e] = !0);
}
mt.suppressDeprecationWarnings = !1;
mt.deprecationHandler = null;
function ia(e) {
  return typeof Function < "u" && e instanceof Function || Object.prototype.toString.call(e) === "[object Function]";
}
function lD(e) {
  var t, n;
  for (n in e)
    Tn(e, n) && (t = e[n], ia(t) ? this[n] = t : this["_" + n] = t);
  this._config = e, this._dayOfMonthOrdinalParseLenient = new RegExp(
    (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + "|" + /\d{1,2}/.source
  );
}
function em(e, t) {
  var n = wl({}, e), o;
  for (o in t)
    Tn(t, o) && (xs(e[o]) && xs(t[o]) ? (n[o] = {}, wl(n[o], e[o]), wl(n[o], t[o])) : t[o] != null ? n[o] = t[o] : delete n[o]);
  for (o in e)
    Tn(e, o) && !Tn(t, o) && xs(e[o]) && (n[o] = wl({}, n[o]));
  return n;
}
function ay(e) {
  e != null && this.set(e);
}
var tm;
Object.keys ? tm = Object.keys : tm = function(e) {
  var t, n = [];
  for (t in e)
    Tn(e, t) && n.push(t);
  return n;
};
var sD = {
  sameDay: "[Today at] LT",
  nextDay: "[Tomorrow at] LT",
  nextWeek: "dddd [at] LT",
  lastDay: "[Yesterday at] LT",
  lastWeek: "[Last] dddd [at] LT",
  sameElse: "L"
};
function uD(e, t, n) {
  var o = this._calendar[e] || this._calendar.sameElse;
  return ia(o) ? o.call(t, n) : o;
}
function ea(e, t, n) {
  var o = "" + Math.abs(e), r = t - o.length, i = e >= 0;
  return (i ? n ? "+" : "" : "-") + Math.pow(10, Math.max(0, r)).toString().substr(1) + o;
}
var ly = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, lf = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, $g = {}, $u = {};
function Lt(e, t, n, o) {
  var r = o;
  typeof o == "string" && (r = function() {
    return this[o]();
  }), e && ($u[e] = r), t && ($u[t[0]] = function() {
    return ea(r.apply(this, arguments), t[1], t[2]);
  }), n && ($u[n] = function() {
    return this.localeData().ordinal(
      r.apply(this, arguments),
      e
    );
  });
}
function cD(e) {
  return e.match(/\[[\s\S]/) ? e.replace(/^\[|\]$/g, "") : e.replace(/\\/g, "");
}
function dD(e) {
  var t = e.match(ly), n, o;
  for (n = 0, o = t.length; n < o; n++)
    $u[t[n]] ? t[n] = $u[t[n]] : t[n] = cD(t[n]);
  return function(r) {
    var i = "", a;
    for (a = 0; a < o; a++)
      i += ia(t[a]) ? t[a].call(r, e) : t[a];
    return i;
  };
}
function qf(e, t) {
  return e.isValid() ? (t = XP(t, e.localeData()), $g[t] = $g[t] || dD(t), $g[t](e)) : e.localeData().invalidDate();
}
function XP(e, t) {
  var n = 5;
  function o(r) {
    return t.longDateFormat(r) || r;
  }
  for (lf.lastIndex = 0; n >= 0 && lf.test(e); )
    e = e.replace(
      lf,
      o
    ), lf.lastIndex = 0, n -= 1;
  return e;
}
var fD = {
  LTS: "h:mm:ss A",
  LT: "h:mm A",
  L: "MM/DD/YYYY",
  LL: "MMMM D, YYYY",
  LLL: "MMMM D, YYYY h:mm A",
  LLLL: "dddd, MMMM D, YYYY h:mm A"
};
function pD(e) {
  var t = this._longDateFormat[e], n = this._longDateFormat[e.toUpperCase()];
  return t || !n ? t : (this._longDateFormat[e] = n.match(ly).map(function(o) {
    return o === "MMMM" || o === "MM" || o === "DD" || o === "dddd" ? o.slice(1) : o;
  }).join(""), this._longDateFormat[e]);
}
var hD = "Invalid date";
function gD() {
  return this._invalidDate;
}
var vD = "%d", mD = /\d{1,2}/;
function bD(e) {
  return this._ordinal.replace("%d", e);
}
var yD = {
  future: "in %s",
  past: "%s ago",
  s: "a few seconds",
  ss: "%d seconds",
  m: "a minute",
  mm: "%d minutes",
  h: "an hour",
  hh: "%d hours",
  d: "a day",
  dd: "%d days",
  w: "a week",
  ww: "%d weeks",
  M: "a month",
  MM: "%d months",
  y: "a year",
  yy: "%d years"
};
function xD(e, t, n, o) {
  var r = this._relativeTime[n];
  return ia(r) ? r(e, t, n, o) : r.replace(/%d/i, e);
}
function wD(e, t) {
  var n = this._relativeTime[e > 0 ? "future" : "past"];
  return ia(n) ? n(t) : n.replace(/%s/i, t);
}
var jx = {
  D: "date",
  dates: "date",
  date: "date",
  d: "day",
  days: "day",
  day: "day",
  e: "weekday",
  weekdays: "weekday",
  weekday: "weekday",
  E: "isoWeekday",
  isoweekdays: "isoWeekday",
  isoweekday: "isoWeekday",
  DDD: "dayOfYear",
  dayofyears: "dayOfYear",
  dayofyear: "dayOfYear",
  h: "hour",
  hours: "hour",
  hour: "hour",
  ms: "millisecond",
  milliseconds: "millisecond",
  millisecond: "millisecond",
  m: "minute",
  minutes: "minute",
  minute: "minute",
  M: "month",
  months: "month",
  month: "month",
  Q: "quarter",
  quarters: "quarter",
  quarter: "quarter",
  s: "second",
  seconds: "second",
  second: "second",
  gg: "weekYear",
  weekyears: "weekYear",
  weekyear: "weekYear",
  GG: "isoWeekYear",
  isoweekyears: "isoWeekYear",
  isoweekyear: "isoWeekYear",
  w: "week",
  weeks: "week",
  week: "week",
  W: "isoWeek",
  isoweeks: "isoWeek",
  isoweek: "isoWeek",
  y: "year",
  years: "year",
  year: "year"
};
function ri(e) {
  return typeof e == "string" ? jx[e] || jx[e.toLowerCase()] : void 0;
}
function sy(e) {
  var t = {}, n, o;
  for (o in e)
    Tn(e, o) && (n = ri(o), n && (t[n] = e[o]));
  return t;
}
var SD = {
  date: 9,
  day: 11,
  weekday: 11,
  isoWeekday: 11,
  dayOfYear: 4,
  hour: 13,
  millisecond: 16,
  minute: 14,
  month: 8,
  quarter: 7,
  second: 15,
  weekYear: 1,
  isoWeekYear: 1,
  week: 5,
  isoWeek: 5,
  year: 1
};
function CD(e) {
  var t = [], n;
  for (n in e)
    Tn(e, n) && t.push({ unit: n, priority: SD[n] });
  return t.sort(function(o, r) {
    return o.priority - r.priority;
  }), t;
}
var QP = /\d/, Rr = /\d\d/, ZP = /\d{3}/, uy = /\d{4}/, ih = /[+-]?\d{6}/, oo = /\d\d?/, JP = /\d\d\d\d?/, eO = /\d\d\d\d\d\d?/, ah = /\d{1,3}/, cy = /\d{1,4}/, lh = /[+-]?\d{1,6}/, nc = /\d+/, sh = /[+-]?\d+/, $D = /Z|[+-]\d\d:?\d\d/gi, uh = /Z|[+-]\d\d(?::?\d\d)?/gi, PD = /[+-]?\d+(\.\d{1,3})?/, Id = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i, oc = /^[1-9]\d?/, dy = /^([1-9]\d|\d)/, yp;
yp = {};
function $t(e, t, n) {
  yp[e] = ia(t) ? t : function(o, r) {
    return o && n ? n : t;
  };
}
function OD(e, t) {
  return Tn(yp, e) ? yp[e](t._strict, t._locale) : new RegExp(kD(e));
}
function kD(e) {
  return Da(
    e.replace("\\", "").replace(
      /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
      function(t, n, o, r, i) {
        return n || o || r || i;
      }
    )
  );
}
function Da(e) {
  return e.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
}
function Zr(e) {
  return e < 0 ? Math.ceil(e) || 0 : Math.floor(e);
}
function mn(e) {
  var t = +e, n = 0;
  return t !== 0 && isFinite(t) && (n = Zr(t)), n;
}
var nm = {};
function Wn(e, t) {
  var n, o = t, r;
  for (typeof e == "string" && (e = [e]), Ba(t) && (o = function(i, a) {
    a[t] = mn(i);
  }), r = e.length, n = 0; n < r; n++)
    nm[e[n]] = o;
}
function Td(e, t) {
  Wn(e, function(n, o, r, i) {
    r._w = r._w || {}, t(n, r._w, r, i);
  });
}
function ID(e, t, n) {
  t != null && Tn(nm, e) && nm[e](t, n._a, n, e);
}
function ch(e) {
  return e % 4 === 0 && e % 100 !== 0 || e % 400 === 0;
}
var Zo = 0, Ta = 1, Ui = 2, Mo = 3, wi = 4, _a = 5, gs = 6, TD = 7, _D = 8;
Lt("Y", 0, 0, function() {
  var e = this.year();
  return e <= 9999 ? ea(e, 4) : "+" + e;
});
Lt(0, ["YY", 2], 0, function() {
  return this.year() % 100;
});
Lt(0, ["YYYY", 4], 0, "year");
Lt(0, ["YYYYY", 5], 0, "year");
Lt(0, ["YYYYYY", 6, !0], 0, "year");
$t("Y", sh);
$t("YY", oo, Rr);
$t("YYYY", cy, uy);
$t("YYYYY", lh, ih);
$t("YYYYYY", lh, ih);
Wn(["YYYYY", "YYYYYY"], Zo);
Wn("YYYY", function(e, t) {
  t[Zo] = e.length === 2 ? mt.parseTwoDigitYear(e) : mn(e);
});
Wn("YY", function(e, t) {
  t[Zo] = mt.parseTwoDigitYear(e);
});
Wn("Y", function(e, t) {
  t[Zo] = parseInt(e, 10);
});
function Kc(e) {
  return ch(e) ? 366 : 365;
}
mt.parseTwoDigitYear = function(e) {
  return mn(e) + (mn(e) > 68 ? 1900 : 2e3);
};
var tO = rc("FullYear", !0);
function MD() {
  return ch(this.year());
}
function rc(e, t) {
  return function(n) {
    return n != null ? (nO(this, e, n), mt.updateOffset(this, t), this) : sd(this, e);
  };
}
function sd(e, t) {
  if (!e.isValid())
    return NaN;
  var n = e._d, o = e._isUTC;
  switch (t) {
    case "Milliseconds":
      return o ? n.getUTCMilliseconds() : n.getMilliseconds();
    case "Seconds":
      return o ? n.getUTCSeconds() : n.getSeconds();
    case "Minutes":
      return o ? n.getUTCMinutes() : n.getMinutes();
    case "Hours":
      return o ? n.getUTCHours() : n.getHours();
    case "Date":
      return o ? n.getUTCDate() : n.getDate();
    case "Day":
      return o ? n.getUTCDay() : n.getDay();
    case "Month":
      return o ? n.getUTCMonth() : n.getMonth();
    case "FullYear":
      return o ? n.getUTCFullYear() : n.getFullYear();
    default:
      return NaN;
  }
}
function nO(e, t, n) {
  var o, r, i, a, l;
  if (!(!e.isValid() || isNaN(n))) {
    switch (o = e._d, r = e._isUTC, t) {
      case "Milliseconds":
        return void (r ? o.setUTCMilliseconds(n) : o.setMilliseconds(n));
      case "Seconds":
        return void (r ? o.setUTCSeconds(n) : o.setSeconds(n));
      case "Minutes":
        return void (r ? o.setUTCMinutes(n) : o.setMinutes(n));
      case "Hours":
        return void (r ? o.setUTCHours(n) : o.setHours(n));
      case "Date":
        return void (r ? o.setUTCDate(n) : o.setDate(n));
      // case 'Day': // Not real
      //    return void (isUTC ? d.setUTCDay(value) : d.setDay(value));
      // case 'Month': // Not used because we need to pass two variables
      //     return void (isUTC ? d.setUTCMonth(value) : d.setMonth(value));
      case "FullYear":
        break;
      // See below ...
      default:
        return;
    }
    i = n, a = e.month(), l = e.date(), l = l === 29 && a === 1 && !ch(i) ? 28 : l, r ? o.setUTCFullYear(i, a, l) : o.setFullYear(i, a, l);
  }
}
function ED(e) {
  return e = ri(e), ia(this[e]) ? this[e]() : this;
}
function DD(e, t) {
  if (typeof e == "object") {
    e = sy(e);
    var n = CD(e), o, r = n.length;
    for (o = 0; o < r; o++)
      this[n[o].unit](e[n[o].unit]);
  } else if (e = ri(e), ia(this[e]))
    return this[e](t);
  return this;
}
function AD(e, t) {
  return (e % t + t) % t;
}
var bo;
Array.prototype.indexOf ? bo = Array.prototype.indexOf : bo = function(e) {
  var t;
  for (t = 0; t < this.length; ++t)
    if (this[t] === e)
      return t;
  return -1;
};
function fy(e, t) {
  if (isNaN(e) || isNaN(t))
    return NaN;
  var n = AD(t, 12);
  return e += (t - n) / 12, n === 1 ? ch(e) ? 29 : 28 : 31 - n % 7 % 2;
}
Lt("M", ["MM", 2], "Mo", function() {
  return this.month() + 1;
});
Lt("MMM", 0, 0, function(e) {
  return this.localeData().monthsShort(this, e);
});
Lt("MMMM", 0, 0, function(e) {
  return this.localeData().months(this, e);
});
$t("M", oo, oc);
$t("MM", oo, Rr);
$t("MMM", function(e, t) {
  return t.monthsShortRegex(e);
});
$t("MMMM", function(e, t) {
  return t.monthsRegex(e);
});
Wn(["M", "MM"], function(e, t) {
  t[Ta] = mn(e) - 1;
});
Wn(["MMM", "MMMM"], function(e, t, n, o) {
  var r = n._locale.monthsParse(e, o, n._strict);
  r != null ? t[Ta] = r : nn(n).invalidMonth = e;
});
var ND = "January_February_March_April_May_June_July_August_September_October_November_December".split(
  "_"
), oO = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), rO = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, RD = Id, zD = Id;
function FD(e, t) {
  return e ? ki(this._months) ? this._months[e.month()] : this._months[(this._months.isFormat || rO).test(t) ? "format" : "standalone"][e.month()] : ki(this._months) ? this._months : this._months.standalone;
}
function BD(e, t) {
  return e ? ki(this._monthsShort) ? this._monthsShort[e.month()] : this._monthsShort[rO.test(t) ? "format" : "standalone"][e.month()] : ki(this._monthsShort) ? this._monthsShort : this._monthsShort.standalone;
}
function LD(e, t, n) {
  var o, r, i, a = e.toLocaleLowerCase();
  if (!this._monthsParse)
    for (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = [], o = 0; o < 12; ++o)
      i = ra([2e3, o]), this._shortMonthsParse[o] = this.monthsShort(
        i,
        ""
      ).toLocaleLowerCase(), this._longMonthsParse[o] = this.months(i, "").toLocaleLowerCase();
  return n ? t === "MMM" ? (r = bo.call(this._shortMonthsParse, a), r !== -1 ? r : null) : (r = bo.call(this._longMonthsParse, a), r !== -1 ? r : null) : t === "MMM" ? (r = bo.call(this._shortMonthsParse, a), r !== -1 ? r : (r = bo.call(this._longMonthsParse, a), r !== -1 ? r : null)) : (r = bo.call(this._longMonthsParse, a), r !== -1 ? r : (r = bo.call(this._shortMonthsParse, a), r !== -1 ? r : null));
}
function HD(e, t, n) {
  var o, r, i;
  if (this._monthsParseExact)
    return LD.call(this, e, t, n);
  for (this._monthsParse || (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = []), o = 0; o < 12; o++) {
    if (r = ra([2e3, o]), n && !this._longMonthsParse[o] && (this._longMonthsParse[o] = new RegExp(
      "^" + this.months(r, "").replace(".", "") + "$",
      "i"
    ), this._shortMonthsParse[o] = new RegExp(
      "^" + this.monthsShort(r, "").replace(".", "") + "$",
      "i"
    )), !n && !this._monthsParse[o] && (i = "^" + this.months(r, "") + "|^" + this.monthsShort(r, ""), this._monthsParse[o] = new RegExp(i.replace(".", ""), "i")), n && t === "MMMM" && this._longMonthsParse[o].test(e))
      return o;
    if (n && t === "MMM" && this._shortMonthsParse[o].test(e))
      return o;
    if (!n && this._monthsParse[o].test(e))
      return o;
  }
}
function iO(e, t) {
  if (!e.isValid())
    return e;
  if (typeof t == "string") {
    if (/^\d+$/.test(t))
      t = mn(t);
    else if (t = e.localeData().monthsParse(t), !Ba(t))
      return e;
  }
  var n = t, o = e.date();
  return o = o < 29 ? o : Math.min(o, fy(e.year(), n)), e._isUTC ? e._d.setUTCMonth(n, o) : e._d.setMonth(n, o), e;
}
function aO(e) {
  return e != null ? (iO(this, e), mt.updateOffset(this, !0), this) : sd(this, "Month");
}
function VD() {
  return fy(this.year(), this.month());
}
function jD(e) {
  return this._monthsParseExact ? (Tn(this, "_monthsRegex") || lO.call(this), e ? this._monthsShortStrictRegex : this._monthsShortRegex) : (Tn(this, "_monthsShortRegex") || (this._monthsShortRegex = RD), this._monthsShortStrictRegex && e ? this._monthsShortStrictRegex : this._monthsShortRegex);
}
function WD(e) {
  return this._monthsParseExact ? (Tn(this, "_monthsRegex") || lO.call(this), e ? this._monthsStrictRegex : this._monthsRegex) : (Tn(this, "_monthsRegex") || (this._monthsRegex = zD), this._monthsStrictRegex && e ? this._monthsStrictRegex : this._monthsRegex);
}
function lO() {
  function e(s, u) {
    return u.length - s.length;
  }
  var t = [], n = [], o = [], r, i, a, l;
  for (r = 0; r < 12; r++)
    i = ra([2e3, r]), a = Da(this.monthsShort(i, "")), l = Da(this.months(i, "")), t.push(a), n.push(l), o.push(l), o.push(a);
  t.sort(e), n.sort(e), o.sort(e), this._monthsRegex = new RegExp("^(" + o.join("|") + ")", "i"), this._monthsShortRegex = this._monthsRegex, this._monthsStrictRegex = new RegExp(
    "^(" + n.join("|") + ")",
    "i"
  ), this._monthsShortStrictRegex = new RegExp(
    "^(" + t.join("|") + ")",
    "i"
  );
}
function KD(e, t, n, o, r, i, a) {
  var l;
  return e < 100 && e >= 0 ? (l = new Date(e + 400, t, n, o, r, i, a), isFinite(l.getFullYear()) && l.setFullYear(e)) : l = new Date(e, t, n, o, r, i, a), l;
}
function ud(e) {
  var t, n;
  return e < 100 && e >= 0 ? (n = Array.prototype.slice.call(arguments), n[0] = e + 400, t = new Date(Date.UTC.apply(null, n)), isFinite(t.getUTCFullYear()) && t.setUTCFullYear(e)) : t = new Date(Date.UTC.apply(null, arguments)), t;
}
function xp(e, t, n) {
  var o = 7 + t - n, r = (7 + ud(e, 0, o).getUTCDay() - t) % 7;
  return -r + o - 1;
}
function sO(e, t, n, o, r) {
  var i = (7 + n - o) % 7, a = xp(e, o, r), l = 1 + 7 * (t - 1) + i + a, s, u;
  return l <= 0 ? (s = e - 1, u = Kc(s) + l) : l > Kc(e) ? (s = e + 1, u = l - Kc(e)) : (s = e, u = l), {
    year: s,
    dayOfYear: u
  };
}
function cd(e, t, n) {
  var o = xp(e.year(), t, n), r = Math.floor((e.dayOfYear() - o - 1) / 7) + 1, i, a;
  return r < 1 ? (a = e.year() - 1, i = r + Aa(a, t, n)) : r > Aa(e.year(), t, n) ? (i = r - Aa(e.year(), t, n), a = e.year() + 1) : (a = e.year(), i = r), {
    week: i,
    year: a
  };
}
function Aa(e, t, n) {
  var o = xp(e, t, n), r = xp(e + 1, t, n);
  return (Kc(e) - o + r) / 7;
}
Lt("w", ["ww", 2], "wo", "week");
Lt("W", ["WW", 2], "Wo", "isoWeek");
$t("w", oo, oc);
$t("ww", oo, Rr);
$t("W", oo, oc);
$t("WW", oo, Rr);
Td(
  ["w", "ww", "W", "WW"],
  function(e, t, n, o) {
    t[o.substr(0, 1)] = mn(e);
  }
);
function qD(e) {
  return cd(e, this._week.dow, this._week.doy).week;
}
var YD = {
  dow: 0,
  // Sunday is the first day of the week.
  doy: 6
  // The week that contains Jan 6th is the first week of the year.
};
function GD() {
  return this._week.dow;
}
function UD() {
  return this._week.doy;
}
function XD(e) {
  var t = this.localeData().week(this);
  return e == null ? t : this.add((e - t) * 7, "d");
}
function QD(e) {
  var t = cd(this, 1, 4).week;
  return e == null ? t : this.add((e - t) * 7, "d");
}
Lt("d", 0, "do", "day");
Lt("dd", 0, 0, function(e) {
  return this.localeData().weekdaysMin(this, e);
});
Lt("ddd", 0, 0, function(e) {
  return this.localeData().weekdaysShort(this, e);
});
Lt("dddd", 0, 0, function(e) {
  return this.localeData().weekdays(this, e);
});
Lt("e", 0, 0, "weekday");
Lt("E", 0, 0, "isoWeekday");
$t("d", oo);
$t("e", oo);
$t("E", oo);
$t("dd", function(e, t) {
  return t.weekdaysMinRegex(e);
});
$t("ddd", function(e, t) {
  return t.weekdaysShortRegex(e);
});
$t("dddd", function(e, t) {
  return t.weekdaysRegex(e);
});
Td(["dd", "ddd", "dddd"], function(e, t, n, o) {
  var r = n._locale.weekdaysParse(e, o, n._strict);
  r != null ? t.d = r : nn(n).invalidWeekday = e;
});
Td(["d", "e", "E"], function(e, t, n, o) {
  t[o] = mn(e);
});
function ZD(e, t) {
  return typeof e != "string" ? e : isNaN(e) ? (e = t.weekdaysParse(e), typeof e == "number" ? e : null) : parseInt(e, 10);
}
function JD(e, t) {
  return typeof e == "string" ? t.weekdaysParse(e) % 7 || 7 : isNaN(e) ? null : e;
}
function py(e, t) {
  return e.slice(t, 7).concat(e.slice(0, t));
}
var eA = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), uO = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), tA = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), nA = Id, oA = Id, rA = Id;
function iA(e, t) {
  var n = ki(this._weekdays) ? this._weekdays : this._weekdays[e && e !== !0 && this._weekdays.isFormat.test(t) ? "format" : "standalone"];
  return e === !0 ? py(n, this._week.dow) : e ? n[e.day()] : n;
}
function aA(e) {
  return e === !0 ? py(this._weekdaysShort, this._week.dow) : e ? this._weekdaysShort[e.day()] : this._weekdaysShort;
}
function lA(e) {
  return e === !0 ? py(this._weekdaysMin, this._week.dow) : e ? this._weekdaysMin[e.day()] : this._weekdaysMin;
}
function sA(e, t, n) {
  var o, r, i, a = e.toLocaleLowerCase();
  if (!this._weekdaysParse)
    for (this._weekdaysParse = [], this._shortWeekdaysParse = [], this._minWeekdaysParse = [], o = 0; o < 7; ++o)
      i = ra([2e3, 1]).day(o), this._minWeekdaysParse[o] = this.weekdaysMin(
        i,
        ""
      ).toLocaleLowerCase(), this._shortWeekdaysParse[o] = this.weekdaysShort(
        i,
        ""
      ).toLocaleLowerCase(), this._weekdaysParse[o] = this.weekdays(i, "").toLocaleLowerCase();
  return n ? t === "dddd" ? (r = bo.call(this._weekdaysParse, a), r !== -1 ? r : null) : t === "ddd" ? (r = bo.call(this._shortWeekdaysParse, a), r !== -1 ? r : null) : (r = bo.call(this._minWeekdaysParse, a), r !== -1 ? r : null) : t === "dddd" ? (r = bo.call(this._weekdaysParse, a), r !== -1 || (r = bo.call(this._shortWeekdaysParse, a), r !== -1) ? r : (r = bo.call(this._minWeekdaysParse, a), r !== -1 ? r : null)) : t === "ddd" ? (r = bo.call(this._shortWeekdaysParse, a), r !== -1 || (r = bo.call(this._weekdaysParse, a), r !== -1) ? r : (r = bo.call(this._minWeekdaysParse, a), r !== -1 ? r : null)) : (r = bo.call(this._minWeekdaysParse, a), r !== -1 || (r = bo.call(this._weekdaysParse, a), r !== -1) ? r : (r = bo.call(this._shortWeekdaysParse, a), r !== -1 ? r : null));
}
function uA(e, t, n) {
  var o, r, i;
  if (this._weekdaysParseExact)
    return sA.call(this, e, t, n);
  for (this._weekdaysParse || (this._weekdaysParse = [], this._minWeekdaysParse = [], this._shortWeekdaysParse = [], this._fullWeekdaysParse = []), o = 0; o < 7; o++) {
    if (r = ra([2e3, 1]).day(o), n && !this._fullWeekdaysParse[o] && (this._fullWeekdaysParse[o] = new RegExp(
      "^" + this.weekdays(r, "").replace(".", "\\.?") + "$",
      "i"
    ), this._shortWeekdaysParse[o] = new RegExp(
      "^" + this.weekdaysShort(r, "").replace(".", "\\.?") + "$",
      "i"
    ), this._minWeekdaysParse[o] = new RegExp(
      "^" + this.weekdaysMin(r, "").replace(".", "\\.?") + "$",
      "i"
    )), this._weekdaysParse[o] || (i = "^" + this.weekdays(r, "") + "|^" + this.weekdaysShort(r, "") + "|^" + this.weekdaysMin(r, ""), this._weekdaysParse[o] = new RegExp(i.replace(".", ""), "i")), n && t === "dddd" && this._fullWeekdaysParse[o].test(e))
      return o;
    if (n && t === "ddd" && this._shortWeekdaysParse[o].test(e))
      return o;
    if (n && t === "dd" && this._minWeekdaysParse[o].test(e))
      return o;
    if (!n && this._weekdaysParse[o].test(e))
      return o;
  }
}
function cA(e) {
  if (!this.isValid())
    return e != null ? this : NaN;
  var t = sd(this, "Day");
  return e != null ? (e = ZD(e, this.localeData()), this.add(e - t, "d")) : t;
}
function dA(e) {
  if (!this.isValid())
    return e != null ? this : NaN;
  var t = (this.day() + 7 - this.localeData()._week.dow) % 7;
  return e == null ? t : this.add(e - t, "d");
}
function fA(e) {
  if (!this.isValid())
    return e != null ? this : NaN;
  if (e != null) {
    var t = JD(e, this.localeData());
    return this.day(this.day() % 7 ? t : t - 7);
  } else
    return this.day() || 7;
}
function pA(e) {
  return this._weekdaysParseExact ? (Tn(this, "_weekdaysRegex") || hy.call(this), e ? this._weekdaysStrictRegex : this._weekdaysRegex) : (Tn(this, "_weekdaysRegex") || (this._weekdaysRegex = nA), this._weekdaysStrictRegex && e ? this._weekdaysStrictRegex : this._weekdaysRegex);
}
function hA(e) {
  return this._weekdaysParseExact ? (Tn(this, "_weekdaysRegex") || hy.call(this), e ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex) : (Tn(this, "_weekdaysShortRegex") || (this._weekdaysShortRegex = oA), this._weekdaysShortStrictRegex && e ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex);
}
function gA(e) {
  return this._weekdaysParseExact ? (Tn(this, "_weekdaysRegex") || hy.call(this), e ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex) : (Tn(this, "_weekdaysMinRegex") || (this._weekdaysMinRegex = rA), this._weekdaysMinStrictRegex && e ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex);
}
function hy() {
  function e(c, d) {
    return d.length - c.length;
  }
  var t = [], n = [], o = [], r = [], i, a, l, s, u;
  for (i = 0; i < 7; i++)
    a = ra([2e3, 1]).day(i), l = Da(this.weekdaysMin(a, "")), s = Da(this.weekdaysShort(a, "")), u = Da(this.weekdays(a, "")), t.push(l), n.push(s), o.push(u), r.push(l), r.push(s), r.push(u);
  t.sort(e), n.sort(e), o.sort(e), r.sort(e), this._weekdaysRegex = new RegExp("^(" + r.join("|") + ")", "i"), this._weekdaysShortRegex = this._weekdaysRegex, this._weekdaysMinRegex = this._weekdaysRegex, this._weekdaysStrictRegex = new RegExp(
    "^(" + o.join("|") + ")",
    "i"
  ), this._weekdaysShortStrictRegex = new RegExp(
    "^(" + n.join("|") + ")",
    "i"
  ), this._weekdaysMinStrictRegex = new RegExp(
    "^(" + t.join("|") + ")",
    "i"
  );
}
function gy() {
  return this.hours() % 12 || 12;
}
function vA() {
  return this.hours() || 24;
}
Lt("H", ["HH", 2], 0, "hour");
Lt("h", ["hh", 2], 0, gy);
Lt("k", ["kk", 2], 0, vA);
Lt("hmm", 0, 0, function() {
  return "" + gy.apply(this) + ea(this.minutes(), 2);
});
Lt("hmmss", 0, 0, function() {
  return "" + gy.apply(this) + ea(this.minutes(), 2) + ea(this.seconds(), 2);
});
Lt("Hmm", 0, 0, function() {
  return "" + this.hours() + ea(this.minutes(), 2);
});
Lt("Hmmss", 0, 0, function() {
  return "" + this.hours() + ea(this.minutes(), 2) + ea(this.seconds(), 2);
});
function cO(e, t) {
  Lt(e, 0, 0, function() {
    return this.localeData().meridiem(
      this.hours(),
      this.minutes(),
      t
    );
  });
}
cO("a", !0);
cO("A", !1);
function dO(e, t) {
  return t._meridiemParse;
}
$t("a", dO);
$t("A", dO);
$t("H", oo, dy);
$t("h", oo, oc);
$t("k", oo, oc);
$t("HH", oo, Rr);
$t("hh", oo, Rr);
$t("kk", oo, Rr);
$t("hmm", JP);
$t("hmmss", eO);
$t("Hmm", JP);
$t("Hmmss", eO);
Wn(["H", "HH"], Mo);
Wn(["k", "kk"], function(e, t, n) {
  var o = mn(e);
  t[Mo] = o === 24 ? 0 : o;
});
Wn(["a", "A"], function(e, t, n) {
  n._isPm = n._locale.isPM(e), n._meridiem = e;
});
Wn(["h", "hh"], function(e, t, n) {
  t[Mo] = mn(e), nn(n).bigHour = !0;
});
Wn("hmm", function(e, t, n) {
  var o = e.length - 2;
  t[Mo] = mn(e.substr(0, o)), t[wi] = mn(e.substr(o)), nn(n).bigHour = !0;
});
Wn("hmmss", function(e, t, n) {
  var o = e.length - 4, r = e.length - 2;
  t[Mo] = mn(e.substr(0, o)), t[wi] = mn(e.substr(o, 2)), t[_a] = mn(e.substr(r)), nn(n).bigHour = !0;
});
Wn("Hmm", function(e, t, n) {
  var o = e.length - 2;
  t[Mo] = mn(e.substr(0, o)), t[wi] = mn(e.substr(o));
});
Wn("Hmmss", function(e, t, n) {
  var o = e.length - 4, r = e.length - 2;
  t[Mo] = mn(e.substr(0, o)), t[wi] = mn(e.substr(o, 2)), t[_a] = mn(e.substr(r));
});
function mA(e) {
  return (e + "").toLowerCase().charAt(0) === "p";
}
var bA = /[ap]\.?m?\.?/i, yA = rc("Hours", !0);
function xA(e, t, n) {
  return e > 11 ? n ? "pm" : "PM" : n ? "am" : "AM";
}
var fO = {
  calendar: sD,
  longDateFormat: fD,
  invalidDate: hD,
  ordinal: vD,
  dayOfMonthOrdinalParse: mD,
  relativeTime: yD,
  months: ND,
  monthsShort: oO,
  week: YD,
  weekdays: eA,
  weekdaysMin: tA,
  weekdaysShort: uO,
  meridiemParse: bA
}, ao = {}, $c = {}, dd;
function wA(e, t) {
  var n, o = Math.min(e.length, t.length);
  for (n = 0; n < o; n += 1)
    if (e[n] !== t[n])
      return n;
  return o;
}
function Wx(e) {
  return e && e.toLowerCase().replace("_", "-");
}
function SA(e) {
  for (var t = 0, n, o, r, i; t < e.length; ) {
    for (i = Wx(e[t]).split("-"), n = i.length, o = Wx(e[t + 1]), o = o ? o.split("-") : null; n > 0; ) {
      if (r = dh(i.slice(0, n).join("-")), r)
        return r;
      if (o && o.length >= n && wA(i, o) >= n - 1)
        break;
      n--;
    }
    t++;
  }
  return dd;
}
function CA(e) {
  return !!(e && e.match("^[^/\\\\]*$"));
}
function dh(e) {
  var t = null, n;
  if (ao[e] === void 0 && typeof module < "u" && module && module.exports && CA(e))
    try {
      t = dd._abbr, n = require, n("./locale/" + e), kl(t);
    } catch {
      ao[e] = null;
    }
  return ao[e];
}
function kl(e, t) {
  var n;
  return e && (vr(t) ? n = Ga(e) : n = vy(e, t), n ? dd = n : typeof console < "u" && console.warn && console.warn(
    "Locale " + e + " not found. Did you forget to load it?"
  )), dd._abbr;
}
function vy(e, t) {
  if (t !== null) {
    var n, o = fO;
    if (t.abbr = e, ao[e] != null)
      UP(
        "defineLocaleOverride",
        "use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."
      ), o = ao[e]._config;
    else if (t.parentLocale != null)
      if (ao[t.parentLocale] != null)
        o = ao[t.parentLocale]._config;
      else if (n = dh(t.parentLocale), n != null)
        o = n._config;
      else
        return $c[t.parentLocale] || ($c[t.parentLocale] = []), $c[t.parentLocale].push({
          name: e,
          config: t
        }), null;
    return ao[e] = new ay(em(o, t)), $c[e] && $c[e].forEach(function(r) {
      vy(r.name, r.config);
    }), kl(e), ao[e];
  } else
    return delete ao[e], null;
}
function $A(e, t) {
  if (t != null) {
    var n, o, r = fO;
    ao[e] != null && ao[e].parentLocale != null ? ao[e].set(em(ao[e]._config, t)) : (o = dh(e), o != null && (r = o._config), t = em(r, t), o == null && (t.abbr = e), n = new ay(t), n.parentLocale = ao[e], ao[e] = n), kl(e);
  } else
    ao[e] != null && (ao[e].parentLocale != null ? (ao[e] = ao[e].parentLocale, e === kl() && kl(e)) : ao[e] != null && delete ao[e]);
  return ao[e];
}
function Ga(e) {
  var t;
  if (e && e._locale && e._locale._abbr && (e = e._locale._abbr), !e)
    return dd;
  if (!ki(e)) {
    if (t = dh(e), t)
      return t;
    e = [e];
  }
  return SA(e);
}
function PA() {
  return tm(ao);
}
function my(e) {
  var t, n = e._a;
  return n && nn(e).overflow === -2 && (t = n[Ta] < 0 || n[Ta] > 11 ? Ta : n[Ui] < 1 || n[Ui] > fy(n[Zo], n[Ta]) ? Ui : n[Mo] < 0 || n[Mo] > 24 || n[Mo] === 24 && (n[wi] !== 0 || n[_a] !== 0 || n[gs] !== 0) ? Mo : n[wi] < 0 || n[wi] > 59 ? wi : n[_a] < 0 || n[_a] > 59 ? _a : n[gs] < 0 || n[gs] > 999 ? gs : -1, nn(e)._overflowDayOfYear && (t < Zo || t > Ui) && (t = Ui), nn(e)._overflowWeeks && t === -1 && (t = TD), nn(e)._overflowWeekday && t === -1 && (t = _D), nn(e).overflow = t), e;
}
var OA = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, kA = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, IA = /Z|[+-]\d\d(?::?\d\d)?/, sf = [
  ["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/],
  ["YYYY-MM-DD", /\d{4}-\d\d-\d\d/],
  ["GGGG-[W]WW-E", /\d{4}-W\d\d-\d/],
  ["GGGG-[W]WW", /\d{4}-W\d\d/, !1],
  ["YYYY-DDD", /\d{4}-\d{3}/],
  ["YYYY-MM", /\d{4}-\d\d/, !1],
  ["YYYYYYMMDD", /[+-]\d{10}/],
  ["YYYYMMDD", /\d{8}/],
  ["GGGG[W]WWE", /\d{4}W\d{3}/],
  ["GGGG[W]WW", /\d{4}W\d{2}/, !1],
  ["YYYYDDD", /\d{7}/],
  ["YYYYMM", /\d{6}/, !1],
  ["YYYY", /\d{4}/, !1]
], Pg = [
  ["HH:mm:ss.SSSS", /\d\d:\d\d:\d\d\.\d+/],
  ["HH:mm:ss,SSSS", /\d\d:\d\d:\d\d,\d+/],
  ["HH:mm:ss", /\d\d:\d\d:\d\d/],
  ["HH:mm", /\d\d:\d\d/],
  ["HHmmss.SSSS", /\d\d\d\d\d\d\.\d+/],
  ["HHmmss,SSSS", /\d\d\d\d\d\d,\d+/],
  ["HHmmss", /\d\d\d\d\d\d/],
  ["HHmm", /\d\d\d\d/],
  ["HH", /\d\d/]
], TA = /^\/?Date\((-?\d+)/i, _A = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/, MA = {
  UT: 0,
  GMT: 0,
  EDT: -240,
  EST: -300,
  CDT: -300,
  CST: -360,
  MDT: -360,
  MST: -420,
  PDT: -420,
  PST: -480
};
function pO(e) {
  var t, n, o = e._i, r = OA.exec(o) || kA.exec(o), i, a, l, s, u = sf.length, c = Pg.length;
  if (r) {
    for (nn(e).iso = !0, t = 0, n = u; t < n; t++)
      if (sf[t][1].exec(r[1])) {
        a = sf[t][0], i = sf[t][2] !== !1;
        break;
      }
    if (a == null) {
      e._isValid = !1;
      return;
    }
    if (r[3]) {
      for (t = 0, n = c; t < n; t++)
        if (Pg[t][1].exec(r[3])) {
          l = (r[2] || " ") + Pg[t][0];
          break;
        }
      if (l == null) {
        e._isValid = !1;
        return;
      }
    }
    if (!i && l != null) {
      e._isValid = !1;
      return;
    }
    if (r[4])
      if (IA.exec(r[4]))
        s = "Z";
      else {
        e._isValid = !1;
        return;
      }
    e._f = a + (l || "") + (s || ""), yy(e);
  } else
    e._isValid = !1;
}
function EA(e, t, n, o, r, i) {
  var a = [
    DA(e),
    oO.indexOf(t),
    parseInt(n, 10),
    parseInt(o, 10),
    parseInt(r, 10)
  ];
  return i && a.push(parseInt(i, 10)), a;
}
function DA(e) {
  var t = parseInt(e, 10);
  return t <= 49 ? 2e3 + t : t <= 999 ? 1900 + t : t;
}
function AA(e) {
  return e.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, "");
}
function NA(e, t, n) {
  if (e) {
    var o = uO.indexOf(e), r = new Date(
      t[0],
      t[1],
      t[2]
    ).getDay();
    if (o !== r)
      return nn(n).weekdayMismatch = !0, n._isValid = !1, !1;
  }
  return !0;
}
function RA(e, t, n) {
  if (e)
    return MA[e];
  if (t)
    return 0;
  var o = parseInt(n, 10), r = o % 100, i = (o - r) / 100;
  return i * 60 + r;
}
function hO(e) {
  var t = _A.exec(AA(e._i)), n;
  if (t) {
    if (n = EA(
      t[4],
      t[3],
      t[2],
      t[5],
      t[6],
      t[7]
    ), !NA(t[1], n, e))
      return;
    e._a = n, e._tzm = RA(t[8], t[9], t[10]), e._d = ud.apply(null, e._a), e._d.setUTCMinutes(e._d.getUTCMinutes() - e._tzm), nn(e).rfc2822 = !0;
  } else
    e._isValid = !1;
}
function zA(e) {
  var t = TA.exec(e._i);
  if (t !== null) {
    e._d = /* @__PURE__ */ new Date(+t[1]);
    return;
  }
  if (pO(e), e._isValid === !1)
    delete e._isValid;
  else
    return;
  if (hO(e), e._isValid === !1)
    delete e._isValid;
  else
    return;
  e._strict ? e._isValid = !1 : mt.createFromInputFallback(e);
}
mt.createFromInputFallback = oi(
  "value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",
  function(e) {
    e._d = /* @__PURE__ */ new Date(e._i + (e._useUTC ? " UTC" : ""));
  }
);
function pu(e, t, n) {
  return e ?? t ?? n;
}
function FA(e) {
  var t = new Date(mt.now());
  return e._useUTC ? [
    t.getUTCFullYear(),
    t.getUTCMonth(),
    t.getUTCDate()
  ] : [t.getFullYear(), t.getMonth(), t.getDate()];
}
function by(e) {
  var t, n, o = [], r, i, a;
  if (!e._d) {
    for (r = FA(e), e._w && e._a[Ui] == null && e._a[Ta] == null && BA(e), e._dayOfYear != null && (a = pu(e._a[Zo], r[Zo]), (e._dayOfYear > Kc(a) || e._dayOfYear === 0) && (nn(e)._overflowDayOfYear = !0), n = ud(a, 0, e._dayOfYear), e._a[Ta] = n.getUTCMonth(), e._a[Ui] = n.getUTCDate()), t = 0; t < 3 && e._a[t] == null; ++t)
      e._a[t] = o[t] = r[t];
    for (; t < 7; t++)
      e._a[t] = o[t] = e._a[t] == null ? t === 2 ? 1 : 0 : e._a[t];
    e._a[Mo] === 24 && e._a[wi] === 0 && e._a[_a] === 0 && e._a[gs] === 0 && (e._nextDay = !0, e._a[Mo] = 0), e._d = (e._useUTC ? ud : KD).apply(
      null,
      o
    ), i = e._useUTC ? e._d.getUTCDay() : e._d.getDay(), e._tzm != null && e._d.setUTCMinutes(e._d.getUTCMinutes() - e._tzm), e._nextDay && (e._a[Mo] = 24), e._w && typeof e._w.d < "u" && e._w.d !== i && (nn(e).weekdayMismatch = !0);
  }
}
function BA(e) {
  var t, n, o, r, i, a, l, s, u;
  t = e._w, t.GG != null || t.W != null || t.E != null ? (i = 1, a = 4, n = pu(
    t.GG,
    e._a[Zo],
    cd(no(), 1, 4).year
  ), o = pu(t.W, 1), r = pu(t.E, 1), (r < 1 || r > 7) && (s = !0)) : (i = e._locale._week.dow, a = e._locale._week.doy, u = cd(no(), i, a), n = pu(t.gg, e._a[Zo], u.year), o = pu(t.w, u.week), t.d != null ? (r = t.d, (r < 0 || r > 6) && (s = !0)) : t.e != null ? (r = t.e + i, (t.e < 0 || t.e > 6) && (s = !0)) : r = i), o < 1 || o > Aa(n, i, a) ? nn(e)._overflowWeeks = !0 : s != null ? nn(e)._overflowWeekday = !0 : (l = sO(n, o, r, i, a), e._a[Zo] = l.year, e._dayOfYear = l.dayOfYear);
}
mt.ISO_8601 = function() {
};
mt.RFC_2822 = function() {
};
function yy(e) {
  if (e._f === mt.ISO_8601) {
    pO(e);
    return;
  }
  if (e._f === mt.RFC_2822) {
    hO(e);
    return;
  }
  e._a = [], nn(e).empty = !0;
  var t = "" + e._i, n, o, r, i, a, l = t.length, s = 0, u, c;
  for (r = XP(e._f, e._locale).match(ly) || [], c = r.length, n = 0; n < c; n++)
    i = r[n], o = (t.match(OD(i, e)) || [])[0], o && (a = t.substr(0, t.indexOf(o)), a.length > 0 && nn(e).unusedInput.push(a), t = t.slice(
      t.indexOf(o) + o.length
    ), s += o.length), $u[i] ? (o ? nn(e).empty = !1 : nn(e).unusedTokens.push(i), ID(i, o, e)) : e._strict && !o && nn(e).unusedTokens.push(i);
  nn(e).charsLeftOver = l - s, t.length > 0 && nn(e).unusedInput.push(t), e._a[Mo] <= 12 && nn(e).bigHour === !0 && e._a[Mo] > 0 && (nn(e).bigHour = void 0), nn(e).parsedDateParts = e._a.slice(0), nn(e).meridiem = e._meridiem, e._a[Mo] = LA(
    e._locale,
    e._a[Mo],
    e._meridiem
  ), u = nn(e).era, u !== null && (e._a[Zo] = e._locale.erasConvertYear(u, e._a[Zo])), by(e), my(e);
}
function LA(e, t, n) {
  var o;
  return n == null ? t : e.meridiemHour != null ? e.meridiemHour(t, n) : (e.isPM != null && (o = e.isPM(n), o && t < 12 && (t += 12), !o && t === 12 && (t = 0)), t);
}
function HA(e) {
  var t, n, o, r, i, a, l = !1, s = e._f.length;
  if (s === 0) {
    nn(e).invalidFormat = !0, e._d = /* @__PURE__ */ new Date(NaN);
    return;
  }
  for (r = 0; r < s; r++)
    i = 0, a = !1, t = iy({}, e), e._useUTC != null && (t._useUTC = e._useUTC), t._f = e._f[r], yy(t), ry(t) && (a = !0), i += nn(t).charsLeftOver, i += nn(t).unusedTokens.length * 10, nn(t).score = i, l ? i < o && (o = i, n = t) : (o == null || i < o || a) && (o = i, n = t, a && (l = !0));
  wl(e, n || t);
}
function VA(e) {
  if (!e._d) {
    var t = sy(e._i), n = t.day === void 0 ? t.date : t.day;
    e._a = YP(
      [t.year, t.month, n, t.hour, t.minute, t.second, t.millisecond],
      function(o) {
        return o && parseInt(o, 10);
      }
    ), by(e);
  }
}
function jA(e) {
  var t = new kd(my(gO(e)));
  return t._nextDay && (t.add(1, "d"), t._nextDay = void 0), t;
}
function gO(e) {
  var t = e._i, n = e._f;
  return e._locale = e._locale || Ga(e._l), t === null || n === void 0 && t === "" ? rh({ nullInput: !0 }) : (typeof t == "string" && (e._i = t = e._locale.preparse(t)), Ii(t) ? new kd(my(t)) : (Od(t) ? e._d = t : ki(n) ? HA(e) : n ? yy(e) : WA(e), ry(e) || (e._d = null), e));
}
function WA(e) {
  var t = e._i;
  vr(t) ? e._d = new Date(mt.now()) : Od(t) ? e._d = new Date(t.valueOf()) : typeof t == "string" ? zA(e) : ki(t) ? (e._a = YP(t.slice(0), function(n) {
    return parseInt(n, 10);
  }), by(e)) : xs(t) ? VA(e) : Ba(t) ? e._d = new Date(t) : mt.createFromInputFallback(e);
}
function vO(e, t, n, o, r) {
  var i = {};
  return (t === !0 || t === !1) && (o = t, t = void 0), (n === !0 || n === !1) && (o = n, n = void 0), (xs(e) && oy(e) || ki(e) && e.length === 0) && (e = void 0), i._isAMomentObject = !0, i._useUTC = i._isUTC = r, i._l = n, i._i = e, i._f = t, i._strict = o, jA(i);
}
function no(e, t, n, o) {
  return vO(e, t, n, o, !1);
}
var KA = oi(
  "moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",
  function() {
    var e = no.apply(null, arguments);
    return this.isValid() && e.isValid() ? e < this ? this : e : rh();
  }
), qA = oi(
  "moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",
  function() {
    var e = no.apply(null, arguments);
    return this.isValid() && e.isValid() ? e > this ? this : e : rh();
  }
);
function mO(e, t) {
  var n, o;
  if (t.length === 1 && ki(t[0]) && (t = t[0]), !t.length)
    return no();
  for (n = t[0], o = 1; o < t.length; ++o)
    (!t[o].isValid() || t[o][e](n)) && (n = t[o]);
  return n;
}
function YA() {
  var e = [].slice.call(arguments, 0);
  return mO("isBefore", e);
}
function GA() {
  var e = [].slice.call(arguments, 0);
  return mO("isAfter", e);
}
var UA = function() {
  return Date.now ? Date.now() : +/* @__PURE__ */ new Date();
}, Pc = [
  "year",
  "quarter",
  "month",
  "week",
  "day",
  "hour",
  "minute",
  "second",
  "millisecond"
];
function XA(e) {
  var t, n = !1, o, r = Pc.length;
  for (t in e)
    if (Tn(e, t) && !(bo.call(Pc, t) !== -1 && (e[t] == null || !isNaN(e[t]))))
      return !1;
  for (o = 0; o < r; ++o)
    if (e[Pc[o]]) {
      if (n)
        return !1;
      parseFloat(e[Pc[o]]) !== mn(e[Pc[o]]) && (n = !0);
    }
  return !0;
}
function QA() {
  return this._isValid;
}
function ZA() {
  return Ei(NaN);
}
function fh(e) {
  var t = sy(e), n = t.year || 0, o = t.quarter || 0, r = t.month || 0, i = t.week || t.isoWeek || 0, a = t.day || 0, l = t.hour || 0, s = t.minute || 0, u = t.second || 0, c = t.millisecond || 0;
  this._isValid = XA(t), this._milliseconds = +c + u * 1e3 + // 1000
  s * 6e4 + // 1000 * 60
  l * 1e3 * 60 * 60, this._days = +a + i * 7, this._months = +r + o * 3 + n * 12, this._data = {}, this._locale = Ga(), this._bubble();
}
function Yf(e) {
  return e instanceof fh;
}
function om(e) {
  return e < 0 ? Math.round(-1 * e) * -1 : Math.round(e);
}
function JA(e, t, n) {
  var o = Math.min(e.length, t.length), r = Math.abs(e.length - t.length), i = 0, a;
  for (a = 0; a < o; a++)
    mn(e[a]) !== mn(t[a]) && i++;
  return i + r;
}
function bO(e, t) {
  Lt(e, 0, 0, function() {
    var n = this.utcOffset(), o = "+";
    return n < 0 && (n = -n, o = "-"), o + ea(~~(n / 60), 2) + t + ea(~~n % 60, 2);
  });
}
bO("Z", ":");
bO("ZZ", "");
$t("Z", uh);
$t("ZZ", uh);
Wn(["Z", "ZZ"], function(e, t, n) {
  n._useUTC = !0, n._tzm = xy(uh, e);
});
var eN = /([\+\-]|\d\d)/gi;
function xy(e, t) {
  var n = (t || "").match(e), o, r, i;
  return n === null ? null : (o = n[n.length - 1] || [], r = (o + "").match(eN) || ["-", 0, 0], i = +(r[1] * 60) + mn(r[2]), i === 0 ? 0 : r[0] === "+" ? i : -i);
}
function wy(e, t) {
  var n, o;
  return t._isUTC ? (n = t.clone(), o = (Ii(e) || Od(e) ? e.valueOf() : no(e).valueOf()) - n.valueOf(), n._d.setTime(n._d.valueOf() + o), mt.updateOffset(n, !1), n) : no(e).local();
}
function rm(e) {
  return -Math.round(e._d.getTimezoneOffset());
}
mt.updateOffset = function() {
};
function tN(e, t, n) {
  var o = this._offset || 0, r;
  if (!this.isValid())
    return e != null ? this : NaN;
  if (e != null) {
    if (typeof e == "string") {
      if (e = xy(uh, e), e === null)
        return this;
    } else Math.abs(e) < 16 && !n && (e = e * 60);
    return !this._isUTC && t && (r = rm(this)), this._offset = e, this._isUTC = !0, r != null && this.add(r, "m"), o !== e && (!t || this._changeInProgress ? wO(
      this,
      Ei(e - o, "m"),
      1,
      !1
    ) : this._changeInProgress || (this._changeInProgress = !0, mt.updateOffset(this, !0), this._changeInProgress = null)), this;
  } else
    return this._isUTC ? o : rm(this);
}
function nN(e, t) {
  return e != null ? (typeof e != "string" && (e = -e), this.utcOffset(e, t), this) : -this.utcOffset();
}
function oN(e) {
  return this.utcOffset(0, e);
}
function rN(e) {
  return this._isUTC && (this.utcOffset(0, e), this._isUTC = !1, e && this.subtract(rm(this), "m")), this;
}
function iN() {
  if (this._tzm != null)
    this.utcOffset(this._tzm, !1, !0);
  else if (typeof this._i == "string") {
    var e = xy($D, this._i);
    e != null ? this.utcOffset(e) : this.utcOffset(0, !0);
  }
  return this;
}
function aN(e) {
  return this.isValid() ? (e = e ? no(e).utcOffset() : 0, (this.utcOffset() - e) % 60 === 0) : !1;
}
function lN() {
  return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset();
}
function sN() {
  if (!vr(this._isDSTShifted))
    return this._isDSTShifted;
  var e = {}, t;
  return iy(e, this), e = gO(e), e._a ? (t = e._isUTC ? ra(e._a) : no(e._a), this._isDSTShifted = this.isValid() && JA(e._a, t.toArray()) > 0) : this._isDSTShifted = !1, this._isDSTShifted;
}
function uN() {
  return this.isValid() ? !this._isUTC : !1;
}
function cN() {
  return this.isValid() ? this._isUTC : !1;
}
function yO() {
  return this.isValid() ? this._isUTC && this._offset === 0 : !1;
}
var dN = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, fN = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
function Ei(e, t) {
  var n = e, o = null, r, i, a;
  return Yf(e) ? n = {
    ms: e._milliseconds,
    d: e._days,
    M: e._months
  } : Ba(e) || !isNaN(+e) ? (n = {}, t ? n[t] = +e : n.milliseconds = +e) : (o = dN.exec(e)) ? (r = o[1] === "-" ? -1 : 1, n = {
    y: 0,
    d: mn(o[Ui]) * r,
    h: mn(o[Mo]) * r,
    m: mn(o[wi]) * r,
    s: mn(o[_a]) * r,
    ms: mn(om(o[gs] * 1e3)) * r
    // the millisecond decimal point is included in the match
  }) : (o = fN.exec(e)) ? (r = o[1] === "-" ? -1 : 1, n = {
    y: Xl(o[2], r),
    M: Xl(o[3], r),
    w: Xl(o[4], r),
    d: Xl(o[5], r),
    h: Xl(o[6], r),
    m: Xl(o[7], r),
    s: Xl(o[8], r)
  }) : n == null ? n = {} : typeof n == "object" && ("from" in n || "to" in n) && (a = pN(
    no(n.from),
    no(n.to)
  ), n = {}, n.ms = a.milliseconds, n.M = a.months), i = new fh(n), Yf(e) && Tn(e, "_locale") && (i._locale = e._locale), Yf(e) && Tn(e, "_isValid") && (i._isValid = e._isValid), i;
}
Ei.fn = fh.prototype;
Ei.invalid = ZA;
function Xl(e, t) {
  var n = e && parseFloat(e.replace(",", "."));
  return (isNaN(n) ? 0 : n) * t;
}
function Kx(e, t) {
  var n = {};
  return n.months = t.month() - e.month() + (t.year() - e.year()) * 12, e.clone().add(n.months, "M").isAfter(t) && --n.months, n.milliseconds = +t - +e.clone().add(n.months, "M"), n;
}
function pN(e, t) {
  var n;
  return e.isValid() && t.isValid() ? (t = wy(t, e), e.isBefore(t) ? n = Kx(e, t) : (n = Kx(t, e), n.milliseconds = -n.milliseconds, n.months = -n.months), n) : { milliseconds: 0, months: 0 };
}
function xO(e, t) {
  return function(n, o) {
    var r, i;
    return o !== null && !isNaN(+o) && (UP(
      t,
      "moment()." + t + "(period, number) is deprecated. Please use moment()." + t + "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."
    ), i = n, n = o, o = i), r = Ei(n, o), wO(this, r, e), this;
  };
}
function wO(e, t, n, o) {
  var r = t._milliseconds, i = om(t._days), a = om(t._months);
  e.isValid() && (o = o ?? !0, a && iO(e, sd(e, "Month") + a * n), i && nO(e, "Date", sd(e, "Date") + i * n), r && e._d.setTime(e._d.valueOf() + r * n), o && mt.updateOffset(e, i || a));
}
var hN = xO(1, "add"), gN = xO(-1, "subtract");
function SO(e) {
  return typeof e == "string" || e instanceof String;
}
function vN(e) {
  return Ii(e) || Od(e) || SO(e) || Ba(e) || bN(e) || mN(e) || e === null || e === void 0;
}
function mN(e) {
  var t = xs(e) && !oy(e), n = !1, o = [
    "years",
    "year",
    "y",
    "months",
    "month",
    "M",
    "days",
    "day",
    "d",
    "dates",
    "date",
    "D",
    "hours",
    "hour",
    "h",
    "minutes",
    "minute",
    "m",
    "seconds",
    "second",
    "s",
    "milliseconds",
    "millisecond",
    "ms"
  ], r, i, a = o.length;
  for (r = 0; r < a; r += 1)
    i = o[r], n = n || Tn(e, i);
  return t && n;
}
function bN(e) {
  var t = ki(e), n = !1;
  return t && (n = e.filter(function(o) {
    return !Ba(o) && SO(e);
  }).length === 0), t && n;
}
function yN(e) {
  var t = xs(e) && !oy(e), n = !1, o = [
    "sameDay",
    "nextDay",
    "lastDay",
    "nextWeek",
    "lastWeek",
    "sameElse"
  ], r, i;
  for (r = 0; r < o.length; r += 1)
    i = o[r], n = n || Tn(e, i);
  return t && n;
}
function xN(e, t) {
  var n = e.diff(t, "days", !0);
  return n < -6 ? "sameElse" : n < -1 ? "lastWeek" : n < 0 ? "lastDay" : n < 1 ? "sameDay" : n < 2 ? "nextDay" : n < 7 ? "nextWeek" : "sameElse";
}
function wN(e, t) {
  arguments.length === 1 && (arguments[0] ? vN(arguments[0]) ? (e = arguments[0], t = void 0) : yN(arguments[0]) && (t = arguments[0], e = void 0) : (e = void 0, t = void 0));
  var n = e || no(), o = wy(n, this).startOf("day"), r = mt.calendarFormat(this, o) || "sameElse", i = t && (ia(t[r]) ? t[r].call(this, n) : t[r]);
  return this.format(
    i || this.localeData().calendar(r, this, no(n))
  );
}
function SN() {
  return new kd(this);
}
function CN(e, t) {
  var n = Ii(e) ? e : no(e);
  return this.isValid() && n.isValid() ? (t = ri(t) || "millisecond", t === "millisecond" ? this.valueOf() > n.valueOf() : n.valueOf() < this.clone().startOf(t).valueOf()) : !1;
}
function $N(e, t) {
  var n = Ii(e) ? e : no(e);
  return this.isValid() && n.isValid() ? (t = ri(t) || "millisecond", t === "millisecond" ? this.valueOf() < n.valueOf() : this.clone().endOf(t).valueOf() < n.valueOf()) : !1;
}
function PN(e, t, n, o) {
  var r = Ii(e) ? e : no(e), i = Ii(t) ? t : no(t);
  return this.isValid() && r.isValid() && i.isValid() ? (o = o || "()", (o[0] === "(" ? this.isAfter(r, n) : !this.isBefore(r, n)) && (o[1] === ")" ? this.isBefore(i, n) : !this.isAfter(i, n))) : !1;
}
function ON(e, t) {
  var n = Ii(e) ? e : no(e), o;
  return this.isValid() && n.isValid() ? (t = ri(t) || "millisecond", t === "millisecond" ? this.valueOf() === n.valueOf() : (o = n.valueOf(), this.clone().startOf(t).valueOf() <= o && o <= this.clone().endOf(t).valueOf())) : !1;
}
function kN(e, t) {
  return this.isSame(e, t) || this.isAfter(e, t);
}
function IN(e, t) {
  return this.isSame(e, t) || this.isBefore(e, t);
}
function TN(e, t, n) {
  var o, r, i;
  if (!this.isValid())
    return NaN;
  if (o = wy(e, this), !o.isValid())
    return NaN;
  switch (r = (o.utcOffset() - this.utcOffset()) * 6e4, t = ri(t), t) {
    case "year":
      i = Gf(this, o) / 12;
      break;
    case "month":
      i = Gf(this, o);
      break;
    case "quarter":
      i = Gf(this, o) / 3;
      break;
    case "second":
      i = (this - o) / 1e3;
      break;
    // 1000
    case "minute":
      i = (this - o) / 6e4;
      break;
    // 1000 * 60
    case "hour":
      i = (this - o) / 36e5;
      break;
    // 1000 * 60 * 60
    case "day":
      i = (this - o - r) / 864e5;
      break;
    // 1000 * 60 * 60 * 24, negate dst
    case "week":
      i = (this - o - r) / 6048e5;
      break;
    // 1000 * 60 * 60 * 24 * 7, negate dst
    default:
      i = this - o;
  }
  return n ? i : Zr(i);
}
function Gf(e, t) {
  if (e.date() < t.date())
    return -Gf(t, e);
  var n = (t.year() - e.year()) * 12 + (t.month() - e.month()), o = e.clone().add(n, "months"), r, i;
  return t - o < 0 ? (r = e.clone().add(n - 1, "months"), i = (t - o) / (o - r)) : (r = e.clone().add(n + 1, "months"), i = (t - o) / (r - o)), -(n + i) || 0;
}
mt.defaultFormat = "YYYY-MM-DDTHH:mm:ssZ";
mt.defaultFormatUtc = "YYYY-MM-DDTHH:mm:ss[Z]";
function _N() {
  return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ");
}
function MN(e) {
  if (!this.isValid())
    return null;
  var t = e !== !0, n = t ? this.clone().utc() : this;
  return n.year() < 0 || n.year() > 9999 ? qf(
    n,
    t ? "YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"
  ) : ia(Date.prototype.toISOString) ? t ? this.toDate().toISOString() : new Date(this.valueOf() + this.utcOffset() * 60 * 1e3).toISOString().replace("Z", qf(n, "Z")) : qf(
    n,
    t ? "YYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYY-MM-DD[T]HH:mm:ss.SSSZ"
  );
}
function EN() {
  if (!this.isValid())
    return "moment.invalid(/* " + this._i + " */)";
  var e = "moment", t = "", n, o, r, i;
  return this.isLocal() || (e = this.utcOffset() === 0 ? "moment.utc" : "moment.parseZone", t = "Z"), n = "[" + e + '("]', o = 0 <= this.year() && this.year() <= 9999 ? "YYYY" : "YYYYYY", r = "-MM-DD[T]HH:mm:ss.SSS", i = t + '[")]', this.format(n + o + r + i);
}
function DN(e) {
  e || (e = this.isUtc() ? mt.defaultFormatUtc : mt.defaultFormat);
  var t = qf(this, e);
  return this.localeData().postformat(t);
}
function AN(e, t) {
  return this.isValid() && (Ii(e) && e.isValid() || no(e).isValid()) ? Ei({ to: this, from: e }).locale(this.locale()).humanize(!t) : this.localeData().invalidDate();
}
function NN(e) {
  return this.from(no(), e);
}
function RN(e, t) {
  return this.isValid() && (Ii(e) && e.isValid() || no(e).isValid()) ? Ei({ from: this, to: e }).locale(this.locale()).humanize(!t) : this.localeData().invalidDate();
}
function zN(e) {
  return this.to(no(), e);
}
function CO(e) {
  var t;
  return e === void 0 ? this._locale._abbr : (t = Ga(e), t != null && (this._locale = t), this);
}
var $O = oi(
  "moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",
  function(e) {
    return e === void 0 ? this.localeData() : this.locale(e);
  }
);
function PO() {
  return this._locale;
}
var wp = 1e3, Pu = 60 * wp, Sp = 60 * Pu, OO = (365 * 400 + 97) * 24 * Sp;
function Ou(e, t) {
  return (e % t + t) % t;
}
function kO(e, t, n) {
  return e < 100 && e >= 0 ? new Date(e + 400, t, n) - OO : new Date(e, t, n).valueOf();
}
function IO(e, t, n) {
  return e < 100 && e >= 0 ? Date.UTC(e + 400, t, n) - OO : Date.UTC(e, t, n);
}
function FN(e) {
  var t, n;
  if (e = ri(e), e === void 0 || e === "millisecond" || !this.isValid())
    return this;
  switch (n = this._isUTC ? IO : kO, e) {
    case "year":
      t = n(this.year(), 0, 1);
      break;
    case "quarter":
      t = n(
        this.year(),
        this.month() - this.month() % 3,
        1
      );
      break;
    case "month":
      t = n(this.year(), this.month(), 1);
      break;
    case "week":
      t = n(
        this.year(),
        this.month(),
        this.date() - this.weekday()
      );
      break;
    case "isoWeek":
      t = n(
        this.year(),
        this.month(),
        this.date() - (this.isoWeekday() - 1)
      );
      break;
    case "day":
    case "date":
      t = n(this.year(), this.month(), this.date());
      break;
    case "hour":
      t = this._d.valueOf(), t -= Ou(
        t + (this._isUTC ? 0 : this.utcOffset() * Pu),
        Sp
      );
      break;
    case "minute":
      t = this._d.valueOf(), t -= Ou(t, Pu);
      break;
    case "second":
      t = this._d.valueOf(), t -= Ou(t, wp);
      break;
  }
  return this._d.setTime(t), mt.updateOffset(this, !0), this;
}
function BN(e) {
  var t, n;
  if (e = ri(e), e === void 0 || e === "millisecond" || !this.isValid())
    return this;
  switch (n = this._isUTC ? IO : kO, e) {
    case "year":
      t = n(this.year() + 1, 0, 1) - 1;
      break;
    case "quarter":
      t = n(
        this.year(),
        this.month() - this.month() % 3 + 3,
        1
      ) - 1;
      break;
    case "month":
      t = n(this.year(), this.month() + 1, 1) - 1;
      break;
    case "week":
      t = n(
        this.year(),
        this.month(),
        this.date() - this.weekday() + 7
      ) - 1;
      break;
    case "isoWeek":
      t = n(
        this.year(),
        this.month(),
        this.date() - (this.isoWeekday() - 1) + 7
      ) - 1;
      break;
    case "day":
    case "date":
      t = n(this.year(), this.month(), this.date() + 1) - 1;
      break;
    case "hour":
      t = this._d.valueOf(), t += Sp - Ou(
        t + (this._isUTC ? 0 : this.utcOffset() * Pu),
        Sp
      ) - 1;
      break;
    case "minute":
      t = this._d.valueOf(), t += Pu - Ou(t, Pu) - 1;
      break;
    case "second":
      t = this._d.valueOf(), t += wp - Ou(t, wp) - 1;
      break;
  }
  return this._d.setTime(t), mt.updateOffset(this, !0), this;
}
function LN() {
  return this._d.valueOf() - (this._offset || 0) * 6e4;
}
function HN() {
  return Math.floor(this.valueOf() / 1e3);
}
function VN() {
  return new Date(this.valueOf());
}
function jN() {
  var e = this;
  return [
    e.year(),
    e.month(),
    e.date(),
    e.hour(),
    e.minute(),
    e.second(),
    e.millisecond()
  ];
}
function WN() {
  var e = this;
  return {
    years: e.year(),
    months: e.month(),
    date: e.date(),
    hours: e.hours(),
    minutes: e.minutes(),
    seconds: e.seconds(),
    milliseconds: e.milliseconds()
  };
}
function KN() {
  return this.isValid() ? this.toISOString() : null;
}
function qN() {
  return ry(this);
}
function YN() {
  return wl({}, nn(this));
}
function GN() {
  return nn(this).overflow;
}
function UN() {
  return {
    input: this._i,
    format: this._f,
    locale: this._locale,
    isUTC: this._isUTC,
    strict: this._strict
  };
}
Lt("N", 0, 0, "eraAbbr");
Lt("NN", 0, 0, "eraAbbr");
Lt("NNN", 0, 0, "eraAbbr");
Lt("NNNN", 0, 0, "eraName");
Lt("NNNNN", 0, 0, "eraNarrow");
Lt("y", ["y", 1], "yo", "eraYear");
Lt("y", ["yy", 2], 0, "eraYear");
Lt("y", ["yyy", 3], 0, "eraYear");
Lt("y", ["yyyy", 4], 0, "eraYear");
$t("N", Sy);
$t("NN", Sy);
$t("NNN", Sy);
$t("NNNN", aR);
$t("NNNNN", lR);
Wn(
  ["N", "NN", "NNN", "NNNN", "NNNNN"],
  function(e, t, n, o) {
    var r = n._locale.erasParse(e, o, n._strict);
    r ? nn(n).era = r : nn(n).invalidEra = e;
  }
);
$t("y", nc);
$t("yy", nc);
$t("yyy", nc);
$t("yyyy", nc);
$t("yo", sR);
Wn(["y", "yy", "yyy", "yyyy"], Zo);
Wn(["yo"], function(e, t, n, o) {
  var r;
  n._locale._eraYearOrdinalRegex && (r = e.match(n._locale._eraYearOrdinalRegex)), n._locale.eraYearOrdinalParse ? t[Zo] = n._locale.eraYearOrdinalParse(e, r) : t[Zo] = parseInt(e, 10);
});
function XN(e, t) {
  var n, o, r, i = this._eras || Ga("en")._eras;
  for (n = 0, o = i.length; n < o; ++n) {
    switch (typeof i[n].since) {
      case "string":
        r = mt(i[n].since).startOf("day"), i[n].since = r.valueOf();
        break;
    }
    switch (typeof i[n].until) {
      case "undefined":
        i[n].until = 1 / 0;
        break;
      case "string":
        r = mt(i[n].until).startOf("day").valueOf(), i[n].until = r.valueOf();
        break;
    }
  }
  return i;
}
function QN(e, t, n) {
  var o, r, i = this.eras(), a, l, s;
  for (e = e.toUpperCase(), o = 0, r = i.length; o < r; ++o)
    if (a = i[o].name.toUpperCase(), l = i[o].abbr.toUpperCase(), s = i[o].narrow.toUpperCase(), n)
      switch (t) {
        case "N":
        case "NN":
        case "NNN":
          if (l === e)
            return i[o];
          break;
        case "NNNN":
          if (a === e)
            return i[o];
          break;
        case "NNNNN":
          if (s === e)
            return i[o];
          break;
      }
    else if ([a, l, s].indexOf(e) >= 0)
      return i[o];
}
function ZN(e, t) {
  var n = e.since <= e.until ? 1 : -1;
  return t === void 0 ? mt(e.since).year() : mt(e.since).year() + (t - e.offset) * n;
}
function JN() {
  var e, t, n, o = this.localeData().eras();
  for (e = 0, t = o.length; e < t; ++e)
    if (n = this.clone().startOf("day").valueOf(), o[e].since <= n && n <= o[e].until || o[e].until <= n && n <= o[e].since)
      return o[e].name;
  return "";
}
function eR() {
  var e, t, n, o = this.localeData().eras();
  for (e = 0, t = o.length; e < t; ++e)
    if (n = this.clone().startOf("day").valueOf(), o[e].since <= n && n <= o[e].until || o[e].until <= n && n <= o[e].since)
      return o[e].narrow;
  return "";
}
function tR() {
  var e, t, n, o = this.localeData().eras();
  for (e = 0, t = o.length; e < t; ++e)
    if (n = this.clone().startOf("day").valueOf(), o[e].since <= n && n <= o[e].until || o[e].until <= n && n <= o[e].since)
      return o[e].abbr;
  return "";
}
function nR() {
  var e, t, n, o, r = this.localeData().eras();
  for (e = 0, t = r.length; e < t; ++e)
    if (n = r[e].since <= r[e].until ? 1 : -1, o = this.clone().startOf("day").valueOf(), r[e].since <= o && o <= r[e].until || r[e].until <= o && o <= r[e].since)
      return (this.year() - mt(r[e].since).year()) * n + r[e].offset;
  return this.year();
}
function oR(e) {
  return Tn(this, "_erasNameRegex") || Cy.call(this), e ? this._erasNameRegex : this._erasRegex;
}
function rR(e) {
  return Tn(this, "_erasAbbrRegex") || Cy.call(this), e ? this._erasAbbrRegex : this._erasRegex;
}
function iR(e) {
  return Tn(this, "_erasNarrowRegex") || Cy.call(this), e ? this._erasNarrowRegex : this._erasRegex;
}
function Sy(e, t) {
  return t.erasAbbrRegex(e);
}
function aR(e, t) {
  return t.erasNameRegex(e);
}
function lR(e, t) {
  return t.erasNarrowRegex(e);
}
function sR(e, t) {
  return t._eraYearOrdinalRegex || nc;
}
function Cy() {
  var e = [], t = [], n = [], o = [], r, i, a, l, s, u = this.eras();
  for (r = 0, i = u.length; r < i; ++r)
    a = Da(u[r].name), l = Da(u[r].abbr), s = Da(u[r].narrow), t.push(a), e.push(l), n.push(s), o.push(a), o.push(l), o.push(s);
  this._erasRegex = new RegExp("^(" + o.join("|") + ")", "i"), this._erasNameRegex = new RegExp("^(" + t.join("|") + ")", "i"), this._erasAbbrRegex = new RegExp("^(" + e.join("|") + ")", "i"), this._erasNarrowRegex = new RegExp(
    "^(" + n.join("|") + ")",
    "i"
  );
}
Lt(0, ["gg", 2], 0, function() {
  return this.weekYear() % 100;
});
Lt(0, ["GG", 2], 0, function() {
  return this.isoWeekYear() % 100;
});
function ph(e, t) {
  Lt(0, [e, e.length], 0, t);
}
ph("gggg", "weekYear");
ph("ggggg", "weekYear");
ph("GGGG", "isoWeekYear");
ph("GGGGG", "isoWeekYear");
$t("G", sh);
$t("g", sh);
$t("GG", oo, Rr);
$t("gg", oo, Rr);
$t("GGGG", cy, uy);
$t("gggg", cy, uy);
$t("GGGGG", lh, ih);
$t("ggggg", lh, ih);
Td(
  ["gggg", "ggggg", "GGGG", "GGGGG"],
  function(e, t, n, o) {
    t[o.substr(0, 2)] = mn(e);
  }
);
Td(["gg", "GG"], function(e, t, n, o) {
  t[o] = mt.parseTwoDigitYear(e);
});
function uR(e) {
  return TO.call(
    this,
    e,
    this.week(),
    this.weekday() + this.localeData()._week.dow,
    this.localeData()._week.dow,
    this.localeData()._week.doy
  );
}
function cR(e) {
  return TO.call(
    this,
    e,
    this.isoWeek(),
    this.isoWeekday(),
    1,
    4
  );
}
function dR() {
  return Aa(this.year(), 1, 4);
}
function fR() {
  return Aa(this.isoWeekYear(), 1, 4);
}
function pR() {
  var e = this.localeData()._week;
  return Aa(this.year(), e.dow, e.doy);
}
function hR() {
  var e = this.localeData()._week;
  return Aa(this.weekYear(), e.dow, e.doy);
}
function TO(e, t, n, o, r) {
  var i;
  return e == null ? cd(this, o, r).year : (i = Aa(e, o, r), t > i && (t = i), gR.call(this, e, t, n, o, r));
}
function gR(e, t, n, o, r) {
  var i = sO(e, t, n, o, r), a = ud(i.year, 0, i.dayOfYear);
  return this.year(a.getUTCFullYear()), this.month(a.getUTCMonth()), this.date(a.getUTCDate()), this;
}
Lt("Q", 0, "Qo", "quarter");
$t("Q", QP);
Wn("Q", function(e, t) {
  t[Ta] = (mn(e) - 1) * 3;
});
function vR(e) {
  return e == null ? Math.ceil((this.month() + 1) / 3) : this.month((e - 1) * 3 + this.month() % 3);
}
Lt("D", ["DD", 2], "Do", "date");
$t("D", oo, oc);
$t("DD", oo, Rr);
$t("Do", function(e, t) {
  return e ? t._dayOfMonthOrdinalParse || t._ordinalParse : t._dayOfMonthOrdinalParseLenient;
});
Wn(["D", "DD"], Ui);
Wn("Do", function(e, t) {
  t[Ui] = mn(e.match(oo)[0]);
});
var _O = rc("Date", !0);
Lt("DDD", ["DDDD", 3], "DDDo", "dayOfYear");
$t("DDD", ah);
$t("DDDD", ZP);
Wn(["DDD", "DDDD"], function(e, t, n) {
  n._dayOfYear = mn(e);
});
function mR(e) {
  var t = Math.round(
    (this.clone().startOf("day") - this.clone().startOf("year")) / 864e5
  ) + 1;
  return e == null ? t : this.add(e - t, "d");
}
Lt("m", ["mm", 2], 0, "minute");
$t("m", oo, dy);
$t("mm", oo, Rr);
Wn(["m", "mm"], wi);
var bR = rc("Minutes", !1);
Lt("s", ["ss", 2], 0, "second");
$t("s", oo, dy);
$t("ss", oo, Rr);
Wn(["s", "ss"], _a);
var yR = rc("Seconds", !1);
Lt("S", 0, 0, function() {
  return ~~(this.millisecond() / 100);
});
Lt(0, ["SS", 2], 0, function() {
  return ~~(this.millisecond() / 10);
});
Lt(0, ["SSS", 3], 0, "millisecond");
Lt(0, ["SSSS", 4], 0, function() {
  return this.millisecond() * 10;
});
Lt(0, ["SSSSS", 5], 0, function() {
  return this.millisecond() * 100;
});
Lt(0, ["SSSSSS", 6], 0, function() {
  return this.millisecond() * 1e3;
});
Lt(0, ["SSSSSSS", 7], 0, function() {
  return this.millisecond() * 1e4;
});
Lt(0, ["SSSSSSSS", 8], 0, function() {
  return this.millisecond() * 1e5;
});
Lt(0, ["SSSSSSSSS", 9], 0, function() {
  return this.millisecond() * 1e6;
});
$t("S", ah, QP);
$t("SS", ah, Rr);
$t("SSS", ah, ZP);
var Sl, MO;
for (Sl = "SSSS"; Sl.length <= 9; Sl += "S")
  $t(Sl, nc);
function xR(e, t) {
  t[gs] = mn(("0." + e) * 1e3);
}
for (Sl = "S"; Sl.length <= 9; Sl += "S")
  Wn(Sl, xR);
MO = rc("Milliseconds", !1);
Lt("z", 0, 0, "zoneAbbr");
Lt("zz", 0, 0, "zoneName");
function wR() {
  return this._isUTC ? "UTC" : "";
}
function SR() {
  return this._isUTC ? "Coordinated Universal Time" : "";
}
var ut = kd.prototype;
ut.add = hN;
ut.calendar = wN;
ut.clone = SN;
ut.diff = TN;
ut.endOf = BN;
ut.format = DN;
ut.from = AN;
ut.fromNow = NN;
ut.to = RN;
ut.toNow = zN;
ut.get = ED;
ut.invalidAt = GN;
ut.isAfter = CN;
ut.isBefore = $N;
ut.isBetween = PN;
ut.isSame = ON;
ut.isSameOrAfter = kN;
ut.isSameOrBefore = IN;
ut.isValid = qN;
ut.lang = $O;
ut.locale = CO;
ut.localeData = PO;
ut.max = qA;
ut.min = KA;
ut.parsingFlags = YN;
ut.set = DD;
ut.startOf = FN;
ut.subtract = gN;
ut.toArray = jN;
ut.toObject = WN;
ut.toDate = VN;
ut.toISOString = MN;
ut.inspect = EN;
typeof Symbol < "u" && Symbol.for != null && (ut[Symbol.for("nodejs.util.inspect.custom")] = function() {
  return "Moment<" + this.format() + ">";
});
ut.toJSON = KN;
ut.toString = _N;
ut.unix = HN;
ut.valueOf = LN;
ut.creationData = UN;
ut.eraName = JN;
ut.eraNarrow = eR;
ut.eraAbbr = tR;
ut.eraYear = nR;
ut.year = tO;
ut.isLeapYear = MD;
ut.weekYear = uR;
ut.isoWeekYear = cR;
ut.quarter = ut.quarters = vR;
ut.month = aO;
ut.daysInMonth = VD;
ut.week = ut.weeks = XD;
ut.isoWeek = ut.isoWeeks = QD;
ut.weeksInYear = pR;
ut.weeksInWeekYear = hR;
ut.isoWeeksInYear = dR;
ut.isoWeeksInISOWeekYear = fR;
ut.date = _O;
ut.day = ut.days = cA;
ut.weekday = dA;
ut.isoWeekday = fA;
ut.dayOfYear = mR;
ut.hour = ut.hours = yA;
ut.minute = ut.minutes = bR;
ut.second = ut.seconds = yR;
ut.millisecond = ut.milliseconds = MO;
ut.utcOffset = tN;
ut.utc = oN;
ut.local = rN;
ut.parseZone = iN;
ut.hasAlignedHourOffset = aN;
ut.isDST = lN;
ut.isLocal = uN;
ut.isUtcOffset = cN;
ut.isUtc = yO;
ut.isUTC = yO;
ut.zoneAbbr = wR;
ut.zoneName = SR;
ut.dates = oi(
  "dates accessor is deprecated. Use date instead.",
  _O
);
ut.months = oi(
  "months accessor is deprecated. Use month instead",
  aO
);
ut.years = oi(
  "years accessor is deprecated. Use year instead",
  tO
);
ut.zone = oi(
  "moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",
  nN
);
ut.isDSTShifted = oi(
  "isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",
  sN
);
function CR(e) {
  return no(e * 1e3);
}
function $R() {
  return no.apply(null, arguments).parseZone();
}
function EO(e) {
  return e;
}
var _n = ay.prototype;
_n.calendar = uD;
_n.longDateFormat = pD;
_n.invalidDate = gD;
_n.ordinal = bD;
_n.preparse = EO;
_n.postformat = EO;
_n.relativeTime = xD;
_n.pastFuture = wD;
_n.set = lD;
_n.eras = XN;
_n.erasParse = QN;
_n.erasConvertYear = ZN;
_n.erasAbbrRegex = rR;
_n.erasNameRegex = oR;
_n.erasNarrowRegex = iR;
_n.months = FD;
_n.monthsShort = BD;
_n.monthsParse = HD;
_n.monthsRegex = WD;
_n.monthsShortRegex = jD;
_n.week = qD;
_n.firstDayOfYear = UD;
_n.firstDayOfWeek = GD;
_n.weekdays = iA;
_n.weekdaysMin = lA;
_n.weekdaysShort = aA;
_n.weekdaysParse = uA;
_n.weekdaysRegex = pA;
_n.weekdaysShortRegex = hA;
_n.weekdaysMinRegex = gA;
_n.isPM = mA;
_n.meridiem = xA;
function Cp(e, t, n, o) {
  var r = Ga(), i = ra().set(o, t);
  return r[n](i, e);
}
function DO(e, t, n) {
  if (Ba(e) && (t = e, e = void 0), e = e || "", t != null)
    return Cp(e, t, n, "month");
  var o, r = [];
  for (o = 0; o < 12; o++)
    r[o] = Cp(e, o, n, "month");
  return r;
}
function $y(e, t, n, o) {
  typeof e == "boolean" ? (Ba(t) && (n = t, t = void 0), t = t || "") : (t = e, n = t, e = !1, Ba(t) && (n = t, t = void 0), t = t || "");
  var r = Ga(), i = e ? r._week.dow : 0, a, l = [];
  if (n != null)
    return Cp(t, (n + i) % 7, o, "day");
  for (a = 0; a < 7; a++)
    l[a] = Cp(t, (a + i) % 7, o, "day");
  return l;
}
function PR(e, t) {
  return DO(e, t, "months");
}
function OR(e, t) {
  return DO(e, t, "monthsShort");
}
function kR(e, t, n) {
  return $y(e, t, n, "weekdays");
}
function IR(e, t, n) {
  return $y(e, t, n, "weekdaysShort");
}
function TR(e, t, n) {
  return $y(e, t, n, "weekdaysMin");
}
kl("en", {
  eras: [
    {
      since: "0001-01-01",
      until: 1 / 0,
      offset: 1,
      name: "Anno Domini",
      narrow: "AD",
      abbr: "AD"
    },
    {
      since: "0000-12-31",
      until: -1 / 0,
      offset: 1,
      name: "Before Christ",
      narrow: "BC",
      abbr: "BC"
    }
  ],
  dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
  ordinal: function(e) {
    var t = e % 10, n = mn(e % 100 / 10) === 1 ? "th" : t === 1 ? "st" : t === 2 ? "nd" : t === 3 ? "rd" : "th";
    return e + n;
  }
});
mt.lang = oi(
  "moment.lang is deprecated. Use moment.locale instead.",
  kl
);
mt.langData = oi(
  "moment.langData is deprecated. Use moment.localeData instead.",
  Ga
);
var ba = Math.abs;
function _R() {
  var e = this._data;
  return this._milliseconds = ba(this._milliseconds), this._days = ba(this._days), this._months = ba(this._months), e.milliseconds = ba(e.milliseconds), e.seconds = ba(e.seconds), e.minutes = ba(e.minutes), e.hours = ba(e.hours), e.months = ba(e.months), e.years = ba(e.years), this;
}
function AO(e, t, n, o) {
  var r = Ei(t, n);
  return e._milliseconds += o * r._milliseconds, e._days += o * r._days, e._months += o * r._months, e._bubble();
}
function MR(e, t) {
  return AO(this, e, t, 1);
}
function ER(e, t) {
  return AO(this, e, t, -1);
}
function qx(e) {
  return e < 0 ? Math.floor(e) : Math.ceil(e);
}
function DR() {
  var e = this._milliseconds, t = this._days, n = this._months, o = this._data, r, i, a, l, s;
  return e >= 0 && t >= 0 && n >= 0 || e <= 0 && t <= 0 && n <= 0 || (e += qx(im(n) + t) * 864e5, t = 0, n = 0), o.milliseconds = e % 1e3, r = Zr(e / 1e3), o.seconds = r % 60, i = Zr(r / 60), o.minutes = i % 60, a = Zr(i / 60), o.hours = a % 24, t += Zr(a / 24), s = Zr(NO(t)), n += s, t -= qx(im(s)), l = Zr(n / 12), n %= 12, o.days = t, o.months = n, o.years = l, this;
}
function NO(e) {
  return e * 4800 / 146097;
}
function im(e) {
  return e * 146097 / 4800;
}
function AR(e) {
  if (!this.isValid())
    return NaN;
  var t, n, o = this._milliseconds;
  if (e = ri(e), e === "month" || e === "quarter" || e === "year")
    switch (t = this._days + o / 864e5, n = this._months + NO(t), e) {
      case "month":
        return n;
      case "quarter":
        return n / 3;
      case "year":
        return n / 12;
    }
  else
    switch (t = this._days + Math.round(im(this._months)), e) {
      case "week":
        return t / 7 + o / 6048e5;
      case "day":
        return t + o / 864e5;
      case "hour":
        return t * 24 + o / 36e5;
      case "minute":
        return t * 1440 + o / 6e4;
      case "second":
        return t * 86400 + o / 1e3;
      // Math.floor prevents floating point math errors here
      case "millisecond":
        return Math.floor(t * 864e5) + o;
      default:
        throw new Error("Unknown unit " + e);
    }
}
function Ua(e) {
  return function() {
    return this.as(e);
  };
}
var RO = Ua("ms"), NR = Ua("s"), RR = Ua("m"), zR = Ua("h"), FR = Ua("d"), BR = Ua("w"), LR = Ua("M"), HR = Ua("Q"), VR = Ua("y"), jR = RO;
function WR() {
  return Ei(this);
}
function KR(e) {
  return e = ri(e), this.isValid() ? this[e + "s"]() : NaN;
}
function Rs(e) {
  return function() {
    return this.isValid() ? this._data[e] : NaN;
  };
}
var qR = Rs("milliseconds"), YR = Rs("seconds"), GR = Rs("minutes"), UR = Rs("hours"), XR = Rs("days"), QR = Rs("months"), ZR = Rs("years");
function JR() {
  return Zr(this.days() / 7);
}
var Oa = Math.round, yu = {
  ss: 44,
  // a few seconds to seconds
  s: 45,
  // seconds to minute
  m: 45,
  // minutes to hour
  h: 22,
  // hours to day
  d: 26,
  // days to month/week
  w: null,
  // weeks to month
  M: 11
  // months to year
};
function ez(e, t, n, o, r) {
  return r.relativeTime(t || 1, !!n, e, o);
}
function tz(e, t, n, o) {
  var r = Ei(e).abs(), i = Oa(r.as("s")), a = Oa(r.as("m")), l = Oa(r.as("h")), s = Oa(r.as("d")), u = Oa(r.as("M")), c = Oa(r.as("w")), d = Oa(r.as("y")), f = i <= n.ss && ["s", i] || i < n.s && ["ss", i] || a <= 1 && ["m"] || a < n.m && ["mm", a] || l <= 1 && ["h"] || l < n.h && ["hh", l] || s <= 1 && ["d"] || s < n.d && ["dd", s];
  return n.w != null && (f = f || c <= 1 && ["w"] || c < n.w && ["ww", c]), f = f || u <= 1 && ["M"] || u < n.M && ["MM", u] || d <= 1 && ["y"] || ["yy", d], f[2] = t, f[3] = +e > 0, f[4] = o, ez.apply(null, f);
}
function nz(e) {
  return e === void 0 ? Oa : typeof e == "function" ? (Oa = e, !0) : !1;
}
function oz(e, t) {
  return yu[e] === void 0 ? !1 : t === void 0 ? yu[e] : (yu[e] = t, e === "s" && (yu.ss = t - 1), !0);
}
function rz(e, t) {
  if (!this.isValid())
    return this.localeData().invalidDate();
  var n = !1, o = yu, r, i;
  return typeof e == "object" && (t = e, e = !1), typeof e == "boolean" && (n = e), typeof t == "object" && (o = Object.assign({}, yu, t), t.s != null && t.ss == null && (o.ss = t.s - 1)), r = this.localeData(), i = tz(this, !n, o, r), n && (i = r.pastFuture(+this, i)), r.postformat(i);
}
var Og = Math.abs;
function eu(e) {
  return (e > 0) - (e < 0) || +e;
}
function hh() {
  if (!this.isValid())
    return this.localeData().invalidDate();
  var e = Og(this._milliseconds) / 1e3, t = Og(this._days), n = Og(this._months), o, r, i, a, l = this.asSeconds(), s, u, c, d;
  return l ? (o = Zr(e / 60), r = Zr(o / 60), e %= 60, o %= 60, i = Zr(n / 12), n %= 12, a = e ? e.toFixed(3).replace(/\.?0+$/, "") : "", s = l < 0 ? "-" : "", u = eu(this._months) !== eu(l) ? "-" : "", c = eu(this._days) !== eu(l) ? "-" : "", d = eu(this._milliseconds) !== eu(l) ? "-" : "", s + "P" + (i ? u + i + "Y" : "") + (n ? u + n + "M" : "") + (t ? c + t + "D" : "") + (r || o || e ? "T" : "") + (r ? d + r + "H" : "") + (o ? d + o + "M" : "") + (e ? d + a + "S" : "")) : "P0D";
}
var Pn = fh.prototype;
Pn.isValid = QA;
Pn.abs = _R;
Pn.add = MR;
Pn.subtract = ER;
Pn.as = AR;
Pn.asMilliseconds = RO;
Pn.asSeconds = NR;
Pn.asMinutes = RR;
Pn.asHours = zR;
Pn.asDays = FR;
Pn.asWeeks = BR;
Pn.asMonths = LR;
Pn.asQuarters = HR;
Pn.asYears = VR;
Pn.valueOf = jR;
Pn._bubble = DR;
Pn.clone = WR;
Pn.get = KR;
Pn.milliseconds = qR;
Pn.seconds = YR;
Pn.minutes = GR;
Pn.hours = UR;
Pn.days = XR;
Pn.weeks = JR;
Pn.months = QR;
Pn.years = ZR;
Pn.humanize = rz;
Pn.toISOString = hh;
Pn.toString = hh;
Pn.toJSON = hh;
Pn.locale = CO;
Pn.localeData = PO;
Pn.toIsoString = oi(
  "toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",
  hh
);
Pn.lang = $O;
Lt("X", 0, 0, "unix");
Lt("x", 0, 0, "valueOf");
$t("x", sh);
$t("X", PD);
Wn("X", function(e, t, n) {
  n._d = new Date(parseFloat(e) * 1e3);
});
Wn("x", function(e, t, n) {
  n._d = new Date(mn(e));
});
//! moment.js
mt.version = "2.30.1";
iD(no);
mt.fn = ut;
mt.min = YA;
mt.max = GA;
mt.now = UA;
mt.utc = ra;
mt.unix = CR;
mt.months = PR;
mt.isDate = Od;
mt.locale = kl;
mt.invalid = rh;
mt.duration = Ei;
mt.isMoment = Ii;
mt.weekdays = kR;
mt.parseZone = $R;
mt.localeData = Ga;
mt.isDuration = Yf;
mt.monthsShort = OR;
mt.weekdaysMin = TR;
mt.defineLocale = vy;
mt.updateLocale = $A;
mt.locales = PA;
mt.weekdaysShort = IR;
mt.normalizeUnits = ri;
mt.relativeTimeRounding = nz;
mt.relativeTimeThreshold = oz;
mt.calendarFormat = xN;
mt.prototype = ut;
mt.HTML5_FMT = {
  DATETIME_LOCAL: "YYYY-MM-DDTHH:mm",
  // <input type="datetime-local" />
  DATETIME_LOCAL_SECONDS: "YYYY-MM-DDTHH:mm:ss",
  // <input type="datetime-local" step="1" />
  DATETIME_LOCAL_MS: "YYYY-MM-DDTHH:mm:ss.SSS",
  // <input type="datetime-local" step="0.001" />
  DATE: "YYYY-MM-DD",
  // <input type="date" />
  TIME: "HH:mm",
  // <input type="time" />
  TIME_SECONDS: "HH:mm:ss",
  // <input type="time" step="1" />
  TIME_MS: "HH:mm:ss.SSS",
  // <input type="time" step="0.001" />
  WEEK: "GGGG-[W]WW",
  // <input type="week" />
  MONTH: "YYYY-MM"
  // <input type="month" />
};
const pfe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: mt
}, Symbol.toStringTag, { value: "Module" }));
mt.ISO_8601;
const iz = (e) => mt.isMoment(e), hfe = (e, t) => mt.utc(e, t), gfe = (e, t) => mt.duration(e, t), az = (e, t) => mt(e, t), vfe = (e) => az(e);
var Ln = /* @__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))(Ln || {});
const kg = "Value", lz = "Time";
function sz(e, t = "", n) {
  return !e || Object.keys(e).length === 0 ? t : ["{", Object.keys(e).sort().map((i) => `${i}="${e[i]}"`).join(", "), "}"].join("");
}
function uz(e, t, n) {
  var o, r;
  const i = (o = e.state) == null ? void 0 : o.displayName, a = !!n;
  if (i && a === ((r = e.state) == null ? void 0 : r.multipleFrames))
    return i;
  const l = cz(e, t);
  return e.state = e.state || {}, e.state.displayName = l, e.state.multipleFrames = a, l;
}
function cz(e, t, n) {
  var o, r, i, a, l;
  const s = ((o = e.config) == null ? void 0 : o.displayName) && ((r = e.config) == null ? void 0 : r.displayName.length), u = !!((a = (i = t?.meta) == null ? void 0 : i.timeCompare) != null && a.isTimeShiftQuery);
  let c = s ? e.config.displayName : e.name;
  if (s)
    return u ? `${c} (comparison)` : c;
  if (t && ((l = e.config) != null && l.displayNameFromDS))
    return u ? `${e.config.displayNameFromDS} (comparison)` : e.config.displayNameFromDS;
  if (e.type === Ln.time && !e.labels)
    return c ?? lz;
  let d = [], f = !1, p = !1;
  if (e.name && e.name !== kg && d.push(e.name), e.labels && t) {
    let v = fz([t]);
    if (v)
      e.labels[v] && (d.push(e.labels[v]), p = !0);
    else {
      let g = sz(e.labels);
      g && (d.push(g), p = !0);
    }
  }
  return t && !f && !p && e.name === kg && t.name && t.name.length > 0 && (d.push(t.name), f = !0), d.length ? c = d.join(" ") : e.name ? c = e.name : c = kg, c === e.name && (c = dz(e, t)), u && (c = `${c} (comparison)`), c;
}
function dz(e, t) {
  let n = 0, o = !1;
  if (t)
    for (let r = 0; r < t.fields.length; r++) {
      const i = t.fields[r];
      if (e === i) {
        if (o = !0, n > 0) {
          n++;
          break;
        }
      } else if (e.name === i.name && (n++, o))
        break;
    }
  return n ? `${e.name} ${n}` : e.name;
}
function fz(e) {
  let t = null;
  for (let n = 0; n < e.length; n++) {
    const o = e[n];
    for (const r of o.fields)
      if (r.labels) {
        for (const i in r.labels)
          if (t === null)
            t = i;
          else if (i !== t)
            return null;
      }
  }
  return t;
}
const pz = /^\s*(-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?|NAN)\s*$/i;
function xu(e) {
  return e instanceof Date || iz(e) ? Ln.time : UE(e) ? Ln.number : Zv(e) ? pz.test(e) ? Ln.number : e === "true" || e === "TRUE" || e === "True" || e === "false" || e === "FALSE" || e === "False" ? Ln.boolean : Ln.string : XE(e) ? Ln.boolean : Ln.other;
}
function hz(e) {
  if (e.name) {
    const t = e.name.toLowerCase();
    if (t === "date" || t === "time")
      return Ln.time;
  }
  for (let t = 0; t < e.values.length; t++) {
    const n = e.values[t];
    if (n != null)
      return xu(n);
  }
}
function gz(e) {
  return vz(e);
}
function vz(e, t) {
  return {
    fields: (t ? e.fields.filter(t) : e.fields).map((r) => {
      let i = r.values;
      return {
        name: r.name,
        type: r.type,
        config: r.config,
        values: i,
        labels: r.labels
      };
    }),
    refId: e.refId,
    meta: e.meta,
    name: e.name
  };
}
var Yx, Gx;
class mz {
  constructor() {
    this[Yx] = {};
  }
  // Implement "iterator protocol"
  *iterator() {
    for (let t = 0; t < this.length; t++)
      yield this.get(t);
  }
  set(t, n) {
    throw "unsupported operation";
  }
  add(t) {
    throw "unsupported operation";
  }
  push(...t) {
    for (const n of t)
      this.add(n);
    return this.length;
  }
  // Implement "iterable protocol"
  [(Gx = Symbol.iterator, Yx = Symbol.unscopables, Gx)]() {
    return this.iterator();
  }
  forEach(t) {
    return Tg(this).forEach(t);
  }
  map(t) {
    return Tg(this).map(t);
  }
  filter(t) {
    return Tg(this).filter(t);
  }
  at(t) {
    return this.get(t);
  }
  toArray() {
    const t = new Array(this.length);
    for (let n = 0; n < this.length; n++)
      t[n] = this.get(n);
    return t;
  }
  join(t) {
    return this.toArray().join(t);
  }
  toJSON() {
    return this.toArray();
  }
  pop() {
    throw new Error("Method not implemented.");
  }
  concat(...t) {
    throw new Error("Method not implemented.");
  }
  reverse() {
    throw new Error("Method not implemented.");
  }
  shift() {
    throw new Error("Method not implemented.");
  }
  sort(t) {
    throw new Error("Method not implemented.");
  }
  splice(t, n, ...o) {
    throw new Error("Method not implemented.");
  }
  unshift(...t) {
    throw new Error("Method not implemented.");
  }
  fill(t, n, o) {
    throw new Error("Method not implemented.");
  }
  copyWithin(t, n, o) {
    throw new Error("Method not implemented.");
  }
  //--------------------------------------------------------------------------------
  // Delegated Array function -- these will not be efficient :grimmice:
  //--------------------------------------------------------------------------------
  slice(t, n) {
    return this.toArray().slice(t, n);
  }
  indexOf(t, n) {
    return this.toArray().indexOf(t, n);
  }
  lastIndexOf(t, n) {
    return this.toArray().lastIndexOf(t, n);
  }
  every(t, n) {
    return this.toArray().every(t, n);
  }
  some(t, n) {
    return this.toArray().some(t, n);
  }
  reduce(t, n) {
    throw new Error("Method not implemented.");
  }
  reduceRight(t, n) {
    throw new Error("Method not implemented.");
  }
  find(t, n) {
    return this.toArray().find(t, n);
  }
  findIndex(t, n) {
    return this.toArray().findIndex(t, n);
  }
  entries() {
    return this.toArray().entries();
  }
  keys() {
    return this.toArray().keys();
  }
  values() {
    return this.toArray().values();
  }
  includes(t, n) {
    return this.toArray().includes(t, n);
  }
  flatMap(t, n) {
    return this.toArray().flatMap(t, n);
  }
  flat(t) {
    throw new Error("Method not implemented.");
  }
}
const Ig = [];
function Tg(e) {
  return {
    *[Symbol.iterator]() {
      for (let t = 0; t < e.length; t++)
        yield e.get(t);
    },
    forEach(t) {
      for (let n = 0; n < e.length; n++)
        t(e.get(n), n, Ig);
    },
    map(t) {
      const n = [];
      for (let o = 0; o < e.length; o++)
        n.push(t(e.get(o), o, Ig));
      return n;
    },
    /** Add a predicate where you return true if it should *keep* the value */
    filter(t) {
      const n = [];
      let o = 0;
      for (const r of this)
        t(r, o++, Ig) && n.push(r);
      return n;
    }
  };
}
function bz(e, t) {
  return t.type || (t.name === "time" || t.name === "Time" ? t.type = Ln.time : t.type = xu(e)), t.type === Ln.number ? (n) => parseFloat(n) : t.type === Ln.boolean ? (n) => !(n[0] === "F" || n[0] === "f" || n[0] === "0") : (n) => n;
}
const _g = void 0;
class yz extends mz {
  constructor(t, n) {
    if (super(), this.fields = [], this.first = [], this.parsers = void 0, this.creator = n || ((o) => o ?? []), t) {
      const { name: o, refId: r, meta: i, fields: a } = t;
      if (o && (this.name = o), r && (this.refId = r), i && (this.meta = i), a)
        for (const l of a)
          this.addField(l);
    }
    Object.defineProperty(this, "length", {
      enumerable: !0,
      get: () => this.first.length
    });
  }
  // Defined for Vector interface
  get length() {
    return this.first.length;
  }
  addFieldFor(t, n) {
    return this.addField({
      name: n || "",
      // Will be filled in
      type: xu(t)
    });
  }
  addField(t, n) {
    let o;
    t.values && (o = t.values);
    let r = t.type;
    !r && (t.name === "time" || t.name === "Time") ? r = Ln.time : (!r && o && o.length && (r = xu(o[0])), r || (r = Ln.other));
    let i = t.name;
    i || (i = `Field ${this.fields.length + 1}`);
    const a = {
      ...t,
      name: i,
      type: r,
      config: t.config || {},
      values: this.creator(o)
    };
    if (r === Ln.other && (r = hz(a), r && (a.type = r)), this.fields.push(a), this.first = this.fields[0].values, n)
      for (; a.values.length < n; )
        a.values.push(_g);
    else
      this.validate();
    return a;
  }
  validate() {
    const t = this.fields.reduce((n, o) => Math.max(n, o.values.length), 0);
    for (const n of this.fields)
      for (; n.values.length !== t; )
        n.values.push(_g);
  }
  /**
   * @deprecated unclear if this is actually used
   */
  setParser(t, n) {
    return this.parsers || (this.parsers = /* @__PURE__ */ new Map()), this.parsers.set(t, n), n;
  }
  parseValue(t, n) {
    var o;
    let r = (o = this.parsers) == null ? void 0 : o.get(t);
    return r || (r = this.setParser(t, bz(n, t))), r(n);
  }
  /**
   * This will add each value to the corresponding column
   */
  appendRow(t) {
    for (let n = this.fields.length; n < t.length; n++)
      this.addField({
        name: `Field ${n + 1}`,
        type: xu(t[n])
      });
    if (this.length < 1)
      for (let n = 0; n < this.fields.length; n++) {
        const o = this.fields[n];
        (!o.type || o.type === Ln.other) && (o.type = xu(t[n]));
      }
    for (let n = 0; n < this.fields.length; n++) {
      const o = this.fields[n];
      let r = t[n];
      o.type !== Ln.string && Zv(r) && (r = this.parseValue(o, r)), o.values.push(r);
    }
  }
  /** support standard array push syntax */
  push(...t) {
    for (const n of t)
      this.add(n);
    return this.length;
  }
  reverse() {
    for (const t of this.fields)
      t.values.reverse();
    return this;
  }
  /**
   * Add values from an object to corresponding fields. Similar to appendRow but does not create new fields.
   */
  add(t) {
    const n = t;
    for (const o of this.fields) {
      let r = n[o.name];
      o.type !== Ln.string && Zv(r) && (r = this.parseValue(o, r)), r === void 0 && (r = _g), o.values.push(r);
    }
  }
  set(t, n) {
    if (t > this.length)
      throw new Error("Unable to set value beyond current length");
    const o = n || {};
    for (const r of this.fields)
      r.values[t] = o[r.name];
  }
  /**
   * Get an object with a property for each field in the DataFrame
   */
  get(t) {
    const n = {};
    for (const o of this.fields)
      n[o.name] = o.values[t];
    return n;
  }
  /**
   * The simplified JSON values used in JSON.stringify()
   */
  toJSON() {
    return gz(this);
  }
}
function xz(e) {
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
function mfe(e) {
  if (Object.prototype.hasOwnProperty.call(e, "__esModule")) return e;
  var t = e.default;
  if (typeof t == "function") {
    var n = function o() {
      return this instanceof o ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments);
    };
    n.prototype = t.prototype;
  } else n = {};
  return Object.defineProperty(n, "__esModule", { value: !0 }), Object.keys(e).forEach(function(o) {
    var r = Object.getOwnPropertyDescriptor(e, o);
    Object.defineProperty(n, o, r.get ? r : {
      enumerable: !0,
      get: function() {
        return e[o];
      }
    });
  }), n;
}
function $p(e) {
  "@babel/helpers - typeof";
  return $p = 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;
  }, $p(e);
}
var wz = /^\s+/, Sz = /\s+$/;
function Dt(e, t) {
  if (e = e || "", t = t || {}, e instanceof Dt)
    return e;
  if (!(this instanceof Dt))
    return new Dt(e, t);
  var n = Cz(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;
}
Dt.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, r, i, a, l;
    return n = t.r / 255, o = t.g / 255, r = t.b / 255, n <= 0.03928 ? i = n / 12.92 : i = 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), r <= 0.03928 ? l = r / 12.92 : l = Math.pow((r + 0.055) / 1.055, 2.4), 0.2126 * i + 0.7152 * a + 0.0722 * l;
  },
  setAlpha: function(t) {
    return this._a = zO(t), this._roundA = Math.round(100 * this._a) / 100, this;
  },
  toHsv: function() {
    var t = Xx(this._r, this._g, this._b);
    return {
      h: t.h * 360,
      s: t.s,
      v: t.v,
      a: this._a
    };
  },
  toHsvString: function() {
    var t = Xx(this._r, this._g, this._b), n = Math.round(t.h * 360), o = Math.round(t.s * 100), r = Math.round(t.v * 100);
    return this._a == 1 ? "hsv(" + n + ", " + o + "%, " + r + "%)" : "hsva(" + n + ", " + o + "%, " + r + "%, " + this._roundA + ")";
  },
  toHsl: function() {
    var t = Ux(this._r, this._g, this._b);
    return {
      h: t.h * 360,
      s: t.s,
      l: t.l,
      a: this._a
    };
  },
  toHslString: function() {
    var t = Ux(this._r, this._g, this._b), n = Math.round(t.h * 360), o = Math.round(t.s * 100), r = Math.round(t.l * 100);
    return this._a == 1 ? "hsl(" + n + ", " + o + "%, " + r + "%)" : "hsla(" + n + ", " + o + "%, " + r + "%, " + this._roundA + ")";
  },
  toHex: function(t) {
    return Qx(this._r, this._g, this._b, t);
  },
  toHexString: function(t) {
    return "#" + this.toHex(t);
  },
  toHex8: function(t) {
    return kz(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(lo(this._r, 255) * 100) + "%",
      g: Math.round(lo(this._g, 255) * 100) + "%",
      b: Math.round(lo(this._b, 255) * 100) + "%",
      a: this._a
    };
  },
  toPercentageRgbString: function() {
    return this._a == 1 ? "rgb(" + Math.round(lo(this._r, 255) * 100) + "%, " + Math.round(lo(this._g, 255) * 100) + "%, " + Math.round(lo(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(lo(this._r, 255) * 100) + "%, " + Math.round(lo(this._g, 255) * 100) + "%, " + Math.round(lo(this._b, 255) * 100) + "%, " + this._roundA + ")";
  },
  toName: function() {
    return this._a === 0 ? "transparent" : this._a < 1 ? !1 : Bz[Qx(this._r, this._g, this._b, !0)] || !1;
  },
  toFilter: function(t) {
    var n = "#" + Zx(this._r, this._g, this._b, this._a), o = n, r = this._gradientType ? "GradientType = 1, " : "";
    if (t) {
      var i = Dt(t);
      o = "#" + Zx(i._r, i._g, i._b, i._a);
    }
    return "progid:DXImageTransform.Microsoft.gradient(" + r + "startColorstr=" + n + ",endColorstr=" + o + ")";
  },
  toString: function(t) {
    var n = !!t;
    t = t || this._format;
    var o = !1, r = this._a < 1 && this._a >= 0, i = !n && r && (t === "hex" || t === "hex6" || t === "hex3" || t === "hex4" || t === "hex8" || t === "name");
    return i ? 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 Dt(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(Mz, arguments);
  },
  brighten: function() {
    return this._applyModification(Ez, arguments);
  },
  darken: function() {
    return this._applyModification(Dz, arguments);
  },
  desaturate: function() {
    return this._applyModification(Iz, arguments);
  },
  saturate: function() {
    return this._applyModification(Tz, arguments);
  },
  greyscale: function() {
    return this._applyModification(_z, arguments);
  },
  spin: function() {
    return this._applyModification(Az, arguments);
  },
  _applyCombination: function(t, n) {
    return t.apply(null, [this].concat([].slice.call(n)));
  },
  analogous: function() {
    return this._applyCombination(zz, arguments);
  },
  complement: function() {
    return this._applyCombination(Nz, arguments);
  },
  monochromatic: function() {
    return this._applyCombination(Fz, arguments);
  },
  splitcomplement: function() {
    return this._applyCombination(Rz, arguments);
  },
  // Disabled until https://github.com/bgrins/TinyColor/issues/254
  // polyad: function (number) {
  //   return this._applyCombination(polyad, [number]);
  // },
  triad: function() {
    return this._applyCombination(Jx, [3]);
  },
  tetrad: function() {
    return this._applyCombination(Jx, [4]);
  }
};
Dt.fromRatio = function(e, t) {
  if ($p(e) == "object") {
    var n = {};
    for (var o in e)
      e.hasOwnProperty(o) && (o === "a" ? n[o] = e[o] : n[o] = Nc(e[o]));
    e = n;
  }
  return Dt(e, t);
};
function Cz(e) {
  var t = {
    r: 0,
    g: 0,
    b: 0
  }, n = 1, o = null, r = null, i = null, a = !1, l = !1;
  return typeof e == "string" && (e = jz(e)), $p(e) == "object" && (ya(e.r) && ya(e.g) && ya(e.b) ? (t = $z(e.r, e.g, e.b), a = !0, l = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : ya(e.h) && ya(e.s) && ya(e.v) ? (o = Nc(e.s), r = Nc(e.v), t = Oz(e.h, o, r), a = !0, l = "hsv") : ya(e.h) && ya(e.s) && ya(e.l) && (o = Nc(e.s), i = Nc(e.l), t = Pz(e.h, o, i), a = !0, l = "hsl"), e.hasOwnProperty("a") && (n = e.a)), n = zO(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 $z(e, t, n) {
  return {
    r: lo(e, 255) * 255,
    g: lo(t, 255) * 255,
    b: lo(n, 255) * 255
  };
}
function Ux(e, t, n) {
  e = lo(e, 255), t = lo(t, 255), n = lo(n, 255);
  var o = Math.max(e, t, n), r = Math.min(e, t, n), i, a, l = (o + r) / 2;
  if (o == r)
    i = a = 0;
  else {
    var s = o - r;
    switch (a = l > 0.5 ? s / (2 - o - r) : s / (o + r), o) {
      case e:
        i = (t - n) / s + (t < n ? 6 : 0);
        break;
      case t:
        i = (n - e) / s + 2;
        break;
      case n:
        i = (e - t) / s + 4;
        break;
    }
    i /= 6;
  }
  return {
    h: i,
    s: a,
    l
  };
}
function Pz(e, t, n) {
  var o, r, i;
  e = lo(e, 360), t = lo(t, 100), n = lo(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 = r = i = 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), r = a(s, l, e), i = a(s, l, e - 1 / 3);
  }
  return {
    r: o * 255,
    g: r * 255,
    b: i * 255
  };
}
function Xx(e, t, n) {
  e = lo(e, 255), t = lo(t, 255), n = lo(n, 255);
  var o = Math.max(e, t, n), r = Math.min(e, t, n), i, a, l = o, s = o - r;
  if (a = o === 0 ? 0 : s / o, o == r)
    i = 0;
  else {
    switch (o) {
      case e:
        i = (t - n) / s + (t < n ? 6 : 0);
        break;
      case t:
        i = (n - e) / s + 2;
        break;
      case n:
        i = (e - t) / s + 4;
        break;
    }
    i /= 6;
  }
  return {
    h: i,
    s: a,
    v: l
  };
}
function Oz(e, t, n) {
  e = lo(e, 360) * 6, t = lo(t, 100), n = lo(n, 100);
  var o = Math.floor(e), r = e - o, i = n * (1 - t), a = n * (1 - r * t), l = n * (1 - (1 - r) * t), s = o % 6, u = [n, a, i, i, l, n][s], c = [l, n, n, a, i, i][s], d = [i, i, l, n, n, a][s];
  return {
    r: u * 255,
    g: c * 255,
    b: d * 255
  };
}
function Qx(e, t, n, o) {
  var r = [Si(Math.round(e).toString(16)), Si(Math.round(t).toString(16)), Si(Math.round(n).toString(16))];
  return o && 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[0].charAt(0) + r[1].charAt(0) + r[2].charAt(0) : r.join("");
}
function kz(e, t, n, o, r) {
  var i = [Si(Math.round(e).toString(16)), Si(Math.round(t).toString(16)), Si(Math.round(n).toString(16)), Si(FO(o))];
  return r && 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[3].charAt(0) == i[3].charAt(1) ? i[0].charAt(0) + i[1].charAt(0) + i[2].charAt(0) + i[3].charAt(0) : i.join("");
}
function Zx(e, t, n, o) {
  var r = [Si(FO(o)), Si(Math.round(e).toString(16)), Si(Math.round(t).toString(16)), Si(Math.round(n).toString(16))];
  return r.join("");
}
Dt.equals = function(e, t) {
  return !e || !t ? !1 : Dt(e).toRgbString() == Dt(t).toRgbString();
};
Dt.random = function() {
  return Dt.fromRatio({
    r: Math.random(),
    g: Math.random(),
    b: Math.random()
  });
};
function Iz(e, t) {
  t = t === 0 ? 0 : t || 10;
  var n = Dt(e).toHsl();
  return n.s -= t / 100, n.s = gh(n.s), Dt(n);
}
function Tz(e, t) {
  t = t === 0 ? 0 : t || 10;
  var n = Dt(e).toHsl();
  return n.s += t / 100, n.s = gh(n.s), Dt(n);
}
function _z(e) {
  return Dt(e).desaturate(100);
}
function Mz(e, t) {
  t = t === 0 ? 0 : t || 10;
  var n = Dt(e).toHsl();
  return n.l += t / 100, n.l = gh(n.l), Dt(n);
}
function Ez(e, t) {
  t = t === 0 ? 0 : t || 10;
  var n = Dt(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)))), Dt(n);
}
function Dz(e, t) {
  t = t === 0 ? 0 : t || 10;
  var n = Dt(e).toHsl();
  return n.l -= t / 100, n.l = gh(n.l), Dt(n);
}
function Az(e, t) {
  var n = Dt(e).toHsl(), o = (n.h + t) % 360;
  return n.h = o < 0 ? 360 + o : o, Dt(n);
}
function Nz(e) {
  var t = Dt(e).toHsl();
  return t.h = (t.h + 180) % 360, Dt(t);
}
function Jx(e, t) {
  if (isNaN(t) || t <= 0)
    throw new Error("Argument to polyad must be a positive number");
  for (var n = Dt(e).toHsl(), o = [Dt(e)], r = 360 / t, i = 1; i < t; i++)
    o.push(Dt({
      h: (n.h + i * r) % 360,
      s: n.s,
      l: n.l
    }));
  return o;
}
function Rz(e) {
  var t = Dt(e).toHsl(), n = t.h;
  return [Dt(e), Dt({
    h: (n + 72) % 360,
    s: t.s,
    l: t.l
  }), Dt({
    h: (n + 216) % 360,
    s: t.s,
    l: t.l
  })];
}
function zz(e, t, n) {
  t = t || 6, n = n || 30;
  var o = Dt(e).toHsl(), r = 360 / n, i = [Dt(e)];
  for (o.h = (o.h - (r * t >> 1) + 720) % 360; --t; )
    o.h = (o.h + r) % 360, i.push(Dt(o));
  return i;
}
function Fz(e, t) {
  t = t || 6;
  for (var n = Dt(e).toHsv(), o = n.h, r = n.s, i = n.v, a = [], l = 1 / t; t--; )
    a.push(Dt({
      h: o,
      s: r,
      v: i
    })), i = (i + l) % 1;
  return a;
}
Dt.mix = function(e, t, n) {
  n = n === 0 ? 0 : n || 50;
  var o = Dt(e).toRgb(), r = Dt(t).toRgb(), i = n / 100, a = {
    r: (r.r - o.r) * i + o.r,
    g: (r.g - o.g) * i + o.g,
    b: (r.b - o.b) * i + o.b,
    a: (r.a - o.a) * i + o.a
  };
  return Dt(a);
};
Dt.readability = function(e, t) {
  var n = Dt(e), o = Dt(t);
  return (Math.max(n.getLuminance(), o.getLuminance()) + 0.05) / (Math.min(n.getLuminance(), o.getLuminance()) + 0.05);
};
Dt.isReadable = function(e, t, n) {
  var o = Dt.readability(e, t), r, i;
  switch (i = !1, r = Wz(n), r.level + r.size) {
    case "AAsmall":
    case "AAAlarge":
      i = o >= 4.5;
      break;
    case "AAlarge":
      i = o >= 3;
      break;
    case "AAAsmall":
      i = o >= 7;
      break;
  }
  return i;
};
Dt.mostReadable = function(e, t, n) {
  var o = null, r = 0, i, a, l, s;
  n = n || {}, a = n.includeFallbackColors, l = n.level, s = n.size;
  for (var u = 0; u < t.length; u++)
    i = Dt.readability(e, t[u]), i > r && (r = i, o = Dt(t[u]));
  return Dt.isReadable(e, o, {
    level: l,
    size: s
  }) || !a ? o : (n.includeFallbackColors = !1, Dt.mostReadable(e, ["#fff", "#000"], n));
};
var am = Dt.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"
}, Bz = Dt.hexNames = Lz(am);
function Lz(e) {
  var t = {};
  for (var n in e)
    e.hasOwnProperty(n) && (t[e[n]] = n);
  return t;
}
function zO(e) {
  return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
}
function lo(e, t) {
  Hz(e) && (e = "100%");
  var n = Vz(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 gh(e) {
  return Math.min(1, Math.max(0, e));
}
function Pr(e) {
  return parseInt(e, 16);
}
function Hz(e) {
  return typeof e == "string" && e.indexOf(".") != -1 && parseFloat(e) === 1;
}
function Vz(e) {
  return typeof e == "string" && e.indexOf("%") != -1;
}
function Si(e) {
  return e.length == 1 ? "0" + e : "" + e;
}
function Nc(e) {
  return e <= 1 && (e = e * 100 + "%"), e;
}
function FO(e) {
  return Math.round(parseFloat(e) * 255).toString(16);
}
function ew(e) {
  return Pr(e) / 255;
}
var fi = (function() {
  var e = "[-\\+]?\\d+%?", t = "[-\\+]?\\d*\\.\\d+%?", n = "(?:" + t + ")|(?:" + e + ")", o = "[\\s|\\(]+(" + n + ")[,|\\s]+(" + n + ")[,|\\s]+(" + n + ")\\s*\\)?", r = "[\\s|\\(]+(" + n + ")[,|\\s]+(" + n + ")[,|\\s]+(" + n + ")[,|\\s]+(" + n + ")\\s*\\)?";
  return {
    CSS_UNIT: new RegExp(n),
    rgb: new RegExp("rgb" + o),
    rgba: new RegExp("rgba" + r),
    hsl: new RegExp("hsl" + o),
    hsla: new RegExp("hsla" + r),
    hsv: new RegExp("hsv" + o),
    hsva: new RegExp("hsva" + r),
    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 ya(e) {
  return !!fi.CSS_UNIT.exec(e);
}
function jz(e) {
  e = e.replace(wz, "").replace(Sz, "").toLowerCase();
  var t = !1;
  if (am[e])
    e = am[e], t = !0;
  else if (e == "transparent")
    return {
      r: 0,
      g: 0,
      b: 0,
      a: 0,
      format: "name"
    };
  var n;
  return (n = fi.rgb.exec(e)) ? {
    r: n[1],
    g: n[2],
    b: n[3]
  } : (n = fi.rgba.exec(e)) ? {
    r: n[1],
    g: n[2],
    b: n[3],
    a: n[4]
  } : (n = fi.hsl.exec(e)) ? {
    h: n[1],
    s: n[2],
    l: n[3]
  } : (n = fi.hsla.exec(e)) ? {
    h: n[1],
    s: n[2],
    l: n[3],
    a: n[4]
  } : (n = fi.hsv.exec(e)) ? {
    h: n[1],
    s: n[2],
    v: n[3]
  } : (n = fi.hsva.exec(e)) ? {
    h: n[1],
    s: n[2],
    v: n[3],
    a: n[4]
  } : (n = fi.hex8.exec(e)) ? {
    r: Pr(n[1]),
    g: Pr(n[2]),
    b: Pr(n[3]),
    a: ew(n[4]),
    format: t ? "name" : "hex8"
  } : (n = fi.hex6.exec(e)) ? {
    r: Pr(n[1]),
    g: Pr(n[2]),
    b: Pr(n[3]),
    format: t ? "name" : "hex"
  } : (n = fi.hex4.exec(e)) ? {
    r: Pr(n[1] + "" + n[1]),
    g: Pr(n[2] + "" + n[2]),
    b: Pr(n[3] + "" + n[3]),
    a: ew(n[4] + "" + n[4]),
    format: t ? "name" : "hex8"
  } : (n = fi.hex3.exec(e)) ? {
    r: Pr(n[1] + "" + n[1]),
    g: Pr(n[2] + "" + n[2]),
    b: Pr(n[3] + "" + n[3]),
    format: t ? "name" : "hex"
  } : !1;
}
function Wz(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 BO(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: {}
    }))
  };
}
function bfe(e, t, n) {
  return BO({
    name: t || "timeseries",
    refId: "A",
    fields: [
      {
        name: "time",
        type: Ln.time,
        values: e.timestamps.map((o) => o * 1e3)
      },
      ...e.series.map((o) => ({
        name: o.label,
        type: Ln.number,
        values: o.values,
        config: n ? { unit: n } : {}
      }))
    ]
  });
}
function yfe(e) {
  const t = e.fields.filter(
    (o) => o.type === Ln.number || o.type === Ln.time
  );
  return t.length < 2 ? [[], []] : t.map(
    (o) => o.values.toArray().map((r) => r == null ? null : o.type === Ln.time && typeof r == "number" ? r / 1e3 : r)
  );
}
function xfe(e, t) {
  const n = e.fields.find((o) => o.name === t);
  return n ? n.values.toArray() : [];
}
function wfe(e, t) {
  return uz(e, t);
}
function Sfe(e) {
  for (const t of e.fields)
    if (t.type === Ln.time)
      return {
        name: t.name,
        timestamps: t.values.toArray().map((n) => typeof n == "number" ? n / 1e3 : Number.NaN)
      };
  return { name: "", timestamps: [] };
}
function Cfe(e, t) {
  if (t.length === 0)
    return "#4096ff";
  let n = t[0].color;
  for (const o of t)
    e >= o.value && (n = o.color);
  return n;
}
const _d = /* @__PURE__ */ new Map();
function Mg(e) {
  _d.set(e.type, e);
}
function Pp(e) {
  return _d.get(e);
}
function $fe() {
  return Array.from(_d.values()).map((e) => e.meta);
}
function Pfe() {
  return Array.from(_d.values());
}
function Ofe() {
  _d.clear();
}
const tw = [
  "api-gateway",
  "auth-service",
  "payment-service",
  "user-service",
  "notification-service",
  "order-service",
  "inventory-service",
  "search-service"
];
function Uf(e) {
  let t = e;
  return () => (t = (t * 16807 + 0) % 2147483647, t / 2147483647);
}
function Kz(e, t, n, o, r) {
  const i = n ^ Math.floor(Date.now() / 5e3) * 2654435761, a = Uf(n), l = Uf(i);
  if (e === "random-walk") {
    const s = Uf((n + Date.now()) % 2147483647), u = r + o * 0.5, c = r * 0.1, d = r + o * 1.8, f = [u];
    for (let p = 1; p < t; p++) {
      const v = f[p - 1], g = (u - v) * 0.05, m = (s() - 0.5) * o * 0.08 + g;
      f.push(Math.max(c, Math.min(d, v + m)));
    }
    return f;
  }
  return Array.from({ length: t }, (s, u) => {
    const c = u / t;
    let d;
    switch (e) {
      case "sine":
        d = r + 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(
          (v, g) => v + Math.exp(-((c - g) ** 2) / 1e-3) * o * 2,
          0
        );
        d = r + p + (a() - 0.5) * o * 0.15;
        break;
      }
      case "step":
        d = r + Math.floor(c * 5) % 3 * o * 0.5 + (a() - 0.5) * o * 0.1;
        break;
      case "sawtooth":
        d = r + c * 3 % 1 * o + (a() - 0.5) * o * 0.15;
        break;
      case "noise":
        d = r + a() * o;
        break;
      case "trend-up":
        d = r + c * o * 1.5 + Math.sin(c * 10) * o * 0.2 + (a() - 0.5) * o * 0.1;
        break;
      case "trend-down":
        d = r + (1 - c) * o * 1.5 + Math.sin(c * 8) * o * 0.15 + (a() - 0.5) * o * 0.1;
        break;
      case "plateau": {
        const v = c < 0.3 ? c / 0.3 : c > 0.7 ? (1 - c) / 0.30000000000000004 : 1;
        d = r + v * o + (a() - 0.5) * o * 0.1;
        break;
      }
      case "live": {
        if (c < 0.9)
          d = r + 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 = r + Math.sin(0.9 * Math.PI * 4 + n) * o * 0.6 + (l() - 0.5) * o * 0.4 * p * 2;
        }
        break;
      }
      default:
        d = r;
    }
    return Math.max(0, d);
  });
}
function LO(e, t = 15, n = 3, o = "sine", r) {
  const i = [];
  for (let l = e.from; l <= e.to; l += t)
    i.push(l);
  const a = Array.from({ length: n }, (l, s) => {
    const u = 20 + (s * 37 + 13) % 60, c = 10 + (s * 53 + 7) % 40, d = Kz(o, i.length, s * 1e3 + 42, u, c);
    return {
      label: r?.[s] ?? tw[s % tw.length],
      values: d
    };
  });
  return { timestamps: i, series: a };
}
function qz(e, t, n, o) {
  const i = ((n + o) / 2 - e) * 0.05, a = (Math.random() - 0.5) * t * 0.08 + i;
  return Math.max(n, Math.min(o, e + a));
}
function kfe() {
  const e = Math.floor(Date.now() / 1e3);
  return { from: e - 3600, to: e };
}
function Ife(e, t = 8) {
  const n = (e.to - e.from) / t, o = Array.from({ length: t }, (l, s) => Math.floor(e.from + s * n)), r = ["p50", "p90", "p99"], i = Uf(99), a = r.map((l, s) => {
    const u = [25, 85, 220][s], c = o.map(() => u + i() * u * 0.4);
    return { label: l, values: c };
  });
  return { timestamps: o, series: a };
}
class Yz {
  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, intervalMs: r, maxDataPoints: i } = t, a = n.to - n.from, l = Math.max(r, Math.ceil(a / (i || 1e3))), s = Math.max(Math.round(l / 1e3), 1), u = o.filter((c) => c).map((c) => {
      const { timestamps: d, series: f } = LO(
        { from: n.from / 1e3, to: n.to / 1e3 },
        s,
        c.seriesCount,
        c.pattern,
        c.labels
      ), p = d.map((g) => g * 1e3), v = [
        { name: "Time", type: Ln.time, values: p, config: {} },
        ...f.map((g) => ({
          name: g.label,
          type: Ln.number,
          values: g.values,
          config: { displayNameFromDS: g.label }
        }))
      ];
      return BO({ name: c.metric, refId: "A", fields: v });
    });
    return Promise.resolve({ data: u, state: "Done" });
  }
}
const Il = [
  "#4096ff",
  "#52c41a",
  "#faad14",
  "#ff4d4f",
  "#722ed1",
  "#13c2c2",
  "#eb2f96",
  "#fa8c16",
  "#a0d911",
  "#1677ff",
  "#2f54eb",
  "#f5222d",
  "#fadb14",
  "#7cb305",
  "#08979c",
  "#531dab",
  "#c41d7f",
  "#d4380d",
  "#d48806",
  "#389e0d"
];
function xa(e, t) {
  if (e.length < 2 || t < 2)
    return [...e];
  const n = (i) => [
    Number.parseInt(i.slice(1, 3), 16),
    Number.parseInt(i.slice(3, 5), 16),
    Number.parseInt(i.slice(5, 7), 16)
  ], o = (i) => Math.round(Math.max(0, Math.min(255, i))).toString(16).padStart(2, "0"), r = e.length - 1;
  return Array.from({ length: t }, (i, a) => {
    const l = a / (t - 1) * r, s = Math.min(Math.floor(l), r - 1), u = l - s, [c, d, f] = n(e[s]), [p, v, g] = n(e[s + 1]);
    return `#${o(c + (p - c) * u)}${o(d + (v - d) * u)}${o(f + (g - f) * u)}`;
  });
}
const Yr = {
  classic: Il,
  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: xa(["#cfe2f3", "#9fc5e8", "#3d85c8", "#0b5394", "#041d3a"], 16),
  reds: xa(["#fce5cd", "#f6b26b", "#e06666", "#cc0000", "#660000"], 16),
  GrYlRd: xa(
    ["#37872d", "#96d98d", "#fee520", "#ff780a", "#f2495c", "#8f3bb8"],
    16
  ),
  "purple-orange": xa(
    ["#7b2d8b", "#d45087", "#ff7c43", "#ffa600", "#f0e442", "#b3de69"],
    16
  ),
  "green-yellow-red": xa(
    ["#1a9850", "#a6d96a", "#fee08b", "#fdae61", "#d73027"],
    16
  ),
  "red-yellow-green": xa(
    ["#d73027", "#fdae61", "#fee08b", "#a6d96a", "#1a9850"],
    16
  ),
  "blue-yellow-red": xa(
    ["#2166ac", "#92c5de", "#d1e5f0", "#fddbc7", "#f4a582", "#b2182b"],
    16
  ),
  "blue-purple": xa(
    ["#045a8d", "#74a9cf", "#ccebc5", "#9ebcda", "#8856a7", "#810f7c"],
    16
  ),
  "yellow-blue": xa(["#ffffd9", "#c7e9b4", "#41b6c4", "#225ea8", "#0c2c84"], 16)
};
function Gz(e) {
  return !e || e === "classic" ? Il : Yr[e] ?? Il;
}
function HO(e, t, n = "sequential", o) {
  if (t === 0)
    return [];
  if (e === "fixed") {
    const i = o ?? Il[0];
    return Array.from({ length: t }, () => i);
  }
  if (e === "thresholds")
    return [];
  const r = Gz(e);
  return n === "distributed" && t > 1 ? Array.from({ length: t }, (i, a) => {
    const l = Math.round(a * (r.length - 1) / (t - 1));
    return r[l];
  }) : Array.from({ length: t }, (i, a) => r[a % r.length]);
}
const Gn = {
  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 Uz = 0;
function lm() {
  return `panel-${Date.now()}-${++Uz}`;
}
function Xr(e) {
  return [{ id: "A", enabled: !0, dataSource: e }];
}
const Xz = {
  timeseries: {
    queries: Xr({
      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: Xr({
      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: Xr({ 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: Xr({
      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: Xr({ 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: Xr({ 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: Xr({
      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 VO(e, t) {
  const n = t?.id ?? lm();
  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
  }, ...Xz[e], ...t, id: n };
}
function jO() {
  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: Xr({
          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: Xr({
          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: Xr({
          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: Xr({
          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: Xr({
          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 r = VO(o.type, { id: o.id, title: o.title, ...o.extra });
    e[o.id] = r, 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 Qz() {
  return JSON.stringify(jO(), null, 2);
}
const Py = /* @__PURE__ */ new Map();
function Ql(e) {
  Py.set(e.meta.type, e);
}
function Zz(e) {
  return Py.get(e);
}
function Tfe() {
  return Array.from(Py.values());
}
const Jz = {
  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 }
  ]
}, e4 = {
  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 }
  ]
}, t4 = {
  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 }
  ]
}, n4 = {
  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 }
  ]
}, o4 = {
  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 }
  ]
}, r4 = {
  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 }
  ]
}, i4 = {
  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 a4() {
  Ql(i4), Ql(Jz), Ql(t4), Ql(o4), Ql(e4), Ql(r4), Ql(n4);
}
function WO(e) {
  return e === void 0 || e === "0" || e === "3";
}
const l4 = /* @__PURE__ */ new Set(["mean", "min", "max", "sum", "count"]);
function Rc(e, t = "lastNotNull", n) {
  if (!WO(n) && l4.has(t)) {
    const r = e.filter((i) => i !== null);
    return r.length > 0 ? r[r.length - 1] ?? 0 : 0;
  }
  const o = e.filter((r) => r !== 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((r, i) => r + i, 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((r, i) => r + i, 0);
    case "count":
      return o.length;
    default:
      return o.length > 0 ? o[o.length - 1] ?? 0 : 0;
  }
}
function uf(e, t) {
  if (!WO(t))
    return null;
  const n = e.filter((r) => r !== null);
  if (n.length < 2)
    return null;
  const o = n[0];
  return o === 0 ? null : (n[n.length - 1] - o) / o;
}
class vh {
  constructor(t) {
    this.props = t;
  }
}
var sm = /* @__PURE__ */ ((e) => (e.LOCAL_STORAGE = "LOCAL_STORAGE", e.IN_MEMORY = "IN_MEMORY", e))(sm || {}), ws = /* @__PURE__ */ ((e) => (e.Linear = "linear", e.Logarithmic = "logarithmic", e.Symlog = "symlog", e))(ws || {}), Xi = /* @__PURE__ */ ((e) => (e.Lines = "lines", e.Bars = "bars", e.Points = "points", e.Histogram = "histogram", e))(Xi || {}), Xf = /* @__PURE__ */ ((e) => (e.Linear = "linear", e.Smooth = "smooth", e.StepBefore = "stepBefore", e.StepAfter = "stepAfter", e))(Xf || {}), um = /* @__PURE__ */ ((e) => (e.Solid = "solid", e.Dashed = "dashed", e.Dotted = "dotted", e))(um || {}), qc = /* @__PURE__ */ ((e) => (e.None = "none", e.Solid = "solid", e.Gradient = "gradient", e))(qc || {}), KO = /* @__PURE__ */ ((e) => (e[e.Before = -1] = "Before", e[e.Center = 0] = "Center", e[e.After = 1] = "After", e))(KO || {});
function s4(e, t, n) {
  if (!n || n.length === 0)
    return 0;
  const o = n.reduce((r, i) => i.length > r.length ? i : r, "");
  return o === "" || !t.font?.[0] ? 0 : (e.ctx.font = t.font[0], e.ctx.measureText(o).width / devicePixelRatio);
}
function u4(e) {
  return (t, n, o, r) => {
    const i = t.axes[o];
    if (r > 1) {
      const l = i._size;
      if (l !== void 0)
        return l;
    }
    let a = (i.ticks?.size ?? 0) + e;
    return a += s4(t, i, n), Math.ceil(a);
  };
}
class c4 extends vh {
  buildGridConfig() {
    const { grid: t, isDarkMode: n, isLogScale: o } = this.props, r = n ? "#444" : "#E8E9EA", i = o ? 0.1 : 0.2;
    return t ? {
      stroke: t.stroke ?? r,
      width: t.width ?? i,
      show: t.show ?? !0
    } : { stroke: r, width: i, 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 r = new Date(o * 1e3);
        return `${r.getHours().toString().padStart(2, "0")}:${r.getMinutes().toString().padStart(2, "0")}`;
      });
  }
  buildYAxisValuesFormatter() {
    const { yAxisUnit: t, decimalPrecision: n } = this.props;
    return (o, r) => r.map((i) => {
      if (i == null || Number.isNaN(i))
        return "";
      const a = i.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 u4(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: r = 2,
      space: i,
      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: r };
    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), i !== void 0 && (f.space = i), 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 d4 = "#FFFFFF", qO = 30, f4 = 1e6, p4 = 3, h4 = {
  focus: { alpha: 0.3 },
  legend: { show: !1 },
  padding: [16, 16, 8, 8],
  series: [],
  hooks: {}
}, Eg = {
  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: () => d4
  },
  focus: { prox: f4 },
  hover: { prox: qO, bias: 0 }
};
function g4(e, t, n) {
  return e;
}
function v4(e) {
  const t = [10, 5];
  function n(i, a, l) {
    const s = i.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 = g4(
        c.thresholdValue,
        c.thresholdUnit,
        e.yAxisUnit
      ), p = i.valToPos(Number(f), a, !0), v = Math.round(i.bbox.left), g = Math.round(p), m = Math.round(i.bbox.left + i.bbox.width);
      if (s.strokeStyle = d, s.beginPath(), s.moveTo(v, g), s.lineTo(m, g), s.stroke(), c.thresholdLabel) {
        const x = s.measureText(c.thresholdLabel).width, S = m - x - 20, P = s.canvas.height - g > u ? g + 15 : g - 15;
        s.fillStyle = d, s.fillText(c.thresholdLabel, S, P);
      }
    }
  }
  const { scaleKey: o, thresholds: r } = e;
  return (i) => {
    const a = i.ctx;
    n(i, o, r), a.restore();
  };
}
function nw({
  seriesShow: e,
  seriesLabel: t,
  visibleStoredLabels: n,
  hiddenStoredLabels: o,
  hasActivePreference: r
}) {
  const i = !!n?.has(t), a = !!o?.has(t);
  return i ? !0 : a || r ? !1 : e ?? !0;
}
const YO = "series_visibility_";
function m4(e) {
  try {
    const t = localStorage.getItem(YO + e);
    return t ? JSON.parse(t) : null;
  } catch {
    return null;
  }
}
function b4(e, t) {
  try {
    localStorage.setItem(YO + e, JSON.stringify(t));
  } catch {
  }
}
function GO({
  uPlotInstance: e,
  stepInterval: t
}) {
  const n = e.scales.x;
  if (n && typeof n.min == "number") {
    const o = n.min, r = o + t, i = e.valToPos(o, "x"), a = e.valToPos(r, "x");
    return Math.abs(a - i);
  }
  return 0;
}
const y4 = !0, Ro = "u-", x4 = "uplot", w4 = Ro + "hz", S4 = Ro + "vt", C4 = Ro + "title", $4 = Ro + "wrap", P4 = Ro + "under", O4 = Ro + "over", k4 = Ro + "axis", us = Ro + "off", I4 = Ro + "select", T4 = Ro + "cursor-x", _4 = Ro + "cursor-y", M4 = Ro + "cursor-pt", E4 = Ro + "legend", D4 = Ro + "live", A4 = Ro + "inline", N4 = Ro + "series", R4 = Ro + "marker", ow = Ro + "label", z4 = Ro + "value", zc = "width", Fc = "height", Oc = "top", rw = "bottom", tu = "left", Dg = "right", Oy = "#000", iw = Oy + "0", aw = "mousemove", lw = "mousedown", Ag = "mouseup", sw = "mouseenter", uw = "mouseleave", cw = "dblclick", F4 = "resize", B4 = "scroll", dw = "change", Op = "dppxchange", ky = "--", ic = typeof window < "u", cm = ic ? document : null, ku = ic ? window : null, L4 = ic ? navigator : null;
let Rn, cf;
function dm() {
  let e = devicePixelRatio;
  Rn != e && (Rn = e, cf && pm(dw, cf, dm), cf = matchMedia(`(min-resolution: ${Rn - 1e-3}dppx) and (max-resolution: ${Rn + 1e-3}dppx)`), Ss(dw, cf, dm), ku.dispatchEvent(new CustomEvent(Op)));
}
function kr(e, t) {
  if (t != null) {
    let n = e.classList;
    !n.contains(t) && n.add(t);
  }
}
function fm(e, t) {
  let n = e.classList;
  n.contains(t) && n.remove(t);
}
function to(e, t, n) {
  e.style[t] = n + "px";
}
function pi(e, t, n, o) {
  let r = cm.createElement(e);
  return t != null && kr(r, t), n?.insertBefore(r, o), r;
}
function Gr(e, t) {
  return pi("div", e, t);
}
const fw = /* @__PURE__ */ new WeakMap();
function Vi(e, t, n, o, r) {
  let i = "translate(" + t + "px," + n + "px)", a = fw.get(e);
  i != a && (e.style.transform = i, fw.set(e, i), t < 0 || n < 0 || t > o || n > r ? kr(e, us) : fm(e, us));
}
const pw = /* @__PURE__ */ new WeakMap();
function hw(e, t, n) {
  let o = t + n, r = pw.get(e);
  o != r && (pw.set(e, o), e.style.background = t, e.style.borderColor = n);
}
const gw = /* @__PURE__ */ new WeakMap();
function vw(e, t, n, o) {
  let r = t + "" + n, i = gw.get(e);
  r != i && (gw.set(e, r), 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 Iy = { passive: !0 }, H4 = { ...Iy, capture: !0 };
function Ss(e, t, n, o) {
  t.addEventListener(e, n, o ? H4 : Iy);
}
function pm(e, t, n, o) {
  t.removeEventListener(e, n, Iy);
}
ic && dm();
function bi(e, t, n, o) {
  let r;
  n = n || 0, o = o || t.length - 1;
  let i = o <= 2147483647;
  for (; o - n > 1; )
    r = i ? n + o >> 1 : Mr((n + o) / 2), t[r] < e ? n = r : o = r;
  return e - t[n] <= t[o] - e ? n : o;
}
function Fu(e, t, n, o) {
  for (let r = o == 1 ? t : n; r >= t && r <= n; r += o)
    if (e[r] != null)
      return r;
  return -1;
}
function V4(e, t, n, o) {
  let r = vn, i = -vn;
  if (o == 1)
    r = e[t], i = e[n];
  else if (o == -1)
    r = e[n], i = e[t];
  else
    for (let a = t; a <= n; a++) {
      let l = e[a];
      l != null && (l < r && (r = l), l > i && (i = l));
    }
  return [r, i];
}
function j4(e, t, n) {
  let o = vn, r = -vn;
  for (let i = t; i <= n; i++) {
    let a = e[i];
    a != null && a > 0 && (a < o && (o = a), a > r && (r = a));
  }
  return [o, r];
}
function mh(e, t, n, o) {
  let r = yw(e), i = yw(t);
  e == t && (r == -1 ? (e *= n, t /= n) : (e /= n, t *= n));
  let a = n == 10 ? Na : UO, l = r == 1 ? Mr : Qr, s = i == 1 ? Qr : Mr, u = l(a(Io(e))), c = s(a(Io(t))), d = Bu(n, u), f = Bu(n, c);
  return n == 10 && (u < 0 && (d = Un(d, -u)), c < 0 && (f = Un(f, -c))), o || n == 2 ? (e = d * r, t = f * i) : (e = ZO(e, d), t = bh(t, f)), [e, t];
}
function Ty(e, t, n, o) {
  let r = mh(e, t, n, o);
  return e == 0 && (r[0] = 0), t == 0 && (r[1] = 0), r;
}
const _y = 0.1, mw = {
  mode: 3,
  pad: _y
}, Yc = {
  pad: 0,
  soft: null,
  mode: 0
}, W4 = {
  min: Yc,
  max: Yc
};
function kp(e, t, n, o) {
  return yh(n) ? bw(e, t, n) : (Yc.pad = n, Yc.soft = o ? 0 : null, Yc.mode = o ? 3 : 0, bw(e, t, W4));
}
function kn(e, t) {
  return e ?? t;
}
function K4(e, t, n) {
  for (t = kn(t, 0), n = kn(n, e.length - 1); t <= n; ) {
    if (e[t] != null)
      return !0;
    t++;
  }
  return !1;
}
function bw(e, t, n) {
  let o = n.min, r = n.max, i = kn(o.pad, 0), a = kn(r.pad, 0), l = kn(o.hard, -vn), s = kn(r.hard, vn), u = kn(o.soft, vn), c = kn(r.soft, -vn), d = kn(o.mode, 0), f = kn(r.mode, 0), p = t - e, v = Na(p), g = Qo(Io(e), Io(t)), m = Na(g), x = Io(m - v);
  (p < 1e-24 || x > 10) && (p = 0, (e == 0 || t == 0) && (p = 1e-24, d == 2 && u != vn && (i = 0), f == 2 && c != -vn && (a = 0)));
  let S = p || g || 1e3, C = Na(S), P = Bu(10, Mr(C)), $ = S * (p == 0 ? e == 0 ? 0.1 : 1 : i), I = Un(ZO(e - $, P / 10), 24), w = e >= u && (d == 1 || d == 3 && I <= u || d == 2 && I >= u) ? u : vn, T = Qo(l, I < w && e >= w ? w : Jr(w, I)), M = S * (p == 0 ? t == 0 ? 0.1 : 1 : a), R = Un(bh(t + M, P / 10), 24), N = t <= c && (f == 1 || f == 3 && R >= c || f == 2 && R <= c) ? c : -vn, H = Jr(s, R > N && t <= N ? N : Qo(N, R));
  return T == H && T == 0 && (H = 100), [T, H];
}
const q4 = new Intl.NumberFormat(ic ? L4.language : "en-US"), My = (e) => q4.format(e), zr = Math, Qf = zr.PI, Io = zr.abs, Mr = zr.floor, Oo = zr.round, Qr = zr.ceil, Jr = zr.min, Qo = zr.max, Bu = zr.pow, yw = zr.sign, Na = zr.log10, UO = zr.log2, Y4 = (e, t = 1) => zr.sinh(e) * t, Ng = (e, t = 1) => zr.asinh(e / t), vn = 1 / 0;
function xw(e) {
  return (Na((e ^ e >> 31) - (e >> 31)) | 0) + 1;
}
function hm(e, t, n) {
  return Jr(Qo(e, t), n);
}
function gn(e) {
  return typeof e == "function" ? e : () => e;
}
const G4 = () => {
}, XO = (e) => e, QO = (e, t) => t, U4 = (e) => null, ww = (e) => !0, Sw = (e, t) => e == t, X4 = /\.\d*?(?=9{6,}|0{6,})/gm, ks = (e) => {
  if (ek(e) || Dl.has(e))
    return e;
  const t = `${e}`, n = t.match(X4);
  if (n == null)
    return e;
  let o = n[0].length - 1;
  if (t.indexOf("e-") != -1) {
    let [r, i] = t.split("e");
    return +`${ks(r)}e${i}`;
  }
  return Un(e, o);
};
function is(e, t) {
  return ks(Un(ks(e / t)) * t);
}
function bh(e, t) {
  return ks(Qr(ks(e / t)) * t);
}
function ZO(e, t) {
  return ks(Mr(ks(e / t)) * t);
}
function Un(e, t = 0) {
  if (ek(e))
    return e;
  let n = 10 ** t, o = e * n * (1 + Number.EPSILON);
  return Oo(o) / n;
}
const Dl = /* @__PURE__ */ new Map();
function JO(e) {
  return (("" + e).split(".")[1] || "").length;
}
function fd(e, t, n, o) {
  let r = [], i = o.map(JO);
  for (let a = t; a < n; a++) {
    let l = Io(a), s = Un(Bu(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 >= i[u] ? 0 : i[u]), f = e == 10 ? c : Un(c, d);
      r.push(f), Dl.set(f, d);
    }
  }
  return r;
}
const Gc = {}, Ey = [], Lu = [null, null], ml = Array.isArray, ek = Number.isInteger, Q4 = (e) => e === void 0;
function Cw(e) {
  return typeof e == "string";
}
function yh(e) {
  let t = !1;
  if (e != null) {
    let n = e.constructor;
    t = n == null || n == Object;
  }
  return t;
}
function Z4(e) {
  return e != null && typeof e == "object";
}
const J4 = Object.getPrototypeOf(Uint8Array), tk = "__proto__";
function Hu(e, t = yh) {
  let n;
  if (ml(e)) {
    let o = e.find((r) => r != null);
    if (ml(o) || t(o)) {
      n = Array(e.length);
      for (let r = 0; r < e.length; r++)
        n[r] = Hu(e[r], t);
    } else
      n = e.slice();
  } else if (e instanceof J4)
    n = e.slice();
  else if (t(e)) {
    n = {};
    for (let o in e)
      o != tk && (n[o] = Hu(e[o], t));
  } else
    n = e;
  return n;
}
function So(e) {
  let t = arguments;
  for (let n = 1; n < t.length; n++) {
    let o = t[n];
    for (let r in o)
      r != tk && (yh(e[r]) ? So(e[r], Hu(o[r])) : e[r] = Hu(o[r]));
  }
  return e;
}
const e3 = 0, t3 = 1, n3 = 2;
function o3(e, t, n) {
  for (let o = 0, r, i = -1; o < t.length; o++) {
    let a = t[o];
    if (a > i) {
      for (r = a - 1; r >= 0 && e[r] == null; )
        e[r--] = null;
      for (r = a + 1; r < n && e[r] == null; )
        e[i = r++] = null;
    }
  }
}
function r3(e, t) {
  if (l3(e)) {
    let a = e[0].slice();
    for (let l = 1; l < e.length; l++)
      a.push(...e[l].slice(1));
    return s3(a[0]) || (a = a3(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)], r = o[0].length, i = /* @__PURE__ */ new Map();
  for (let a = 0; a < r; a++)
    i.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(r).fill(void 0), f = t ? t[a][u] : t3, p = [];
      for (let v = 0; v < c.length; v++) {
        let g = c[v], m = i.get(s[v]);
        g === null ? f != e3 && (d[m] = g, f == n3 && p.push(m)) : d[m] = g;
      }
      o3(d, p, r), o.push(d);
    }
  }
  return o;
}
const i3 = typeof queueMicrotask > "u" ? (e) => Promise.resolve().then(e) : queueMicrotask;
function a3(e) {
  let t = e[0], n = t.length, o = Array(n);
  for (let i = 0; i < o.length; i++)
    o[i] = i;
  o.sort((i, a) => t[i] - t[a]);
  let r = [];
  for (let i = 0; i < e.length; i++) {
    let a = e[i], l = Array(n);
    for (let s = 0; s < n; s++)
      l[s] = a[o[s]];
    r.push(l);
  }
  return r;
}
function l3(e) {
  let t = e[0][0], n = t.length;
  for (let o = 1; o < e.length; o++) {
    let r = e[o][0];
    if (r.length != n)
      return !1;
    if (r != t) {
      for (let i = 0; i < n; i++)
        if (r[i] != t[i])
          return !1;
    }
  }
  return !0;
}
function s3(e, t = 100) {
  const n = e.length;
  if (n <= 1)
    return !0;
  let o = 0, r = n - 1;
  for (; o <= r && e[o] == null; )
    o++;
  for (; r >= o && e[r] == null; )
    r--;
  if (r <= o)
    return !0;
  const i = Qo(1, Mr((r - o + 1) / t));
  for (let a = e[o], l = o + i; l <= r; l += i) {
    const s = e[l];
    if (s != null) {
      if (s <= a)
        return !1;
      a = s;
    }
  }
  return !0;
}
const nk = [
  "January",
  "February",
  "March",
  "April",
  "May",
  "June",
  "July",
  "August",
  "September",
  "October",
  "November",
  "December"
], ok = [
  "Sunday",
  "Monday",
  "Tuesday",
  "Wednesday",
  "Thursday",
  "Friday",
  "Saturday"
];
function rk(e) {
  return e.slice(0, 3);
}
const u3 = ok.map(rk), c3 = nk.map(rk), d3 = {
  MMMM: nk,
  MMM: c3,
  WWWW: ok,
  WWW: u3
};
function kc(e) {
  return (e < 10 ? "0" : "") + e;
}
function f3(e) {
  return (e < 10 ? "00" : e < 100 ? "0" : "") + e;
}
const p3 = {
  // 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) => kc(e.getMonth() + 1),
  // 7
  M: (e) => e.getMonth() + 1,
  // 09
  DD: (e) => kc(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) => kc(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) => kc(e.getMinutes()),
  // 9
  m: (e) => e.getMinutes(),
  // 09
  ss: (e) => kc(e.getSeconds()),
  // 9
  s: (e) => e.getSeconds(),
  // 374
  fff: (e) => f3(e.getMilliseconds())
};
function Dy(e, t) {
  t = t || d3;
  let n = [], o = /\{([a-z]+)\}|[^{]+/gi, r;
  for (; r = o.exec(e); )
    n.push(r[0][0] == "{" ? p3[r[1]] : r[0]);
  return (i) => {
    let a = "";
    for (let l = 0; l < n.length; l++)
      a += typeof n[l] == "string" ? n[l] : n[l](i, t);
    return a;
  };
}
const h3 = new Intl.DateTimeFormat().resolvedOptions().timeZone;
function g3(e, t) {
  let n;
  return t == "UTC" || t == "Etc/UTC" ? n = new Date(+e + e.getTimezoneOffset() * 6e4) : t == h3 ? n = e : (n = new Date(e.toLocaleString("en-US", { timeZone: t })), n.setMilliseconds(e.getMilliseconds())), n;
}
const ik = (e) => e % 1 == 0, Ip = [1, 2, 2.5, 5], v3 = fd(10, -32, 0, Ip), ak = fd(10, 0, 32, Ip), m3 = ak.filter(ik), as = v3.concat(ak), Ay = `
`, lk = "{YYYY}", $w = Ay + lk, sk = "{M}/{D}", Bc = Ay + sk, df = Bc + "/{YY}", uk = "{aa}", b3 = "{h}:{mm}", hu = b3 + uk, Pw = Ay + hu, Ow = ":{ss}", zn = null;
function ck(e) {
  let t = e * 1e3, n = t * 60, o = n * 60, r = o * 24, i = r * 30, a = r * 365, s = (e == 1 ? fd(10, 0, 3, Ip).filter(ik) : fd(10, -3, 0, Ip)).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?
    r,
    r * 2,
    r * 3,
    r * 4,
    r * 5,
    r * 6,
    r * 7,
    r * 8,
    r * 9,
    r * 10,
    r * 15,
    // year divisors (# months, approx)
    i,
    i * 2,
    i * 3,
    i * 4,
    i * 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, lk, zn, zn, zn, zn, zn, zn, 1],
    [r * 28, "{MMM}", $w, zn, zn, zn, zn, zn, 1],
    [r, sk, $w, zn, zn, zn, zn, zn, 1],
    [o, "{h}" + uk, df, zn, Bc, zn, zn, zn, 1],
    [n, hu, df, zn, Bc, zn, zn, zn, 1],
    [t, Ow, df + " " + hu, zn, Bc + " " + hu, zn, Pw, zn, 1],
    [e, Ow + ".{fff}", df + " " + hu, zn, Bc + " " + hu, zn, Pw, zn, 1]
  ];
  function c(d) {
    return (f, p, v, g, m, x) => {
      let S = [], C = m >= a, P = m >= i && m < a, $ = d(v), I = Un($ * e, 3), w = Rg($.getFullYear(), C ? 0 : $.getMonth(), P || C ? 1 : $.getDate()), T = Un(w * e, 3);
      if (P || C) {
        let M = P ? m / i : 0, R = C ? m / a : 0, N = I == T ? I : Un(Rg(w.getFullYear() + R, w.getMonth() + M, 1) * e, 3), H = new Date(Oo(N / e)), L = H.getFullYear(), F = H.getMonth();
        for (let A = 0; N <= g; A++) {
          let G = Rg(L + R * A, F + M * A, 1), j = G - d(Un(G * e, 3));
          N = Un((+G + j) * e, 3), N <= g && S.push(N);
        }
      } else {
        let M = m >= r ? r : m, R = Mr(v) - Mr(I), N = T + R + bh(I - T, M);
        S.push(N);
        let H = d(N), L = H.getHours() + H.getMinutes() / n + H.getSeconds() / o, F = m / o, A = f.axes[p]._space, G = x / A;
        for (; N = Un(N + m, e == 1 ? 0 : 3), !(N > g); )
          if (F > 1) {
            let j = Mr(Un(L + F, 6)) % 24, K = d(N).getHours() - j;
            K > 1 && (K = -1), N -= K * o, L = (L + F) % 24;
            let q = S[S.length - 1];
            Un((N - q) / m, 3) * G >= 0.7 && S.push(N);
          } else
            S.push(N);
      }
      return S;
    };
  }
  return [
    s,
    u,
    c
  ];
}
const [y3, x3, w3] = ck(1), [S3, C3, $3] = ck(1e-3);
fd(2, -53, 53, [1]);
function kw(e, t) {
  return e.map((n) => n.map(
    (o, r) => r == 0 || r == 8 || o == null ? o : t(r == 1 || n[8] == 0 ? o : n[1] + o)
  ));
}
function Iw(e, t) {
  return (n, o, r, i, a) => {
    let l = t.find((v) => a >= v[0]) || t[t.length - 1], s, u, c, d, f, p;
    return o.map((v) => {
      let g = e(v), m = g.getFullYear(), x = g.getMonth(), S = g.getDate(), C = g.getHours(), P = g.getMinutes(), $ = g.getSeconds(), I = m != s && l[2] || x != u && l[3] || S != c && l[4] || C != d && l[5] || P != f && l[6] || $ != p && l[7] || l[1];
      return s = m, u = x, c = S, d = C, f = P, p = $, I(g);
    });
  };
}
function P3(e, t) {
  let n = Dy(t);
  return (o, r, i, a, l) => r.map((s) => n(e(s)));
}
function Rg(e, t, n) {
  return new Date(e, t, n);
}
function Tw(e, t) {
  return t(e);
}
const O3 = "{YYYY}-{MM}-{DD} {h}:{mm}{aa}";
function _w(e, t) {
  return (n, o, r, i) => i == null ? ky : t(e(o));
}
function k3(e, t) {
  let n = e.series[t];
  return n.width ? n.stroke(e, t) : n.points.width ? n.points.stroke(e, t) : null;
}
function I3(e, t) {
  return e.series[t].fill(e, t);
}
const T3 = {
  show: !0,
  live: !0,
  isolate: !1,
  mount: G4,
  markers: {
    show: !0,
    width: 2,
    stroke: k3,
    fill: I3,
    dash: "solid"
  },
  idx: null,
  idxs: null,
  values: []
};
function _3(e, t) {
  let n = e.cursor.points, o = Gr(), r = n.size(e, t);
  to(o, zc, r), to(o, Fc, r);
  let i = r / -2;
  to(o, "marginLeft", i), to(o, "marginTop", i);
  let a = n.width(e, t, r);
  return a && to(o, "borderWidth", a), o;
}
function M3(e, t) {
  let n = e.series[t].points;
  return n._fill || n._stroke;
}
function E3(e, t) {
  let n = e.series[t].points;
  return n._stroke || n._fill;
}
function D3(e, t) {
  return e.series[t].points.size;
}
const zg = [0, 0];
function A3(e, t, n) {
  return zg[0] = t, zg[1] = n, zg;
}
function ff(e, t, n, o = !0) {
  return (r) => {
    r.button == 0 && (!o || r.target == t) && n(r);
  };
}
function Fg(e, t, n, o = !0) {
  return (r) => {
    (!o || r.target == t) && n(r);
  };
}
const N3 = {
  show: !0,
  x: !0,
  y: !0,
  lock: !1,
  move: A3,
  points: {
    one: !1,
    show: _3,
    size: D3,
    width: 0,
    stroke: E3,
    fill: M3
  },
  bind: {
    mousedown: ff,
    mouseup: ff,
    click: ff,
    // legend clicks, not .u-over clicks
    dblclick: ff,
    mousemove: Fg,
    mouseleave: Fg,
    mouseenter: Fg
  },
  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, r) => o - r,
    prox: -1,
    bias: 0
  },
  hover: {
    skip: [void 0],
    prox: null,
    bias: 0
  },
  left: -10,
  top: -10,
  idx: null,
  dataIdx: null,
  idxs: null,
  event: null
}, dk = {
  show: !0,
  stroke: "rgba(0,0,0,0.07)",
  width: 2
  //	dash: [],
}, Ny = So({}, dk, {
  filter: QO
}), fk = So({}, Ny, {
  size: 10
}), pk = So({}, dk, {
  show: !1
}), Ry = '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"', hk = "bold " + Ry, gk = 1.5, Mw = {
  show: !0,
  scale: "x",
  stroke: Oy,
  space: 50,
  gap: 5,
  size: 50,
  labelGap: 0,
  labelSize: 30,
  labelFont: hk,
  side: 2,
  //	class: "x-vals",
  //	incrs: timeIncrs,
  //	values: timeVals,
  //	filter: retArg1,
  grid: Ny,
  ticks: fk,
  border: pk,
  font: Ry,
  lineGap: gk,
  rotate: 0
}, R3 = "Value", z3 = "Time", Ew = {
  show: !0,
  scale: "x",
  auto: !1,
  sorted: 1,
  //	label: "Time",
  //	value: v => stamp(new Date(v * 1e3)),
  // internal caches
  min: vn,
  max: -vn,
  idxs: []
};
function F3(e, t, n, o, r) {
  return t.map((i) => i == null ? "" : My(i));
}
function B3(e, t, n, o, r, i, a) {
  let l = [], s = Dl.get(r) || 0;
  n = a ? n : Un(bh(n, r), s);
  for (let u = n; u <= o; u = Un(u + r, s))
    l.push(Object.is(u, -0) ? 0 : u);
  return l;
}
function gm(e, t, n, o, r, i, a) {
  const l = [], s = e.scales[e.axes[t].scale].log, u = s == 10 ? Na : UO, c = Mr(u(n));
  r = Bu(s, c), s == 10 && (r = as[bi(r, as)]);
  let d = n, f = r * s;
  s == 10 && (f = as[bi(f, as)]);
  do
    l.push(d), d = d + r, s == 10 && !Dl.has(d) && (d = Un(d, Dl.get(r))), d >= f && (r = d, f = r * s, s == 10 && (f = as[bi(f, as)]));
  while (d <= o);
  return l;
}
function L3(e, t, n, o, r, i, a) {
  let s = e.scales[e.axes[t].scale].asinh, u = o > s ? gm(e, t, Qo(s, n), o, r) : [s], c = o >= 0 && n <= 0 ? [0] : [];
  return (n < -s ? gm(e, t, Qo(s, -o), -n, r) : [s]).reverse().map((f) => -f).concat(c, u);
}
const vk = /./, H3 = /[12357]/, V3 = /[125]/, Dw = /1/, vm = (e, t, n, o) => e.map((r, i) => t == 4 && r == 0 || i % o == 0 && n.test(r.toExponential()[r < 0 ? 1 : 0]) ? r : null);
function j3(e, t, n, o, r) {
  let i = e.axes[n], a = i.scale, l = e.scales[a], s = e.valToPos, u = i._space, c = s(10, a), d = s(9, a) - c >= u ? vk : s(7, a) - c >= u ? H3 : s(5, a) - c >= u ? V3 : Dw;
  if (d == Dw) {
    let f = Io(s(1, a) - c);
    if (f < u)
      return vm(t.slice().reverse(), l.distr, d, Qr(u / f)).reverse();
  }
  return vm(t, l.distr, d, 1);
}
function W3(e, t, n, o, r) {
  let i = e.axes[n], a = i.scale, l = i._space, s = e.valToPos, u = Io(s(1, a) - s(2, a));
  return u < l ? vm(t.slice().reverse(), 3, vk, Qr(l / u)).reverse() : t;
}
function K3(e, t, n, o) {
  return o == null ? ky : t == null ? "" : My(t);
}
const Aw = {
  show: !0,
  scale: "y",
  stroke: Oy,
  space: 30,
  gap: 5,
  size: 50,
  labelGap: 0,
  labelSize: 30,
  labelFont: hk,
  side: 3,
  //	class: "y-vals",
  //	incrs: numIncrs,
  //	values: (vals, space) => vals,
  //	filter: retArg1,
  grid: Ny,
  ticks: fk,
  border: pk,
  font: Ry,
  lineGap: gk,
  rotate: 0
};
function q3(e, t) {
  let n = 3 + (e || 1) * 2;
  return Un(n * t, 3);
}
function Y3(e, t) {
  let { scale: n, idxs: o } = e.series[0], r = e._data[0], i = e.valToPos(r[o[0]], n, !0), a = e.valToPos(r[o[1]], n, !0), l = Io(a - i), s = e.series[t], u = l / (s.points.space * Rn);
  return o[1] - o[0] <= u;
}
const Nw = {
  scale: null,
  auto: !0,
  sorted: 0,
  // internal caches
  min: vn,
  max: -vn
}, mk = (e, t, n, o, r) => r, Rw = {
  show: !0,
  auto: !0,
  sorted: 0,
  gaps: mk,
  alpha: 1,
  facets: [
    So({}, Nw, { scale: "x" }),
    So({}, Nw, { scale: "y" })
  ]
}, zw = {
  scale: "y",
  auto: !0,
  sorted: 0,
  show: !0,
  spanGaps: !1,
  gaps: mk,
  alpha: 1,
  points: {
    show: Y3,
    filter: null
    //  paths:
    //	stroke: "#000",
    //	fill: "#fff",
    //	width: 1,
    //	size: 10,
  },
  //	label: "Value",
  //	value: v => v,
  values: null,
  // internal caches
  min: vn,
  max: -vn,
  idxs: [],
  path: null,
  clip: null
};
function G3(e, t, n, o, r) {
  return n / 10;
}
const bk = {
  time: y4,
  auto: !0,
  distr: 1,
  log: 10,
  asinh: 1,
  min: null,
  max: null,
  dir: 1,
  ori: 0
}, U3 = So({}, bk, {
  time: !1,
  ori: 1
}), Fw = {};
function yk(e, t) {
  let n = Fw[e];
  return n || (n = {
    key: e,
    plots: [],
    sub(o) {
      n.plots.push(o);
    },
    unsub(o) {
      n.plots = n.plots.filter((r) => r != o);
    },
    pub(o, r, i, a, l, s, u) {
      for (let c = 0; c < n.plots.length; c++)
        n.plots[c] != r && n.plots[c].pub(o, r, i, a, l, s, u);
    }
  }, e != null && (Fw[e] = n)), n;
}
const Vu = 1, mm = 2;
function zs(e, t, n) {
  const o = e.mode, r = e.series[t], i = o == 2 ? e._data[t] : e._data, a = e.scales, l = e.bbox;
  let s = i[0], u = o == 2 ? i[1] : i[t], c = o == 2 ? a[r.facets[0].scale] : a[e.series[0].scale], d = o == 2 ? a[r.facets[1].scale] : a[r.scale], f = l.left, p = l.top, v = l.width, g = l.height, m = e.valToPosH, x = e.valToPosV;
  return c.ori == 0 ? n(
    r,
    s,
    u,
    c,
    d,
    m,
    x,
    f,
    p,
    v,
    g,
    wh,
    ac,
    Ch,
    wk,
    Ck
  ) : n(
    r,
    s,
    u,
    c,
    d,
    x,
    m,
    p,
    f,
    g,
    v,
    Sh,
    lc,
    By,
    Sk,
    $k
  );
}
function zy(e, t) {
  let n = 0, o = 0, r = kn(e.bands, Ey);
  for (let i = 0; i < r.length; i++) {
    let a = r[i];
    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 X3(e, t, n, o, r) {
  let i = e.mode, a = e.series[t], l = i == 2 ? a.facets[1].scale : a.scale, s = e.scales[l];
  return r == -1 ? s.min : r == 1 ? s.max : s.distr == 3 ? s.dir == 1 ? s.min : s.max : 0;
}
function Ra(e, t, n, o, r, i) {
  return zs(e, t, (a, l, s, u, c, d, f, p, v, g, m) => {
    let x = a.pxRound;
    const S = u.dir * (u.ori == 0 ? 1 : -1), C = u.ori == 0 ? ac : lc;
    let P, $;
    S == 1 ? (P = n, $ = o) : (P = o, $ = n);
    let I = x(d(l[P], u, g, p)), w = x(f(s[P], c, m, v)), T = x(d(l[$], u, g, p)), M = x(f(i == 1 ? c.max : c.min, c, m, v)), R = new Path2D(r);
    return C(R, T, M), C(R, I, M), C(R, I, w), R;
  });
}
function xh(e, t, n, o, r, i) {
  let a = null;
  if (e.length > 0) {
    a = new Path2D();
    const l = t == 0 ? Ch : By;
    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 + i), s = f[1];
      }
    }
    let u = n + r - s, c = 10;
    u > 0 && l(a, s, o - c / 2, u, o + i + c);
  }
  return a;
}
function Q3(e, t, n) {
  let o = e[e.length - 1];
  o && o[0] == t ? o[1] = n : e.push([t, n]);
}
function Fy(e, t, n, o, r, i, a) {
  let l = [], s = e.length;
  for (let u = r == 1 ? n : o; u >= n && u <= o; u += r)
    if (t[u] === null) {
      let d = u, f = u;
      if (r == 1)
        for (; ++u <= o && t[u] === null; )
          f = u;
      else
        for (; --u >= n && t[u] === null; )
          f = u;
      let p = i(e[d]), v = f == d ? p : i(e[f]), g = d - r;
      p = a <= 0 && g >= 0 && g < s ? i(e[g]) : p;
      let x = f + r;
      v = a >= 0 && x >= 0 && x < s ? i(e[x]) : v, v >= p && l.push([p, v]);
    }
  return l;
}
function Bw(e) {
  return e == 0 ? XO : e == 1 ? Oo : (t) => is(t, e);
}
function xk(e) {
  let t = e == 0 ? wh : Sh, n = e == 0 ? (r, i, a, l, s, u) => {
    r.arcTo(i, a, l, s, u);
  } : (r, i, a, l, s, u) => {
    r.arcTo(a, i, s, l, u);
  }, o = e == 0 ? (r, i, a, l, s) => {
    r.rect(i, a, l, s);
  } : (r, i, a, l, s) => {
    r.rect(a, i, s, l);
  };
  return (r, i, a, l, s, u = 0, c = 0) => {
    u == 0 && c == 0 ? o(r, i, a, l, s) : (u = Jr(u, l / 2, s / 2), c = Jr(c, l / 2, s / 2), t(r, i + u, a), n(r, i + l, a, i + l, a + s, u), n(r, i + l, a + s, i, a + s, c), n(r, i, a + s, i, a, c), n(r, i, a, i + l, a, u), r.closePath());
  };
}
const wh = (e, t, n) => {
  e.moveTo(t, n);
}, Sh = (e, t, n) => {
  e.moveTo(n, t);
}, ac = (e, t, n) => {
  e.lineTo(t, n);
}, lc = (e, t, n) => {
  e.lineTo(n, t);
}, Ch = xk(0), By = xk(1), wk = (e, t, n, o, r, i) => {
  e.arc(t, n, o, r, i);
}, Sk = (e, t, n, o, r, i) => {
  e.arc(n, t, o, r, i);
}, Ck = (e, t, n, o, r, i, a) => {
  e.bezierCurveTo(t, n, o, r, i, a);
}, $k = (e, t, n, o, r, i, a) => {
  e.bezierCurveTo(n, t, r, o, a, i);
};
function Pk(e) {
  return (t, n, o, r, i) => zs(t, n, (a, l, s, u, c, d, f, p, v, g, m) => {
    let { pxRound: x, points: S } = a, C, P;
    u.ori == 0 ? (C = wh, P = wk) : (C = Sh, P = Sk);
    const $ = Un(S.width * Rn, 3);
    let I = (S.size - S.width) / 2 * Rn, w = Un(I * 2, 3), T = new Path2D(), M = new Path2D(), { left: R, top: N, width: H, height: L } = t.bbox;
    Ch(
      M,
      R - w,
      N - w,
      H + w * 2,
      L + w * 2
    );
    const F = (A) => {
      if (s[A] != null) {
        let G = x(d(l[A], u, g, p)), j = x(f(s[A], c, m, v));
        C(T, G + I, j), P(T, G, j, I, 0, Qf * 2);
      }
    };
    if (i)
      i.forEach(F);
    else
      for (let A = o; A <= r; A++)
        F(A);
    return {
      stroke: $ > 0 ? T : null,
      fill: T,
      clip: M,
      flags: Vu | mm
    };
  });
}
function Ok(e) {
  return (t, n, o, r, i, a) => {
    o != r && (i != o && a != o && e(t, n, o), i != r && a != r && e(t, n, r), e(t, n, a));
  };
}
const Z3 = Ok(ac), J3 = Ok(lc);
function kk(e) {
  const t = kn(e?.alignGaps, 0);
  return (n, o, r, i) => zs(n, o, (a, l, s, u, c, d, f, p, v, g, m) => {
    let x = a.pxRound, S = (U) => x(d(U, u, g, p)), C = (U) => x(f(U, c, m, v)), P, $;
    u.ori == 0 ? (P = ac, $ = Z3) : (P = lc, $ = J3);
    const I = u.dir * (u.ori == 0 ? 1 : -1), w = { stroke: new Path2D(), fill: null, clip: null, band: null, gaps: null, flags: Vu }, T = w.stroke;
    let M = vn, R = -vn, N, H, L, F = S(l[I == 1 ? r : i]), A = Fu(s, r, i, 1 * I), G = Fu(s, r, i, -1 * I), j = S(l[A]), Z = S(l[G]), W = !1;
    for (let U = I == 1 ? r : i; U >= r && U <= i; U += I) {
      let ae = S(l[U]), se = s[U];
      ae == F ? se != null ? (H = C(se), M == vn && (P(T, ae, H), N = H), M = Jr(H, M), R = Qo(H, R)) : se === null && (W = !0) : (M != vn && ($(T, F, M, R, N, H), L = F), se != null ? (H = C(se), P(T, ae, H), M = R = N = H) : (M = vn, R = -vn, se === null && (W = !0)), F = ae);
    }
    M != vn && M != R && L != F && $(T, F, M, R, N, H);
    let [K, q] = zy(n, o);
    if (a.fill != null || K != 0) {
      let U = w.fill = new Path2D(T), ae = a.fillTo(n, o, a.min, a.max, K), se = C(ae);
      P(U, Z, se), P(U, j, se);
    }
    if (!a.spanGaps) {
      let U = [];
      W && U.push(...Fy(l, s, r, i, I, S, t)), w.gaps = U = a.gaps(n, o, r, i, U), w.clip = xh(U, u.ori, p, v, g, m);
    }
    return q != 0 && (w.band = q == 2 ? [
      Ra(n, o, r, i, T, -1),
      Ra(n, o, r, i, T, 1)
    ] : Ra(n, o, r, i, T, q)), w;
  });
}
function eF(e) {
  const t = kn(e.align, 1), n = kn(e.ascDesc, !1), o = kn(e.alignGaps, 0), r = kn(e.extend, !1);
  return (i, a, l, s) => zs(i, a, (u, c, d, f, p, v, g, m, x, S, C) => {
    let P = u.pxRound, { left: $, width: I } = i.bbox, w = (K) => P(v(K, f, S, m)), T = (K) => P(g(K, p, C, x)), M = f.ori == 0 ? ac : lc;
    const R = { stroke: new Path2D(), fill: null, clip: null, band: null, gaps: null, flags: Vu }, N = R.stroke, H = f.dir * (f.ori == 0 ? 1 : -1);
    l = Fu(d, l, s, 1), s = Fu(d, l, s, -1);
    let L = T(d[H == 1 ? l : s]), F = w(c[H == 1 ? l : s]), A = F, G = F;
    r && t == -1 && (G = $, M(N, G, L)), M(N, F, L);
    for (let K = H == 1 ? l : s; K >= l && K <= s; K += H) {
      let q = d[K];
      if (q == null)
        continue;
      let U = w(c[K]), ae = T(q);
      t == 1 ? M(N, U, L) : M(N, A, ae), M(N, U, ae), L = ae, A = U;
    }
    let j = A;
    r && t == 1 && (j = $ + I, M(N, j, L));
    let [Z, W] = zy(i, a);
    if (u.fill != null || Z != 0) {
      let K = R.fill = new Path2D(N), q = u.fillTo(i, a, u.min, u.max, Z), U = T(q);
      M(K, j, U), M(K, G, U);
    }
    if (!u.spanGaps) {
      let K = [];
      K.push(...Fy(c, d, l, s, H, w, o));
      let q = u.width * Rn / 2, U = n || t == 1 ? q : -q, ae = n || t == -1 ? -q : q;
      K.forEach((se) => {
        se[0] += U, se[1] += ae;
      }), R.gaps = K = u.gaps(i, a, l, s, K), R.clip = xh(K, f.ori, m, x, S, C);
    }
    return W != 0 && (R.band = W == 2 ? [
      Ra(i, a, l, s, N, -1),
      Ra(i, a, l, s, N, 1)
    ] : Ra(i, a, l, s, N, W)), R;
  });
}
function Lw(e, t, n, o, r, i, a = vn) {
  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 = Io(e[s] - e[l]);
          c < u && (u = c, a = Io(n(e[s], o, r, i) - n(e[l], o, r, i)));
        }
        l = s;
      }
  }
  return a;
}
function tF(e) {
  e = e || Gc;
  const t = kn(e.size, [0.6, vn, 1]), n = e.align || 0, o = e.gap || 0;
  let r = e.radius;
  r = // [valueRadius, baselineRadius]
  r == null ? [0, 0] : typeof r == "number" ? [r, 0] : r;
  const i = gn(r), a = 1 - t[0], l = kn(t[1], vn), s = kn(t[2], 1), u = kn(e.disp, Gc), c = kn(e.each, (p) => {
  }), { fill: d, stroke: f } = u;
  return (p, v, g, m) => zs(p, v, (x, S, C, P, $, I, w, T, M, R, N) => {
    let H = x.pxRound, L = n, F = o * Rn, A = l * Rn, G = s * Rn, j, Z;
    P.ori == 0 ? [j, Z] = i(p, v) : [Z, j] = i(p, v);
    const W = P.dir * (P.ori == 0 ? 1 : -1);
    let K = P.ori == 0 ? Ch : By, q = P.ori == 0 ? c : (Se, Ce, Ae, qe, We, tt, Ee) => {
      c(Se, Ce, Ae, We, qe, Ee, tt);
    }, U = kn(p.bands, Ey).find((Se) => Se.series[0] == v), ae = U != null ? U.dir : 0, se = x.fillTo(p, v, x.min, x.max, ae), ie = H(w(se, $, N, M)), re, te, ve, ce = R, fe = H(x.width * Rn), ge = !1, Te = null, ze = null, Ke = null, He = null;
    d != null && (fe == 0 || f != null) && (ge = !0, Te = d.values(p, v, g, m), ze = /* @__PURE__ */ new Map(), new Set(Te).forEach((Se) => {
      Se != null && ze.set(Se, new Path2D());
    }), fe > 0 && (Ke = f.values(p, v, g, m), He = /* @__PURE__ */ new Map(), new Set(Ke).forEach((Se) => {
      Se != null && He.set(Se, new Path2D());
    })));
    let { x0: Ne, size: Xe } = u;
    if (Ne != null && Xe != null) {
      L = 1, S = Ne.values(p, v, g, m), Ne.unit == 2 && (S = S.map((Ae) => p.posToVal(T + Ae * R, P.key, !0)));
      let Se = Xe.values(p, v, g, m);
      Xe.unit == 2 ? te = Se[0] * R : te = I(Se[0], P, R, T) - I(0, P, R, T), ce = Lw(S, C, I, P, R, T, ce), ve = ce - te + F;
    } else
      ce = Lw(S, C, I, P, R, T, ce), ve = ce * a + F, te = ce - ve;
    ve < 1 && (ve = 0), fe >= te / 2 && (fe = 0), ve < 5 && (H = XO);
    let De = ve > 0, Fe = ce - ve - (De ? fe : 0);
    te = H(hm(Fe, G, A)), re = (L == 0 ? te / 2 : L == W ? 0 : te) - L * W * ((L == 0 ? F / 2 : 0) + (De ? fe / 2 : 0));
    const Ve = { stroke: null, fill: null, clip: null, band: null, gaps: null, flags: 0 }, ot = ge ? null : new Path2D();
    let je = null;
    if (U != null)
      je = p.data[U.series[1]];
    else {
      let { y0: Se, y1: Ce } = u;
      Se != null && Ce != null && (C = Ce.values(p, v, g, m), je = Se.values(p, v, g, m));
    }
    let Pe = j * te, Ge = Z * te;
    for (let Se = W == 1 ? g : m; Se >= g && Se <= m; Se += W) {
      let Ce = C[Se];
      if (Ce == null)
        continue;
      if (je != null) {
        let rt = je[Se] ?? 0;
        if (Ce - rt == 0)
          continue;
        ie = w(rt, $, N, M);
      }
      let Ae = P.distr != 2 || u != null ? S[Se] : Se, qe = I(Ae, P, R, T), We = w(kn(Ce, se), $, N, M), tt = H(qe - re), Ee = H(Qo(We, ie)), Re = H(Jr(We, ie)), Be = Ee - Re;
      if (Ce != null) {
        let rt = Ce < 0 ? Ge : Pe, pt = Ce < 0 ? Pe : Ge;
        ge ? (fe > 0 && Ke[Se] != null && K(He.get(Ke[Se]), tt, Re + Mr(fe / 2), te, Qo(0, Be - fe), rt, pt), Te[Se] != null && K(ze.get(Te[Se]), tt, Re + Mr(fe / 2), te, Qo(0, Be - fe), rt, pt)) : K(ot, tt, Re + Mr(fe / 2), te, Qo(0, Be - fe), rt, pt), q(
          p,
          v,
          Se,
          tt - fe / 2,
          Re,
          te + fe,
          Be
        );
      }
    }
    return fe > 0 ? Ve.stroke = ge ? He : ot : ge || (Ve._fill = x.width == 0 ? x._fill : x._stroke ?? x._fill, Ve.width = 0), Ve.fill = ge ? ze : ot, Ve;
  });
}
function nF(e, t) {
  const n = kn(t?.alignGaps, 0);
  return (o, r, i, a) => zs(o, r, (l, s, u, c, d, f, p, v, g, m, x) => {
    let S = l.pxRound, C = (j) => S(f(j, c, m, v)), P = (j) => S(p(j, d, x, g)), $, I, w;
    c.ori == 0 ? ($ = wh, w = ac, I = Ck) : ($ = Sh, w = lc, I = $k);
    const T = c.dir * (c.ori == 0 ? 1 : -1);
    i = Fu(u, i, a, 1), a = Fu(u, i, a, -1);
    let M = C(s[T == 1 ? i : a]), R = M, N = [], H = [];
    for (let j = T == 1 ? i : a; j >= i && j <= a; j += T)
      if (u[j] != null) {
        let W = s[j], K = C(W);
        N.push(R = K), H.push(P(u[j]));
      }
    const L = { stroke: e(N, H, $, w, I, S), fill: null, clip: null, band: null, gaps: null, flags: Vu }, F = L.stroke;
    let [A, G] = zy(o, r);
    if (l.fill != null || A != 0) {
      let j = L.fill = new Path2D(F), Z = l.fillTo(o, r, l.min, l.max, A), W = P(Z);
      w(j, R, W), w(j, M, W);
    }
    if (!l.spanGaps) {
      let j = [];
      j.push(...Fy(s, u, i, a, T, C, n)), L.gaps = j = l.gaps(o, r, i, a, j), L.clip = xh(j, c.ori, v, g, m, x);
    }
    return G != 0 && (L.band = G == 2 ? [
      Ra(o, r, i, a, F, -1),
      Ra(o, r, i, a, F, 1)
    ] : Ra(o, r, i, a, F, G)), L;
  });
}
function oF(e) {
  return nF(rF, e);
}
function rF(e, t, n, o, r, i) {
  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++)
      r(
        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 bm = /* @__PURE__ */ new Set();
function Hw() {
  for (let e of bm)
    e.syncRect(!0);
}
ic && (Ss(F4, ku, Hw), Ss(B4, ku, Hw, !0), Ss(Op, ku, () => {
  xo.pxRatio = Rn;
}));
const iF = kk(), aF = Pk();
function Vw(e, t, n, o) {
  return (o ? [e[0], e[1]].concat(e.slice(2)) : [e[0]].concat(e.slice(1))).map((i, a) => ym(i, a, t, n));
}
function lF(e, t) {
  return e.map((n, o) => o == 0 ? {} : So({}, t, n));
}
function ym(e, t, n, o) {
  return So({}, t == 0 ? n : o, e);
}
function Ik(e, t, n) {
  return t == null ? Lu : [t, n];
}
const sF = Ik;
function uF(e, t, n) {
  return t == null ? Lu : kp(t, n, _y, !0);
}
function Tk(e, t, n, o) {
  return t == null ? Lu : mh(t, n, e.scales[o].log, !1);
}
const cF = Tk;
function _k(e, t, n, o) {
  return t == null ? Lu : Ty(t, n, e.scales[o].log, !1);
}
const dF = _k;
function fF(e, t, n, o, r) {
  let i = Qo(xw(e), xw(t)), a = t - e, l = bi(r / o * a, n);
  do {
    let s = n[l], u = o * s / a;
    if (u >= r && i + (s < 5 ? Dl.get(s) : 0) <= 17)
      return [s, u];
  } while (++l < n.length);
  return [0, 0];
}
function jw(e) {
  let t, n;
  return e = e.replace(/(\d+)px/, (o, r) => (t = Oo((n = +r) * Rn)) + "px"), [e, t, n];
}
function pF(e) {
  e.show && [e.font, e.labelFont].forEach((t) => {
    let n = Un(t[2] * Rn, 1);
    t[0] = t[0].replace(/[0-9.]+px/, n + "px"), t[1] = n;
  });
}
function xo(e, t, n) {
  const o = {
    mode: kn(e.mode, 1)
  }, r = o.mode;
  function i(Y, ee) {
    return ((ee.distr == 3 ? Na(Y > 0 ? Y : ee.clamp(o, Y, ee.min, ee.max, ee.key)) : ee.distr == 4 ? Ng(Y, ee.asinh) : ee.distr == 100 ? ee.fwd(Y) : Y) - ee._min) / (ee._max - ee._min);
  }
  function a(Y, ee, me, ye) {
    let ke = i(Y, ee);
    return ye + me * (ee.dir == -1 ? 1 - ke : ke);
  }
  function l(Y, ee, me, ye) {
    let ke = i(Y, ee);
    return ye + me * (ee.dir == -1 ? ke : 1 - ke);
  }
  function s(Y, ee, me, ye) {
    return ee.ori == 0 ? a(Y, ee, me, ye) : l(Y, ee, me, ye);
  }
  o.valToPosH = a, o.valToPosV = l;
  let u = !1;
  o.status = 0;
  const c = o.root = Gr(x4);
  if (e.id != null && (c.id = e.id), kr(c, e.class), e.title) {
    let Y = Gr(C4, c);
    Y.textContent = e.title;
  }
  const d = pi("canvas"), f = o.ctx = d.getContext("2d"), p = Gr($4, c);
  Ss("click", p, (Y) => {
    Y.target === g && (qn != ga || Hn != sl) && Po.click(o, Y);
  }, !0);
  const v = o.under = Gr(P4, p);
  p.appendChild(d);
  const g = o.over = Gr(O4, p);
  e = Hu(e);
  const m = +kn(e.pxAlign, 1), x = Bw(m);
  (e.plugins || []).forEach((Y) => {
    Y.opts && (e = Y.opts(o, e) || e);
  });
  const S = e.ms || 1e-3, C = o.series = r == 1 ? Vw(e.series || [], Ew, zw, !1) : lF(e.series || [null], Rw), P = o.axes = Vw(e.axes || [], Mw, Aw, !0), $ = o.scales = {}, I = o.bands = e.bands || [];
  I.forEach((Y) => {
    Y.fill = gn(Y.fill || null), Y.dir = kn(Y.dir, -1);
  });
  const w = r == 2 ? C[1].facets[0].scale : C[0].scale, T = {
    axes: Ud,
    series: tl
  }, M = (e.drawOrder || ["axes", "series"]).map((Y) => T[Y]);
  function R(Y) {
    let ee = $[Y];
    if (ee == null) {
      let me = (e.scales || Gc)[Y] || Gc;
      if (me.from != null)
        R(me.from), $[Y] = So({}, $[me.from], me, { key: Y });
      else {
        ee = $[Y] = So({}, Y == w ? bk : U3, me), ee.key = Y;
        let ye = ee.time, ke = ee.range, b = ml(ke);
        if ((Y != w || r == 2 && !ye) && (b && (ke[0] == null || ke[1] == null) && (ke = {
          min: ke[0] == null ? mw : {
            mode: 1,
            hard: ke[0],
            soft: ke[0]
          },
          max: ke[1] == null ? mw : {
            mode: 1,
            hard: ke[1],
            soft: ke[1]
          }
        }, b = !1), !b && yh(ke))) {
          let y = ke;
          ke = (k, D, z) => D == null ? Lu : kp(D, z, y);
        }
        ee.range = gn(ke || (ye ? sF : Y == w ? ee.distr == 3 ? cF : ee.distr == 4 ? dF : Ik : ee.distr == 3 ? Tk : ee.distr == 4 ? _k : uF)), ee.auto = gn(b ? !1 : ee.auto), ee.clamp = gn(ee.clamp || G3), ee._min = ee._max = null;
      }
    }
  }
  R("x"), R("y"), r == 1 && C.forEach((Y) => {
    R(Y.scale);
  }), P.forEach((Y) => {
    R(Y.scale);
  });
  for (let Y in e.scales)
    R(Y);
  const N = $[w], H = N.distr;
  let L, F;
  N.ori == 0 ? (kr(c, w4), L = a, F = l) : (kr(c, S4), L = l, F = a);
  const A = {};
  for (let Y in $) {
    let ee = $[Y];
    (ee.min != null || ee.max != null) && (A[Y] = { min: ee.min, max: ee.max }, ee.min = ee.max = null);
  }
  const G = e.tzDate || ((Y) => new Date(Oo(Y / S))), j = e.fmtDate || Dy, Z = S == 1 ? w3(G) : $3(G), W = Iw(G, kw(S == 1 ? x3 : C3, j)), K = _w(G, Tw(O3, j)), q = [], U = o.legend = So({}, T3, e.legend), ae = U.show, se = U.markers;
  U.idxs = q, se.width = gn(se.width), se.dash = gn(se.dash), se.stroke = gn(se.stroke), se.fill = gn(se.fill);
  let ie, re, te, ve = [], ce = [], fe, ge = !1, Te = {};
  if (U.live) {
    const Y = C[1] ? C[1].values : null;
    ge = Y != null, fe = ge ? Y(o, 1, 0) : { _: 0 };
    for (let ee in fe)
      Te[ee] = ky;
  }
  if (ae)
    if (ie = pi("table", E4, c), te = pi("tbody", null, ie), U.mount(o, ie), ge) {
      re = pi("thead", null, ie, te);
      let Y = pi("tr", null, re);
      pi("th", null, Y);
      for (var ze in fe)
        pi("th", ow, Y).textContent = ze;
    } else
      kr(ie, A4), U.live && kr(ie, D4);
  const Ke = { show: !0 }, He = { show: !1 };
  function Ne(Y, ee) {
    if (ee == 0 && (ge || !U.live || r == 2))
      return Lu;
    let me = [], ye = pi("tr", N4, te, te.childNodes[ee]);
    kr(ye, Y.class), Y.show || kr(ye, us);
    let ke = pi("th", null, ye);
    if (se.show) {
      let k = Gr(R4, ke);
      if (ee > 0) {
        let D = se.width(o, ee);
        D && (k.style.border = D + "px " + se.dash(o, ee) + " " + se.stroke(o, ee)), k.style.background = se.fill(o, ee);
      }
    }
    let b = Gr(ow, ke);
    b.textContent = Y.label, ee > 0 && (se.show || (b.style.color = Y.width > 0 ? se.stroke(o, ee) : se.fill(o, ee)), De("click", ke, (k) => {
      if (gt._lock)
        return;
      En(k);
      let D = C.indexOf(Y);
      if ((k.ctrlKey || k.metaKey) != U.isolate) {
        let z = C.some((V, X) => X > 0 && X != D && V.show);
        C.forEach((V, X) => {
          X > 0 && Lr(X, z ? X == D ? Ke : He : Ke, !0, uo.setSeries);
        });
      } else
        Lr(D, { show: !Y.show }, !0, uo.setSeries);
    }, !1), so && De(sw, ke, (k) => {
      gt._lock || (En(k), Lr(C.indexOf(Y), cl, !0, uo.setSeries));
    }, !1));
    for (var y in fe) {
      let k = pi("td", z4, ye);
      k.textContent = "--", me.push(k);
    }
    return [ye, me];
  }
  const Xe = /* @__PURE__ */ new Map();
  function De(Y, ee, me, ye = !0) {
    const ke = Xe.get(ee) || {}, b = gt.bind[Y](o, ee, me, ye);
    b && (Ss(Y, ee, ke[Y] = b), Xe.set(ee, ke));
  }
  function Fe(Y, ee, me) {
    const ye = Xe.get(ee) || {};
    for (let ke in ye)
      (Y == null || ke == Y) && (pm(ke, ee, ye[ke]), delete ye[ke]);
    Y == null && Xe.delete(ee);
  }
  let Ve = 0, ot = 0, je = 0, Pe = 0, Ge = 0, Se = 0, Ce = Ge, Ae = Se, qe = je, We = Pe, tt = 0, Ee = 0, Re = 0, Be = 0;
  o.bbox = {};
  let rt = !1, pt = !1, at = !1, ft = !1, wt = !1, Ct = !1;
  function St(Y, ee, me) {
    (me || Y != o.width || ee != o.height) && yt(Y, ee), il(!1), at = !0, pt = !0, zi();
  }
  function yt(Y, ee) {
    o.width = Ve = je = Y, o.height = ot = Pe = ee, Ge = Se = 0, ln(), pn();
    let me = o.bbox;
    tt = me.left = is(Ge * Rn, 0.5), Ee = me.top = is(Se * Rn, 0.5), Re = me.width = is(je * Rn, 0.5), Be = me.height = is(Pe * Rn, 0.5);
  }
  const Ot = 3;
  function Wt() {
    let Y = !1, ee = 0;
    for (; !Y; ) {
      ee++;
      let me = qs(ee), ye = Kl(ee);
      Y = ee == Ot || me && ye, Y || (yt(o.width, o.height), pt = !0);
    }
  }
  function Xt({ width: Y, height: ee }) {
    St(Y, ee);
  }
  o.setSize = Xt;
  function ln() {
    let Y = !1, ee = !1, me = !1, ye = !1;
    P.forEach((ke, b) => {
      if (ke.show && ke._show) {
        let { side: y, _size: k } = ke, D = y % 2, z = ke.label != null ? ke.labelSize : 0, V = k + z;
        V > 0 && (D ? (je -= V, y == 3 ? (Ge += V, ye = !0) : me = !0) : (Pe -= V, y == 0 ? (Se += V, Y = !0) : ee = !0));
      }
    }), Sn[0] = Y, Sn[1] = me, Sn[2] = ee, Sn[3] = ye, je -= un[1] + un[3], Ge += un[3], Pe -= un[2] + un[0], Se += un[0];
  }
  function pn() {
    let Y = Ge + je, ee = Se + Pe, me = Ge, ye = Se;
    function ke(b, y) {
      switch (b) {
        case 1:
          return Y += y, Y - y;
        case 2:
          return ee += y, ee - y;
        case 3:
          return me -= y, me + y;
        case 0:
          return ye -= y, ye + y;
      }
    }
    P.forEach((b, y) => {
      if (b.show && b._show) {
        let k = b.side;
        b._pos = ke(k, b._size), b.label != null && (b._lpos = ke(k, b.labelSize));
      }
    });
  }
  const gt = o.cursor = So({}, N3, { drag: { y: r == 2 } }, e.cursor);
  if (gt.dataIdx == null) {
    let Y = gt.hover, ee = Y.skip = new Set(Y.skip ?? []);
    ee.add(void 0);
    let me = Y.prox = gn(Y.prox), ye = Y.bias ??= 0;
    gt.dataIdx = (ke, b, y, k) => {
      if (b == 0)
        return y;
      let D = y, z = me(ke, b, y, k) ?? vn, V = z >= 0 && z < vn, X = N.ori == 0 ? je : Pe, J = gt.left, ue = t[0], we = t[b];
      if (ee.has(we[y])) {
        D = null;
        let de = null, Oe = null, _e;
        if (ye == 0 || ye == -1)
          for (_e = y; de == null && _e-- > 0; )
            ee.has(we[_e]) || (de = _e);
        if (ye == 0 || ye == 1)
          for (_e = y; Oe == null && _e++ < we.length; )
            ee.has(we[_e]) || (Oe = _e);
        if (de != null || Oe != null)
          if (V) {
            let Ye = de == null ? -1 / 0 : L(ue[de], N, X, 0), Qe = Oe == null ? 1 / 0 : L(ue[Oe], N, X, 0), Ze = J - Ye, lt = Qe - J;
            Ze <= lt ? Ze <= z && (D = de) : lt <= z && (D = Oe);
          } else
            D = Oe == null ? de : de == null ? Oe : y - de <= Oe - y ? de : Oe;
      } else V && Io(J - L(ue[y], N, X, 0)) > z && (D = null);
      return D;
    };
  }
  const En = (Y) => {
    gt.event = Y;
  };
  gt.idxs = q, gt._lock = !1;
  let hn = gt.points;
  hn.show = gn(hn.show), hn.size = gn(hn.size), hn.stroke = gn(hn.stroke), hn.width = gn(hn.width), hn.fill = gn(hn.fill);
  const Kn = o.focus = So({}, e.focus || { alpha: 0.3 }, gt.focus), so = Kn.prox >= 0, Uo = so && hn.one;
  let Ue = [], ht = [], vt = [];
  function Zt(Y, ee) {
    let me = hn.show(o, ee);
    if (me)
      return kr(me, M4), kr(me, Y.class), Vi(me, -10, -10, je, Pe), g.insertBefore(me, Ue[ee]), me;
  }
  function Zn(Y, ee) {
    if (r == 1 || ee > 0) {
      let me = r == 1 && $[Y.scale].time, ye = Y.value;
      Y.value = me ? Cw(ye) ? _w(G, Tw(ye, j)) : ye || K : ye || K3, Y.label = Y.label || (me ? z3 : R3);
    }
    if (Uo || ee > 0) {
      Y.width = Y.width == null ? 1 : Y.width, Y.paths = Y.paths || iF || U4, Y.fillTo = gn(Y.fillTo || X3), Y.pxAlign = +kn(Y.pxAlign, m), Y.pxRound = Bw(Y.pxAlign), Y.stroke = gn(Y.stroke || null), Y.fill = gn(Y.fill || null), Y._stroke = Y._fill = Y._paths = Y._focus = null;
      let me = q3(Qo(1, Y.width), 1), ye = Y.points = So({}, {
        size: me,
        width: Qo(1, me * 0.2),
        stroke: Y.stroke,
        space: me * 2,
        paths: aF,
        _stroke: null,
        _fill: null
      }, Y.points);
      ye.show = gn(ye.show), ye.filter = gn(ye.filter), ye.fill = gn(ye.fill), ye.stroke = gn(ye.stroke), ye.paths = gn(ye.paths), ye.pxAlign = Y.pxAlign;
    }
    if (ae) {
      let me = Ne(Y, ee);
      ve.splice(ee, 0, me[0]), ce.splice(ee, 0, me[1]), U.values.push(null);
    }
    if (gt.show) {
      q.splice(ee, 0, null);
      let me = null;
      Uo ? ee == 0 && (me = Zt(Y, ee)) : ee > 0 && (me = Zt(Y, ee)), Ue.splice(ee, 0, me), ht.splice(ee, 0, 0), vt.splice(ee, 0, 0);
    }
    io("addSeries", ee);
  }
  function Qn(Y, ee) {
    ee = ee ?? C.length, Y = r == 1 ? ym(Y, ee, Ew, zw) : ym(Y, ee, {}, Rw), C.splice(ee, 0, Y), Zn(C[ee], ee);
  }
  o.addSeries = Qn;
  function $o(Y) {
    if (C.splice(Y, 1), ae) {
      U.values.splice(Y, 1), ce.splice(Y, 1);
      let ee = ve.splice(Y, 1)[0];
      Fe(null, ee.firstChild), ee.remove();
    }
    gt.show && (q.splice(Y, 1), Ue.splice(Y, 1)[0].remove(), ht.splice(Y, 1), vt.splice(Y, 1)), io("delSeries", Y);
  }
  o.delSeries = $o;
  const Sn = [!1, !1, !1, !1];
  function Tt(Y, ee) {
    if (Y._show = Y.show, Y.show) {
      let me = Y.side % 2, ye = $[Y.scale];
      ye == null && (Y.scale = me ? C[1].scale : w, ye = $[Y.scale]);
      let ke = ye.time;
      Y.size = gn(Y.size), Y.space = gn(Y.space), Y.rotate = gn(Y.rotate), ml(Y.incrs) && Y.incrs.forEach((y) => {
        !Dl.has(y) && Dl.set(y, JO(y));
      }), Y.incrs = gn(Y.incrs || (ye.distr == 2 ? m3 : ke ? S == 1 ? y3 : S3 : as)), Y.splits = gn(Y.splits || (ke && ye.distr == 1 ? Z : ye.distr == 3 ? gm : ye.distr == 4 ? L3 : B3)), Y.stroke = gn(Y.stroke), Y.grid.stroke = gn(Y.grid.stroke), Y.ticks.stroke = gn(Y.ticks.stroke), Y.border.stroke = gn(Y.border.stroke);
      let b = Y.values;
      Y.values = // static array of tick values
      ml(b) && !ml(b[0]) ? gn(b) : (
        // temporal
        ke ? (
          // config array of fmtDate string tpls
          ml(b) ? Iw(G, kw(b, j)) : (
            // fmtDate string tpl
            Cw(b) ? P3(G, b) : b || W
          )
        ) : b || F3
      ), Y.filter = gn(Y.filter || (ye.distr >= 3 && ye.log == 10 ? j3 : ye.distr == 3 && ye.log == 2 ? W3 : QO)), Y.font = jw(Y.font), Y.labelFont = jw(Y.labelFont), Y._size = Y.size(o, null, ee, 0), Y._space = Y._rotate = Y._incrs = Y._found = // foundIncrSpace
      Y._splits = Y._values = null, Y._size > 0 && (Sn[ee] = !0, Y._el = Gr(k4, p));
    }
  }
  function po(Y, ee, me, ye) {
    let [ke, b, y, k] = me, D = ee % 2, z = 0;
    return D == 0 && (k || b) && (z = ee == 0 && !ke || ee == 2 && !y ? Oo(Mw.size / 3) : 0), D == 1 && (ke || y) && (z = ee == 1 && !b || ee == 3 && !k ? Oo(Aw.size / 2) : 0), z;
  }
  const zo = o.padding = (e.padding || [po, po, po, po]).map((Y) => gn(kn(Y, po))), un = o._padding = zo.map((Y, ee) => Y(o, ee, Sn, 0));
  let Dn, cn = null, An = null;
  const er = r == 1 ? C[0].idxs : null;
  let Jn = null, hr = !1;
  function jo(Y, ee) {
    if (t = Y ?? [], o.data = o._data = t, r == 2) {
      Dn = 0;
      for (let me = 1; me < C.length; me++)
        Dn += t[me][0].length;
    } else {
      t.length == 0 && (o.data = o._data = t = [[]]), Jn = t[0], Dn = Jn.length;
      let me = t;
      if (H == 2) {
        me = t.slice();
        let ye = me[0] = Array(Dn);
        for (let ke = 0; ke < Dn; ke++)
          ye[ke] = ke;
      }
      o._data = t = me;
    }
    if (il(!0), io("setData"), H == 2 && (at = !0), ee !== !1) {
      let me = N;
      me.auto(o, hr) ? ca() : Wo(w, me.min, me.max), ft = ft || gt.left >= 0, Ct = !0, zi();
    }
  }
  o.setData = jo;
  function ca() {
    hr = !0;
    let Y, ee;
    r == 1 && (Dn > 0 ? (cn = er[0] = 0, An = er[1] = Dn - 1, Y = t[0][cn], ee = t[0][An], H == 2 ? (Y = cn, ee = An) : Y == ee && (H == 3 ? [Y, ee] = mh(Y, Y, N.log, !1) : H == 4 ? [Y, ee] = Ty(Y, Y, N.log, !1) : N.time ? ee = Y + Oo(86400 / S) : [Y, ee] = kp(Y, ee, _y, !0))) : (cn = er[0] = Y = null, An = er[1] = ee = null)), Wo(w, Y, ee);
  }
  let da, ai, Di, Qa, Ai, Za, li, Ni, Hl, tr;
  function Ks(Y, ee, me, ye, ke, b) {
    Y ??= iw, me ??= Ey, ye ??= "butt", ke ??= iw, b ??= "round", Y != da && (f.strokeStyle = da = Y), ke != ai && (f.fillStyle = ai = ke), ee != Di && (f.lineWidth = Di = ee), b != Ai && (f.lineJoin = Ai = b), ye != Za && (f.lineCap = Za = ye), me != Qa && f.setLineDash(Qa = me);
  }
  function Vl(Y, ee, me, ye) {
    ee != ai && (f.fillStyle = ai = ee), Y != li && (f.font = li = Y), me != Ni && (f.textAlign = Ni = me), ye != Hl && (f.textBaseline = Hl = ye);
  }
  function Ja(Y, ee, me, ye, ke = 0) {
    if (ye.length > 0 && Y.auto(o, hr) && (ee == null || ee.min == null)) {
      let b = kn(cn, 0), y = kn(An, ye.length - 1), k = me.min == null ? Y.distr == 3 ? j4(ye, b, y) : V4(ye, b, y, ke) : [me.min, me.max];
      Y.min = Jr(Y.min, me.min = k[0]), Y.max = Qo(Y.max, me.max = k[1]);
    }
  }
  const jl = { min: null, max: null };
  function Wl() {
    for (let ye in $) {
      let ke = $[ye];
      A[ye] == null && // scales that have never been set (on init)
      (ke.min == null || // or auto scales when the x scale was explicitly set
      A[w] != null && ke.auto(o, hr)) && (A[ye] = jl);
    }
    for (let ye in $) {
      let ke = $[ye];
      A[ye] == null && ke.from != null && A[ke.from] != null && (A[ye] = jl);
    }
    A[w] != null && il(!0);
    let Y = {};
    for (let ye in A) {
      let ke = A[ye];
      if (ke != null) {
        let b = Y[ye] = Hu($[ye], Z4);
        if (ke.min != null)
          So(b, ke);
        else if (ye != w || r == 2)
          if (Dn == 0 && b.from == null) {
            let y = b.range(o, null, null, ye);
            b.min = y[0], b.max = y[1];
          } else
            b.min = vn, b.max = -vn;
      }
    }
    if (Dn > 0) {
      C.forEach((ye, ke) => {
        if (r == 1) {
          let b = ye.scale, y = A[b];
          if (y == null)
            return;
          let k = Y[b];
          if (ke == 0) {
            let D = k.range(o, k.min, k.max, b);
            k.min = D[0], k.max = D[1], cn = bi(k.min, t[0]), An = bi(k.max, t[0]), An - cn > 1 && (t[0][cn] < k.min && cn++, t[0][An] > k.max && An--), ye.min = Jn[cn], ye.max = Jn[An];
          } else ye.show && ye.auto && Ja(k, y, ye, t[ke], ye.sorted);
          ye.idxs[0] = cn, ye.idxs[1] = An;
        } else if (ke > 0 && ye.show && ye.auto) {
          let [b, y] = ye.facets, k = b.scale, D = y.scale, [z, V] = t[ke], X = Y[k], J = Y[D];
          X != null && Ja(X, A[k], b, z, b.sorted), J != null && Ja(J, A[D], y, V, y.sorted), ye.min = y.min, ye.max = y.max;
        }
      });
      for (let ye in Y) {
        let ke = Y[ye], b = A[ye];
        if (ke.from == null && (b == null || b.min == null)) {
          let y = ke.range(
            o,
            ke.min == vn ? null : ke.min,
            ke.max == -vn ? null : ke.max,
            ye
          );
          ke.min = y[0], ke.max = y[1];
        }
      }
    }
    for (let ye in Y) {
      let ke = Y[ye];
      if (ke.from != null) {
        let b = Y[ke.from];
        if (b.min == null)
          ke.min = ke.max = null;
        else {
          let y = ke.range(o, b.min, b.max, ye);
          ke.min = y[0], ke.max = y[1];
        }
      }
    }
    let ee = {}, me = !1;
    for (let ye in Y) {
      let ke = Y[ye], b = $[ye];
      if (b.min != ke.min || b.max != ke.max) {
        b.min = ke.min, b.max = ke.max;
        let y = b.distr;
        b._min = y == 3 ? Na(b.min) : y == 4 ? Ng(b.min, b.asinh) : y == 100 ? b.fwd(b.min) : b.min, b._max = y == 3 ? Na(b.max) : y == 4 ? Ng(b.max, b.asinh) : y == 100 ? b.fwd(b.max) : b.max, ee[ye] = me = !0;
      }
    }
    if (me) {
      C.forEach((ye, ke) => {
        r == 2 ? ke > 0 && ee.y && (ye._paths = null) : ee[ye.scale] && (ye._paths = null);
      });
      for (let ye in ee)
        at = !0, io("setScale", ye);
      gt.show && gt.left >= 0 && (ft = Ct = !0);
    }
    for (let ye in A)
      A[ye] = null;
  }
  function el(Y) {
    let ee = hm(cn - 1, 0, Dn - 1), me = hm(An + 1, 0, Dn - 1);
    for (; Y[ee] == null && ee > 0; )
      ee--;
    for (; Y[me] == null && me < Dn - 1; )
      me++;
    return [ee, me];
  }
  function tl() {
    Dn > 0 && (C.forEach((Y, ee) => {
      if (ee > 0 && Y.show && (ro(ee, !1), ro(ee, !0), Y._paths == null)) {
        tr != Y.alpha && (f.globalAlpha = tr = Y.alpha);
        let me = r == 2 ? [0, t[ee][0].length - 1] : el(t[ee]);
        Y._paths = Y.paths(o, ee, me[0], me[1]), tr != 1 && (f.globalAlpha = tr = 1);
      }
    }), C.forEach((Y, ee) => {
      if (ee > 0 && Y.show) {
        tr != Y.alpha && (f.globalAlpha = tr = Y.alpha), Y._paths != null && nr(ee, !1);
        {
          let me = Y._paths != null ? Y._paths.gaps : null, ye = Y.points.show(o, ee, cn, An, me), ke = Y.points.filter(o, ee, ye, me);
          (ye || ke) && (Y.points._paths = Y.points.paths(o, ee, cn, An, ke), nr(ee, !0));
        }
        tr != 1 && (f.globalAlpha = tr = 1), io("drawSeries", ee);
      }
    }));
  }
  function ro(Y, ee) {
    let me = ee ? C[Y].points : C[Y];
    me._stroke = me.stroke(o, Y), me._fill = me.fill(o, Y);
  }
  function nr(Y, ee) {
    let me = ee ? C[Y].points : C[Y], {
      stroke: ye,
      fill: ke,
      clip: b,
      flags: y,
      _stroke: k = me._stroke,
      _fill: D = me._fill,
      _width: z = me.width
    } = me._paths;
    z = Un(z * Rn, 3);
    let V = null, X = z % 2 / 2;
    ee && D == null && (D = z > 0 ? "#fff" : k);
    let J = me.pxAlign == 1 && X > 0;
    if (J && f.translate(X, X), !ee) {
      let ue = tt - z / 2, we = Ee - z / 2, de = Re + z, Oe = Be + z;
      V = new Path2D(), V.rect(ue, we, de, Oe);
    }
    ee ? Fo(k, z, me.dash, me.cap, D, ye, ke, y, b) : fa(Y, k, z, me.dash, me.cap, D, ye, ke, y, V, b), J && f.translate(-X, -X);
  }
  function fa(Y, ee, me, ye, ke, b, y, k, D, z, V) {
    let X = !1;
    D != 0 && I.forEach((J, ue) => {
      if (J.series[0] == Y) {
        let we = C[J.series[1]], de = t[J.series[1]], Oe = (we._paths || Gc).band;
        ml(Oe) && (Oe = J.dir == 1 ? Oe[0] : Oe[1]);
        let _e, Ye = null;
        we.show && Oe && K4(de, cn, An) ? (Ye = J.fill(o, ue) || b, _e = we._paths.clip) : Oe = null, Fo(ee, me, ye, ke, Ye, y, k, D, z, V, _e, Oe), X = !0;
      }
    }), X || Fo(ee, me, ye, ke, b, y, k, D, z, V);
  }
  const or = Vu | mm;
  function Fo(Y, ee, me, ye, ke, b, y, k, D, z, V, X) {
    Ks(Y, ee, me, ye, ke), (D || z || X) && (f.save(), D && f.clip(D), z && f.clip(z)), X ? (k & or) == or ? (f.clip(X), V && f.clip(V), ol(ke, y), nl(Y, b, ee)) : k & mm ? (ol(ke, y), f.clip(X), nl(Y, b, ee)) : k & Vu && (f.save(), f.clip(X), V && f.clip(V), ol(ke, y), f.restore(), nl(Y, b, ee)) : (ol(ke, y), nl(Y, b, ee)), (D || z || X) && f.restore();
  }
  function nl(Y, ee, me) {
    me > 0 && (ee instanceof Map ? ee.forEach((ye, ke) => {
      f.strokeStyle = da = ke, f.stroke(ye);
    }) : ee != null && Y && f.stroke(ee));
  }
  function ol(Y, ee) {
    ee instanceof Map ? ee.forEach((me, ye) => {
      f.fillStyle = ai = ye, f.fill(me);
    }) : ee != null && Y && f.fill(ee);
  }
  function rl(Y, ee, me, ye) {
    let ke = P[Y], b;
    if (ye <= 0)
      b = [0, 0];
    else {
      let y = ke._space = ke.space(o, Y, ee, me, ye), k = ke._incrs = ke.incrs(o, Y, ee, me, ye, y);
      b = fF(ee, me, k, ye, y);
    }
    return ke._found = b;
  }
  function Ri(Y, ee, me, ye, ke, b, y, k, D, z) {
    let V = y % 2 / 2;
    m == 1 && f.translate(V, V), Ks(k, y, D, z, k), f.beginPath();
    let X, J, ue, we, de = ke + (ye == 0 || ye == 3 ? -b : b);
    me == 0 ? (J = ke, we = de) : (X = ke, ue = de);
    for (let Oe = 0; Oe < Y.length; Oe++)
      ee[Oe] != null && (me == 0 ? X = ue = Y[Oe] : J = we = Y[Oe], f.moveTo(X, J), f.lineTo(ue, we));
    f.stroke(), m == 1 && f.translate(-V, -V);
  }
  function qs(Y) {
    let ee = !0;
    return P.forEach((me, ye) => {
      if (!me.show)
        return;
      let ke = $[me.scale];
      if (ke.min == null) {
        me._show && (ee = !1, me._show = !1, il(!1));
        return;
      } else
        me._show || (ee = !1, me._show = !0, il(!1));
      let b = me.side, y = b % 2, { min: k, max: D } = ke, [z, V] = rl(ye, k, D, y == 0 ? je : Pe);
      if (V == 0)
        return;
      let X = ke.distr == 2, J = me._splits = me.splits(o, ye, k, D, z, V, X), ue = ke.distr == 2 ? J.map((_e) => Jn[_e]) : J, we = ke.distr == 2 ? Jn[J[1]] - Jn[J[0]] : z, de = me._values = me.values(o, me.filter(o, ue, ye, V, we), ye, V, we);
      me._rotate = b == 2 ? me.rotate(o, de, ye, V) : 0;
      let Oe = me._size;
      me._size = Qr(me.size(o, de, ye, Y)), Oe != null && me._size != Oe && (ee = !1);
    }), ee;
  }
  function Kl(Y) {
    let ee = !0;
    return zo.forEach((me, ye) => {
      let ke = me(o, ye, Sn, Y);
      ke != un[ye] && (ee = !1), un[ye] = ke;
    }), ee;
  }
  function Ud() {
    for (let Y = 0; Y < P.length; Y++) {
      let ee = P[Y];
      if (!ee.show || !ee._show)
        continue;
      let me = ee.side, ye = me % 2, ke, b, y = ee.stroke(o, Y), k = me == 0 || me == 3 ? -1 : 1;
      if (ee.label) {
        let Yn = ee.labelGap * k, co = Oo((ee._lpos + Yn) * Rn);
        Vl(ee.labelFont[0], y, "center", me == 2 ? Oc : rw), f.save(), ye == 1 ? (ke = b = 0, f.translate(
          co,
          Oo(Ee + Be / 2)
        ), f.rotate((me == 3 ? -Qf : Qf) / 2)) : (ke = Oo(tt + Re / 2), b = co), f.fillText(ee.label, ke, b), f.restore();
      }
      let [D, z] = ee._found;
      if (z == 0)
        continue;
      let V = $[ee.scale], X = ye == 0 ? Re : Be, J = ye == 0 ? tt : Ee, ue = Oo(ee.gap * Rn), we = ee._splits, de = V.distr == 2 ? we.map((Yn) => Jn[Yn]) : we, Oe = V.distr == 2 ? Jn[we[1]] - Jn[we[0]] : D, _e = ee.ticks, Ye = ee.border, Qe = _e.show ? Oo(_e.size * Rn) : 0, Ze = ee._rotate * -Qf / 180, lt = x(ee._pos * Rn), st = (Qe + ue) * k, xt = lt + st;
      b = ye == 0 ? xt : 0, ke = ye == 1 ? xt : 0;
      let Rt = ee.font[0], Gt = ee.align == 1 ? tu : ee.align == 2 ? Dg : Ze > 0 ? tu : Ze < 0 ? Dg : ye == 0 ? "center" : me == 3 ? Dg : tu, _t = Ze || ye == 1 ? "middle" : me == 2 ? Oc : rw;
      Vl(Rt, y, Gt, _t);
      let jt = ee.font[1] * ee.lineGap, Nn = we.map((Yn) => x(s(Yn, V, X, J))), xn = ee._values;
      for (let Yn = 0; Yn < xn.length; Yn++) {
        let co = xn[Yn];
        if (co != null) {
          ye == 0 ? ke = Nn[Yn] : b = Nn[Yn], co = "" + co;
          let di = co.indexOf(`
`) == -1 ? [co] : co.split(/\n/gm);
          for (let gr = 0; gr < di.length; gr++) {
            let Vr = di[gr];
            Ze ? (f.save(), f.translate(ke, b + gr * jt), f.rotate(Ze), f.fillText(Vr, 0, 0), f.restore()) : f.fillText(Vr, ke, b + gr * jt);
          }
        }
      }
      _e.show && Ri(
        Nn,
        _e.filter(o, de, Y, z, Oe),
        ye,
        me,
        lt,
        Qe,
        Un(_e.width * Rn, 3),
        _e.stroke(o, Y),
        _e.dash,
        _e.cap
      );
      let Bn = ee.grid;
      Bn.show && Ri(
        Nn,
        Bn.filter(o, de, Y, z, Oe),
        ye,
        ye == 0 ? 2 : 1,
        ye == 0 ? Ee : tt,
        ye == 0 ? Be : Re,
        Un(Bn.width * Rn, 3),
        Bn.stroke(o, Y),
        Bn.dash,
        Bn.cap
      ), Ye.show && Ri(
        [lt],
        [1],
        ye == 0 ? 1 : 0,
        ye == 0 ? 1 : 2,
        ye == 1 ? Ee : tt,
        ye == 1 ? Be : Re,
        Un(Ye.width * Rn, 3),
        Ye.stroke(o, Y),
        Ye.dash,
        Ye.cap
      );
    }
    io("drawAxes");
  }
  function il(Y) {
    C.forEach((ee, me) => {
      me > 0 && (ee._paths = null, Y && (r == 1 ? (ee.min = null, ee.max = null) : ee.facets.forEach((ye) => {
        ye.min = null, ye.max = null;
      })));
    });
  }
  let Ys = !1, Gs = !1, al = [];
  function dg() {
    Gs = !1;
    for (let Y = 0; Y < al.length; Y++)
      io(...al[Y]);
    al.length = 0;
  }
  function zi() {
    Ys || (i3(vc), Ys = !0);
  }
  function fg(Y, ee = !1) {
    Ys = !0, Gs = ee, Y(o), vc(), ee && al.length > 0 && queueMicrotask(dg);
  }
  o.batch = fg;
  function vc() {
    if (rt && (Wl(), rt = !1), at && (Wt(), at = !1), pt) {
      if (to(v, tu, Ge), to(v, Oc, Se), to(v, zc, je), to(v, Fc, Pe), to(g, tu, Ge), to(g, Oc, Se), to(g, zc, je), to(g, Fc, Pe), to(p, zc, Ve), to(p, Fc, ot), d.width = Oo(Ve * Rn), d.height = Oo(ot * Rn), P.forEach(({ _el: Y, _show: ee, _size: me, _pos: ye, side: ke }) => {
        if (Y != null)
          if (ee) {
            let b = ke === 3 || ke === 0 ? me : 0, y = ke % 2 == 1;
            to(Y, y ? "left" : "top", ye - b), to(Y, y ? "width" : "height", me), to(Y, y ? "top" : "left", y ? Se : Ge), to(Y, y ? "height" : "width", y ? Pe : je), fm(Y, us);
          } else
            kr(Y, us);
      }), da = ai = Di = Ai = Za = li = Ni = Hl = Qa = null, tr = 1, pl(!0), Ge != Ce || Se != Ae || je != qe || Pe != We) {
        il(!1);
        let Y = je / qe, ee = Pe / We;
        if (gt.show && !ft && gt.left >= 0) {
          gt.left *= Y, gt.top *= ee, pa && Vi(pa, Oo(gt.left), 0, je, Pe), ha && Vi(ha, 0, Oo(gt.top), je, Pe);
          for (let me = 0; me < Ue.length; me++) {
            let ye = Ue[me];
            ye != null && (ht[me] *= Y, vt[me] *= ee, Vi(ye, Qr(ht[me]), Qr(vt[me]), je, Pe));
          }
        }
        if (Vn.show && !wt && Vn.left >= 0 && Vn.width > 0) {
          Vn.left *= Y, Vn.width *= Y, Vn.top *= ee, Vn.height *= ee;
          for (let me in wc)
            to(Fi, me, Vn[me]);
        }
        Ce = Ge, Ae = Se, qe = je, We = Pe;
      }
      io("setSize"), pt = !1;
    }
    Ve > 0 && ot > 0 && (f.clearRect(0, 0, d.width, d.height), io("drawClear"), M.forEach((Y) => Y()), io("draw")), Vn.show && wt && (Us(Vn), wt = !1), gt.show && ft && (Hi(null, !0, !1), ft = !1), U.show && U.live && Ct && (fl(), Ct = !1), u || (u = !0, o.status = 1, io("ready")), hr = !1, Ys = !1;
  }
  o.redraw = (Y, ee) => {
    at = ee || !1, Y !== !1 ? Wo(w, N.min, N.max) : zi();
  };
  function mc(Y, ee) {
    let me = $[Y];
    if (me.from == null) {
      if (Dn == 0) {
        let ye = me.range(o, ee.min, ee.max, Y);
        ee.min = ye[0], ee.max = ye[1];
      }
      if (ee.min > ee.max) {
        let ye = ee.min;
        ee.min = ee.max, ee.max = ye;
      }
      if (Dn > 1 && ee.min != null && ee.max != null && ee.max - ee.min < 1e-16)
        return;
      Y == w && me.distr == 2 && Dn > 0 && (ee.min = bi(ee.min, t[0]), ee.max = bi(ee.max, t[0]), ee.min == ee.max && ee.max++), A[Y] = ee, rt = !0, zi();
    }
  }
  o.setScale = mc;
  let ll, bc, pa, ha, Xd, yc, ga, sl, ul, ql, qn, Hn, si = !1;
  const Po = gt.drag;
  let ho = Po.x, mo = Po.y;
  gt.show && (gt.x && (ll = Gr(T4, g)), gt.y && (bc = Gr(_4, g)), N.ori == 0 ? (pa = ll, ha = bc) : (pa = bc, ha = ll), qn = gt.left, Hn = gt.top);
  const Vn = o.select = So({
    show: !0,
    over: !0,
    left: 0,
    width: 0,
    top: 0,
    height: 0
  }, e.select), Fi = Vn.show ? Gr(I4, Vn.over ? g : v) : null;
  function Us(Y, ee) {
    if (Vn.show) {
      for (let me in Y)
        Vn[me] = Y[me], me in wc && to(Fi, me, Y[me]);
      ee !== !1 && io("setSelect");
    }
  }
  o.setSelect = Us;
  function pg(Y, ee) {
    let me = C[Y], ye = ae ? ve[Y] : null;
    if (me.show)
      ye && fm(ye, us);
    else {
      ye && kr(ye, us);
      let ke = Uo ? Ue[0] : Ue[Y];
      Vi(ke, -10, -10, je, Pe);
    }
  }
  function Wo(Y, ee, me) {
    mc(Y, { min: ee, max: me });
  }
  function Lr(Y, ee, me, ye) {
    ee.focus != null && vg(Y), ee.show != null && C.forEach((ke, b) => {
      b > 0 && (Y == b || Y == null) && (ke.show = ee.show, pg(b, ee.show), r == 2 ? (Wo(ke.facets[0].scale, null, null), Wo(ke.facets[1].scale, null, null)) : Wo(ke.scale, null, null), zi());
    }), me !== !1 && io("setSeries", Y, ee), ye && Ul("setSeries", o, Y, ee);
  }
  o.setSeries = Lr;
  function hg(Y, ee) {
    So(I[Y], ee);
  }
  function gg(Y, ee) {
    Y.fill = gn(Y.fill || null), Y.dir = kn(Y.dir, -1), ee = ee ?? I.length, I.splice(ee, 0, Y);
  }
  function Qd(Y) {
    Y == null ? I.length = 0 : I.splice(Y, 1);
  }
  o.addBand = gg, o.setBand = hg, o.delBand = Qd;
  function Zd(Y, ee) {
    C[Y].alpha = ee, gt.show && Ue[Y] && (Ue[Y].style.opacity = ee), ae && ve[Y] && (ve[Y].style.opacity = ee);
  }
  let eo, Bi, va;
  const cl = { focus: !0 };
  function vg(Y) {
    if (Y != va) {
      let ee = Y == null, me = Kn.alpha != 1;
      C.forEach((ye, ke) => {
        if (r == 1 || ke > 0) {
          let b = ee || ke == 0 || ke == Y;
          ye._focus = ee ? null : b, me && Zd(ke, b ? 1 : Kn.alpha);
        }
      }), va = Y, me && zi();
    }
  }
  ae && so && De(uw, ie, (Y) => {
    gt._lock || (En(Y), va != null && Lr(null, cl, !0, uo.setSeries));
  });
  function Hr(Y, ee, me) {
    let ye = $[ee];
    me && (Y = Y / Rn - (ye.ori == 1 ? Se : Ge));
    let ke = je;
    ye.ori == 1 && (ke = Pe, Y = ke - Y), ye.dir == -1 && (Y = ke - Y);
    let b = ye._min, y = ye._max, k = Y / ke, D = b + (y - b) * k, z = ye.distr;
    return z == 3 ? Bu(10, D) : z == 4 ? Y4(D, ye.asinh) : z == 100 ? ye.bwd(D) : D;
  }
  function mg(Y, ee) {
    let me = Hr(Y, w, ee);
    return bi(me, t[0], cn, An);
  }
  o.valToIdx = (Y) => bi(Y, t[0]), o.posToIdx = mg, o.posToVal = Hr, o.valToPos = (Y, ee, me) => $[ee].ori == 0 ? a(
    Y,
    $[ee],
    me ? Re : je,
    me ? tt : 0
  ) : l(
    Y,
    $[ee],
    me ? Be : Pe,
    me ? Ee : 0
  ), o.setCursor = (Y, ee, me) => {
    qn = Y.left, Hn = Y.top, Hi(null, ee, me);
  };
  function Jd(Y, ee) {
    to(Fi, tu, Vn.left = Y), to(Fi, zc, Vn.width = ee);
  }
  function ef(Y, ee) {
    to(Fi, Oc, Vn.top = Y), to(Fi, Fc, Vn.height = ee);
  }
  let dl = N.ori == 0 ? Jd : ef, Li = N.ori == 1 ? Jd : ef;
  function ma() {
    if (ae && U.live)
      for (let Y = r == 2 ? 1 : 0; Y < C.length; Y++) {
        if (Y == 0 && ge)
          continue;
        let ee = U.values[Y], me = 0;
        for (let ye in ee)
          ce[Y][me++].firstChild.nodeValue = ee[ye];
      }
  }
  function fl(Y, ee) {
    if (Y != null && (Y.idxs ? Y.idxs.forEach((me, ye) => {
      q[ye] = me;
    }) : Q4(Y.idx) || q.fill(Y.idx), U.idx = q[0]), ae && U.live) {
      for (let me = 0; me < C.length; me++)
        (me > 0 || r == 1 && !ge) && bg(me, q[me]);
      ma();
    }
    Ct = !1, ee !== !1 && io("setLegend");
  }
  o.setLegend = fl;
  function bg(Y, ee) {
    let me = C[Y], ye = Y == 0 && H == 2 ? Jn : t[Y], ke;
    ge ? ke = me.values(o, Y, ee) ?? Te : (ke = me.value(o, ee == null ? null : ye[ee], Y, ee), ke = ke == null ? Te : { _: ke }), U.values[Y] = ke;
  }
  function Hi(Y, ee, me) {
    ul = qn, ql = Hn, [qn, Hn] = gt.move(o, qn, Hn), gt.left = qn, gt.top = Hn, gt.show && (pa && Vi(pa, Oo(qn), 0, je, Pe), ha && Vi(ha, 0, Oo(Hn), je, Pe));
    let ye, ke = cn > An;
    eo = vn, Bi = null;
    let b = N.ori == 0 ? je : Pe, y = N.ori == 1 ? je : Pe;
    if (qn < 0 || Dn == 0 || ke) {
      ye = gt.idx = null;
      for (let k = 0; k < C.length; k++) {
        let D = Ue[k];
        D != null && Vi(D, -10, -10, je, Pe);
      }
      so && Lr(null, cl, !0, Y == null && uo.setSeries), U.live && (q.fill(ye), Ct = !0);
    } else {
      let k, D, z;
      r == 1 && (k = N.ori == 0 ? qn : Hn, D = Hr(k, w), ye = gt.idx = bi(D, t[0], cn, An), z = L(t[0][ye], N, b, 0));
      let V = -10, X = -10, J = 0, ue = 0, we = !0, de = "", Oe = "";
      for (let _e = r == 2 ? 1 : 0; _e < C.length; _e++) {
        let Ye = C[_e], Qe = q[_e], Ze = Qe == null ? null : r == 1 ? t[_e][Qe] : t[_e][1][Qe], lt = gt.dataIdx(o, _e, ye, D), st = lt == null ? null : r == 1 ? t[_e][lt] : t[_e][1][lt];
        Ct = Ct || st != Ze || lt != Qe, q[_e] = lt;
        let xt = lt == ye ? z : L(r == 1 ? t[0][lt] : t[_e][0][lt], N, b, 0);
        if (_e > 0 && Ye.show) {
          let Rt = st == null ? -10 : F(st, r == 1 ? $[Ye.scale] : $[Ye.facets[1].scale], y, 0);
          if (so && st != null) {
            let Gt = N.ori == 1 ? qn : Hn, _t = Io(Kn.dist(o, _e, lt, Rt, Gt));
            if (_t < eo) {
              let jt = Kn.bias;
              if (jt != 0) {
                let Nn = Hr(Gt, Ye.scale), xn = st >= 0 ? 1 : -1, Bn = Nn >= 0 ? 1 : -1;
                Bn == xn && (Bn == 1 ? jt == 1 ? st >= Nn : st <= Nn : (
                  // >= 0
                  jt == 1 ? st <= Nn : st >= Nn
                )) && (eo = _t, Bi = _e);
              } else
                eo = _t, Bi = _e;
            }
          }
          if (Ct || Uo) {
            let Gt, _t;
            N.ori == 0 ? (Gt = xt, _t = Rt) : (Gt = Rt, _t = xt);
            let jt, Nn, xn, Bn, Yn, co, di = !0, gr = hn.bbox;
            if (gr != null) {
              di = !1;
              let Vr = gr(o, _e);
              xn = Vr.left, Bn = Vr.top, jt = Vr.width, Nn = Vr.height;
            } else
              xn = Gt, Bn = _t, jt = Nn = hn.size(o, _e);
            if (co = hn.fill(o, _e), Yn = hn.stroke(o, _e), Uo)
              _e == Bi && eo <= Kn.prox && (V = xn, X = Bn, J = jt, ue = Nn, we = di, de = co, Oe = Yn);
            else {
              let Vr = Ue[_e];
              Vr != null && (ht[_e] = xn, vt[_e] = Bn, vw(Vr, jt, Nn, di), hw(Vr, co, Yn), Vi(Vr, Qr(xn), Qr(Bn), je, Pe));
            }
          }
        }
      }
      if (Uo) {
        let _e = Kn.prox, Ye = va == null ? eo <= _e : eo > _e || Bi != va;
        if (Ct || Ye) {
          let Qe = Ue[0];
          ht[0] = V, vt[0] = X, vw(Qe, J, ue, we), hw(Qe, de, Oe), Vi(Qe, Qr(V), Qr(X), je, Pe);
        }
      }
    }
    if (Vn.show && si)
      if (Y != null) {
        let [k, D] = uo.scales, [z, V] = uo.match, [X, J] = Y.cursor.sync.scales, ue = Y.cursor.drag;
        if (ho = ue._x, mo = ue._y, ho || mo) {
          let { left: we, top: de, width: Oe, height: _e } = Y.select, Ye = Y.scales[X].ori, Qe = Y.posToVal, Ze, lt, st, xt, Rt, Gt = k != null && z(k, X), _t = D != null && V(D, J);
          Gt && ho ? (Ye == 0 ? (Ze = we, lt = Oe) : (Ze = de, lt = _e), st = $[k], xt = L(Qe(Ze, X), st, b, 0), Rt = L(Qe(Ze + lt, X), st, b, 0), dl(Jr(xt, Rt), Io(Rt - xt))) : dl(0, b), _t && mo ? (Ye == 1 ? (Ze = we, lt = Oe) : (Ze = de, lt = _e), st = $[D], xt = F(Qe(Ze, J), st, y, 0), Rt = F(Qe(Ze + lt, J), st, y, 0), Li(Jr(xt, Rt), Io(Rt - xt))) : Li(0, y);
        } else
          Xs();
      } else {
        let k = Io(ul - Xd), D = Io(ql - yc);
        if (N.ori == 1) {
          let J = k;
          k = D, D = J;
        }
        ho = Po.x && k >= Po.dist, mo = Po.y && D >= Po.dist;
        let z = Po.uni;
        z != null ? ho && mo && (ho = k >= z, mo = D >= z, !ho && !mo && (D > k ? mo = !0 : ho = !0)) : Po.x && Po.y && (ho || mo) && (ho = mo = !0);
        let V, X;
        ho && (N.ori == 0 ? (V = ga, X = qn) : (V = sl, X = Hn), dl(Jr(V, X), Io(X - V)), mo || Li(0, y)), mo && (N.ori == 1 ? (V = ga, X = qn) : (V = sl, X = Hn), Li(Jr(V, X), Io(X - V)), ho || dl(0, b)), !ho && !mo && (dl(0, 0), Li(0, 0));
      }
    if (Po._x = ho, Po._y = mo, Y == null) {
      if (me) {
        if (Js != null) {
          let [k, D] = uo.scales;
          uo.values[0] = k != null ? Hr(N.ori == 0 ? qn : Hn, k) : null, uo.values[1] = D != null ? Hr(N.ori == 1 ? qn : Hn, D) : null;
        }
        Ul(aw, o, qn, Hn, je, Pe, ye);
      }
      if (so) {
        let k = me && uo.setSeries, D = Kn.prox;
        va == null ? eo <= D && Lr(Bi, cl, !0, k) : eo > D ? Lr(null, cl, !0, k) : Bi != va && Lr(Bi, cl, !0, k);
      }
    }
    Ct && (U.idx = ye, fl()), ee !== !1 && io("setCursor");
  }
  let ui = null;
  Object.defineProperty(o, "rect", {
    get() {
      return ui == null && pl(!1), ui;
    }
  });
  function pl(Y = !1) {
    Y ? ui = null : (ui = g.getBoundingClientRect(), io("syncRect", ui));
  }
  function hl(Y, ee, me, ye, ke, b, y) {
    gt._lock || si && Y != null && Y.movementX == 0 && Y.movementY == 0 || (xc(Y, ee, me, ye, ke, b, y, !1, Y != null), Y != null ? Hi(null, !0, !0) : Hi(ee, !0, !1));
  }
  function xc(Y, ee, me, ye, ke, b, y, k, D) {
    if (ui == null && pl(!1), En(Y), Y != null)
      me = Y.clientX - ui.left, ye = Y.clientY - ui.top;
    else {
      if (me < 0 || ye < 0) {
        qn = -10, Hn = -10;
        return;
      }
      let [z, V] = uo.scales, X = ee.cursor.sync, [J, ue] = X.values, [we, de] = X.scales, [Oe, _e] = uo.match, Ye = ee.axes[0].side % 2 == 1, Qe = N.ori == 0 ? je : Pe, Ze = N.ori == 1 ? je : Pe, lt = Ye ? b : ke, st = Ye ? ke : b, xt = Ye ? ye : me, Rt = Ye ? me : ye;
      if (we != null ? me = Oe(z, we) ? s(J, $[z], Qe, 0) : -10 : me = Qe * (xt / lt), de != null ? ye = _e(V, de) ? s(ue, $[V], Ze, 0) : -10 : ye = Ze * (Rt / st), N.ori == 1) {
        let Gt = me;
        me = ye, ye = Gt;
      }
    }
    D && ((me <= 1 || me >= je - 1) && (me = is(me, je)), (ye <= 1 || ye >= Pe - 1) && (ye = is(ye, Pe))), k ? (Xd = me, yc = ye, [ga, sl] = gt.move(o, me, ye)) : (qn = me, Hn = ye);
  }
  const wc = {
    width: 0,
    height: 0,
    left: 0,
    top: 0
  };
  function Xs() {
    Us(wc, !1);
  }
  let tf, nf, of, Qs;
  function rf(Y, ee, me, ye, ke, b, y) {
    si = !0, ho = mo = Po._x = Po._y = !1, xc(Y, ee, me, ye, ke, b, y, !0, !1), Y != null && (De(Ag, cm, Yl, !1), Ul(lw, o, ga, sl, je, Pe, null));
    let { left: k, top: D, width: z, height: V } = Vn;
    tf = k, nf = D, of = z, Qs = V, Xs();
  }
  function Yl(Y, ee, me, ye, ke, b, y) {
    si = Po._x = Po._y = !1, xc(Y, ee, me, ye, ke, b, y, !1, !0);
    let { left: k, top: D, width: z, height: V } = Vn, X = z > 0 || V > 0, J = tf != k || nf != D || of != z || Qs != V;
    if (X && J && Us(Vn), Po.setScale && X && J) {
      let ue = k, we = z, de = D, Oe = V;
      if (N.ori == 1 && (ue = D, we = V, de = k, Oe = z), ho && Wo(
        w,
        Hr(ue, w),
        Hr(ue + we, w)
      ), mo)
        for (let _e in $) {
          let Ye = $[_e];
          _e != w && Ye.from == null && Ye.min != vn && Wo(
            _e,
            Hr(de + Oe, _e),
            Hr(de, _e)
          );
        }
      Xs();
    } else gt.lock && (gt._lock = !gt._lock, Hi(null, !0, !1));
    Y != null && (Fe(Ag, cm), Ul(Ag, o, qn, Hn, je, Pe, null));
  }
  function yg(Y, ee, me, ye, ke, b, y) {
    if (gt._lock)
      return;
    En(Y);
    let k = si;
    if (si) {
      let D = !0, z = !0, V = 10, X, J;
      N.ori == 0 ? (X = ho, J = mo) : (X = mo, J = ho), X && J && (D = qn <= V || qn >= je - V, z = Hn <= V || Hn >= Pe - V), X && D && (qn = qn < ga ? 0 : je), J && z && (Hn = Hn < sl ? 0 : Pe), Hi(null, !0, !0), si = !1;
    }
    qn = -10, Hn = -10, Hi(null, !0, !0), k && (si = k);
  }
  function Zs(Y, ee, me, ye, ke, b, y) {
    gt._lock || (En(Y), ca(), Xs(), Y != null && Ul(cw, o, qn, Hn, je, Pe, null));
  }
  function af() {
    P.forEach(pF), St(o.width, o.height, !0);
  }
  Ss(Op, ku, af);
  const gl = {};
  gl.mousedown = rf, gl.mousemove = hl, gl.mouseup = Yl, gl.dblclick = Zs, gl.setSeries = (Y, ee, me, ye) => {
    let ke = uo.match[2];
    me = ke(o, ee, me), me != -1 && Lr(me, ye, !0, !1);
  }, gt.show && (De(lw, g, rf), De(aw, g, hl), De(sw, g, (Y) => {
    En(Y), pl(!1);
  }), De(uw, g, yg), De(cw, g, Zs), bm.add(o), o.syncRect = pl);
  const Gl = o.hooks = e.hooks || {};
  function io(Y, ee, me) {
    Gs ? al.push([Y, ee, me]) : Y in Gl && Gl[Y].forEach((ye) => {
      ye.call(null, o, ee, me);
    });
  }
  (e.plugins || []).forEach((Y) => {
    for (let ee in Y.hooks)
      Gl[ee] = (Gl[ee] || []).concat(Y.hooks[ee]);
  });
  const ci = (Y, ee, me) => me, uo = So({
    key: null,
    setSeries: !1,
    filters: {
      pub: ww,
      sub: ww
    },
    scales: [w, C[1] ? C[1].scale : null],
    match: [Sw, Sw, ci],
    values: [null, null]
  }, gt.sync);
  uo.match.length == 2 && uo.match.push(ci), gt.sync = uo;
  const Js = uo.key, Sc = yk(Js);
  function Ul(Y, ee, me, ye, ke, b, y) {
    uo.filters.pub(Y, ee, me, ye, ke, b, y) && Sc.pub(Y, ee, me, ye, ke, b, y);
  }
  Sc.sub(o);
  function xg(Y, ee, me, ye, ke, b, y) {
    uo.filters.sub(Y, ee, me, ye, ke, b, y) && gl[Y](null, ee, me, ye, ke, b, y);
  }
  o.pub = xg;
  function wg() {
    Sc.unsub(o), bm.delete(o), Xe.clear(), pm(Op, ku, af), c.remove(), ie?.remove(), io("destroy");
  }
  o.destroy = wg;
  function Cc() {
    io("init", e, t), jo(t || e.data, !1), A[w] ? mc(w, A[w]) : ca(), wt = Vn.show && (Vn.width > 0 || Vn.height > 0), ft = Ct = !0, St(e.width, e.height);
  }
  return C.forEach(Zn), P.forEach(Tt), n ? n instanceof HTMLElement ? (n.appendChild(c), Cc()) : n(o, Cc) : Cc(), o;
}
xo.assign = So;
xo.fmtNum = My;
xo.rangeNum = kp;
xo.rangeLog = mh;
xo.rangeAsinh = Ty;
xo.orient = zs;
xo.pxRatio = Rn;
xo.join = r3;
xo.fmtDate = Dy, xo.tzDate = g3;
xo.sync = yk;
{
  xo.addGap = Q3, xo.clipGaps = xh;
  let e = xo.paths = {
    points: Pk
  };
  e.linear = kk, e.stepped = eF, e.bars = tF, e.spline = oF;
}
function hF(e, t) {
  if (!e || e.length === 0)
    return [null, null];
  let n = null, o = null;
  for (const { thresholdValue: r } of e)
    r !== void 0 && ((n === null || r < n) && (n = r), (o === null || r > o) && (o = r));
  return [n, o];
}
function gF({
  distr: e,
  logBase: t,
  limits: n
}) {
  if (e !== ws.Logarithmic)
    return n;
  const o = t === 2 ? Math.log2 : Math.log10;
  return {
    min: pf(n.min, t, o, Math.floor),
    max: pf(n.max, t, o, Math.ceil),
    softMin: pf(n.softMin, t, o, Math.floor),
    softMax: pf(n.softMax, t, o, Math.ceil)
  };
}
function pf(e, t, n, o) {
  return e == null || e <= 0 ? e : t ** o(n(e));
}
function vF({
  time: e,
  distr: t,
  logBase: n
}) {
  if (e)
    return {};
  const o = (n ?? 10) === 2 ? 2 : 10;
  return {
    distr: t === ws.Logarithmic ? 3 : t === ws.Symlog ? 2 : 1,
    log: o
  };
}
function mF(e, t, n, o, r, i) {
  const a = n == null ? 3 : 1, l = o == null ? 3 : 1, s = {
    min: {
      pad: r,
      hard: e ?? -1 / 0,
      soft: n !== null ? n : void 0,
      mode: a
    },
    max: {
      pad: i,
      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 bF(e, t, n) {
  return !n && e == null && t == null ? null : [e, t];
}
function yF(e, t, n, o) {
  const { rangeConfig: r, hardMinOnly: i, hardMaxOnly: a, min: l, max: s } = t, u = i ? l : n, c = a ? s : o;
  return u == null || c == null ? e : xo.rangeNum(u, c, r);
}
function xF(e, t, n, o, r) {
  const i = t.min ?? n, a = t.max ?? o;
  return i == null || a == null ? e : xo.rangeLog(i, a, r ?? 10, !0);
}
function wF(e, t, n) {
  let [o, r] = e;
  return o != null && (o = t ** Math.floor(n(o))), r != null && (r = t ** Math.ceil(n(r)), o === r && (r *= t)), [o, r];
}
function SF(e, t, n) {
  if (n !== 1)
    return e;
  let [o, r] = e;
  return t.hardMinOnly && t.min != null && (o = t.min), t.hardMaxOnly && t.max != null && (r = t.max), [o, r];
}
function CF(e, t) {
  const [n, o] = e;
  return n != null && o != null && n >= o ? [t === 3 ? 1 : 0, 100] : e;
}
function $F(e) {
  return (t, n, o, r) => {
    const i = t.scales[r], a = bF(n, o, e.hasFixedRange);
    if (!a)
      return [n, o];
    let l = a;
    const s = i.log;
    if (i.distr === 1)
      l = yF(l, e, n, o);
    else if (i.distr === 3) {
      l = xF(l, e, n, o, s);
      const u = i.log === 2 ? Math.log2 : Math.log10;
      l = wF(l, s ?? 10, u);
    }
    return l = SF(l, e, i.distr ?? 1), CF(l, i.distr ?? 1);
  };
}
function PF(e, t, n, o) {
  if (!n || n.length === 0)
    return { softMin: e, softMax: t };
  const [r, i] = hF(n);
  if (r === null && i === null)
    return { softMin: e, softMax: t };
  const a = r !== null ? e !== null ? Math.min(e, r) : r : e, l = i !== null ? t !== null ? Math.max(t, i) : i : t;
  return { softMin: a, softMax: l };
}
class OF extends vh {
  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: r,
      logBase: i = 10,
      padMinBy: a = 0,
      padMaxBy: l = 0.05
    } = this.props;
    if (n) {
      if (this.min != null && this.max != null) {
        const T = this.min;
        let M = this.max;
        const R = new Date(M * 1e3);
        return R.setSeconds(0), R.setMilliseconds(0), M = Math.floor(R.getTime() / 1e3) + 60, { [t]: { time: !0, auto: !1, range: [T, M] } };
      }
      return { [t]: { time: !0, auto: !0 } };
    }
    const s = this.props.distribution, u = r?.thresholds, { softMin: c, softMax: d } = PF(
      this.softMin,
      this.softMax,
      u,
      r?.yAxisUnit
    ), { min: f, max: p, softMin: v, softMax: g } = gF({
      distr: s,
      logBase: i,
      limits: {
        min: this.min,
        max: this.max,
        softMin: c,
        softMax: d
      }
    }), m = vF({ time: n, distr: s, logBase: i }), { rangeConfig: x, hardMinOnly: S, hardMaxOnly: C, hasFixedRange: P } = mF(
      f,
      p,
      v,
      g,
      a,
      l
    ), $ = $F({
      rangeConfig: x,
      hardMinOnly: S,
      hardMaxOnly: C,
      hasFixedRange: P,
      min: f,
      max: p
    });
    let I = this.props.auto;
    return I ??= !n && !P, {
      [t]: {
        time: n,
        auto: I,
        range: o ?? $,
        ...m
      }
    };
  }
  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 Bg = {};
let Ww = 0;
const Kw = [
  "#4096ff",
  "#52c41a",
  "#faad14",
  "#ff4d4f",
  "#722ed1",
  "#13c2c2",
  "#eb2f96",
  "#fa8c16",
  "#a0d911",
  "#1677ff"
];
function kF(e) {
  if (Bg[e])
    return Bg[e];
  const t = Kw[Ww % Kw.length];
  return Ww++, Bg[e] = t, t;
}
const qw = {
  white: "#ffffff",
  black: "#000000"
};
function IF(e, t, n, o = 100) {
  const r = e.ctx.createLinearGradient(0, 0, 0, e.bbox.height), i = Math.round(o / 100 * 112).toString(16).padStart(2, "0"), a = Math.round(o / 100 * 64).toString(16).padStart(2, "0");
  return r.addColorStop(0, `${t}${i}`), r.addColorStop(0.6, `${t}${a}`), r.addColorStop(1, n), r;
}
function TF(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 _F(e, t, n) {
  const o = [];
  for (let r = 0; r < e.length; r++) {
    const i = e[r + 1];
    if (i && e[r][1] === i[0]) {
      const a = n.posToIdx(e[r][1], !0);
      o.push(t[a] == null ? TF(t, a) : a);
    }
  }
  return o;
}
function MF(e, t, n, o) {
  if (n || !o || o.length === 0)
    return null;
  const r = e.series[t].idxs;
  if (!r)
    return null;
  const [i, a] = r, l = e.data[0], s = e.data[t], u = Math.round(e.valToPos(l[i], "x", !0)), c = Math.round(e.valToPos(l[a], "x", !0)), d = [];
  return o[0][0] === u && d.push(i), d.push(..._F(o, s, e)), o[o.length - 1][1] === c && d.push(a), d.length ? d : null;
}
const Yw = 2, EF = 2.5;
let ar = null;
class DF extends vh {
  constructor(t) {
    if (super(t), !ar) {
      const n = xo.paths, o = n.linear, r = n.spline, i = n.stepped;
      if (!o || !r || !i)
        throw new Error("Required uPlot path builders are not available");
      ar = {
        linear: o(),
        spline: r(),
        stepBefore: i({ align: -1 }),
        stepAfter: i({ align: 1 })
      };
    }
  }
  getLineColor() {
    const { colorMapping: t, lineColor: n, label: o, isDarkMode: r } = this.props;
    return o ? n ?? t?.[o] ?? kF(o) : n ?? (r ? qw.white : qw.black);
  }
  buildLineConfig({ resolvedLineColor: t }) {
    const { lineWidth: n, lineStyle: o, lineCap: r, fillColor: i, fillMode: a, fillOpacity: l } = this.props, s = {
      stroke: t,
      width: n ?? Yw
    }, u = l != null && l > 0 ? Math.round(Math.min(l, 100) / 100 * 255).toString(16).padStart(2, "0") : null;
    o === um.Dashed && (s.dash = [10, 10]), o === um.Dotted && (s.dash = [2, 6]), r && (s.cap = r);
    const c = i ?? t;
    return this.props.drawStyle === Xi.Bars ? s.fill = u ? `${c}${u}` : c : this.props.drawStyle === Xi.Histogram ? s.fill = `${c}${u ?? "40"}` : a && a !== qc.None ? a === qc.Solid ? s.fill = u ? `${c}${u}` : c : a === qc.Gradient && (s.fill = (d) => IF(d, c, "rgba(0, 0, 0, 0)", l ?? 100)) : u && (s.fill = `${c}${u}`), s;
  }
  buildPathConfig() {
    const {
      pathBuilder: t,
      drawStyle: n,
      lineInterpolation: o,
      barAlignment: r,
      barMaxWidth: i,
      barWidthFactor: a,
      stepInterval: l
    } = this.props;
    return t ? { paths: t } : n === Xi.Points ? { paths: () => null } : n != null ? {
      paths: (s, u, c, d) => AF({
        drawStyle: n,
        lineInterpolation: o,
        barAlignment: r,
        barMaxWidth: i,
        barWidthFactor: a,
        stepInterval: l
      })(s, u, c, d)
    } : {};
  }
  resolvePointsShow() {
    const { pointsBuilder: t, drawStyle: n, showPoints: o } = this.props;
    return t || (n === Xi.Points ? !0 : !!o);
  }
  shouldApplyIsolatedPointFilter(t) {
    const { drawStyle: n, pointsFilter: o } = this.props;
    return n === Xi.Lines && !o && !t;
  }
  buildPointsConfig({ resolvedLineColor: t }) {
    const { lineWidth: n, pointSize: o, pointsFilter: r } = this.props, i = o ?? (n ?? Yw) * EF, a = {
      stroke: t,
      fill: t,
      size: i,
      filter: r || void 0,
      show: this.resolvePointsShow()
    };
    return this.shouldApplyIsolatedPointFilter(a.show) && (a.filter = MF), a;
  }
  getConfig() {
    const { scaleKey: t, label: n, spanGaps: o, show: r = !0, metric: i } = 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: r,
      metric: i,
      ...l,
      ...s,
      points: Object.keys(u).length > 0 ? u : void 0
    };
  }
  merge(t) {
    this.props = { ...this.props, ...t };
  }
}
function AF({
  drawStyle: e,
  lineInterpolation: t,
  barAlignment: n = KO.Center,
  barWidthFactor: o = 0.6,
  barMaxWidth: r = 200,
  stepInterval: i
}) {
  if (!ar)
    throw new Error("Required uPlot path builders are not available");
  if (e === Xi.Bars || e === Xi.Histogram) {
    const a = xo.paths;
    return NF({ pathBuilders: a, barAlignment: n, barWidthFactor: o, barMaxWidth: r, stepInterval: i });
  }
  if (e === Xi.Lines) {
    if (t === Xf.StepBefore)
      return ar.stepBefore;
    if (t === Xf.StepAfter)
      return ar.stepAfter;
    if (t === Xf.Linear)
      return ar.linear;
  }
  return ar.spline;
}
function NF({
  pathBuilders: e,
  barAlignment: t,
  barWidthFactor: n,
  barMaxWidth: o,
  stepInterval: r
}) {
  if (!ar)
    throw new Error("Required uPlot path builders are not available");
  const i = e.bars;
  if (typeof r == "number" && r > 0 && i)
    return (l, s, u, c) => {
      let d = o;
      const f = GO({
        uPlotInstance: l,
        stepInterval: r
      });
      f > 0 && (d = Math.min(d, f));
      const p = `bars|${t}|${n}|${d}`;
      return ar && !ar[p] && (ar[p] = i({
        size: [n, d],
        align: t
      })), ar?.[p]?.(l, s, u, c) ?? null;
    };
  const a = `bars|${t}|${n}|${o}`;
  return !ar[a] && i && (ar[a] = i({
    size: [n, o],
    align: t
  })), ar[a];
}
class Mk extends vh {
  series = [];
  selectionPreferencesSource = sm.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: r,
      selectionPreferencesSource: i,
      shouldSaveSelectionPreference: a,
      stepInterval: l
    } = t ?? {};
    this.id = n, r && (this.tzDate = r), i && (this.selectionPreferencesSource = i), 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 c4(t);
  }
  addScale(t) {
    const n = this.scales.find((o) => o.props.scaleKey === t.scaleKey);
    if (n) {
      n.merge?.(t);
      return;
    }
    this.scales.push(new OF(t));
  }
  addSeries(t) {
    this.series.push(new DF(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", v4(t)));
  }
  setBands(t) {
    this.bands = t;
  }
  setCursor(t) {
    this.cursor = Lx({}, 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 = {
      ...Eg,
      hover: {
        ...Eg.hover,
        prox: this.stepInterval ? (n) => GO({
          uPlotInstance: n,
          stepInterval: this.stepInterval ?? 0
        }) * p4 : qO
      }
    };
    return Lx({}, Eg, t, this.cursor);
  }
  getStoredVisibility() {
    return this.id && this.selectionPreferencesSource === sm.LOCAL_STORAGE ? m4(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 r = !1, i = !1;
    for (const { label: d, show: f } of t)
      f ? (r = !0, n.add(d), o.has(d) && o.delete(d)) : (i = !0, n.has(d) || o.add(d));
    const a = r && i, 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(
      (r, i, a) => {
        const l = i.getConfig(), s = l.label ?? "", u = a + 1, c = nw({
          seriesShow: l.show,
          seriesLabel: s,
          visibleStoredLabels: t,
          hiddenStoredLabels: n,
          hasActivePreference: o
        });
        return r[u] = {
          seriesIndex: u,
          color: l.stroke ?? "#ccc",
          label: s,
          show: c,
          yAxis: 1
        }, r;
      },
      {}
    );
  }
  getConfig() {
    const t = { ...h4 }, { visibleStoredLabels: n, hiddenStoredLabels: o, hasActivePreference: r } = this.getVisibilityResolutionState();
    return t.series = [
      { value: () => "", label: "Timestamp" },
      ...this.series.map((i) => {
        const a = i.getConfig(), l = nw({
          seriesShow: a.show,
          seriesLabel: a.label ?? "",
          visibleStoredLabels: n,
          hiddenStoredLabels: o,
          hasActivePreference: r
        });
        return { ...a, show: l };
      })
    ], t.axes = Object.values(this.axes).map((i) => i.getConfig()), t.scales = this.scales.reduce(
      (i, a) => ({ ...i, ...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 Gw(e, t) {
  return t.some(
    ({ spanGaps: n }) => typeof n == "number" && n > 0 && e > n
  );
}
function RF(e, t) {
  const n = JSON.parse(JSON.stringify(e)), [o, ...r] = n;
  if (!Array.isArray(o) || o.length < 2 || r.length === 0)
    return n;
  const i = o, a = i.length;
  let l = 0;
  for (let f = 0; f < a - 1; f += 1)
    Gw(i[f + 1] - i[f], t) && (l += 1);
  if (l === 0)
    return e;
  const s = a + l, u = Array.from({ length: s }), c = r.map(
    () => Array.from({ length: s })
  );
  let d = 0;
  for (let f = 0; f < a; f += 1) {
    u[d] = i[f];
    for (const [p, v] of r.entries())
      c[p][d] = v[f];
    if (d += 1, f < a - 1 && Gw(i[f + 1] - i[f], t)) {
      u[d] = i[f] + Math.max(1, Math.floor((i[f + 1] - i[f]) / 2));
      for (let p = 0; p < r.length; p += 1)
        c[p][d] = null;
      d += 1;
    }
  }
  return [u, ...c];
}
function zF(e, t) {
  const n = JSON.parse(JSON.stringify(e)), [o, ...r] = n;
  if (!Array.isArray(o) || r.length === 0)
    return n;
  const a = t.some(({ spanGaps: d }) => typeof d == "number") ? RF(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(
      (v) => v === null ? void 0 : v
    );
  });
  return [s, ...c];
}
const $h = /\{\{(\w+)(?::(\w+))?\}\}/g;
function _fe(e) {
  const t = [];
  let n;
  const o = new RegExp($h.source, "g");
  for (; (n = o.exec(e)) !== null; )
    t.push({
      name: n[1],
      format: n[2] || "single",
      start: n.index,
      end: n.index + n[0].length
    });
  return t;
}
function Mfe(e) {
  return new RegExp($h.source, "g").test(e);
}
function FF(e, t) {
  if (typeof e == "number")
    return String(e);
  const n = Array.isArray(e) ? e : [e];
  switch (t) {
    case "csv":
      return n.join(",");
    case "sql":
      return n.map((o) => `'${o.replaceAll("'", "''")}'`).join(",");
    case "pipe":
      return n.join("|");
    case "single":
    default:
      return n[0] ?? "";
  }
}
function nu(e, t) {
  return e.replaceAll($h, (n, o, r) => {
    const i = t[o];
    return i == null ? n : FF(i, r || "single");
  });
}
function BF(e) {
  const t = /* @__PURE__ */ new Set();
  let n;
  const o = new RegExp($h.source, "g");
  for (; (n = o.exec(e)) !== null; )
    t.add(n[1]);
  return Array.from(t);
}
class LF {
  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 r of o.dependsOn) {
      const i = this.nodes.get(r);
      i && (i.dependents = i.dependents.filter((a) => a !== n));
    }
    o.dependsOn = [], t.query && (o.dependsOn = BF(t.query));
    for (const r of o.dependsOn)
      this.ensureNode(r).dependents.push(n);
  }
  removeVariable(t) {
    const n = this.nodes.get(t);
    if (n) {
      for (const o of n.dependsOn) {
        const r = this.nodes.get(o);
        r && (r.dependents = r.dependents.filter((i) => i !== t));
      }
      for (const o of n.dependents) {
        const r = this.nodes.get(o);
        r && (r.dependsOn = r.dependsOn.filter((i) => i !== t));
      }
      this.nodes.delete(t);
    }
  }
  getDependents(t) {
    return this.nodes.get(t)?.dependents ?? [];
  }
  getAllDependents(t) {
    const n = /* @__PURE__ */ new Set(), o = [], r = (i) => {
      if (n.has(i))
        return;
      n.add(i);
      const a = this.getDependents(i);
      for (const l of a)
        o.push(l), r(l);
    };
    return r(t), o;
  }
  detectCycle() {
    const r = /* @__PURE__ */ new Map(), i = [];
    for (const l of this.nodes.keys())
      r.set(l, 0);
    const a = (l) => {
      r.set(l, 1);
      const s = this.nodes.get(l);
      if (s)
        for (const u of s.dependsOn) {
          const c = r.get(u);
          if (c === 1)
            return i.push(u, l), !0;
          if (c === 0 && a(u))
            return i.push(l), !0;
        }
      return r.set(l, 2), !1;
    };
    for (const l of this.nodes.keys())
      if (r.get(l) === 0 && a(l))
        return i.reverse();
    return null;
  }
  topologicalSort() {
    const t = /* @__PURE__ */ new Set(), n = [], o = (r) => {
      if (t.has(r))
        return;
      t.add(r);
      const i = this.nodes.get(r);
      if (i)
        for (const a of i.dependsOn)
          o(a);
      n.push(r);
    };
    for (const r of this.nodes.keys())
      o(r);
    return n;
  }
  clear() {
    this.nodes.clear();
  }
}
function HF(e, t, n, o) {
  const r = /* @__PURE__ */ new Map();
  for (const l of e) {
    const s = Number(l.clock), u = Math.round(s / o) * o, c = Number.parseFloat(l.value);
    r.set(u, Number.isNaN(c) ? null : c);
  }
  const i = [], a = Math.ceil(t / o) * o;
  for (let l = a; l <= n; l += o)
    i.push({ ts: l * 1e3, value: r.get(l) ?? null });
  return i;
}
function VF(e, t) {
  return e.map((n) => n === null ? null : n * t);
}
function jF(e, t) {
  return e.map((n) => n === null ? null : n + t);
}
function WF(e) {
  return e.map((t, n) => {
    if (n === 0)
      return 0;
    const o = e[n - 1];
    return t === null || o === null ? null : t - o;
  });
}
function KF(e, t) {
  return e.map((n, o) => {
    if (o === 0)
      return 0;
    const r = e[o - 1];
    if (n === null || r === null)
      return null;
    const i = t[o] - t[o - 1];
    return i > 0 ? (n - r) / i : 0;
  });
}
function qF(e, t) {
  return e.map((n, o) => {
    const r = Math.max(0, o - t + 1), i = e.slice(r, o + 1).filter((a) => a !== null);
    return i.length === 0 ? null : i.reduce((a, l) => a + l, 0) / i.length;
  });
}
function YF(e, t) {
  const n = [];
  let o = null;
  for (const r of e)
    if (r === null)
      n.push(null);
    else if (o === null)
      n.push(r), o = r;
    else {
      const i = t * r + (1 - t) * o;
      n.push(i), o = i;
    }
  return n;
}
function GF(e, t) {
  return e.map((n) => n !== null && n > t ? Number.NaN : n);
}
function UF(e, t) {
  return e.map((n) => n !== null && n < t ? Number.NaN : n);
}
function XF(e, t) {
  return e.map((n) => n === null || Number.isNaN(n) ? t : n);
}
function QF(e) {
  if (e.length === 0)
    return e;
  const t = e[0].values.length;
  return [{ label: "sumSeries", values: Array.from({ length: t }, (o, r) => e.every((a) => a.values[r] === null) ? null : e.reduce((a, l) => a + (l.values[r] ?? 0), 0)) }];
}
function ZF(e, t, n) {
  return e.map((r) => {
    const i = r.values.filter((l) => l !== null && !Number.isNaN(l));
    let a = 0;
    return n === "max" ? a = i.reduce((l, s) => Math.max(l, s), -1 / 0) : n === "min" ? a = i.reduce((l, s) => Math.min(l, s), 1 / 0) : a = i.reduce((l, s) => l + s, 0) / (i.length || 1), { s: r, score: a };
  }).sort((r, i) => i.score - r.score).slice(0, t).map((r) => r.s);
}
function JF(e, t, n) {
  return e.map((r) => {
    const i = r.values.filter((l) => l !== null && !Number.isNaN(l));
    let a = 0;
    return n === "max" ? a = i.reduce((l, s) => Math.max(l, s), -1 / 0) : n === "min" ? a = i.reduce((l, s) => Math.min(l, s), 1 / 0) : a = i.reduce((l, s) => l + s, 0) / (i.length || 1), { s: r, score: a };
  }).sort((r, i) => r.score - i.score).slice(0, t).map((r) => r.s);
}
function eB(e, t) {
  if (!t || t.length === 0)
    return e;
  const { timestamps: n, series: o } = e;
  let r = o;
  for (const i of t) {
    const a = i.def.name, l = i.params;
    switch (a) {
      case "scale":
        r = r.map((s) => ({ ...s, values: VF(s.values, Number(l[0])) }));
        break;
      case "offset":
        r = r.map((s) => ({ ...s, values: jF(s.values, Number(l[0])) }));
        break;
      case "delta":
        r = r.map((s) => ({ ...s, values: WF(s.values) }));
        break;
      case "rate":
        r = r.map((s) => ({ ...s, values: KF(s.values, n) }));
        break;
      case "movingAverage":
        r = r.map((s) => ({ ...s, values: qF(s.values, Number(l[0])) }));
        break;
      case "exponentialMovingAverage":
        r = r.map((s) => ({ ...s, values: YF(s.values, Number(l[0])) }));
        break;
      case "removeAboveValue":
        r = r.map((s) => ({ ...s, values: GF(s.values, Number(l[0])) }));
        break;
      case "removeBelowValue":
        r = r.map((s) => ({ ...s, values: UF(s.values, Number(l[0])) }));
        break;
      case "transformNull":
        r = r.map((s) => ({ ...s, values: XF(s.values, Number(l[0])) }));
        break;
      case "sumSeries":
        r = QF(r);
        break;
      case "top":
        r = ZF(r, Number(l[0]), String(l[1] ?? "avg"));
        break;
      case "bottom":
        r = JF(r, Number(l[0]), String(l[1] ?? "avg"));
        break;
      case "setAlias":
        r = r.map((s) => ({ ...s, label: String(l[0] ?? "") }));
        break;
      case "replaceAlias":
        r = r.map((s) => ({ ...s, label: s.label.replace(new RegExp(String(l[0] ?? "")), String(l[1] ?? "")) }));
        break;
    }
  }
  return { timestamps: n, series: r };
}
function Efe(e) {
  if (!e)
    return 6e4;
  const t = Number.parseInt(e, 10);
  return Number.isNaN(t) ? 6e4 : e.endsWith("m") ? t * 6e4 : e.endsWith("h") ? t * 36e5 : t * 1e3;
}
function tB(e, t, n, o) {
  const r = t[0], i = (e.get(r?.itemid ?? "") ?? []).map((l) => l.ts), a = new yz({ name: "zabbix", refId: o, fields: [] });
  a.addField({ name: "Time", type: Ln.time, values: i });
  for (const l of t) {
    const u = (e.get(l.itemid) ?? []).map((d) => d.value), c = l.valuemapid ? n.get(l.valuemapid) : void 0;
    a.addField({
      name: l.name.replace(/^[\s:]+/, "").trim(),
      type: Ln.number,
      values: u,
      labels: { host: l.hostid, item_key: l.key_ },
      config: {
        unit: l.units || void 0,
        displayNameFromDS: l.name.replace(/^[\s:]+/, "").trim(),
        ...c ? {
          mappings: [{
            type: 1,
            // MappingType.ValueToText
            options: Object.fromEntries(
              Object.entries(c).map(([d, f], p) => [d, { text: f, index: p }])
            )
          }]
        } : {}
      }
    });
  }
  return a;
}
let nB = 1;
async function Jo(e, t, n) {
  const { url: o, token: r } = n, i = {
    jsonrpc: "2.0",
    method: e,
    params: t,
    auth: r,
    id: nB++
  }, a = await fetch(`${o}?_m=${e}`, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify(i)
  });
  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 oB(e) {
  return Jo(
    "hostgroup.get",
    {
      output: ["groupid", "name"],
      sortfield: "name",
      limit: 200
    },
    e
  );
}
function rB(e, t, n) {
  return Jo(
    "host.get",
    {
      output: ["hostid", "host", "name"],
      ...e?.length ? { groupids: e } : {},
      ...t ? { search: { name: t }, searchWildcardsEnabled: !0 } : {},
      sortfield: "name",
      limit: 200
    },
    n
  );
}
function Dfe(e, t) {
  return Jo(
    "application.get",
    {
      output: ["applicationid", "name"],
      hostids: e,
      sortfield: "name",
      limit: 200
    },
    t
  );
}
function Ek(e, t, n, o, r) {
  const i = r ? aB(r) : void 0;
  return Jo(
    "item.get",
    {
      output: ["itemid", "hostid", "name", "key_", "value_type", "units", "valuemapid"],
      selectTags: "extend",
      hostids: e,
      filter: { value_type: ["0", "3"] },
      ...t?.length ? { applicationids: t } : {},
      ...n ? { search: { name: n }, searchWildcardsEnabled: !0 } : {},
      ...i ? { tags: [i], evaltype: 0 } : {},
      sortfield: "name",
      limit: 500
    },
    o
  );
}
function iB(e, t) {
  return Jo(
    "item.get",
    {
      output: ["itemid", "hostid", "name", "key_", "value_type", "units", "valuemapid"],
      itemids: e,
      sortfield: "name"
    },
    t
  );
}
function aB(e) {
  const t = e.indexOf(":");
  return t > 0 ? { tag: e.slice(0, t).trim(), value: e.slice(t + 1).trim(), operator: 0 } : { tag: e.trim(), value: "", operator: 2 };
}
function lB(e) {
  return e.value ? `${e.tag}: ${e.value}` : e.tag;
}
function sB(e, t, n) {
  return Jo(
    "item.get",
    {
      output: ["itemid", "hostid", "name", "key_", "value_type", "units", "valuemapid"],
      hostids: e,
      filter: { value_type: ["1", "2", "4"] },
      ...t?.length ? { applicationids: t } : {},
      sortfield: "name",
      limit: 500
    },
    n
  );
}
function Afe(e, t, n) {
  return Jo(
    "trigger.get",
    {
      output: ["triggerid", "description", "priority", "status"],
      ...e?.length ? { hostids: e } : {},
      ...t?.length ? { groupids: t } : {},
      only_true: !1,
      sortfield: "description",
      limit: 500
    },
    n
  );
}
function Nfe(e, t, n, o, r, i) {
  return Jo(
    "problem.get",
    {
      output: ["eventid", "objectid", "name", "severity", "clock", "acknowledged"],
      ...e?.length ? { groupids: e } : {},
      ...t?.length ? { hostids: t } : {},
      ...n?.length ? { severities: n } : {},
      ...o ? { time_from: o } : {},
      ...r ? { time_till: r } : {},
      sortfield: ["eventid"],
      sortorder: "DESC",
      limit: 500
    },
    i
  );
}
function uB(e, t) {
  return Jo(
    "usermacro.get",
    {
      output: ["hostmacroid", "macro", "value"],
      ...e?.length ? { hostids: e } : {},
      sortfield: "macro",
      limit: 200
    },
    t
  );
}
function cB(e) {
  return Jo(
    "service.get",
    {
      output: ["serviceid", "name"],
      sortfield: "name",
      limit: 200
    },
    e
  );
}
async function Rfe(e, t, n, o) {
  return (n - t) / 86400 <= 7 ? Jo(
    "history.get",
    {
      output: "extend",
      itemids: e,
      history: 0,
      time_from: t,
      time_till: n,
      sortfield: "clock",
      sortorder: "ASC",
      limit: 1e4
    },
    o
  ) : (await Jo(
    "trend.get",
    {
      output: "extend",
      itemids: e,
      time_from: t,
      time_till: n,
      sortfield: "clock",
      sortorder: "ASC",
      limit: 1e4
    },
    o
  )).map((a) => ({
    itemid: a.itemid,
    clock: a.clock,
    value: a.value_avg,
    ns: "0"
  }));
}
function dB(e) {
  return Jo(
    "valuemap.get",
    {
      output: "extend",
      selectMappings: "extend"
    },
    e
  );
}
function fB(e, t) {
  return Jo(
    "discoveryrule.get",
    {
      output: ["itemid", "hostid", "name", "key_"],
      hostids: e,
      sortfield: "name",
      limit: 200
    },
    t
  );
}
function Dk(e, t) {
  return Jo(
    "itemprototype.get",
    {
      output: ["itemid", "name", "key_"],
      discoveryids: [e],
      sortfield: "name"
    },
    t
  );
}
async function zfe(e, t, n, o) {
  const r = await Dk(t, o), i = [
    ...new Set(
      r.map((c) => {
        const d = c.key_.indexOf("[");
        return d > 0 ? c.key_.slice(0, d) : c.key_;
      })
    )
  ], a = n.length > 0 ? i.filter(
    (c) => n.some((d) => c.startsWith(d) || d.startsWith(c))
  ) : i;
  if (a.length === 0)
    return [];
  const l = await Promise.all(
    a.map(
      (c) => Jo(
        "item.get",
        {
          output: [
            "itemid",
            "hostid",
            "name",
            "key_",
            "value_type",
            "units",
            "lastvalue",
            "lastclock",
            "description"
          ],
          hostids: e,
          lld_ruleids: [t],
          search: { key_: `${c}*` },
          searchWildcardsEnabled: !0,
          sortfield: "name",
          limit: 500
        },
        o
      )
    )
  ), s = /* @__PURE__ */ new Set(), u = [];
  for (const c of l)
    for (const d of c)
      s.has(d.itemid) || (s.add(d.itemid), u.push(d));
  return u;
}
function pB(e, t) {
  const n = new Map(t.map((o) => [o, []]));
  for (const o of e)
    n.get(o.itemid)?.push(o);
  return n;
}
function hB(e, t) {
  if (e.length === 0)
    return 0;
  switch (t) {
    case "avg":
      return e.reduce((n, o) => n + o, 0) / e.length;
    case "sum":
      return e.reduce((n, o) => n + o, 0);
    case "min":
      return e.reduce((n, o) => Math.min(n, o), 1 / 0);
    case "max":
      return e.reduce((n, o) => Math.max(n, o), -1 / 0);
    case "count":
      return e.length;
    case "median": {
      const n = [...e].sort((o, r) => o - r);
      return n[Math.floor(n.length / 2)];
    }
  }
}
function gB(e, t, n = "avg") {
  if (e.length === 0)
    return [];
  const o = t / 1e3, r = /* @__PURE__ */ new Map();
  for (const a of e) {
    const l = Math.floor(Number(a.clock) / o) * o, s = r.get(l);
    s ? s.push(Number(a.value)) : r.set(l, [Number(a.value)]);
  }
  const i = e[0].itemid;
  return Array.from(r.entries()).sort(([a], [l]) => a - l).map(([a, l]) => ({
    itemid: i,
    clock: String(a),
    value: String(hB(l, n)),
    ns: "0"
  }));
}
const vB = [
  "Transform",
  "Aggregate",
  "Filter",
  "Trends",
  "Time",
  "Alias",
  "Special"
], Uw = [
  // 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"] }
], mB = /^\$(\w+)$/;
function Lg(e, t, n) {
  if (!e)
    return [];
  const o = mB.exec(e);
  if (!o)
    return [e];
  const r = o[1], i = t[r];
  if (i == null)
    return [e];
  const a = (Array.isArray(i) ? i : [i]).map(String);
  return a.includes("$__all") ? n[r] ?? [] : a.filter(Boolean);
}
function bB(e, t, n) {
  const o = {};
  for (const r of Object.values(n))
    o[r.config.name] = r.options.map((i) => i.value).filter((i) => i !== "$__all");
  return {
    ...e,
    hostIds: Lg(e.hostId, t, o),
    groupIds: Lg(e.groupId, t, o),
    lldRuleIds: Lg(e.lldRuleId, t, o),
    itemTagsFilter: nu(e.itemTagsFilter ?? "", t),
    triggerFilter: nu(e.triggerFilter ?? "", t),
    tagsFilter: nu(e.tagsFilter ?? "", t),
    itemids: nu(e.itemids ?? "", t),
    itServiceFilter: nu(e.itServiceFilter ?? "", t),
    macroFilter: nu(e.macroFilter ?? "", t)
  };
}
const ou = new LF();
function yB(e) {
  return e.split(",").map((t) => t.trim()).filter(Boolean).map((t) => ({ value: t, label: t }));
}
function xB(e) {
  return e.map((t) => ({ value: t.value, label: t.text || t.value }));
}
function wB(e, t, n) {
  if (t) {
    const o = e ?? n[0]?.value ?? "";
    return o ? [o] : [];
  }
  return e ?? n[0]?.value ?? "";
}
function SB(e, t) {
  return [{ value: t || "$__all", label: "$__all" }, ...e];
}
function CB(e, t, n) {
  switch (e.type) {
    case "custom": {
      if (e.customOptions && e.customOptions.length > 0)
        return Promise.resolve(xB(e.customOptions));
      const o = e.customValues ?? "";
      return Promise.resolve(yB(o));
    }
    case "query": {
      if (!t || !e.query)
        return Promise.resolve([]);
      const o = $B(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 $B(e, t) {
  return e.replace(/\{\{(\w+)(?::(\w+))?\}\}/g, (n, o) => {
    const r = t[o];
    return r == null ? n : Array.isArray(r) ? r.join(",") : String(r);
  });
}
const Is = ty("variable", () => {
  const e = le({}), t = le(null);
  function n(p) {
    t.value = p;
  }
  function o(p) {
    e.value[p.id] || (ou.addVariable(p), e.value[p.id] = $n({
      config: p,
      options: [],
      current: "",
      loading: !1,
      error: null
    }), l(p.id));
  }
  function r(p) {
    const v = e.value[p];
    v && (ou.removeVariable(v.config.name), delete e.value[p]);
  }
  function i(p, v) {
    const g = e.value[p];
    g && (g.config = { ...g.config, ...v }, ("name" in v || "query" in v) && ou.addVariable(g.config), l(p));
  }
  function a(p, v) {
    const g = e.value[p];
    g && (g.current = v);
  }
  async function l(p) {
    const v = e.value[p];
    if (v) {
      v.loading = !0, v.error = null;
      try {
        const g = u(), m = await CB(v.config, t.value, g);
        v.options = v.config.includeAll ? SB(m, v.config.allValue) : m;
        const x = Array.isArray(v.current) ? v.current[0] : v.current;
        (!x || !v.options.some((S) => S.value === x)) && (v.current = wB(v.config.defaultValue, v.config.multi, v.options));
      } catch (g) {
        v.error = g?.message ?? String(g);
      } finally {
        v.loading = !1;
      }
    }
  }
  async function s() {
    const p = ou.topologicalSort();
    for (const v of p) {
      const g = Object.values(e.value).find((m) => m.config.name === v);
      g && await l(g.config.id);
    }
  }
  function u() {
    const p = {};
    for (const v of Object.values(e.value)) {
      const { name: g } = v.config;
      Array.isArray(v.current) ? p[g] = v.current.length === 1 ? v.current[0] : v.current : p[g] = v.current;
    }
    return p;
  }
  function c(p) {
    return Object.values(e.value).find((v) => v.config.name === p);
  }
  function d(p) {
    return ou.getAllDependents(p);
  }
  function f() {
    return ou.detectCycle();
  }
  return {
    variables: e,
    optionsResolver: t,
    setOptionsResolver: n,
    addVariable: o,
    removeVariable: r,
    updateVariable: i,
    setValue: a,
    refreshVariable: l,
    refreshAll: s,
    resolveAll: u,
    getVariable: c,
    getDependents: d,
    detectCycle: f
  };
});
function PB() {
  const e = Date.now();
  return { from: e - 3600 * 1e3, to: e };
}
const aa = ty("dashboard", () => {
  const e = jO(), t = le(""), n = le(e.panels), o = le(e.layouts), r = le(!1), i = le(null), a = le(!1), l = le(PB()), s = le(0), u = le(null), c = le(!1), d = le({});
  function f(F) {
    const A = lm(), G = VO(F, { id: A }), j = o.value.reduce((W, K) => Math.max(W, K.y + K.h), 0), Z = {
      i: A,
      x: 0,
      y: j,
      w: F === "stat" || F === "gauge" ? 3 : F === "table" ? 12 : 6,
      h: F === "stat" || F === "gauge" ? 4 : F === "table" ? 10 : 8,
      minH: F === "stat" || F === "gauge" ? 3 : 6
    };
    n.value[A] = G, o.value = [...o.value, Z], i.value = A, a.value = !1, c.value = !0;
  }
  function p(F) {
    const { [F]: A, ...G } = n.value;
    n.value = G, o.value = o.value.filter((j) => j.i !== F), i.value === F && (i.value = null), c.value = !0;
  }
  function v(F) {
    const A = n.value[F];
    if (!A)
      return;
    const G = lm(), j = { ...A, id: G, title: `${A.title} (copy)` }, Z = o.value.find((K) => K.i === F), W = o.value.reduce((K, q) => Math.max(K, q.y + q.h), 0);
    n.value[G] = j, o.value = [
      ...o.value,
      {
        i: G,
        x: Z?.x ?? 0,
        y: W,
        w: Z?.w ?? 6,
        h: Z?.h ?? 8,
        minH: Z?.minH
      }
    ], c.value = !0;
  }
  function g(F, A) {
    const G = n.value[F];
    G && (n.value[F] = { ...G, ...A }, c.value = !0);
  }
  function m() {
    n.value = {}, o.value = [], i.value = null, c.value = !0;
  }
  function x(F) {
    o.value = F;
  }
  function S() {
    u.value = {
      title: t.value,
      panels: { ...n.value },
      layouts: [...o.value]
    }, r.value = !0, c.value = !1;
  }
  function C(F) {
    F && F(H()), r.value = !1, u.value = null, c.value = !1;
  }
  function P() {
    const F = u.value;
    F && (t.value = F.title, n.value = F.panels, o.value = F.layouts), r.value = !1, u.value = null, c.value = !1;
  }
  function $() {
    r.value ? P() : S();
  }
  function I(F) {
    r.value = F;
  }
  function w(F) {
    i.value = F;
  }
  function T(F) {
    l.value = F;
  }
  function M(F) {
    s.value = F;
  }
  function R() {
    for (const F of Object.keys(n.value))
      d.value[F] = (d.value[F] ?? 0) + 1;
  }
  function N(F) {
    d.value[F] = (d.value[F] ?? 0) + 1;
  }
  function H() {
    const F = Is(), A = Object.values(F.variables).map((j) => j.config), G = {
      title: t.value,
      panels: n.value,
      layouts: o.value,
      variables: A
    };
    return JSON.stringify(G, null, 2);
  }
  function L(F) {
    try {
      const A = JSON.parse(F);
      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 G = Is();
        for (const j of Object.keys(G.variables))
          G.removeVariable(j);
        for (const j of A.variables) {
          const Z = {
            ...j,
            hide: j.showOnDashboard === "nothing" || !!j.hideFromVariableList
          };
          G.addVariable(Z);
        }
      }
      return !!(A.panels && A.layouts);
    } catch {
      return !1;
    }
  }
  return {
    title: t,
    panels: n,
    layouts: o,
    isEditing: r,
    editingPanelId: i,
    addPanelModalOpen: a,
    timeRange: l,
    autoRefresh: s,
    _editSnapshot: u,
    isDirty: c,
    panelRefreshKeys: d,
    addPanel: f,
    removePanel: p,
    clonePanel: v,
    updatePanel: g,
    clearPanels: m,
    setLayouts: x,
    startEditing: S,
    confirmSave: C,
    discardChanges: P,
    setEditingPanel: w,
    toggleEditing: $,
    setEditing: I,
    setTimeRange: T,
    setAutoRefresh: M,
    refresh: R,
    refreshPanel: N,
    exportJSON: H,
    importJSON: L
  };
}), ta = ty("theme", () => {
  const e = le(
    (typeof localStorage < "u" ? localStorage.getItem("argus-theme") : null) || "dark"
  ), t = E(() => 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(r) {
    e.value = r, typeof document < "u" && (document.documentElement.dataset.theme = r), typeof localStorage < "u" && localStorage.setItem("argus-theme", r);
  }
  return { theme: e, isDark: t, toggle: n, setTheme: o };
});
function pd(e) {
  "@babel/helpers - typeof";
  return pd = 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;
  }, pd(e);
}
function OB(e, t) {
  if (pd(e) != "object" || !e) return e;
  var n = e[Symbol.toPrimitive];
  if (n !== void 0) {
    var o = n.call(e, t);
    if (pd(o) != "object") return o;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (t === "string" ? String : Number)(e);
}
function kB(e) {
  var t = OB(e, "string");
  return pd(t) == "symbol" ? t : t + "";
}
function IB(e, t, n) {
  return (t = kB(t)) in e ? Object.defineProperty(e, t, {
    value: n,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : e[t] = n, e;
}
function Xw(e, t) {
  var n = Object.keys(e);
  if (Object.getOwnPropertySymbols) {
    var o = Object.getOwnPropertySymbols(e);
    t && (o = o.filter(function(r) {
      return Object.getOwnPropertyDescriptor(e, r).enumerable;
    })), n.push.apply(n, o);
  }
  return n;
}
function Q(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? arguments[t] : {};
    t % 2 ? Xw(Object(n), !0).forEach(function(o) {
      IB(e, o, n[o]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Xw(Object(n)).forEach(function(o) {
      Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(n, o));
    });
  }
  return e;
}
function O() {
  return O = 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;
  }, O.apply(null, arguments);
}
const TB = (e) => typeof e == "function", _B = Array.isArray, MB = (e) => typeof e == "string", EB = (e) => e !== null && typeof e == "object", DB = /^on[^a-z]/, AB = (e) => DB.test(e), Ly = (e) => {
  const t = /* @__PURE__ */ Object.create(null);
  return (n) => t[n] || (t[n] = e(n));
}, NB = /-(\w)/g, Md = Ly((e) => e.replace(NB, (t, n) => n ? n.toUpperCase() : "")), RB = /\B([A-Z])/g, zB = Ly((e) => e.replace(RB, "-$1").toLowerCase()), FB = Ly((e) => e.charAt(0).toUpperCase() + e.slice(1)), BB = Object.prototype.hasOwnProperty, Qw = (e, t) => BB.call(e, t);
function LB(e, t, n, o) {
  const r = e[n];
  if (r != null) {
    const i = Qw(r, "default");
    if (i && o === void 0) {
      const a = r.default;
      o = r.type !== Function && TB(a) ? a() : a;
    }
    r.type === Boolean && (!Qw(t, n) && !i ? o = !1 : o === "" && (o = !0));
  }
  return o;
}
function HB(e) {
  return Object.keys(e).reduce((t, n) => ((n.startsWith("data-") || n.startsWith("aria-")) && (t[n] = e[n]), t), {});
}
function cs(e) {
  return typeof e == "number" ? `${e}px` : e;
}
function wu(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 VB(e) {
  let t;
  const n = new Promise((r) => {
    t = e(() => {
      r(!0);
    });
  }), o = () => {
    t?.();
  };
  return o.then = (r, i) => n.then(r, i), o.promise = n, o;
}
function Me() {
  const e = [];
  for (let t = 0; t < arguments.length; t++) {
    const n = t < 0 || arguments.length <= t ? void 0 : arguments[t];
    if (n) {
      if (MB(n))
        e.push(n);
      else if (_B(n))
        for (let o = 0; o < n.length; o++) {
          const r = Me(n[o]);
          r && e.push(r);
        }
      else if (EB(n))
        for (const o in n)
          n[o] && e.push(o);
    }
  }
  return e.join(" ");
}
var Ak = (function() {
  if (typeof Map < "u")
    return Map;
  function e(t, n) {
    var o = -1;
    return t.some(function(r, i) {
      return r[0] === n ? (o = i, !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), r = this.__entries__[o];
        return r && r[1];
      }, t.prototype.set = function(n, o) {
        var r = e(this.__entries__, n);
        ~r ? this.__entries__[r][1] = o : this.__entries__.push([n, o]);
      }, t.prototype.delete = function(n) {
        var o = this.__entries__, r = e(o, n);
        ~r && o.splice(r, 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 r = 0, i = this.__entries__; r < i.length; r++) {
          var a = i[r];
          n.call(o, a[1], a[0]);
        }
      }, t;
    })()
  );
})(), xm = typeof window < "u" && typeof document < "u" && window.document === document, Tp = (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")();
})(), jB = (function() {
  return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(Tp) : function(e) {
    return setTimeout(function() {
      return e(Date.now());
    }, 1e3 / 60);
  };
})(), WB = 2;
function KB(e, t) {
  var n = !1, o = !1, r = 0;
  function i() {
    n && (n = !1, e()), o && l();
  }
  function a() {
    jB(i);
  }
  function l() {
    var s = Date.now();
    if (n) {
      if (s - r < WB)
        return;
      o = !0;
    } else
      n = !0, o = !1, setTimeout(a, t);
    r = s;
  }
  return l;
}
var qB = 20, YB = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], GB = typeof MutationObserver < "u", UB = (
  /** @class */
  (function() {
    function e() {
      this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = KB(this.refresh.bind(this), qB);
    }
    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() {
      !xm || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), GB ? (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() {
      !xm || !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, r = YB.some(function(i) {
        return !!~o.indexOf(i);
      });
      r && this.refresh();
    }, e.getInstance = function() {
      return this.instance_ || (this.instance_ = new e()), this.instance_;
    }, e.instance_ = null, e;
  })()
), Nk = (function(e, t) {
  for (var n = 0, o = Object.keys(t); n < o.length; n++) {
    var r = o[n];
    Object.defineProperty(e, r, {
      value: t[r],
      enumerable: !1,
      writable: !1,
      configurable: !0
    });
  }
  return e;
}), ju = (function(e) {
  var t = e && e.ownerDocument && e.ownerDocument.defaultView;
  return t || Tp;
}), Rk = Ph(0, 0, 0, 0);
function _p(e) {
  return parseFloat(e) || 0;
}
function Zw(e) {
  for (var t = [], n = 1; n < arguments.length; n++)
    t[n - 1] = arguments[n];
  return t.reduce(function(o, r) {
    var i = e["border-" + r + "-width"];
    return o + _p(i);
  }, 0);
}
function XB(e) {
  for (var t = ["top", "right", "bottom", "left"], n = {}, o = 0, r = t; o < r.length; o++) {
    var i = r[o], a = e["padding-" + i];
    n[i] = _p(a);
  }
  return n;
}
function QB(e) {
  var t = e.getBBox();
  return Ph(0, 0, t.width, t.height);
}
function ZB(e) {
  var t = e.clientWidth, n = e.clientHeight;
  if (!t && !n)
    return Rk;
  var o = ju(e).getComputedStyle(e), r = XB(o), i = r.left + r.right, a = r.top + r.bottom, l = _p(o.width), s = _p(o.height);
  if (o.boxSizing === "border-box" && (Math.round(l + i) !== t && (l -= Zw(o, "left", "right") + i), Math.round(s + a) !== n && (s -= Zw(o, "top", "bottom") + a)), !eL(e)) {
    var u = Math.round(l + i) - t, c = Math.round(s + a) - n;
    Math.abs(u) !== 1 && (l -= u), Math.abs(c) !== 1 && (s -= c);
  }
  return Ph(r.left, r.top, l, s);
}
var JB = /* @__PURE__ */ (function() {
  return typeof SVGGraphicsElement < "u" ? function(e) {
    return e instanceof ju(e).SVGGraphicsElement;
  } : function(e) {
    return e instanceof ju(e).SVGElement && typeof e.getBBox == "function";
  };
})();
function eL(e) {
  return e === ju(e).document.documentElement;
}
function tL(e) {
  return xm ? JB(e) ? QB(e) : ZB(e) : Rk;
}
function nL(e) {
  var t = e.x, n = e.y, o = e.width, r = e.height, i = typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object, a = Object.create(i.prototype);
  return Nk(a, {
    x: t,
    y: n,
    width: o,
    height: r,
    top: n,
    right: t + o,
    bottom: r + n,
    left: t
  }), a;
}
function Ph(e, t, n, o) {
  return { x: e, y: t, width: n, height: o };
}
var oL = (
  /** @class */
  (function() {
    function e(t) {
      this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = Ph(0, 0, 0, 0), this.target = t;
    }
    return e.prototype.isActive = function() {
      var t = tL(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;
  })()
), rL = (
  /** @class */
  /* @__PURE__ */ (function() {
    function e(t, n) {
      var o = nL(n);
      Nk(this, { target: t, contentRect: o });
    }
    return e;
  })()
), iL = (
  /** @class */
  (function() {
    function e(t, n, o) {
      if (this.activeObservations_ = [], this.observations_ = new Ak(), 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 ju(t).Element))
          throw new TypeError('parameter 1 is not of type "Element".');
        var n = this.observations_;
        n.has(t) || (n.set(t, new oL(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 ju(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 rL(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;
  })()
), zk = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new Ak(), Fk = (
  /** @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 = UB.getInstance(), o = new iL(t, n, this);
      zk.set(this, o);
    }
    return e;
  })()
);
[
  "observe",
  "unobserve",
  "disconnect"
].forEach(function(e) {
  Fk.prototype[e] = function() {
    var t;
    return (t = zk.get(this))[e].apply(t, arguments);
  };
});
var Bk = (function() {
  return typeof Tp.ResizeObserver < "u" ? Tp.ResizeObserver : Fk;
})();
const wm = (e) => e != null && e !== "", Mn = (e, t) => {
  const n = O({}, e);
  return Object.keys(t).forEach((o) => {
    const r = n[o];
    if (r)
      r.type || r.default ? r.default = t[o] : r.def ? r.def(t[o]) : n[o] = {
        type: r,
        default: t[o]
      };
    else
      throw new Error(`not have ${o} prop`);
  }), n;
}, Lk = (e) => {
  const t = Object.keys(e), n = {}, o = {}, r = {};
  for (let i = 0, a = t.length; i < a; i++) {
    const l = t[i];
    AB(l) ? (n[l[2].toLowerCase() + l.slice(3)] = e[l], o[l] = e[l]) : r[l] = e[l];
  }
  return {
    onEvents: o,
    events: n,
    extraAttrs: r
  };
}, aL = 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, r = /:(.+)/;
  return typeof e == "object" ? e : (e.split(o).forEach(function(i) {
    if (i) {
      const a = i.split(r);
      if (a.length > 1) {
        const l = t ? Md(a[0].trim()) : a[0].trim();
        n[l] = a[1].trim();
      }
    }
  }), n);
}, Ia = (e, t) => e[t] !== void 0, Hk = Symbol("skipFlatten"), go = 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((r) => {
    Array.isArray(r) ? o.push(...go(r, t)) : r && r.type === Je ? r.key === Hk ? o.push(r) : o.push(...go(r.children, t)) : r && dr(r) ? t && !Oh(r) ? o.push(r) : t || o.push(r) : wm(r) && o.push(r);
  }), o;
}, Vk = 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 (dr(e))
    return e.type === Je ? t === "default" ? go(e.children) : [] : e.children && e.children[t] ? go(e.children[t](n)) : [];
  {
    const o = e.$slots[t] && e.$slots[t](n);
    return go(o);
  }
}, Qi = (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;
}, lL = (e) => {
  const t = {};
  if (e.$ && e.$.vnode) {
    const n = e.$.vnode.props || {};
    Object.keys(e.$props).forEach((o) => {
      const r = e.$props[o], i = zB(o);
      (r !== void 0 || i in n) && (t[o] = r);
    });
  } else if (dr(e) && typeof e.type == "object") {
    const n = e.props || {}, o = {};
    Object.keys(n).forEach((i) => {
      o[Md(i)] = n[i];
    });
    const r = e.type.props || {};
    Object.keys(r).forEach((i) => {
      const a = LB(r, o, i, o[i]);
      (a !== void 0 || i in o) && (t[i] = a);
    });
  }
  return t;
}, jk = 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, r;
  if (e.$) {
    const i = e[t];
    if (i !== void 0)
      return typeof i == "function" && o ? i(n) : i;
    r = e.$slots[t], r = o && r ? r(n) : r;
  } else if (dr(e)) {
    const i = e.props && e.props[t];
    if (i !== void 0 && e.props !== null)
      return typeof i == "function" && o ? i(n) : i;
    e.type === Je ? r = e.children : e.children && e.children[t] && (r = e.children[t], r = o && r ? r(n) : r);
  }
  return Array.isArray(r) && (r = go(r), r = r.length === 1 ? r[0] : r, r = r.length === 0 ? void 0 : r), r;
};
function Jw() {
  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 = O(O({}, n), e.$attrs) : n = O(O({}, n), e.props), Lk(n)[t ? "onEvents" : "events"];
}
function sL(e, t) {
  let o = ((dr(e) ? e.props : e.$attrs) || {}).style || {};
  return typeof o == "string" && (o = aL(o, t)), o;
}
function uL(e) {
  return e.length === 1 && e[0].type === Je;
}
function Oh(e) {
  return e && (e.type === EP || e.type === Je && e.children.length === 0 || e.type === Zb && e.children.trim() === "");
}
function Do() {
  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 === Je ? t.push(...Do(n.children)) : t.push(n);
  }), t.filter((n) => !Oh(n));
}
function Ic(e) {
  if (e) {
    const t = Do(e);
    return t.length ? t : void 0;
  } else
    return e;
}
function Ao(e) {
  return Array.isArray(e) && e.length === 1 && (e = e[0]), e && e.__v_isVNode && typeof e.type != "symbol";
}
function ei(e, t) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "default";
  var o, r;
  return (o = t[n]) !== null && o !== void 0 ? o : (r = e[n]) === null || r === void 0 ? void 0 : r.call(e);
}
const Al = be({
  compatConfig: {
    MODE: 3
  },
  name: "ResizeObserver",
  props: {
    disabled: Boolean,
    onResize: Function
  },
  emits: ["resize"],
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = $n({
      width: 0,
      height: 0,
      offsetHeight: 0,
      offsetWidth: 0
    });
    let r = null, i = null;
    const a = () => {
      i && (i.disconnect(), i = null);
    }, l = (c) => {
      const {
        onResize: d
      } = e, f = c[0].target, {
        width: p,
        height: v
      } = f.getBoundingClientRect(), {
        offsetWidth: g,
        offsetHeight: m
      } = f, x = Math.floor(p), S = Math.floor(v);
      if (o.width !== x || o.height !== S || o.offsetWidth !== g || o.offsetHeight !== m) {
        const C = {
          width: x,
          height: S,
          offsetWidth: g,
          offsetHeight: m
        };
        O(o, C), d && Promise.resolve().then(() => {
          d(O(O({}, C), {
            offsetWidth: g,
            offsetHeight: m
          }), f);
        });
      }
    }, s = pr(), u = () => {
      const {
        disabled: c
      } = e;
      if (c) {
        a();
        return;
      }
      const d = Qi(s);
      d !== r && (a(), r = d), !i && d && (i = new Bk(l), i.observe(d));
    };
    return At(() => {
      u();
    }), Ya(() => {
      u();
    }), Vo(() => {
      a();
    }), Ie(() => e.disabled, () => {
      u();
    }, {
      flush: "post"
    }), () => {
      var c;
      return (c = n.default) === null || c === void 0 ? void 0 : c.call(n)[0];
    };
  }
});
let Wk = (e) => setTimeout(e, 16), Kk = (e) => clearTimeout(e);
typeof window < "u" && "requestAnimationFrame" in window && (Wk = (e) => window.requestAnimationFrame(e), Kk = (e) => window.cancelAnimationFrame(e));
let e1 = 0;
const Hy = /* @__PURE__ */ new Map();
function qk(e) {
  Hy.delete(e);
}
function Vt(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
  e1 += 1;
  const n = e1;
  function o(r) {
    if (r === 0)
      qk(n), e();
    else {
      const i = Wk(() => {
        o(r - 1);
      });
      Hy.set(n, i);
    }
  }
  return o(t), n;
}
Vt.cancel = (e) => {
  const t = Hy.get(e);
  return qk(t), Kk(t);
};
const Ti = function() {
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
    t[n] = arguments[n];
  return t;
}, ii = (e) => {
  const t = e;
  return t.install = function(n) {
    n.component(t.displayName || t.name, e);
  }, e;
};
function Wu() {
  return {
    type: [Function, Array]
  };
}
function Mt(e) {
  return {
    type: Object,
    default: e
  };
}
function ct(e) {
  return {
    type: Boolean,
    default: e
  };
}
function et(e) {
  return {
    type: Function,
    default: e
  };
}
function Tr(e, t) {
  return {
    validator: () => !0,
    default: e
  };
}
function Hg() {
  return {
    validator: () => !0
  };
}
function jn(e) {
  return {
    type: Array,
    default: e
  };
}
function rn(e) {
  return {
    type: String,
    default: e
  };
}
function en(e, t) {
  return e ? {
    type: e,
    default: t
  } : Tr(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 Ho(e, t, n, o) {
  if (e && e.addEventListener) {
    let r = o;
    r === void 0 && Bo && (t === "touchstart" || t === "touchmove" || t === "wheel") && (r = {
      passive: !1
    }), e.addEventListener(t, n, r);
  }
  return {
    remove: () => {
      e && e.removeEventListener && e.removeEventListener(t, n);
    }
  };
}
const Vy = "anticon", Yk = Symbol("GlobalFormContextKey"), cL = (e) => {
  Bt(Yk, e);
}, dL = () => zt(Yk, {
  validateMessages: E(() => {
  })
}), fL = () => ({
  iconPrefixCls: String,
  getTargetContainer: {
    type: Function
  },
  getPopupContainer: {
    type: Function
  },
  prefixCls: String,
  getPrefixCls: {
    type: Function
  },
  renderEmpty: {
    type: Function
  },
  transformCellText: {
    type: Function
  },
  csp: Mt(),
  input: Mt(),
  autoInsertSpaceInButton: {
    type: Boolean,
    default: void 0
  },
  locale: Mt(),
  pageHeader: Mt(),
  componentSize: {
    type: String
  },
  componentDisabled: {
    type: Boolean,
    default: void 0
  },
  direction: {
    type: String,
    default: "ltr"
  },
  space: Mt(),
  virtual: {
    type: Boolean,
    default: void 0
  },
  dropdownMatchSelectWidth: {
    type: [Number, Boolean],
    default: !0
  },
  form: Mt(),
  pagination: Mt(),
  theme: Mt(),
  select: Mt(),
  wave: Mt()
}), jy = Symbol("configProvider"), Gk = {
  getPrefixCls: (e, t) => t || (e ? `ant-${e}` : "ant"),
  iconPrefixCls: E(() => Vy),
  getPopupContainer: E(() => () => document.body),
  direction: E(() => "ltr")
}, kh = () => zt(jy, Gk), pL = (e) => Bt(jy, e), Uk = Symbol("DisabledContextKey"), _i = () => zt(Uk, le(void 0)), Xk = (e) => {
  const t = _i();
  return Bt(Uk, E(() => {
    var n;
    return (n = e.value) !== null && n !== void 0 ? n : t.value;
  })), e;
}, Qk = {
  // 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"
}, hL = {
  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"
}, Zk = {
  placeholder: "Select time",
  rangePlaceholder: ["Start time", "End time"]
}, Mp = {
  lang: O({
    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"]
  }, hL),
  timePickerLocale: O({}, Zk)
}, Cr = "${label} is not a valid ${type}", La = {
  locale: "en",
  Pagination: Qk,
  DatePicker: Mp,
  TimePicker: Zk,
  Calendar: Mp,
  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: Cr,
        method: Cr,
        array: Cr,
        object: Cr,
        number: Cr,
        date: Cr,
        boolean: Cr,
        integer: Cr,
        float: Cr,
        regexp: Cr,
        email: Cr,
        url: Cr,
        hex: Cr
      },
      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"
  }
}, Jk = be({
  compatConfig: {
    MODE: 3
  },
  name: "LocaleReceiver",
  props: {
    componentName: String,
    defaultLocale: {
      type: [Object, Function]
    },
    children: {
      type: Function
    }
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = zt("localeData", {}), r = E(() => {
      const {
        componentName: a = "global",
        defaultLocale: l
      } = e, s = l || La[a || "global"], {
        antLocale: u
      } = o, c = a && u ? u[a] : {};
      return O(O({}, typeof s == "function" ? s() : s), c || {});
    }), i = E(() => {
      const {
        antLocale: a
      } = o, l = a && a.locale;
      return a && a.exist && !l ? La.locale : l;
    });
    return () => {
      const a = e.children || n.default, {
        antLocale: l
      } = o;
      return a?.(r.value, i.value, l);
    };
  }
});
function Rl(e, t, n) {
  const o = zt("localeData", {});
  return [E(() => {
    const {
      antLocale: i
    } = o, a = _(t) || La[e || "global"], l = e && i ? i[e] : {};
    return O(O(O({}, typeof a == "function" ? a() : a), l || {}), _(n) || {});
  })];
}
function Wy(e) {
  for (var t = 0, n, o = 0, r = e.length; r >= 4; ++o, r -= 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 (r) {
    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 t1 = "%";
class gL {
  constructor(t) {
    this.cache = /* @__PURE__ */ new Map(), this.instanceId = t;
  }
  get(t) {
    return this.cache.get(Array.isArray(t) ? t.join(t1) : t) || null;
  }
  update(t, n) {
    const o = Array.isArray(t) ? t.join(t1) : t, r = this.cache.get(o), i = n(r);
    i === null ? this.cache.delete(o) : this.cache.set(o, i);
  }
}
const eI = "data-token-hash", Cs = "data-css-hash", vL = "data-cache-path", Su = "__cssinjs_instance__";
function hd() {
  const e = Math.random().toString(12).slice(2);
  if (typeof document < "u" && document.head && document.body) {
    const t = document.body.querySelectorAll(`style[${Cs}]`) || [], {
      firstChild: n
    } = document.head;
    Array.from(t).forEach((r) => {
      r[Su] = r[Su] || e, r[Su] === e && document.head.insertBefore(r, n);
    });
    const o = {};
    Array.from(document.querySelectorAll(`style[${Cs}]`)).forEach((r) => {
      var i;
      const a = r.getAttribute(Cs);
      o[a] ? r[Su] === e && ((i = r.parentNode) === null || i === void 0 || i.removeChild(r)) : o[a] = !0;
    });
  }
  return new gL(e);
}
const tI = Symbol("StyleContextKey"), mL = () => {
  var e, t, n;
  const o = pr();
  let r;
  if (o && o.appContext) {
    const i = (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__;
    i ? r = i : (r = hd(), o.appContext.config.globalProperties && (o.appContext.config.globalProperties.__ANTDV_CSSINJS_CACHE__ = r));
  } else
    r = hd();
  return r;
}, nI = {
  cache: hd(),
  defaultCache: !0,
  hashPriority: "low"
}, Ih = () => {
  const e = mL();
  return zt(tI, $e(O(O({}, nI), {
    cache: e
  })));
}, bL = (e) => {
  const t = Ih(), n = $e(O(O({}, nI), {
    cache: hd()
  }));
  return Ie([() => _(e), t], () => {
    const o = O({}, t.value), r = _(e);
    Object.keys(r).forEach((a) => {
      const l = r[a];
      r[a] !== void 0 && (o[a] = l);
    });
    const {
      cache: i
    } = r;
    o.cache = o.cache || hd(), o.defaultCache = !i && t.value.defaultCache, n.value = o;
  }, {
    immediate: !0
  }), Bt(tI, n), n;
}, yL = () => ({
  autoClear: ct(),
  /** @private Test only. Not work in production. */
  mock: rn(),
  /**
   * 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: Mt(),
  /** Tell children that this context is default generated context */
  defaultCache: ct(),
  /** Use `:where` selector to reduce hashId css selector priority */
  hashPriority: rn(),
  /** Tell cssinjs where to inject style in */
  container: en(),
  /** Component wil render inline  `<style />` for fallback in SSR. Not recommend. */
  ssrInline: ct(),
  /** Transform css before inject in document. Please note that `transformers` do not support dynamic update */
  transformers: jn(),
  /**
   * Linters to lint css before inject in document.
   * Styles will be linted after transforming.
   * Please note that `linters` do not support dynamic update.
   */
  linters: jn()
});
ii(be({
  name: "AStyleProvider",
  inheritAttrs: !1,
  props: yL(),
  setup(e, t) {
    let {
      slots: n
    } = t;
    return bL(e), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
}));
function xL() {
  return !1;
}
let Sm = !1;
function wL() {
  return Sm;
}
const SL = process.env.NODE_ENV === "production" ? xL : wL;
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 Sm = !0, setTimeout(() => {
        Sm = !1;
      }, 0), t(...arguments);
    };
  }
}
function oI(e, t, n, o) {
  const r = Ih(), i = $e(""), a = $e();
  It(() => {
    i.value = [e, ...t.value].join("%");
  });
  const l = SL(), s = (u) => {
    r.value.cache.update(u, (c) => {
      const [d = 0, f] = c || [];
      return d - 1 === 0 ? (o?.(f, !1), null) : [d - 1, f];
    });
  };
  return Ie(i, (u, c) => {
    c && s(c), r.value.cache.update(u, (d) => {
      const [f = 0, p] = d || [];
      let v = p;
      process.env.NODE_ENV !== "production" && p && l && (o?.(v, l), v = null);
      const g = v || n();
      return [f + 1, g];
    }), a.value = r.value.cache.get(i.value)[1];
  }, {
    immediate: !0
  }), qt(() => {
    s(i.value);
  }), a;
}
function wr() {
  return !!(typeof window < "u" && window.document && window.document.createElement);
}
function bl(e, t) {
  return e && e.contains ? e.contains(t) : !1;
}
const n1 = "data-vc-order", CL = "vc-util-key", Cm = /* @__PURE__ */ new Map();
function rI() {
  let {
    mark: e
  } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
  return e ? e.startsWith("data-") ? e : `data-${e}` : CL;
}
function Th(e) {
  return e.attachTo ? e.attachTo : document.querySelector("head") || document.body;
}
function $L(e) {
  return e === "queue" ? "prependQueue" : e ? "prepend" : "append";
}
function iI(e) {
  return Array.from((Cm.get(e) || e).children).filter((t) => t.tagName === "STYLE");
}
function aI(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  if (!wr())
    return null;
  const {
    csp: n,
    prepend: o
  } = t, r = document.createElement("style");
  r.setAttribute(n1, $L(o)), n?.nonce && (r.nonce = n?.nonce), r.innerHTML = e;
  const i = Th(t), {
    firstChild: a
  } = i;
  if (o) {
    if (o === "queue") {
      const l = iI(i).filter((s) => ["prepend", "prependQueue"].includes(s.getAttribute(n1)));
      if (l.length)
        return i.insertBefore(r, l[l.length - 1].nextSibling), r;
    }
    i.insertBefore(r, a);
  } else
    i.appendChild(r);
  return r;
}
function lI(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  const n = Th(t);
  return iI(n).find((o) => o.getAttribute(rI(t)) === e);
}
function Ep(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  const n = lI(e, t);
  n && Th(t).removeChild(n);
}
function PL(e, t) {
  const n = Cm.get(e);
  if (!n || !bl(document, n)) {
    const o = aI("", t), {
      parentNode: r
    } = o;
    Cm.set(e, r), e.removeChild(o);
  }
}
function gd(e, t) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  var o, r, i;
  const a = Th(n);
  PL(a, n);
  const l = lI(t, n);
  if (l)
    return !((o = n.csp) === null || o === void 0) && o.nonce && l.nonce !== ((r = n.csp) === null || r === void 0 ? void 0 : r.nonce) && (l.nonce = (i = n.csp) === null || i === void 0 ? void 0 : i.nonce), l.innerHTML !== e && (l.innerHTML = e), l;
  const s = aI(e, n);
  return s.setAttribute(rI(n), t), s;
}
function OL(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 Ku {
  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((r) => {
      var i;
      o ? o = (i = o?.map) === null || i === void 0 ? void 0 : i.get(r) : 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 > Ku.MAX_CACHE_SIZE + Ku.MAX_CACHE_OFFSET) {
        const [r] = this.keys.reduce((i, a) => {
          const [, l] = i;
          return this.internalGet(a)[1] < l ? [a, this.internalGet(a)[1]] : i;
        }, [this.keys[0], this.cacheCallTimes]);
        this.delete(r);
      }
      this.keys.push(t);
    }
    let o = this.cache;
    t.forEach((r, i) => {
      if (i === t.length - 1)
        o.set(r, {
          value: [n, this.cacheCallTimes++]
        });
      else {
        const a = o.get(r);
        a ? a.map || (a.map = /* @__PURE__ */ new Map()) : o.set(r, {
          map: /* @__PURE__ */ new Map()
        }), o = o.get(r).map;
      }
    });
  }
  deleteByPath(t, n) {
    var o;
    const r = t.get(n[0]);
    if (n.length === 1)
      return r.map ? t.set(n[0], {
        map: r.map
      }) : t.delete(n[0]), (o = r.value) === null || o === void 0 ? void 0 : o[0];
    const i = this.deleteByPath(r.map, n.slice(1));
    return (!r.map || r.map.size === 0) && !r.value && t.delete(n[0]), i;
  }
  delete(t) {
    if (this.has(t))
      return this.keys = this.keys.filter((n) => !OL(n, t)), this.deleteByPath(this.cache, t);
  }
}
Ku.MAX_CACHE_SIZE = 20;
Ku.MAX_CACHE_OFFSET = 5;
let $m = {};
function wn(e, t) {
  process.env.NODE_ENV !== "production" && !e && console !== void 0 && console.error(`Warning: ${t}`);
}
function sI(e, t) {
  process.env.NODE_ENV !== "production" && !e && console !== void 0 && console.warn(`Note: ${t}`);
}
function kL() {
  $m = {};
}
function uI(e, t, n) {
  !t && !$m[n] && (e(!1, n), $m[n] = !0);
}
function mr(e, t) {
  uI(wn, e, t);
}
function Pm(e, t) {
  uI(sI, e, t);
}
function IL() {
}
let wo = IL;
process.env.NODE_ENV !== "production" && (wo = (e, t, n) => {
  mr(e, `[ant-design-vue: ${t}] ${n}`), process.env.NODE_ENV === "test" && kL();
});
let o1 = 0;
class cI {
  constructor(t) {
    this.derivatives = Array.isArray(t) ? t : [t], this.id = o1, t.length === 0 && wo(t.length > 0, "[Ant Design Vue CSS-in-JS] Theme should have at least one derivative function."), o1 += 1;
  }
  getDerivativeToken(t) {
    return this.derivatives.reduce((n, o) => o(t, n), void 0);
  }
}
const Vg = new Ku();
function dI(e) {
  const t = Array.isArray(e) ? e : [e];
  return Vg.has(t) || Vg.set(t, new cI(t)), Vg.get(t);
}
const r1 = /* @__PURE__ */ new WeakMap();
function Dp(e) {
  let t = r1.get(e) || "";
  return t || (Object.keys(e).forEach((n) => {
    const o = e[n];
    t += n, o instanceof cI ? t += o.id : o && typeof o == "object" ? t += Dp(o) : t += o;
  }), r1.set(e, t)), t;
}
function TL(e, t) {
  return Wy(`${t}_${Dp(e)}`);
}
const Uc = `random-${Date.now()}-${Math.random()}`.replace(/\./g, ""), fI = "_bAmBoO_";
function _L(e, t, n) {
  var o, r;
  if (wr()) {
    gd(e, Uc);
    const i = document.createElement("div");
    i.style.position = "fixed", i.style.left = "0", i.style.top = "0", t?.(i), document.body.appendChild(i), process.env.NODE_ENV !== "production" && (i.innerHTML = "Test", i.style.zIndex = "9999999");
    const a = n ? n(i) : (o = getComputedStyle(i).content) === null || o === void 0 ? void 0 : o.includes(fI);
    return (r = i.parentNode) === null || r === void 0 || r.removeChild(i), Ep(Uc), a;
  }
  return !1;
}
let jg;
function ML() {
  return jg === void 0 && (jg = _L(`@layer ${Uc} { .${Uc} { content: "${fI}"!important; } }`, (e) => {
    e.className = Uc;
  })), jg;
}
const i1 = {}, EL = process.env.NODE_ENV === "production", DL = process.env.NODE_ENV === "prerender", AL = !EL && !DL ? "css-dev-only-do-not-override" : "css", ds = /* @__PURE__ */ new Map();
function NL(e) {
  ds.set(e, (ds.get(e) || 0) + 1);
}
function RL(e, t) {
  typeof document < "u" && document.querySelectorAll(`style[${eI}="${e}"]`).forEach((o) => {
    var r;
    o[Su] === t && ((r = o.parentNode) === null || r === void 0 || r.removeChild(o));
  });
}
const zL = 0;
function FL(e, t) {
  ds.set(e, (ds.get(e) || 0) - 1);
  const n = Array.from(ds.keys()), o = n.filter((r) => (ds.get(r) || 0) <= 0);
  n.length - o.length > zL && o.forEach((r) => {
    RL(r, t), ds.delete(r);
  });
}
const BL = (e, t, n, o) => {
  const r = n.getDerivativeToken(e);
  let i = O(O({}, r), t);
  return o && (i = o(i)), i;
};
function LL(e, t) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : le({});
  const o = Ih(), r = E(() => O({}, ...t.value)), i = E(() => Dp(r.value)), a = E(() => Dp(n.value.override || i1));
  return oI("token", E(() => [n.value.salt || "", e.value.id, i.value, a.value]), () => {
    const {
      salt: s = "",
      override: u = i1,
      formatToken: c,
      getComputedToken: d
    } = n.value, f = d ? d(r.value, u, e.value) : BL(r.value, u, e.value, c), p = TL(f, s);
    f._tokenKey = p, NL(p);
    const v = `${AL}-${Wy(p)}`;
    return f._hashId = v, [f, v];
  }, (s) => {
    var u;
    FL(s[0]._tokenKey, (u = o.value) === null || u === void 0 ? void 0 : u.cache.instanceId);
  });
}
var HL = {
  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
}, pI = "comm", hI = "rule", gI = "decl", VL = "@import", jL = "@namespace", WL = "@keyframes", KL = "@layer", qL = Math.abs, Xc = String.fromCharCode;
function vI(e) {
  return e.trim();
}
function Om(e, t, n) {
  return e.replace(t, n);
}
function Iu(e, t) {
  return e.charCodeAt(t) | 0;
}
function qu(e, t, n) {
  return e.slice(t, n);
}
function Gi(e) {
  return e.length;
}
function YL(e) {
  return e.length;
}
function hf(e, t) {
  return t.push(e), e;
}
var _h = 1, Yu = 1, mI = 0, ni = 0, Co = 0, sc = "";
function Ky(e, t, n, o, r, i, a, l) {
  return { value: e, root: t, parent: n, type: o, props: r, children: i, line: _h, column: Yu, length: a, return: "", siblings: l };
}
function GL() {
  return Co;
}
function UL() {
  return Co = ni > 0 ? Iu(sc, --ni) : 0, Yu--, Co === 10 && (Yu = 1, _h--), Co;
}
function Ci() {
  return Co = ni < mI ? Iu(sc, ni++) : 0, Yu++, Co === 10 && (Yu = 1, _h++), Co;
}
function Cl() {
  return Iu(sc, ni);
}
function Zf() {
  return ni;
}
function Mh(e, t) {
  return qu(sc, e, t);
}
function vd(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 XL(e) {
  return _h = Yu = 1, mI = Gi(sc = e), ni = 0, [];
}
function QL(e) {
  return sc = "", e;
}
function Wg(e) {
  return vI(Mh(ni - 1, km(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
}
function ZL(e) {
  for (; (Co = Cl()) && Co < 33; )
    Ci();
  return vd(e) > 2 || vd(Co) > 3 ? "" : " ";
}
function JL(e, t) {
  for (; --t && Ci() && !(Co < 48 || Co > 102 || Co > 57 && Co < 65 || Co > 70 && Co < 97); )
    ;
  return Mh(e, Zf() + (t < 6 && Cl() == 32 && Ci() == 32));
}
function km(e) {
  for (; Ci(); )
    switch (Co) {
      // ] ) " '
      case e:
        return ni;
      // " '
      case 34:
      case 39:
        e !== 34 && e !== 39 && km(Co);
        break;
      // (
      case 40:
        e === 41 && km(e);
        break;
      // \
      case 92:
        Ci();
        break;
    }
  return ni;
}
function e8(e, t) {
  for (; Ci() && e + Co !== 57; )
    if (e + Co === 84 && Cl() === 47)
      break;
  return "/*" + Mh(t, ni - 1) + "*" + Xc(e === 47 ? e : Ci());
}
function t8(e) {
  for (; !vd(Cl()); )
    Ci();
  return Mh(e, ni);
}
function n8(e) {
  return QL(Jf("", null, null, null, [""], e = XL(e), 0, [0], e));
}
function Jf(e, t, n, o, r, i, a, l, s) {
  for (var u = 0, c = 0, d = a, f = 0, p = 0, v = 0, g = 1, m = 1, x = 1, S = 0, C = 0, P = "", $ = r, I = i, w = o, T = P; m; )
    switch (v = C, C = Ci()) {
      // (
      case 40:
        v != 108 && Iu(T, d - 1) == 58 ? (S++, T += "(") : T += Wg(C);
        break;
      // )
      case 41:
        S--, T += ")";
        break;
      // " ' [
      case 34:
      case 39:
      case 91:
        T += Wg(C);
        break;
      // \t \n \r \s
      case 9:
      case 10:
      case 13:
      case 32:
        if (S > 0) {
          T += Xc(C);
          break;
        }
        T += ZL(v);
        break;
      // \
      case 92:
        T += JL(Zf() - 1, 7);
        continue;
      // /
      case 47:
        switch (Cl()) {
          case 42:
          case 47:
            hf(o8(e8(Ci(), Zf()), t, n, s), s), (vd(v || 1) == 5 || vd(Cl() || 1) == 5) && Gi(T) && qu(T, -1, void 0) !== " " && (T += " ");
            break;
          default:
            T += "/";
        }
        break;
      // {
      case 123 * g:
        l[u++] = Gi(T) * x;
      // } ; \0
      case 125 * g:
      case 59:
      case 0:
        if (S > 0 && C) {
          T += Xc(C);
          break;
        }
        switch (C) {
          // \0 }
          case 0:
          case 125:
            m = 0;
          // ;
          case 59 + c:
            x == -1 && (T = Om(T, /\f/g, "")), p > 0 && (Gi(T) - d || g === 0) && hf(p > 32 ? l1(T + ";", o, n, d - 1, s) : l1(Om(T, " ", "") + ";", o, n, d - 2, s), s);
            break;
          // @ ;
          case 59:
            T += ";";
          // { rule/at-rule
          default:
            if (hf(w = a1(T, t, n, u, c, r, l, P, $ = [], I = [], d, i), i), C === 123)
              if (c === 0)
                Jf(T, t, w, w, $, i, d, l, I);
              else {
                switch (f) {
                  // c(ontainer)
                  case 99:
                    if (Iu(T, 3) === 110) break;
                  // l(ayer)
                  case 108:
                    if (Iu(T, 2) === 97) break;
                  default:
                    c = 0;
                  // d(ocument) m(edia) s(upports)
                  case 100:
                  case 109:
                  case 115:
                }
                c ? Jf(e, w, w, o && hf(a1(e, w, w, 0, 0, r, l, P, r, $ = [], d, I), I), r, I, d, l, o ? $ : I) : Jf(T, w, w, w, [""], I, 0, l, I);
              }
        }
        u = c = p = 0, g = x = 1, P = T = "", d = a;
        break;
      // :
      case 58:
        d = 1 + Gi(T), p = v;
      default:
        if (g < 1) {
          if (C == 123)
            --g;
          else if (C == 125 && g++ == 0 && UL() == 125)
            continue;
        }
        switch (T += Xc(C), C * g) {
          // &
          case 38:
            x = c > 0 ? 1 : (T += "\f", -1);
            break;
          // ,
          case 44:
            if (S > 0) break;
            l[u++] = (Gi(T) - 1) * x, x = 1;
            break;
          // @
          case 64:
            Cl() === 45 && (T += Wg(Ci())), f = Cl(), c = d = Gi(P = T += t8(Zf())), C++;
            break;
          // -
          case 45:
            v === 45 && Gi(T) == 2 && (g = 0);
        }
    }
  return i;
}
function a1(e, t, n, o, r, i, a, l, s, u, c, d) {
  for (var f = r - 1, p = r === 0 ? i : [""], v = YL(p), g = 0, m = 0, x = 0; g < o; ++g)
    for (var S = 0, C = qu(e, f + 1, f = qL(m = a[g])), P = e; S < v; ++S)
      (P = vI(m > 0 ? p[S] + " " + C : Om(C, /&\f/g, p[S]))) && (s[x++] = P);
  return Ky(e, t, n, r === 0 ? hI : l, s, u, c, d);
}
function o8(e, t, n, o) {
  return Ky(e, t, n, pI, Xc(GL()), qu(e, 2, -2), 0, o);
}
function l1(e, t, n, o, r) {
  return Ky(e, t, n, gI, qu(e, 0, o), qu(e, o + 1, -1), o, r);
}
function Im(e, t) {
  for (var n = "", o = 0; o < e.length; o++)
    n += t(e[o], o, e, t) || "";
  return n;
}
function r8(e, t, n, o) {
  switch (e.type) {
    case KL:
      if (e.children.length) break;
    case VL:
    case jL:
    case gI:
      return e.return = e.return || e.value;
    case pI:
      return "";
    case WL:
      return e.return = e.value + "{" + Im(e.children, o) + "}";
    case hI:
      if (!Gi(e.value = e.props.join(","))) return "";
  }
  return Gi(n = Im(e.children, o)) ? e.return = e.value + "{" + n + "}" : "";
}
function bI(e, t) {
  const {
    path: n,
    parentSelectors: o
  } = t;
  mr(!1, `[Ant Design Vue CSS-in-JS] ${n ? `Error in '${n}': ` : ""}${e}${o.length ? ` Selector info: ${o.join(" -> ")}` : ""}`);
}
const i8 = (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) !== "'")) && bI(`You seem to be using a value for 'content' without quotes, try replacing it with \`content: '"${t}"'\`.`, n);
  }
}, a8 = (e, t, n) => {
  e === "animation" && n.hashId && t !== "none" && bI(`You seem to be using hashed animation '${t}', in which case 'animationName' with Keyframe as value is recommended.`, n);
}, s1 = "data-ant-cssinjs-cache-path", l8 = "_FILE_STYLE__";
let $s, yI = !0;
function s8() {
  var e;
  if (!$s && ($s = {}, wr())) {
    const t = document.createElement("div");
    t.className = s1, 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((r) => {
      const [i, a] = r.split(":");
      $s[i] = a;
    });
    const o = document.querySelector(`style[${s1}]`);
    o && (yI = !1, (e = o.parentNode) === null || e === void 0 || e.removeChild(o)), document.body.removeChild(t);
  }
}
function u8(e) {
  return s8(), !!$s[e];
}
function c8(e) {
  const t = $s[e];
  let n = null;
  if (t && wr())
    if (yI)
      n = l8;
    else {
      const o = document.querySelector(`style[${Cs}="${$s[e]}"]`);
      o ? n = o.innerHTML : delete $s[e];
    }
  return [n, t];
}
const u1 = wr(), xI = "_skip_check_", wI = "_multi_value_";
function c1(e) {
  return Im(n8(e), r8).replace(/\{%%%\:[^;];}/g, ";");
}
function d8(e) {
  return typeof e == "object" && e && (xI in e || wI in e);
}
function f8(e, t, n) {
  if (!t)
    return e;
  const o = `.${t}`, r = 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}${r}${u.slice(c.length)}`, [u, ...s.slice(1)].join(" ");
  }).join(",");
}
const Tm = /* @__PURE__ */ new Set();
process.env.NODE_ENV;
const _m = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, {
    root: n,
    injectHash: o,
    parentSelectors: r
  } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
    root: !0,
    parentSelectors: []
  };
  const {
    hashId: i,
    layer: a,
    path: l,
    hashPriority: s,
    transformers: u = [],
    linters: c = []
  } = t;
  let d = "", f = {};
  function p(m) {
    const x = m.getName(i);
    if (!f[x]) {
      const [S] = _m(m.style, t, {
        root: !1,
        parentSelectors: r
      });
      f[x] = `@keyframes ${m.getName(i)}${S}`;
    }
  }
  function v(m) {
    let x = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
    return m.forEach((S) => {
      Array.isArray(S) ? v(S, x) : S && x.push(S);
    }), x;
  }
  if (v(Array.isArray(e) ? e : [e]).forEach((m) => {
    const x = typeof m == "string" && !n ? {} : m;
    if (typeof x == "string")
      d += `${x}
`;
    else if (x._keyframe)
      p(x);
    else {
      const S = u.reduce((C, P) => {
        var $;
        return (($ = P?.visit) === null || $ === void 0 ? void 0 : $.call(P, C)) || C;
      }, x);
      Object.keys(S).forEach((C) => {
        var P;
        const $ = S[C];
        if (typeof $ == "object" && $ && (C !== "animationName" || !$._keyframe) && !d8($)) {
          let I = !1, w = C.trim(), T = !1;
          (n || o) && i ? w.startsWith("@") ? I = !0 : w = f8(C, i, s) : n && !i && (w === "&" || w === "") && (w = "", T = !0);
          const [M, R] = _m($, t, {
            root: T,
            injectHash: I,
            parentSelectors: [...r, w]
          });
          f = O(O({}, f), R), d += `${w}${M}`;
        } else {
          let I = function(T, M) {
            process.env.NODE_ENV !== "production" && (typeof $ != "object" || !$?.[xI]) && [i8, a8, ...c].forEach((H) => H(T, M, {
              path: l,
              hashId: i,
              parentSelectors: r
            }));
            const R = T.replace(/[A-Z]/g, (H) => `-${H.toLowerCase()}`);
            let N = M;
            !HL[T] && typeof N == "number" && N !== 0 && (N = `${N}px`), T === "animationName" && M?._keyframe && (p(M), N = M.getName(i)), d += `${R}:${N};`;
          };
          const w = (P = $?.value) !== null && P !== void 0 ? P : $;
          typeof $ == "object" && $?.[wI] && Array.isArray(w) ? w.forEach((T) => {
            I(C, T);
          }) : I(C, w);
        }
      });
    }
  }), !n)
    d = `{${d}}`;
  else if (a && ML()) {
    const m = a.split(",");
    d = `@layer ${m[m.length - 1].trim()} {${d}}`, m.length > 1 && (d = `@layer ${a}{%%%:%}${d}`);
  }
  return [d, f];
};
function p8(e, t) {
  return Wy(`${e.join("%")}${t}`);
}
function Mm(e, t) {
  const n = Ih(), o = E(() => e.value.token._tokenKey), r = E(() => [o.value, ...e.value.path]);
  let i = u1;
  return process.env.NODE_ENV !== "production" && n.value.mock !== void 0 && (i = n.value.mock === "client"), oI(
    "style",
    r,
    // Create cache if needed
    () => {
      const {
        path: a,
        hashId: l,
        layer: s,
        nonce: u,
        clientOnly: c,
        order: d = 0
      } = e.value, f = r.value.join("|");
      if (u8(f)) {
        const [w, T] = c8(f);
        if (w)
          return [w, o.value, T, {}, c, d];
      }
      const p = t(), {
        hashPriority: v,
        container: g,
        transformers: m,
        linters: x,
        cache: S
      } = n.value, [C, P] = _m(p, {
        hashId: l,
        hashPriority: v,
        layer: s,
        path: a.join("-"),
        transformers: m,
        linters: x
      }), $ = c1(C), I = p8(r.value, $);
      if (i) {
        const w = {
          mark: Cs,
          prepend: "queue",
          attachTo: g,
          priority: d
        }, T = typeof u == "function" ? u() : u;
        T && (w.csp = {
          nonce: T
        });
        const M = gd($, I, w);
        M[Su] = S.instanceId, M.setAttribute(eI, o.value), process.env.NODE_ENV !== "production" && M.setAttribute(vL, r.value.join("|")), Object.keys(P).forEach((R) => {
          Tm.has(R) || (Tm.add(R), gd(c1(P[R]), `_effect-${R}`, {
            mark: Cs,
            prepend: "queue",
            attachTo: g
          }));
        });
      }
      return [$, o.value, I, P, c, d];
    },
    // Remove cache if no need
    (a, l) => {
      let [, , s] = a;
      (l || n.value.autoClear) && u1 && Ep(s, {
        mark: Cs
      });
    }
  ), (a) => a;
}
class tn {
  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 h8 = "4.2.6", md = ["blue", "purple", "cyan", "green", "magenta", "pink", "red", "orange", "yellow", "volcano", "geekblue", "lime", "gold"];
function Yo(e, t) {
  g8(e) && (e = "100%");
  var n = v8(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 gf(e) {
  return Math.min(1, Math.max(0, e));
}
function g8(e) {
  return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1;
}
function v8(e) {
  return typeof e == "string" && e.indexOf("%") !== -1;
}
function SI(e) {
  return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
}
function vf(e) {
  return e <= 1 ? "".concat(Number(e) * 100, "%") : e;
}
function vs(e) {
  return e.length === 1 ? "0" + e : String(e);
}
function m8(e, t, n) {
  return {
    r: Yo(e, 255) * 255,
    g: Yo(t, 255) * 255,
    b: Yo(n, 255) * 255
  };
}
function d1(e, t, n) {
  e = Yo(e, 255), t = Yo(t, 255), n = Yo(n, 255);
  var o = Math.max(e, t, n), r = Math.min(e, t, n), i = 0, a = 0, l = (o + r) / 2;
  if (o === r)
    a = 0, i = 0;
  else {
    var s = o - r;
    switch (a = l > 0.5 ? s / (2 - o - r) : s / (o + r), o) {
      case e:
        i = (t - n) / s + (t < n ? 6 : 0);
        break;
      case t:
        i = (n - e) / s + 2;
        break;
      case n:
        i = (e - t) / s + 4;
        break;
    }
    i /= 6;
  }
  return { h: i, s: a, l };
}
function Kg(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 b8(e, t, n) {
  var o, r, i;
  if (e = Yo(e, 360), t = Yo(t, 100), n = Yo(n, 100), t === 0)
    r = n, i = n, o = n;
  else {
    var a = n < 0.5 ? n * (1 + t) : n + t - n * t, l = 2 * n - a;
    o = Kg(l, a, e + 1 / 3), r = Kg(l, a, e), i = Kg(l, a, e - 1 / 3);
  }
  return { r: o * 255, g: r * 255, b: i * 255 };
}
function Em(e, t, n) {
  e = Yo(e, 255), t = Yo(t, 255), n = Yo(n, 255);
  var o = Math.max(e, t, n), r = Math.min(e, t, n), i = 0, a = o, l = o - r, s = o === 0 ? 0 : l / o;
  if (o === r)
    i = 0;
  else {
    switch (o) {
      case e:
        i = (t - n) / l + (t < n ? 6 : 0);
        break;
      case t:
        i = (n - e) / l + 2;
        break;
      case n:
        i = (e - t) / l + 4;
        break;
    }
    i /= 6;
  }
  return { h: i, s, v: a };
}
function y8(e, t, n) {
  e = Yo(e, 360) * 6, t = Yo(t, 100), n = Yo(n, 100);
  var o = Math.floor(e), r = e - o, i = n * (1 - t), a = n * (1 - r * t), l = n * (1 - (1 - r) * t), s = o % 6, u = [n, a, i, i, l, n][s], c = [l, n, n, a, i, i][s], d = [i, i, l, n, n, a][s];
  return { r: u * 255, g: c * 255, b: d * 255 };
}
function Dm(e, t, n, o) {
  var r = [
    vs(Math.round(e).toString(16)),
    vs(Math.round(t).toString(16)),
    vs(Math.round(n).toString(16))
  ];
  return o && r[0].startsWith(r[0].charAt(1)) && r[1].startsWith(r[1].charAt(1)) && r[2].startsWith(r[2].charAt(1)) ? r[0].charAt(0) + r[1].charAt(0) + r[2].charAt(0) : r.join("");
}
function x8(e, t, n, o, r) {
  var i = [
    vs(Math.round(e).toString(16)),
    vs(Math.round(t).toString(16)),
    vs(Math.round(n).toString(16)),
    vs(w8(o))
  ];
  return r && i[0].startsWith(i[0].charAt(1)) && i[1].startsWith(i[1].charAt(1)) && i[2].startsWith(i[2].charAt(1)) && i[3].startsWith(i[3].charAt(1)) ? i[0].charAt(0) + i[1].charAt(0) + i[2].charAt(0) + i[3].charAt(0) : i.join("");
}
function w8(e) {
  return Math.round(parseFloat(e) * 255).toString(16);
}
function f1(e) {
  return Or(e) / 255;
}
function Or(e) {
  return parseInt(e, 16);
}
function S8(e) {
  return {
    r: e >> 16,
    g: (e & 65280) >> 8,
    b: e & 255
  };
}
var Am = {
  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 gu(e) {
  var t = { r: 0, g: 0, b: 0 }, n = 1, o = null, r = null, i = null, a = !1, l = !1;
  return typeof e == "string" && (e = P8(e)), typeof e == "object" && (wa(e.r) && wa(e.g) && wa(e.b) ? (t = m8(e.r, e.g, e.b), a = !0, l = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : wa(e.h) && wa(e.s) && wa(e.v) ? (o = vf(e.s), r = vf(e.v), t = y8(e.h, o, r), a = !0, l = "hsv") : wa(e.h) && wa(e.s) && wa(e.l) && (o = vf(e.s), i = vf(e.l), t = b8(e.h, o, i), a = !0, l = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = SI(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 C8 = "[-\\+]?\\d+%?", $8 = "[-\\+]?\\d*\\.\\d+%?", $l = "(?:".concat($8, ")|(?:").concat(C8, ")"), qg = "[\\s|\\(]+(".concat($l, ")[,|\\s]+(").concat($l, ")[,|\\s]+(").concat($l, ")\\s*\\)?"), Yg = "[\\s|\\(]+(".concat($l, ")[,|\\s]+(").concat($l, ")[,|\\s]+(").concat($l, ")[,|\\s]+(").concat($l, ")\\s*\\)?"), hi = {
  CSS_UNIT: new RegExp($l),
  rgb: new RegExp("rgb" + qg),
  rgba: new RegExp("rgba" + Yg),
  hsl: new RegExp("hsl" + qg),
  hsla: new RegExp("hsla" + Yg),
  hsv: new RegExp("hsv" + qg),
  hsva: new RegExp("hsva" + Yg),
  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 P8(e) {
  if (e = e.trim().toLowerCase(), e.length === 0)
    return !1;
  var t = !1;
  if (Am[e])
    e = Am[e], t = !0;
  else if (e === "transparent")
    return { r: 0, g: 0, b: 0, a: 0, format: "name" };
  var n = hi.rgb.exec(e);
  return n ? { r: n[1], g: n[2], b: n[3] } : (n = hi.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = hi.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = hi.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = hi.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = hi.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = hi.hex8.exec(e), n ? {
    r: Or(n[1]),
    g: Or(n[2]),
    b: Or(n[3]),
    a: f1(n[4]),
    format: t ? "name" : "hex8"
  } : (n = hi.hex6.exec(e), n ? {
    r: Or(n[1]),
    g: Or(n[2]),
    b: Or(n[3]),
    format: t ? "name" : "hex"
  } : (n = hi.hex4.exec(e), n ? {
    r: Or(n[1] + n[1]),
    g: Or(n[2] + n[2]),
    b: Or(n[3] + n[3]),
    a: f1(n[4] + n[4]),
    format: t ? "name" : "hex8"
  } : (n = hi.hex3.exec(e), n ? {
    r: Or(n[1] + n[1]),
    g: Or(n[2] + n[2]),
    b: Or(n[3] + n[3]),
    format: t ? "name" : "hex"
  } : !1)))))))));
}
function wa(e) {
  return !!hi.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 = S8(t)), this.originalInput = t;
      var r = gu(t);
      this.originalInput = t, this.r = r.r, this.g = r.g, this.b = r.b, this.a = r.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (o = n.format) !== null && o !== void 0 ? o : r.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 = r.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, r, i = t.r / 255, a = t.g / 255, l = t.b / 255;
      return i <= 0.03928 ? n = i / 12.92 : n = Math.pow((i + 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 ? r = l / 12.92 : r = Math.pow((l + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * o + 0.0722 * r;
    }, e.prototype.getAlpha = function() {
      return this.a;
    }, e.prototype.setAlpha = function(t) {
      return this.a = SI(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 = Em(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 = Em(this.r, this.g, this.b), n = Math.round(t.h * 360), o = Math.round(t.s * 100), r = Math.round(t.v * 100);
      return this.a === 1 ? "hsv(".concat(n, ", ").concat(o, "%, ").concat(r, "%)") : "hsva(".concat(n, ", ").concat(o, "%, ").concat(r, "%, ").concat(this.roundA, ")");
    }, e.prototype.toHsl = function() {
      var t = d1(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 = d1(this.r, this.g, this.b), n = Math.round(t.h * 360), o = Math.round(t.s * 100), r = Math.round(t.l * 100);
      return this.a === 1 ? "hsl(".concat(n, ", ").concat(o, "%, ").concat(r, "%)") : "hsla(".concat(n, ", ").concat(o, "%, ").concat(r, "%, ").concat(this.roundA, ")");
    }, e.prototype.toHex = function(t) {
      return t === void 0 && (t = !1), Dm(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), x8(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(Yo(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(Yo(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 = "#" + Dm(this.r, this.g, this.b, !1), n = 0, o = Object.entries(Am); n < o.length; n++) {
        var r = o[n], i = r[0], a = r[1];
        if (t === a)
          return i;
      }
      return !1;
    }, e.prototype.toString = function(t) {
      var n = !!t;
      t = t ?? this.format;
      var o = !1, r = this.a < 1 && this.a >= 0, i = !n && r && (t.startsWith("hex") || t === "name");
      return i ? 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 = gf(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 = gf(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 = gf(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 = gf(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(), r = new e(t).toRgb(), i = n / 100, a = {
        r: (r.r - o.r) * i + o.r,
        g: (r.g - o.g) * i + o.g,
        b: (r.b - o.b) * i + o.b,
        a: (r.a - o.a) * i + 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(), r = 360 / n, i = [this];
      for (o.h = (o.h - (r * t >> 1) + 720) % 360; --t; )
        o.h = (o.h + r) % 360, i.push(new e(o));
      return i;
    }, 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, r = n.s, i = n.v, a = [], l = 1 / t; t--; )
        a.push(new e({ h: o, s: r, v: i })), i = (i + 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(), r = n.a + o.a * (1 - n.a);
      return new e({
        r: (n.r * n.a + o.r * o.a * (1 - n.a)) / r,
        g: (n.g * n.a + o.g * o.a * (1 - n.a)) / r,
        b: (n.b * n.a + o.b * o.a * (1 - n.a)) / r,
        a: r
      });
    }, 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, r = [this], i = 360 / t, a = 1; a < t; a++)
        r.push(new e({ h: (o + a * i) % 360, s: n.s, l: n.l }));
      return r;
    }, e.prototype.equals = function(t) {
      return this.toRgbString() === new e(t).toRgbString();
    }, e;
  })()
), mf = 2, p1 = 0.16, O8 = 0.05, k8 = 0.05, I8 = 0.15, CI = 5, $I = 4, T8 = [{
  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 h1(e) {
  var t = e.r, n = e.g, o = e.b, r = Em(t, n, o);
  return {
    h: r.h * 360,
    s: r.s,
    v: r.v
  };
}
function bf(e) {
  var t = e.r, n = e.g, o = e.b;
  return "#".concat(Dm(t, n, o, !1));
}
function _8(e, t, n) {
  var o = n / 100, r = {
    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 r;
}
function g1(e, t, n) {
  var o;
  return Math.round(e.h) >= 60 && Math.round(e.h) <= 240 ? o = n ? Math.round(e.h) - mf * t : Math.round(e.h) + mf * t : o = n ? Math.round(e.h) + mf * t : Math.round(e.h) - mf * t, o < 0 ? o += 360 : o >= 360 && (o -= 360), o;
}
function v1(e, t, n) {
  if (e.h === 0 && e.s === 0)
    return e.s;
  var o;
  return n ? o = e.s - p1 * t : t === $I ? o = e.s + p1 : o = e.s + O8 * t, o > 1 && (o = 1), n && t === CI && o > 0.1 && (o = 0.1), o < 0.06 && (o = 0.06), Number(o.toFixed(2));
}
function m1(e, t, n) {
  var o;
  return n ? o = e.v + k8 * t : o = e.v - I8 * t, o > 1 && (o = 1), Number(o.toFixed(2));
}
function Ha(e) {
  for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = [], o = gu(e), r = CI; r > 0; r -= 1) {
    var i = h1(o), a = bf(gu({
      h: g1(i, r, !0),
      s: v1(i, r, !0),
      v: m1(i, r, !0)
    }));
    n.push(a);
  }
  n.push(bf(o));
  for (var l = 1; l <= $I; l += 1) {
    var s = h1(o), u = bf(gu({
      h: g1(s, l),
      s: v1(s, l),
      v: m1(s, l)
    }));
    n.push(u);
  }
  return t.theme === "dark" ? T8.map(function(c) {
    var d = c.index, f = c.opacity, p = bf(_8(gu(t.backgroundColor || "#141414"), gu(n[d]), f * 100));
    return p;
  }) : n;
}
var Gg = {
  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"
}, ep = {}, Ug = {};
Object.keys(Gg).forEach(function(e) {
  ep[e] = Ha(Gg[e]), ep[e].primary = ep[e][5], Ug[e] = Ha(Gg[e], {
    theme: "dark",
    backgroundColor: "#141414"
  }), Ug[e].primary = Ug[e][5];
});
var M8 = ep.blue;
const E8 = (e) => {
  const {
    controlHeight: t
  } = e;
  return {
    controlHeightSM: t * 0.75,
    controlHeightXS: t * 0.5,
    controlHeightLG: t * 1.25
  };
};
function D8(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 qy = {
  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"
}, Eh = O(O({}, qy), {
  // 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 PI(e, t) {
  let {
    generateColorPalettes: n,
    generateNeutralColorPalettes: o
  } = t;
  const {
    colorSuccess: r,
    colorWarning: i,
    colorError: a,
    colorInfo: l,
    colorPrimary: s,
    colorBgBase: u,
    colorTextBase: c
  } = e, d = n(s), f = n(r), p = n(i), v = n(a), g = n(l), m = o(u, c);
  return O(O({}, m), {
    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: v[1],
    colorErrorBgHover: v[2],
    colorErrorBorder: v[3],
    colorErrorBorderHover: v[4],
    colorErrorHover: v[5],
    colorError: v[6],
    colorErrorActive: v[7],
    colorErrorTextHover: v[8],
    colorErrorText: v[9],
    colorErrorTextActive: v[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: g[1],
    colorInfoBgHover: g[2],
    colorInfoBorder: g[3],
    colorInfoBorderHover: g[4],
    colorInfoHover: g[4],
    colorInfo: g[6],
    colorInfoActive: g[7],
    colorInfoTextHover: g[8],
    colorInfoText: g[9],
    colorInfoTextActive: g[10],
    colorBgMask: new In("#000").setAlpha(0.45).toRgbString(),
    colorWhite: "#fff"
  });
}
const A8 = (e) => {
  let t = e, n = e, o = e, r = 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 ? r = 4 : e >= 8 && (r = 6), {
    borderRadius: e > 16 ? 16 : e,
    borderRadiusXS: o,
    borderRadiusSM: n,
    borderRadiusLG: t,
    borderRadiusOuter: r
  };
};
function N8(e) {
  const {
    motionUnit: t,
    motionBase: n,
    borderRadius: o,
    lineWidth: r
  } = e;
  return O({
    // motion
    motionDurationFast: `${(n + t).toFixed(1)}s`,
    motionDurationMid: `${(n + t * 2).toFixed(1)}s`,
    motionDurationSlow: `${(n + t * 3).toFixed(1)}s`,
    // line
    lineWidthBold: r + 1
  }, A8(o));
}
const Sa = (e, t) => new In(e).setAlpha(t).toRgbString(), Tc = (e, t) => new In(e).darken(t).toHexString(), R8 = (e) => {
  const t = Ha(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],
  };
}, z8 = (e, t) => {
  const n = e || "#fff", o = t || "#000";
  return {
    colorBgBase: n,
    colorTextBase: o,
    colorText: Sa(o, 0.88),
    colorTextSecondary: Sa(o, 0.65),
    colorTextTertiary: Sa(o, 0.45),
    colorTextQuaternary: Sa(o, 0.25),
    colorFill: Sa(o, 0.15),
    colorFillSecondary: Sa(o, 0.06),
    colorFillTertiary: Sa(o, 0.04),
    colorFillQuaternary: Sa(o, 0.02),
    colorBgLayout: Tc(n, 4),
    colorBgContainer: Tc(n, 0),
    colorBgElevated: Tc(n, 0),
    colorBgSpotlight: Sa(o, 0.85),
    colorBorder: Tc(n, 15),
    colorBorderSecondary: Tc(n, 6)
  };
};
function F8(e) {
  const t = new Array(10).fill(null).map((n, o) => {
    const r = o - 1, i = e * Math.pow(2.71828, r / 5), a = o > 1 ? Math.floor(i) : Math.ceil(i);
    return Math.floor(a / 2) * 2;
  });
  return t[1] = e, t.map((n) => {
    const o = n + 8;
    return {
      size: n,
      lineHeight: o / n
    };
  });
}
const B8 = (e) => {
  const t = F8(e), n = t.map((r) => r.size), o = t.map((r) => r.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 Yy(e) {
  const t = Object.keys(qy).map((n) => {
    const o = Ha(e[n]);
    return new Array(10).fill(1).reduce((r, i, a) => (r[`${n}-${a + 1}`] = o[a], r), {});
  }).reduce((n, o) => (n = O(O({}, n), o), n), {});
  return O(O(O(O(O(O(O({}, e), t), PI(e, {
    generateColorPalettes: R8,
    generateNeutralColorPalettes: z8
  })), B8(e.fontSize)), D8(e)), E8(e)), N8(e));
}
function Xg(e) {
  return e >= 0 && e <= 255;
}
function yf(e, t) {
  const {
    r: n,
    g: o,
    b: r,
    a: i
  } = new In(e).toRgb();
  if (i < 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((r - s * (1 - u)) / u);
    if (Xg(c) && Xg(d) && Xg(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: r,
    a: 1
  }).toRgbString();
}
var L8 = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
function H8(e) {
  const {
    override: t
  } = e, n = L8(e, ["override"]), o = O({}, t);
  Object.keys(Eh).forEach((p) => {
    delete o[p];
  });
  const r = O(O({}, n), o), i = 480, a = 576, l = 768, s = 992, u = 1200, c = 1600, d = 2e3;
  return O(O(O({}, r), {
    colorLink: r.colorInfoText,
    colorLinkHover: r.colorInfoHover,
    colorLinkActive: r.colorInfoActive,
    // ============== Background ============== //
    colorFillContent: r.colorFillSecondary,
    colorFillContentHover: r.colorFill,
    colorFillAlter: r.colorFillQuaternary,
    colorBgContainerDisabled: r.colorFillTertiary,
    // ============== Split ============== //
    colorBorderBg: r.colorBgContainer,
    colorSplit: yf(r.colorBorderSecondary, r.colorBgContainer),
    // ============== Text ============== //
    colorTextPlaceholder: r.colorTextQuaternary,
    colorTextDisabled: r.colorTextQuaternary,
    colorTextHeading: r.colorText,
    colorTextLabel: r.colorTextSecondary,
    colorTextDescription: r.colorTextTertiary,
    colorTextLightSolid: r.colorWhite,
    colorHighlight: r.colorError,
    colorBgTextHover: r.colorFillSecondary,
    colorBgTextActive: r.colorFill,
    colorIcon: r.colorTextTertiary,
    colorIconHover: r.colorText,
    colorErrorOutline: yf(r.colorErrorBg, r.colorBgContainer),
    colorWarningOutline: yf(r.colorWarningBg, r.colorBgContainer),
    // Font
    fontSizeIcon: r.fontSizeSM,
    // Control
    lineWidth: r.lineWidth,
    controlOutlineWidth: r.lineWidth * 2,
    // Checkbox size and expand icon size
    controlInteractiveSize: r.controlHeight / 2,
    controlItemBgHover: r.colorFillTertiary,
    controlItemBgActive: r.colorPrimaryBg,
    controlItemBgActiveHover: r.colorPrimaryBgHover,
    controlItemBgActiveDisabled: r.colorFill,
    controlTmpOutline: r.colorFillQuaternary,
    controlOutline: yf(r.colorPrimaryBg, r.colorBgContainer),
    lineType: r.lineType,
    borderRadius: r.borderRadius,
    borderRadiusXS: r.borderRadiusXS,
    borderRadiusSM: r.borderRadiusSM,
    borderRadiusLG: r.borderRadiusLG,
    fontWeightStrong: 600,
    opacityLoading: 0.65,
    linkDecoration: "none",
    linkHoverDecoration: "none",
    linkFocusDecoration: "none",
    controlPaddingHorizontal: 12,
    controlPaddingHorizontalSM: 8,
    paddingXXS: r.sizeXXS,
    paddingXS: r.sizeXS,
    paddingSM: r.sizeSM,
    padding: r.size,
    paddingMD: r.sizeMD,
    paddingLG: r.sizeLG,
    paddingXL: r.sizeXL,
    paddingContentHorizontalLG: r.sizeLG,
    paddingContentVerticalLG: r.sizeMS,
    paddingContentHorizontal: r.sizeMS,
    paddingContentVertical: r.sizeSM,
    paddingContentHorizontalSM: r.size,
    paddingContentVerticalSM: r.sizeXS,
    marginXXS: r.sizeXXS,
    marginXS: r.sizeXS,
    marginSM: r.sizeSM,
    margin: r.size,
    marginMD: r.sizeMD,
    marginLG: r.sizeLG,
    marginXL: r.sizeXL,
    marginXXL: r.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: i,
    screenXSMin: i,
    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 V8 = (e) => ({
  // FIXME: This use link but is a operation unit. Seems should be a colorPrimary.
  // And Typography use this to generate link style which should not do this.
  color: e.colorLink,
  textDecoration: "none",
  outline: "none",
  cursor: "pointer",
  transition: `color ${e.motionDurationSlow}`,
  "&:focus, &:hover": {
    color: e.colorLinkHover
  },
  "&:active": {
    color: e.colorLinkActive
  }
}), Gy = (e, t, n, o, r) => {
  const i = e / 2, a = 0, l = i, s = n * 1 / Math.sqrt(2), u = i - n * (1 - 1 / Math.sqrt(2)), c = i - t * (1 / Math.sqrt(2)), d = n * (Math.sqrt(2) - 1) + t * (1 / Math.sqrt(2)), f = 2 * i - c, p = d, v = 2 * i - s, g = u, m = 2 * i - a, x = l, S = i * Math.sqrt(2) + n * (Math.sqrt(2) - 2), C = n * (Math.sqrt(2) - 1);
  return {
    pointerEvents: "none",
    width: e,
    height: e,
    overflow: "hidden",
    "&::after": {
      content: '""',
      position: "absolute",
      width: S,
      height: S,
      bottom: 0,
      insetInline: 0,
      margin: "auto",
      borderRadius: {
        _skip_check_: !0,
        value: `0 0 ${t}px 0`
      },
      transform: "translateY(50%) rotate(-135deg)",
      boxShadow: r,
      zIndex: 0,
      background: "transparent"
    },
    "&::before": {
      position: "absolute",
      bottom: 0,
      insetInlineStart: 0,
      width: e,
      height: e / 2,
      background: o,
      clipPath: {
        _multi_value_: !0,
        value: [`polygon(${C}px 100%, 50% ${C}px, ${2 * i - C}px 100%, ${C}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 ${v} ${g} A ${n} ${n} 0 0 0 ${m} ${x} Z')`]
      },
      content: '""'
    }
  };
};
function OI(e, t) {
  return md.reduce((n, o) => {
    const r = e[`${o}-1`], i = e[`${o}-3`], a = e[`${o}-6`], l = e[`${o}-7`];
    return O(O({}, n), t(o, {
      lightColor: r,
      lightBorderColor: i,
      darkColor: a,
      textColor: l
    }));
  }, {});
}
const Va = {
  overflow: "hidden",
  whiteSpace: "nowrap",
  textOverflow: "ellipsis"
}, fn = (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
}), uc = () => ({
  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"
  }
}), ja = () => ({
  // 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: '""'
  }
}), j8 = (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"
    }
  }
}), W8 = (e, t) => {
  const {
    fontFamily: n,
    fontSize: o
  } = e, r = `[class^="${t}"], [class*=" ${t}"]`;
  return {
    [r]: {
      fontFamily: n,
      fontSize: o,
      boxSizing: "border-box",
      "&::before, &::after": {
        boxSizing: "border-box"
      },
      [r]: {
        boxSizing: "border-box",
        "&::before, &::after": {
          boxSizing: "border-box"
        }
      }
    }
  };
}, Wa = (e) => ({
  outline: `${e.lineWidthBold}px solid ${e.colorPrimaryBorder}`,
  outlineOffset: 1,
  transition: "outline-offset 0s, outline 0s"
}), Nl = (e) => ({
  "&:focus-visible": O({}, Wa(e))
});
function On(e, t, n) {
  return (o) => {
    const r = E(() => o?.value), [i, a, l] = cc(), {
      getPrefixCls: s,
      iconPrefixCls: u
    } = kh(), c = E(() => s()), d = E(() => ({
      theme: i.value,
      token: a.value,
      hashId: l.value,
      path: ["Shared", c.value]
    }));
    Mm(d, () => [{
      // Link
      "&": j8(a.value)
    }]);
    const f = E(() => ({
      theme: i.value,
      token: a.value,
      hashId: l.value,
      path: [e, r.value, u.value]
    }));
    return [Mm(f, () => {
      const {
        token: p,
        flush: v
      } = q8(a.value), g = typeof n == "function" ? n(p) : n, m = O(O({}, g), a.value[e]), x = `.${r.value}`, S = Qt(p, {
        componentCls: x,
        prefixCls: r.value,
        iconCls: `.${u.value}`,
        antCls: `.${c.value}`
      }, m), C = t(S, {
        hashId: l.value,
        prefixCls: r.value,
        rootPrefixCls: c.value,
        iconPrefixCls: u.value,
        overrideComponentToken: a.value[e]
      });
      return v(e, m), [W8(a.value, r.value), C];
    }), l];
  };
}
const kI = process.env.NODE_ENV !== "production" || typeof CSSINJS_STATISTIC < "u";
let Nm = !0;
function Qt() {
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
    t[n] = arguments[n];
  if (!kI)
    return O({}, ...t);
  Nm = !1;
  const o = {};
  return t.forEach((r) => {
    Object.keys(r).forEach((a) => {
      Object.defineProperty(o, a, {
        configurable: !0,
        enumerable: !0,
        get: () => r[a]
      });
    });
  }), Nm = !0, o;
}
function K8() {
}
function q8(e) {
  let t, n = e, o = K8;
  return kI && (t = /* @__PURE__ */ new Set(), n = new Proxy(e, {
    get(r, i) {
      return Nm && t.add(i), r[i];
    }
  }), o = (r, i) => {
    Array.from(t);
  }), {
    token: n,
    keys: t,
    flush: o
  };
}
const Y8 = dI(Yy), Uy = {
  token: Eh,
  hashed: !0
}, II = Symbol("DesignTokenContext"), Rm = $e(), G8 = (e) => {
  Bt(II, e), Ie(e, () => {
    Rm.value = _(e), EE(Rm);
  }, {
    immediate: !0,
    deep: !0
  });
}, U8 = be({
  props: {
    value: Mt()
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    return G8(E(() => e.value)), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
});
function cc() {
  const e = zt(II, E(() => Rm.value || Uy)), t = E(() => `${h8}-${e.value.hashed || ""}`), n = E(() => e.value.theme || Y8), o = LL(n, E(() => [Eh, e.value.token]), E(() => ({
    salt: t.value,
    override: O({
      override: e.value.token
    }, e.value.components),
    formatToken: H8
  })));
  return [n, E(() => o.value[0]), E(() => e.value.hashed ? o.value[1] : "")];
}
const Xy = be({
  compatConfig: {
    MODE: 3
  },
  setup() {
    const [, e] = cc(), t = E(() => new In(e.value.colorBgBase).toHsl().l < 0.5 ? {
      opacity: 0.65
    } : {});
    return () => h("svg", {
      style: t.value,
      width: "184",
      height: "152",
      viewBox: "0 0 184 152",
      xmlns: "http://www.w3.org/2000/svg"
    }, [h("g", {
      fill: "none",
      "fill-rule": "evenodd"
    }, [h("g", {
      transform: "translate(24 31.67)"
    }, [h("ellipse", {
      "fill-opacity": ".8",
      fill: "#F5F5F7",
      cx: "67.797",
      cy: "106.89",
      rx: "67.797",
      ry: "12.668"
    }, null), h("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), h("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), h("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), h("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)]), h("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), h("g", {
      transform: "translate(149.65 15.383)",
      fill: "#FFF"
    }, [h("ellipse", {
      cx: "20.654",
      cy: "3.167",
      rx: "2.849",
      ry: "2.815"
    }, null), h("path", {
      d: "M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"
    }, null)])])]);
  }
});
Xy.PRESENTED_IMAGE_DEFAULT = !0;
const TI = be({
  compatConfig: {
    MODE: 3
  },
  setup() {
    const [, e] = cc(), t = E(() => {
      const {
        colorFill: n,
        colorFillTertiary: o,
        colorFillQuaternary: r,
        colorBgContainer: i
      } = e.value;
      return {
        borderColor: new In(n).onBackground(i).toHexString(),
        shadowColor: new In(o).onBackground(i).toHexString(),
        contentColor: new In(r).onBackground(i).toHexString()
      };
    });
    return () => h("svg", {
      width: "64",
      height: "41",
      viewBox: "0 0 64 41",
      xmlns: "http://www.w3.org/2000/svg"
    }, [h("g", {
      transform: "translate(0 1)",
      fill: "none",
      "fill-rule": "evenodd"
    }, [h("ellipse", {
      fill: t.value.shadowColor,
      cx: "32",
      cy: "33",
      rx: "32",
      ry: "7"
    }, null), h("g", {
      "fill-rule": "nonzero",
      stroke: t.value.borderColor
    }, [h("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), h("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)])])]);
  }
});
TI.PRESENTED_IMAGE_SIMPLE = !0;
const X8 = (e) => {
  const {
    componentCls: t,
    margin: n,
    marginXS: o,
    marginXL: r,
    fontSize: i,
    lineHeight: a
  } = e;
  return {
    [t]: {
      marginInline: o,
      fontSize: i,
      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: r,
        color: e.colorTextDisabled,
        [`${t}-image`]: {
          height: e.emptyImgHeightMD
        }
      },
      "&-small": {
        marginBlock: o,
        color: e.colorTextDisabled,
        [`${t}-image`]: {
          height: e.emptyImgHeightSM
        }
      }
    }
  };
}, Q8 = On("Empty", (e) => {
  const {
    componentCls: t,
    controlHeightLG: n
  } = e, o = Qt(e, {
    emptyImgCls: `${t}-img`,
    emptyImgHeight: n * 2.5,
    emptyImgHeightMD: n,
    emptyImgHeightSM: n * 0.875
  });
  return [X8(o)];
});
var Z8 = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const J8 = () => ({
  prefixCls: String,
  imageStyle: Mt(),
  image: Tr(),
  description: Tr()
}), Qy = be({
  name: "AEmpty",
  compatConfig: {
    MODE: 3
  },
  inheritAttrs: !1,
  props: J8(),
  setup(e, t) {
    let {
      slots: n = {},
      attrs: o
    } = t;
    const {
      direction: r,
      prefixCls: i
    } = Nt("empty", e), [a, l] = Q8(i);
    return () => {
      var s, u;
      const c = i.value, d = O(O({}, e), o), {
        image: f = ((s = n.image) === null || s === void 0 ? void 0 : s.call(n)) || ko(Xy),
        description: p = ((u = n.description) === null || u === void 0 ? void 0 : u.call(n)) || void 0,
        imageStyle: v,
        class: g = ""
      } = d, m = Z8(d, ["image", "description", "imageStyle", "class"]), x = typeof f == "function" ? f() : f, S = typeof x == "object" && "type" in x && x.type.PRESENTED_IMAGE_SIMPLE;
      return a(h(Jk, {
        componentName: "Empty",
        children: (C) => {
          const P = typeof p < "u" ? p : C.description, $ = typeof P == "string" ? P : "empty";
          let I = null;
          return typeof x == "string" ? I = h("img", {
            alt: $,
            src: x
          }, null) : I = x, h("div", Q({
            class: Me(c, g, l.value, {
              [`${c}-normal`]: S,
              [`${c}-rtl`]: r.value === "rtl"
            })
          }, m), [h("div", {
            class: `${c}-image`,
            style: v
          }, [I]), P && h("p", {
            class: `${c}-description`
          }, [P]), n.default && h("div", {
            class: `${c}-footer`
          }, [Do(n.default())])]);
        }
      }, null));
    };
  }
});
Qy.PRESENTED_IMAGE_DEFAULT = () => ko(Xy);
Qy.PRESENTED_IMAGE_SIMPLE = () => ko(TI);
const fs = ii(Qy), Zy = (e) => {
  const {
    prefixCls: t
  } = Nt("empty", e);
  return ((o) => {
    switch (o) {
      case "Table":
      case "List":
        return h(fs, {
          image: fs.PRESENTED_IMAGE_SIMPLE
        }, null);
      case "Select":
      case "TreeSelect":
      case "Cascader":
      case "Transfer":
      case "Mentions":
        return h(fs, {
          image: fs.PRESENTED_IMAGE_SIMPLE,
          class: `${t.value}-small`
        }, null);
      default:
        return h(fs, null, null);
    }
  })(e.componentName);
};
function e6(e) {
  return h(Zy, {
    componentName: e
  }, null);
}
const _I = Symbol("SizeContextKey"), MI = () => zt(_I, le(void 0)), EI = (e) => {
  const t = MI();
  return Bt(_I, E(() => e.value || t.value)), e;
}, Nt = ((e, t) => {
  const n = MI(), o = _i(), r = zt(jy, O(O({}, Gk), {
    renderEmpty: (w) => ko(Zy, {
      componentName: w
    })
  })), i = E(() => r.getPrefixCls(e, t.prefixCls)), a = E(() => {
    var w, T;
    return (w = t.direction) !== null && w !== void 0 ? w : (T = r.direction) === null || T === void 0 ? void 0 : T.value;
  }), l = E(() => {
    var w;
    return (w = t.iconPrefixCls) !== null && w !== void 0 ? w : r.iconPrefixCls.value;
  }), s = E(() => r.getPrefixCls()), u = E(() => {
    var w;
    return (w = r.autoInsertSpaceInButton) === null || w === void 0 ? void 0 : w.value;
  }), c = r.renderEmpty, d = r.space, f = r.pageHeader, p = r.form, v = E(() => {
    var w, T;
    return (w = t.getTargetContainer) !== null && w !== void 0 ? w : (T = r.getTargetContainer) === null || T === void 0 ? void 0 : T.value;
  }), g = E(() => {
    var w, T, M;
    return (T = (w = t.getContainer) !== null && w !== void 0 ? w : t.getPopupContainer) !== null && T !== void 0 ? T : (M = r.getPopupContainer) === null || M === void 0 ? void 0 : M.value;
  }), m = E(() => {
    var w, T;
    return (w = t.dropdownMatchSelectWidth) !== null && w !== void 0 ? w : (T = r.dropdownMatchSelectWidth) === null || T === void 0 ? void 0 : T.value;
  }), x = E(() => {
    var w;
    return (t.virtual === void 0 ? ((w = r.virtual) === null || w === void 0 ? void 0 : w.value) !== !1 : t.virtual !== !1) && m.value !== !1;
  }), S = E(() => t.size || n.value), C = E(() => {
    var w, T, M;
    return (w = t.autocomplete) !== null && w !== void 0 ? w : (M = (T = r.input) === null || T === void 0 ? void 0 : T.value) === null || M === void 0 ? void 0 : M.autocomplete;
  }), P = E(() => {
    var w;
    return (w = t.disabled) !== null && w !== void 0 ? w : o.value;
  }), $ = E(() => {
    var w;
    return (w = t.csp) !== null && w !== void 0 ? w : r.csp;
  }), I = E(() => {
    var w, T;
    return (w = t.wave) !== null && w !== void 0 ? w : (T = r.wave) === null || T === void 0 ? void 0 : T.value;
  });
  return {
    configProvider: r,
    prefixCls: i,
    direction: a,
    size: S,
    getTargetContainer: v,
    getPopupContainer: g,
    space: d,
    pageHeader: f,
    form: p,
    autoInsertSpaceInButton: u,
    renderEmpty: c,
    virtual: x,
    dropdownMatchSelectWidth: m,
    rootPrefixCls: s,
    getPrefixCls: r.getPrefixCls,
    autocomplete: C,
    csp: $,
    iconPrefixCls: l,
    disabled: P,
    select: r.select,
    wave: I
  };
});
function Fn(e, t) {
  const n = O({}, e);
  for (let o = 0; o < t.length; o += 1) {
    const r = t[o];
    delete n[r];
  }
  return n;
}
function b1(e) {
  return typeof e == "object" && e != null && e.nodeType === 1;
}
function y1(e, t) {
  return (!t || e !== "hidden") && e !== "visible" && e !== "clip";
}
function Qg(e, t) {
  if (e.clientHeight < e.scrollHeight || e.clientWidth < e.scrollWidth) {
    var n = getComputedStyle(e, null);
    return y1(n.overflowY, t) || y1(n.overflowX, t) || (function(o) {
      var r = (function(i) {
        if (!i.ownerDocument || !i.ownerDocument.defaultView) return null;
        try {
          return i.ownerDocument.defaultView.frameElement;
        } catch {
          return null;
        }
      })(o);
      return !!r && (r.clientHeight < o.scrollHeight || r.clientWidth < o.scrollWidth);
    })(e);
  }
  return !1;
}
function xf(e, t, n, o, r, i, a, l) {
  return i < e && a > t || i > e && a < t ? 0 : i <= e && l <= n || a >= t && l >= n ? i - e - o : a > t && l < n || i < e && l > n ? a - t + r : 0;
}
var x1 = function(e, t) {
  var n = window, o = t.scrollMode, r = t.block, i = t.inline, a = t.boundary, l = t.skipOverflowHiddenElements, s = typeof a == "function" ? a : function(Ke) {
    return Ke !== a;
  };
  if (!b1(e)) throw new TypeError("Invalid target");
  for (var u, c, d = document.scrollingElement || document.documentElement, f = [], p = e; b1(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 && Qg(p) && !Qg(document.documentElement) || p != null && Qg(p, l) && f.push(p);
  }
  for (var v = n.visualViewport ? n.visualViewport.width : innerWidth, g = n.visualViewport ? n.visualViewport.height : innerHeight, m = window.scrollX || pageXOffset, x = window.scrollY || pageYOffset, S = e.getBoundingClientRect(), C = S.height, P = S.width, $ = S.top, I = S.right, w = S.bottom, T = S.left, M = r === "start" || r === "nearest" ? $ : r === "end" ? w : $ + C / 2, R = i === "center" ? T + P / 2 : i === "end" ? I : T, N = [], H = 0; H < f.length; H++) {
    var L = f[H], F = L.getBoundingClientRect(), A = F.height, G = F.width, j = F.top, Z = F.right, W = F.bottom, K = F.left;
    if (o === "if-needed" && $ >= 0 && T >= 0 && w <= g && I <= v && $ >= j && w <= W && T >= K && I <= Z) return N;
    var q = getComputedStyle(L), U = parseInt(q.borderLeftWidth, 10), ae = parseInt(q.borderTopWidth, 10), se = parseInt(q.borderRightWidth, 10), ie = parseInt(q.borderBottomWidth, 10), re = 0, te = 0, ve = "offsetWidth" in L ? L.offsetWidth - L.clientWidth - U - se : 0, ce = "offsetHeight" in L ? L.offsetHeight - L.clientHeight - ae - ie : 0, fe = "offsetWidth" in L ? L.offsetWidth === 0 ? 0 : G / L.offsetWidth : 0, ge = "offsetHeight" in L ? L.offsetHeight === 0 ? 0 : A / L.offsetHeight : 0;
    if (d === L) re = r === "start" ? M : r === "end" ? M - g : r === "nearest" ? xf(x, x + g, g, ae, ie, x + M, x + M + C, C) : M - g / 2, te = i === "start" ? R : i === "center" ? R - v / 2 : i === "end" ? R - v : xf(m, m + v, v, U, se, m + R, m + R + P, P), re = Math.max(0, re + x), te = Math.max(0, te + m);
    else {
      re = r === "start" ? M - j - ae : r === "end" ? M - W + ie + ce : r === "nearest" ? xf(j, W, A, ae, ie + ce, M, M + C, C) : M - (j + A / 2) + ce / 2, te = i === "start" ? R - K - U : i === "center" ? R - (K + G / 2) + ve / 2 : i === "end" ? R - Z + se + ve : xf(K, Z, G, U, se + ve, R, R + P, P);
      var Te = L.scrollLeft, ze = L.scrollTop;
      M += ze - (re = Math.max(0, Math.min(ze + re / ge, L.scrollHeight - A / ge + ce))), R += Te - (te = Math.max(0, Math.min(Te + te / fe, L.scrollWidth - G / fe + ve)));
    }
    N.push({ el: L, top: re, left: te });
  }
  return N;
};
function DI(e) {
  return e === Object(e) && Object.keys(e).length !== 0;
}
function t6(e, t) {
  t === void 0 && (t = "auto");
  var n = "scrollBehavior" in document.body.style;
  e.forEach(function(o) {
    var r = o.el, i = o.top, a = o.left;
    r.scroll && n ? r.scroll({
      top: i,
      left: a,
      behavior: t
    }) : (r.scrollTop = i, r.scrollLeft = a);
  });
}
function n6(e) {
  return e === !1 ? {
    block: "end",
    inline: "nearest"
  } : DI(e) ? e : {
    block: "start",
    inline: "nearest"
  };
}
function o6(e, t) {
  var n = e.isConnected || e.ownerDocument.documentElement.contains(e);
  if (DI(t) && typeof t.behavior == "function")
    return t.behavior(n ? x1(e, t) : []);
  if (n) {
    var o = n6(t);
    return t6(x1(e, o), o.behavior);
  }
}
function r6(e, t, n, o) {
  const r = n - t;
  return e /= o / 2, e < 1 ? r / 2 * e * e * e + t : r / 2 * ((e -= 2) * e * e + 2) + t;
}
function zm(e) {
  return e != null && e === e.window;
}
function i6(e, t) {
  var n, o;
  if (typeof window > "u")
    return 0;
  const r = "scrollTop";
  let i = 0;
  return zm(e) ? i = e.scrollY : e instanceof Document ? i = e.documentElement[r] : (e instanceof HTMLElement || e) && (i = e[r]), e && !zm(e) && typeof i != "number" && (i = (o = ((n = e.ownerDocument) !== null && n !== void 0 ? n : e).documentElement) === null || o === void 0 ? void 0 : o[r]), i;
}
function a6(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  const {
    getContainer: n = () => window,
    callback: o,
    duration: r = 450
  } = t, i = n(), a = i6(i), l = Date.now(), s = () => {
    const c = Date.now() - l, d = r6(c > r ? r : c, a, e, r);
    zm(i) ? i.scrollTo(window.scrollX, d) : i instanceof Document ? i.documentElement.scrollTop = d : i.scrollTop = d, c < r ? Vt(s) : typeof o == "function" && o();
  };
  Vt(s);
}
function l6(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 AI(e, t, n) {
  return n && l6(e, n), e;
}
function tp() {
  return (tp = 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 NI(e, t) {
  e.prototype = Object.create(t.prototype), e.prototype.constructor = e, e.__proto__ = t;
}
function RI(e, t) {
  if (e == null) return {};
  var n, o, r = {}, i = Object.keys(e);
  for (o = 0; o < i.length; o++) t.indexOf(n = i[o]) >= 0 || (r[n] = e[n]);
  return r;
}
function w1(e) {
  return ((t = e) != null && typeof t == "object" && Array.isArray(t) === !1) == 1 && Object.prototype.toString.call(e) === "[object Object]";
  var t;
}
var zI = Object.prototype, FI = zI.toString, s6 = zI.hasOwnProperty, BI = /^\s*function (\w+)/;
function S1(e) {
  var t, n = (t = e?.type) !== null && t !== void 0 ? t : e;
  if (n) {
    var o = n.toString().match(BI);
    return o ? o[1] : "";
  }
  return "";
}
var Ts = function(e) {
  var t, n;
  return w1(e) !== !1 && typeof (t = e.constructor) == "function" && w1(n = t.prototype) !== !1 && n.hasOwnProperty("isPrototypeOf") !== !1;
}, LI = function(e) {
  return e;
}, xr = LI;
if (process.env.NODE_ENV !== "production") {
  var u6 = typeof console < "u";
  xr = u6 ? function(e) {
    console.warn("[VueTypes warn]: " + e);
  } : LI;
}
var bd = function(e, t) {
  return s6.call(e, t);
}, c6 = Number.isInteger || function(e) {
  return typeof e == "number" && isFinite(e) && Math.floor(e) === e;
}, Gu = Array.isArray || function(e) {
  return FI.call(e) === "[object Array]";
}, Uu = function(e) {
  return FI.call(e) === "[object Function]";
}, Ap = function(e) {
  return Ts(e) && bd(e, "_vueTypes_name");
}, HI = function(e) {
  return Ts(e) && (bd(e, "type") || ["_vueTypes_name", "validator", "default", "required"].some(function(t) {
    return bd(e, t);
  }));
};
function Jy(e, t) {
  return Object.defineProperty(e.bind(t), "__original", { value: e });
}
function Fs(e, t, n) {
  var o, r = !0, i = "";
  o = Ts(e) ? e : { type: e };
  var a = Ap(o) ? o._vueTypes_name + " - " : "";
  if (HI(o) && o.type !== null) {
    if (o.type === void 0 || o.type === !0 || !o.required && t === void 0) return r;
    Gu(o.type) ? (r = o.type.some(function(d) {
      return Fs(d, t) === !0;
    }), i = o.type.map(function(d) {
      return S1(d);
    }).join(" or ")) : r = (i = S1(o)) === "Array" ? Gu(t) : i === "Object" ? Ts(t) : i === "String" || i === "Number" || i === "Boolean" || i === "Function" ? (function(d) {
      if (d == null) return "";
      var f = d.constructor.toString().match(BI);
      return f ? f[1] : "";
    })(t) === i : t instanceof o.type;
  }
  if (!r) {
    var l = a + 'value "' + t + '" should be of type "' + i + '"';
    return l;
  }
  if (bd(o, "validator") && Uu(o.validator)) {
    var s = xr, u = [];
    if (xr = function(d) {
      u.push(d);
    }, r = o.validator(t), xr = s, !r) {
      var c = (u.length > 1 ? "* " : "") + u.join(`
* `);
      return u.length = 0, c;
    }
  }
  return r;
}
function Ar(e, t) {
  var n = Object.defineProperties(t, { _vueTypes_name: { value: e, writable: !0 }, isRequired: { get: function() {
    return this.required = !0, this;
  } }, def: { value: function(r) {
    return r !== void 0 || this.default ? Uu(r) || Fs(this, r) === !0 ? (this.default = Gu(r) ? function() {
      return [].concat(r);
    } : Ts(r) ? function() {
      return Object.assign({}, r);
    } : r, this) : (xr(this._vueTypes_name + ' - invalid default value: "' + r + '"'), this) : this;
  } } }), o = n.validator;
  return Uu(o) && (n.validator = Jy(o, n)), n;
}
function na(e, t) {
  var n = Ar(e, t);
  return Object.defineProperty(n, "validate", { value: function(o) {
    return Uu(this.validator) && xr(this._vueTypes_name + ` - calling .validate() will overwrite the current custom validator function. Validator info:
` + JSON.stringify(this)), this.validator = Jy(o, this), this;
  } });
}
function C1(e, t, n) {
  var o, r, i = (o = t, r = {}, Object.getOwnPropertyNames(o).forEach(function(d) {
    r[d] = Object.getOwnPropertyDescriptor(o, d);
  }), Object.defineProperties({}, r));
  if (i._vueTypes_name = e, !Ts(n)) return i;
  var a, l, s = n.validator, u = RI(n, ["validator"]);
  if (Uu(s)) {
    var c = i.validator;
    c && (c = (l = (a = c).__original) !== null && l !== void 0 ? l : a), i.validator = Jy(c ? function(d) {
      return c.call(this, d) && s.call(this, d);
    } : s, i);
  }
  return Object.assign(i, u);
}
function Dh(e) {
  return e.replace(/^(?!\s*$)/gm, "  ");
}
var d6 = function() {
  return na("any", {});
}, f6 = function() {
  return na("function", { type: Function });
}, p6 = function() {
  return na("boolean", { type: Boolean });
}, h6 = function() {
  return na("string", { type: String });
}, g6 = function() {
  return na("number", { type: Number });
}, v6 = function() {
  return na("array", { type: Array });
}, m6 = function() {
  return na("object", { type: Object });
}, b6 = function() {
  return Ar("integer", { type: Number, validator: function(e) {
    return c6(e);
  } });
}, y6 = function() {
  return Ar("symbol", { validator: function(e) {
    return typeof e == "symbol";
  } });
};
function x6(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 Ar(e.name || "<<anonymous function>>", { validator: function(n) {
    var o = e(n);
    return o || xr(this._vueTypes_name + " - " + t), o;
  } });
}
function w6(e) {
  if (!Gu(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, r) {
    if (r != null) {
      var i = r.constructor;
      o.indexOf(i) === -1 && o.push(i);
    }
    return o;
  }, []);
  return Ar("oneOf", { type: n.length > 0 ? n : void 0, validator: function(o) {
    var r = e.indexOf(o) !== -1;
    return r || xr(t), r;
  } });
}
function S6(e) {
  if (!Gu(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 r = e[o];
    if (HI(r)) {
      if (Ap(r) && r._vueTypes_name === "oneOf") {
        n = n.concat(r.type);
        continue;
      }
      if (Uu(r.validator) && (t = !0), r.type !== !0 && r.type) {
        n = n.concat(r.type);
        continue;
      }
    }
    n.push(r);
  }
  return n = n.filter(function(i, a) {
    return n.indexOf(i) === a;
  }), Ar("oneOfType", t ? { type: n, validator: function(i) {
    var a = [], l = e.some(function(s) {
      var u = Fs(Ap(s) && s._vueTypes_name === "oneOf" ? s.type || null : s, i);
      return typeof u == "string" && a.push(u), u === !0;
    });
    return l || xr("oneOfType - provided value does not match any of the " + a.length + ` passed-in validators:
` + Dh(a.join(`
`))), l;
  } } : { type: n });
}
function C6(e) {
  return Ar("arrayOf", { type: Array, validator: function(t) {
    var n, o = t.every(function(r) {
      return (n = Fs(e, r)) === !0;
    });
    return o || xr(`arrayOf - value validation error:
` + Dh(n)), o;
  } });
}
function $6(e) {
  return Ar("instanceOf", { type: e });
}
function P6(e) {
  return Ar("objectOf", { type: Object, validator: function(t) {
    var n, o = Object.keys(t).every(function(r) {
      return (n = Fs(e, t[r])) === !0;
    });
    return o || xr(`objectOf - value validation error:
` + Dh(n)), o;
  } });
}
function O6(e) {
  var t = Object.keys(e), n = t.filter(function(r) {
    var i;
    return !!(!((i = e[r]) === null || i === void 0) && i.required);
  }), o = Ar("shape", { type: Object, validator: function(r) {
    var i = this;
    if (!Ts(r)) return !1;
    var a = Object.keys(r);
    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 xr(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 i._vueTypes_isLoose === !0 || (xr('shape - shape definition does not include a "' + s + '" property. Allowed keys: "' + t.join('", "') + '".'), !1);
      var u = Fs(e[s], r[s]);
      return typeof u == "string" && xr('shape - "' + s + `" property validation error:
 ` + Dh(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 Wi = (function() {
  function e() {
  }
  return e.extend = function(t) {
    var n = this;
    if (Gu(t)) return t.forEach(function(d) {
      return n.extend(d);
    }), this;
    var o = t.name, r = t.validate, i = r !== void 0 && r, a = t.getter, l = a !== void 0 && a, s = RI(t, ["name", "validate", "getter"]);
    if (bd(this, o)) throw new TypeError('[VueTypes error]: Type "' + o + '" already defined');
    var u, c = s.type;
    return Ap(c) ? (delete s.type, Object.defineProperty(this, o, l ? { get: function() {
      return C1(o, c, s);
    } } : { value: function() {
      var d, f = C1(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 i ? na(o, d) : Ar(o, d);
    }, enumerable: !0 } : { value: function() {
      var d, f, p = Object.assign({}, s);
      return d = i ? na(o, p) : Ar(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));
  }, AI(e, null, [{ key: "any", get: function() {
    return d6();
  } }, { key: "func", get: function() {
    return f6().def(this.defaults.func);
  } }, { key: "bool", get: function() {
    return p6().def(this.defaults.bool);
  } }, { key: "string", get: function() {
    return h6().def(this.defaults.string);
  } }, { key: "number", get: function() {
    return g6().def(this.defaults.number);
  } }, { key: "array", get: function() {
    return v6().def(this.defaults.array);
  } }, { key: "object", get: function() {
    return m6().def(this.defaults.object);
  } }, { key: "integer", get: function() {
    return b6().def(this.defaults.integer);
  } }, { key: "symbol", get: function() {
    return y6();
  } }]), e;
})();
function VI(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 NI(o, n), AI(o, null, [{ key: "sensibleDefaults", get: function() {
      return tp({}, this.defaults);
    }, set: function(r) {
      this.defaults = r !== !1 ? tp({}, r !== !0 ? r : e) : {};
    } }]), o;
  })(Wi)).defaults = tp({}, e), t;
}
Wi.defaults = {}, Wi.custom = x6, Wi.oneOf = w6, Wi.instanceOf = $6, Wi.oneOfType = S6, Wi.arrayOf = C6, Wi.objectOf = P6, Wi.shape = O6, Wi.utils = { validate: function(e, t) {
  return Fs(t, e) === !0;
}, toType: function(e, t, n) {
  return n === void 0 && (n = !1), n ? na(e, t) : Ar(e, t);
} };
(function(e) {
  function t() {
    return e.apply(this, arguments) || this;
  }
  return NI(t, e), t;
})(VI());
const pe = VI({
  func: void 0,
  bool: void 0,
  string: void 0,
  number: void 0,
  array: void 0,
  object: void 0,
  integer: void 0
});
pe.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 k6(e) {
  return e.default = void 0, e;
}
const dn = ((e, t, n) => {
  mr(e, `[ant-design-vue: ${t}] ${n}`);
});
function $1(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 jI(e, t) {
  const {
    label: n,
    value: o,
    options: r
  } = e || {};
  return {
    label: n || (t ? "children" : "label"),
    value: o || "value",
    options: r || "options"
  };
}
function I6(e) {
  let {
    fieldNames: t,
    childrenAsData: n
  } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  const o = [], {
    label: r,
    value: i,
    options: a
  } = jI(t, !1);
  function l(s, u) {
    s.forEach((c) => {
      const d = c[r];
      if (u || !(a in c)) {
        const f = c[i];
        o.push({
          key: $1(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: $1(c, o.length),
          group: !0,
          data: c,
          label: f
        }), l(c[a], !0);
      }
    });
  }
  return l(e, !1), o;
}
function Fm(e) {
  const t = O({}, e);
  return "props" in t || Object.defineProperty(t, "props", {
    get() {
      return wn(!1, "Return type is option instead of Option instance. Please read value directly instead of reading from `props`."), t;
    }
  }), t;
}
function T6(e, t) {
  if (!t || !t.length)
    return null;
  let n = !1;
  function o(i, a) {
    let [l, ...s] = a;
    if (!l)
      return [i];
    const u = i.split(l);
    return n = n || u.length > 1, u.reduce((c, d) => [...c, ...o(d, s)], []).filter((c) => c);
  }
  const r = o(e, t);
  return n ? r : null;
}
function _6() {
  return "";
}
function M6(e) {
  return e ? e.ownerDocument : window.document;
}
function WI() {
}
const E6 = () => ({
  action: pe.oneOfType([pe.string, pe.arrayOf(pe.string)]).def([]),
  showAction: pe.any.def([]),
  hideAction: pe.any.def([]),
  getPopupClassNameFromAlign: pe.any.def(_6),
  onPopupVisibleChange: Function,
  afterPopupVisibleChange: pe.func.def(WI),
  popup: pe.any,
  arrow: pe.bool.def(!0),
  popupStyle: {
    type: Object,
    default: void 0
  },
  prefixCls: pe.string.def("rc-trigger-popup"),
  popupClassName: pe.string.def(""),
  popupPlacement: String,
  builtinPlacements: pe.object,
  popupTransitionName: String,
  popupAnimation: pe.any,
  mouseEnterDelay: pe.number.def(0),
  mouseLeaveDelay: pe.number.def(0.1),
  zIndex: Number,
  focusDelay: pe.number.def(0),
  blurDelay: pe.number.def(0.15),
  getPopupContainer: Function,
  getDocument: pe.func.def(M6),
  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: pe.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
}), e0 = {
  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
  }
}, D6 = O(O({}, e0), {
  mobile: {
    type: Object
  }
}), A6 = O(O({}, e0), {
  mask: Boolean,
  mobile: {
    type: Object
  },
  maskAnimation: String,
  maskTransitionName: String
});
function t0(e) {
  let {
    prefixCls: t,
    animation: n,
    transitionName: o
  } = e;
  return n ? {
    name: `${t}-${n}`
  } : o ? {
    name: o
  } : {};
}
function KI(e) {
  const {
    prefixCls: t,
    visible: n,
    zIndex: o,
    mask: r,
    maskAnimation: i,
    maskTransitionName: a
  } = e;
  if (!r)
    return null;
  let l = {};
  return (a || i) && (l = t0({
    prefixCls: t,
    transitionName: a,
    animation: i
  })), h(Dr, Q({
    appear: !0
  }, l), {
    default: () => [ti(h("div", {
      style: {
        zIndex: o
      },
      class: `${t}-mask`
    }, null), [[DE("if"), n]])]
  });
}
KI.displayName = "Mask";
const N6 = be({
  compatConfig: {
    MODE: 3
  },
  name: "MobilePopupInner",
  inheritAttrs: !1,
  props: D6,
  emits: ["mouseenter", "mouseleave", "mousedown", "touchstart", "align"],
  setup(e, t) {
    let {
      expose: n,
      slots: o
    } = t;
    const r = le();
    return n({
      forceAlign: () => {
      },
      getElement: () => r.value
    }), () => {
      var i;
      const {
        zIndex: a,
        visible: l,
        prefixCls: s,
        mobile: {
          popupClassName: u,
          popupStyle: c,
          popupMotion: d = {},
          popupRender: f
        } = {}
      } = e, p = O({
        zIndex: a
      }, c);
      let v = go((i = o.default) === null || i === void 0 ? void 0 : i.call(o));
      v.length > 1 && (v = h("div", {
        class: `${s}-content`
      }, [v])), f && (v = f(v));
      const g = Me(s, u);
      return h(Dr, Q({
        ref: r
      }, d), {
        default: () => [l ? h("div", {
          class: g,
          style: p
        }, [v]) : null]
      });
    };
  }
});
var R6 = function(e, t, n, o) {
  function r(i) {
    return i instanceof n ? i : new n(function(a) {
      a(i);
    });
  }
  return new (n || (n = Promise))(function(i, 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 ? i(c.value) : r(c.value).then(l, s);
    }
    u((o = o.apply(e, t || [])).next());
  });
};
const P1 = ["measure", "align", null, "motion"], z6 = ((e, t) => {
  const n = $e(null), o = $e(), r = $e(!1);
  function i(s) {
    r.value || (n.value = s);
  }
  function a() {
    Vt.cancel(o.value);
  }
  function l(s) {
    a(), o.value = Vt(() => {
      let u = n.value;
      switch (n.value) {
        case "align":
          u = "motion";
          break;
        case "motion":
          u = "stable";
          break;
      }
      i(u), s?.();
    });
  }
  return Ie(e, () => {
    i("measure");
  }, {
    immediate: !0,
    flush: "post"
  }), At(() => {
    Ie(n, () => {
      switch (n.value) {
        case "measure":
          t();
          break;
      }
      n.value && (o.value = Vt(() => R6(void 0, void 0, void 0, function* () {
        const s = P1.indexOf(n.value), u = P1[s + 1];
        u && s !== -1 && i(u);
      })));
    }, {
      immediate: !0,
      flush: "post"
    });
  }), qt(() => {
    r.value = !0, a();
  }), [n, l];
}), F6 = ((e) => {
  const t = $e({
    width: 0,
    height: 0
  });
  function n(r) {
    t.value = {
      width: r.offsetWidth,
      height: r.offsetHeight
    };
  }
  return [E(() => {
    const r = {};
    if (e.value) {
      const {
        width: i,
        height: a
      } = t.value;
      e.value.indexOf("height") !== -1 && a ? r.height = `${a}px` : e.value.indexOf("minHeight") !== -1 && a && (r.minHeight = `${a}px`), e.value.indexOf("width") !== -1 && i ? r.width = `${i}px` : e.value.indexOf("minWidth") !== -1 && i && (r.minWidth = `${i}px`);
    }
    return r;
  }), n];
});
function O1(e, t) {
  var n = Object.keys(e);
  if (Object.getOwnPropertySymbols) {
    var o = Object.getOwnPropertySymbols(e);
    t && (o = o.filter(function(r) {
      return Object.getOwnPropertyDescriptor(e, r).enumerable;
    })), n.push.apply(n, o);
  }
  return n;
}
function k1(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? arguments[t] : {};
    t % 2 ? O1(Object(n), !0).forEach(function(o) {
      B6(e, o, n[o]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : O1(Object(n)).forEach(function(o) {
      Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(n, o));
    });
  }
  return e;
}
function Bm(e) {
  "@babel/helpers - typeof";
  return Bm = 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;
  }, Bm(e);
}
function B6(e, t, n) {
  return t in e ? Object.defineProperty(e, t, {
    value: n,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : e[t] = n, e;
}
var _c, L6 = {
  Webkit: "-webkit-",
  Moz: "-moz-",
  // IE did it wrong again ...
  ms: "-ms-",
  O: "-o-"
};
function Np() {
  if (_c !== void 0)
    return _c;
  _c = "";
  var e = document.createElement("p").style, t = "Transform";
  for (var n in L6)
    n + t in e && (_c = n);
  return _c;
}
function qI() {
  return Np() ? "".concat(Np(), "TransitionProperty") : "transitionProperty";
}
function Ah() {
  return Np() ? "".concat(Np(), "Transform") : "transform";
}
function I1(e, t) {
  var n = qI();
  n && (e.style[n] = t, n !== "transitionProperty" && (e.style.transitionProperty = t));
}
function Zg(e, t) {
  var n = Ah();
  n && (e.style[n] = t, n !== "transform" && (e.style.transform = t));
}
function H6(e) {
  return e.style.transitionProperty || e.style[qI()];
}
function V6(e) {
  var t = window.getComputedStyle(e, null), n = t.getPropertyValue("transform") || t.getPropertyValue(Ah());
  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 j6 = /matrix\((.*)\)/, W6 = /matrix3d\((.*)\)/;
function K6(e, t) {
  var n = window.getComputedStyle(e, null), o = n.getPropertyValue("transform") || n.getPropertyValue(Ah());
  if (o && o !== "none") {
    var r, i = o.match(j6);
    if (i)
      i = i[1], r = i.split(",").map(function(l) {
        return parseFloat(l, 10);
      }), r[4] = t.x, r[5] = t.y, Zg(e, "matrix(".concat(r.join(","), ")"));
    else {
      var a = o.match(W6)[1];
      r = a.split(",").map(function(l) {
        return parseFloat(l, 10);
      }), r[12] = t.x, r[13] = t.y, Zg(e, "matrix3d(".concat(r.join(","), ")"));
    }
  } else
    Zg(e, "translateX(".concat(t.x, "px) translateY(").concat(t.y, "px) translateZ(0)"));
}
var q6 = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source, Ed;
function T1(e) {
  var t = e.style.display;
  e.style.display = "none", e.offsetHeight, e.style.display = t;
}
function Tu(e, t, n) {
  var o = n;
  if (Bm(t) === "object") {
    for (var r in t)
      t.hasOwnProperty(r) && Tu(e, r, t[r]);
    return;
  }
  if (typeof o < "u") {
    typeof o == "number" && (o = "".concat(o, "px")), e.style[t] = o;
    return;
  }
  return Ed(e, t);
}
function Y6(e) {
  var t, n, o, r = e.ownerDocument, i = r.body, a = r && r.documentElement;
  return t = e.getBoundingClientRect(), n = Math.floor(t.left), o = Math.floor(t.top), n -= a.clientLeft || i.clientLeft || 0, o -= a.clientTop || i.clientTop || 0, {
    left: n,
    top: o
  };
}
function YI(e, t) {
  var n = e["page".concat(t ? "Y" : "X", "Offset")], o = "scroll".concat(t ? "Top" : "Left");
  if (typeof n != "number") {
    var r = e.document;
    n = r.documentElement[o], typeof n != "number" && (n = r.body[o]);
  }
  return n;
}
function GI(e) {
  return YI(e);
}
function UI(e) {
  return YI(e, !0);
}
function yd(e) {
  var t = Y6(e), n = e.ownerDocument, o = n.defaultView || n.parentWindow;
  return t.left += GI(o), t.top += UI(o), t;
}
function n0(e) {
  return e != null && e == e.window;
}
function XI(e) {
  return n0(e) ? e.document : e.nodeType === 9 ? e : e.ownerDocument;
}
function G6(e, t, n) {
  var o = n, r = "", i = XI(e);
  return o = o || i.defaultView.getComputedStyle(e, null), o && (r = o.getPropertyValue(t) || o[t]), r;
}
var U6 = new RegExp("^(".concat(q6, ")(?!px)[a-z%]+$"), "i"), X6 = /^(top|right|bottom|left)$/, Jg = "currentStyle", ev = "runtimeStyle", Zl = "left", Q6 = "px";
function Z6(e, t) {
  var n = e[Jg] && e[Jg][t];
  if (U6.test(n) && !X6.test(t)) {
    var o = e.style, r = o[Zl], i = e[ev][Zl];
    e[ev][Zl] = e[Jg][Zl], o[Zl] = t === "fontSize" ? "1em" : n || 0, n = o.pixelLeft + Q6, o[Zl] = r, e[ev][Zl] = i;
  }
  return n === "" ? "auto" : n;
}
typeof window < "u" && (Ed = window.getComputedStyle ? G6 : Z6);
function wf(e, t) {
  return e === "left" ? t.useCssRight ? "right" : e : t.useCssBottom ? "bottom" : e;
}
function _1(e) {
  if (e === "left")
    return "right";
  if (e === "right")
    return "left";
  if (e === "top")
    return "bottom";
  if (e === "bottom")
    return "top";
}
function M1(e, t, n) {
  Tu(e, "position") === "static" && (e.style.position = "relative");
  var o = -999, r = -999, i = wf("left", n), a = wf("top", n), l = _1(i), s = _1(a);
  i !== "left" && (o = 999), a !== "top" && (r = 999);
  var u = "", c = yd(e);
  ("left" in t || "top" in t) && (u = H6(e) || "", I1(e, "none")), "left" in t && (e.style[l] = "", e.style[i] = "".concat(o, "px")), "top" in t && (e.style[s] = "", e.style[a] = "".concat(r, "px")), T1(e);
  var d = yd(e), f = {};
  for (var p in t)
    if (t.hasOwnProperty(p)) {
      var v = wf(p, n), g = p === "left" ? o : r, m = c[p] - d[p];
      v === p ? f[v] = g + m : f[v] = g - m;
    }
  Tu(e, f), T1(e), ("left" in t || "top" in t) && I1(e, u);
  var x = {};
  for (var S in t)
    if (t.hasOwnProperty(S)) {
      var C = wf(S, n), P = t[S] - c[S];
      S === C ? x[C] = f[C] + P : x[C] = f[C] - P;
    }
  Tu(e, x);
}
function J6(e, t) {
  var n = yd(e), o = V6(e), r = {
    x: o.x,
    y: o.y
  };
  "left" in t && (r.x = o.x + t.left - n.left), "top" in t && (r.y = o.y + t.top - n.top), K6(e, r);
}
function e5(e, t, n) {
  if (n.ignoreShake) {
    var o = yd(e), r = o.left.toFixed(0), i = o.top.toFixed(0), a = t.left.toFixed(0), l = t.top.toFixed(0);
    if (r === a && i === l)
      return;
  }
  n.useCssRight || n.useCssBottom ? M1(e, t, n) : n.useCssTransform && Ah() in document.body.style ? J6(e, t) : M1(e, t, n);
}
function o0(e, t) {
  for (var n = 0; n < e.length; n++)
    t(e[n]);
}
function QI(e) {
  return Ed(e, "boxSizing") === "border-box";
}
var t5 = ["margin", "border", "padding"], Lm = -1, n5 = 2, Hm = 1, o5 = 0;
function r5(e, t, n) {
  var o = {}, r = e.style, i;
  for (i in t)
    t.hasOwnProperty(i) && (o[i] = r[i], r[i] = t[i]);
  n.call(e);
  for (i in t)
    t.hasOwnProperty(i) && (r[i] = o[i]);
}
function Lc(e, t, n) {
  var o = 0, r, i, a;
  for (i = 0; i < t.length; i++)
    if (r = t[i], r)
      for (a = 0; a < n.length; a++) {
        var l = void 0;
        r === "border" ? l = "".concat(r).concat(n[a], "Width") : l = r + n[a], o += parseFloat(Ed(e, l)) || 0;
      }
  return o;
}
var Zi = {
  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;
  }
};
o0(["Width", "Height"], function(e) {
  Zi["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)],
      Zi["viewport".concat(e)](n)
    );
  }, Zi["viewport".concat(e)] = function(t) {
    var n = "client".concat(e), o = t.document, r = o.body, i = o.documentElement, a = i[n];
    return o.compatMode === "CSS1Compat" && a || r && r[n] || a;
  };
});
function E1(e, t, n) {
  var o = n;
  if (n0(e))
    return t === "width" ? Zi.viewportWidth(e) : Zi.viewportHeight(e);
  if (e.nodeType === 9)
    return t === "width" ? Zi.docWidth(e) : Zi.docHeight(e);
  var r = t === "width" ? ["Left", "Right"] : ["Top", "Bottom"], i = Math.floor(t === "width" ? e.getBoundingClientRect().width : e.getBoundingClientRect().height), a = QI(e), l = 0;
  (i == null || i <= 0) && (i = void 0, l = Ed(e, t), (l == null || Number(l) < 0) && (l = e.style[t] || 0), l = Math.floor(parseFloat(l)) || 0), o === void 0 && (o = a ? Hm : Lm);
  var s = i !== void 0 || a, u = i || l;
  return o === Lm ? s ? u - Lc(e, ["border", "padding"], r) : l : s ? o === Hm ? u : u + (o === n5 ? -Lc(e, ["border"], r) : Lc(e, ["margin"], r)) : l + Lc(e, t5.slice(o), r);
}
var i5 = {
  position: "absolute",
  visibility: "hidden",
  display: "block"
};
function D1() {
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
    t[n] = arguments[n];
  var o, r = t[0];
  return r.offsetWidth !== 0 ? o = E1.apply(void 0, t) : r5(r, i5, function() {
    o = E1.apply(void 0, t);
  }), o;
}
o0(["width", "height"], function(e) {
  var t = e.charAt(0).toUpperCase() + e.slice(1);
  Zi["outer".concat(t)] = function(o, r) {
    return o && D1(o, e, r ? o5 : Hm);
  };
  var n = e === "width" ? ["Left", "Right"] : ["Top", "Bottom"];
  Zi[e] = function(o, r) {
    var i = r;
    if (i !== void 0) {
      if (o) {
        var a = QI(o);
        return a && (i += Lc(o, ["padding", "border"], n)), Tu(o, e, i);
      }
      return;
    }
    return o && D1(o, e, Lm);
  };
});
function ZI(e, t) {
  for (var n in t)
    t.hasOwnProperty(n) && (e[n] = t[n]);
  return e;
}
var Jt = {
  getWindow: function(t) {
    if (t && t.document && t.setTimeout)
      return t;
    var n = t.ownerDocument || t;
    return n.defaultView || n.parentWindow;
  },
  getDocument: XI,
  offset: function(t, n, o) {
    if (typeof n < "u")
      e5(t, n, o || {});
    else
      return yd(t);
  },
  isWindow: n0,
  each: o0,
  css: Tu,
  clone: function(t) {
    var n, o = {};
    for (n in t)
      t.hasOwnProperty(n) && (o[n] = t[n]);
    var r = t.overflow;
    if (r)
      for (n in t)
        t.hasOwnProperty(n) && (o.overflow[n] = t.overflow[n]);
    return o;
  },
  mix: ZI,
  getWindowScrollLeft: function(t) {
    return GI(t);
  },
  getWindowScrollTop: function(t) {
    return UI(t);
  },
  merge: function() {
    for (var t = {}, n = 0; n < arguments.length; n++)
      Jt.mix(t, n < 0 || arguments.length <= n ? void 0 : arguments[n]);
    return t;
  },
  viewportWidth: 0,
  viewportHeight: 0
};
ZI(Jt, Zi);
var tv = Jt.getParent;
function Vm(e) {
  if (Jt.isWindow(e) || e.nodeType === 9)
    return null;
  var t = Jt.getDocument(e), n = t.body, o, r = Jt.css(e, "position"), i = r === "fixed" || r === "absolute";
  if (!i)
    return e.nodeName.toLowerCase() === "html" ? null : tv(e);
  for (o = tv(e); o && o !== n && o.nodeType !== 9; o = tv(o))
    if (r = Jt.css(o, "position"), r !== "static")
      return o;
  return null;
}
var A1 = Jt.getParent;
function a5(e) {
  if (Jt.isWindow(e) || e.nodeType === 9)
    return !1;
  var t = Jt.getDocument(e), n = t.body, o = null;
  for (
    o = A1(e);
    // 修复元素位于 document.documentElement 下导致崩溃问题
    o && o !== n && o !== t;
    o = A1(o)
  ) {
    var r = Jt.css(o, "position");
    if (r === "fixed")
      return !0;
  }
  return !1;
}
function r0(e, t) {
  for (var n = {
    left: 0,
    right: 1 / 0,
    top: 0,
    bottom: 1 / 0
  }, o = Vm(e), r = Jt.getDocument(e), i = r.defaultView || r.parentWindow, a = r.body, l = r.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 && Jt.css(o, "overflow") !== "visible") {
      var s = Jt.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 = Vm(o);
  }
  var u = null;
  if (!Jt.isWindow(e) && e.nodeType !== 9) {
    u = e.style.position;
    var c = Jt.css(e, "position");
    c === "absolute" && (e.style.position = "fixed");
  }
  var d = Jt.getWindowScrollLeft(i), f = Jt.getWindowScrollTop(i), p = Jt.viewportWidth(i), v = Jt.viewportHeight(i), g = l.scrollWidth, m = l.scrollHeight, x = window.getComputedStyle(a);
  if (x.overflowX === "hidden" && (g = i.innerWidth), x.overflowY === "hidden" && (m = i.innerHeight), e.style && (e.style.position = u), t || a5(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 + v);
  else {
    var S = Math.max(g, d + p);
    n.right = Math.min(n.right, S);
    var C = Math.max(m, f + v);
    n.bottom = Math.min(n.bottom, C);
  }
  return n.top >= 0 && n.left >= 0 && n.bottom > n.top && n.right > n.left ? n : null;
}
function l5(e, t, n, o) {
  var r = Jt.clone(e), i = {
    width: t.width,
    height: t.height
  };
  return o.adjustX && r.left < n.left && (r.left = n.left), o.resizeWidth && r.left >= n.left && r.left + i.width > n.right && (i.width -= r.left + i.width - n.right), o.adjustX && r.left + i.width > n.right && (r.left = Math.max(n.right - i.width, n.left)), o.adjustY && r.top < n.top && (r.top = n.top), o.resizeHeight && r.top >= n.top && r.top + i.height > n.bottom && (i.height -= r.top + i.height - n.bottom), o.adjustY && r.top + i.height > n.bottom && (r.top = Math.max(n.bottom - i.height, n.top)), Jt.mix(r, i);
}
function i0(e) {
  var t, n, o;
  if (!Jt.isWindow(e) && e.nodeType !== 9)
    t = Jt.offset(e), n = Jt.outerWidth(e), o = Jt.outerHeight(e);
  else {
    var r = Jt.getWindow(e);
    t = {
      left: Jt.getWindowScrollLeft(r),
      top: Jt.getWindowScrollTop(r)
    }, n = Jt.viewportWidth(r), o = Jt.viewportHeight(r);
  }
  return t.width = n, t.height = o, t;
}
function N1(e, t) {
  var n = t.charAt(0), o = t.charAt(1), r = e.width, i = e.height, a = e.left, l = e.top;
  return n === "c" ? l += i / 2 : n === "b" && (l += i), o === "c" ? a += r / 2 : o === "r" && (a += r), {
    left: a,
    top: l
  };
}
function Sf(e, t, n, o, r) {
  var i = N1(t, n[1]), a = N1(e, n[0]), l = [a.left - i.left, a.top - i.top];
  return {
    left: Math.round(e.left - l[0] + o[0] - r[0]),
    top: Math.round(e.top - l[1] + o[1] - r[1])
  };
}
function R1(e, t, n) {
  return e.left < n.left || e.left + t.width > n.right;
}
function z1(e, t, n) {
  return e.top < n.top || e.top + t.height > n.bottom;
}
function s5(e, t, n) {
  return e.left > n.right || e.left + t.width < n.left;
}
function u5(e, t, n) {
  return e.top > n.bottom || e.top + t.height < n.top;
}
function Cf(e, t, n) {
  var o = [];
  return Jt.each(e, function(r) {
    o.push(r.replace(t, function(i) {
      return n[i];
    }));
  }), o;
}
function $f(e, t) {
  return e[t] = -e[t], e;
}
function F1(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 B1(e, t) {
  e[0] = F1(e[0], t.width), e[1] = F1(e[1], t.height);
}
function JI(e, t, n, o) {
  var r = n.points, i = n.offset || [0, 0], a = n.targetOffset || [0, 0], l = n.overflow, s = n.source || e;
  i = [].concat(i), a = [].concat(a), l = l || {};
  var u = {}, c = 0, d = !!(l && l.alwaysByViewport), f = r0(s, d), p = i0(s);
  B1(i, p), B1(a, t);
  var v = Sf(p, t, r, i, a), g = Jt.merge(p, v);
  if (f && (l.adjustX || l.adjustY) && o) {
    if (l.adjustX && R1(v, p, f)) {
      var m = Cf(r, /[lr]/gi, {
        l: "r",
        r: "l"
      }), x = $f(i, 0), S = $f(a, 0), C = Sf(p, t, m, x, S);
      s5(C, p, f) || (c = 1, r = m, i = x, a = S);
    }
    if (l.adjustY && z1(v, p, f)) {
      var P = Cf(r, /[tb]/gi, {
        t: "b",
        b: "t"
      }), $ = $f(i, 1), I = $f(a, 1), w = Sf(p, t, P, $, I);
      u5(w, p, f) || (c = 1, r = P, i = $, a = I);
    }
    c && (v = Sf(p, t, r, i, a), Jt.mix(g, v));
    var T = R1(v, p, f), M = z1(v, p, f);
    if (T || M) {
      var R = r;
      T && (R = Cf(r, /[lr]/gi, {
        l: "r",
        r: "l"
      })), M && (R = Cf(r, /[tb]/gi, {
        t: "b",
        b: "t"
      })), r = R, i = n.offset || [0, 0], a = n.targetOffset || [0, 0];
    }
    u.adjustX = l.adjustX && T, u.adjustY = l.adjustY && M, (u.adjustX || u.adjustY) && (g = l5(v, p, f, u));
  }
  return g.width !== p.width && Jt.css(s, "width", Jt.width(s) + g.width - p.width), g.height !== p.height && Jt.css(s, "height", Jt.height(s) + g.height - p.height), Jt.offset(s, {
    left: g.left,
    top: g.top
  }, {
    useCssRight: n.useCssRight,
    useCssBottom: n.useCssBottom,
    useCssTransform: n.useCssTransform,
    ignoreShake: n.ignoreShake
  }), {
    points: r,
    offset: i,
    targetOffset: a,
    overflow: u
  };
}
function c5(e, t) {
  var n = r0(e, t), o = i0(e);
  return !n || o.left + o.width <= n.left || o.top + o.height <= n.top || o.left >= n.right || o.top >= n.bottom;
}
function a0(e, t, n) {
  var o = n.target || t, r = i0(o), i = !c5(o, n.overflow && n.overflow.alwaysByViewport);
  return JI(e, r, n, i);
}
a0.__getOffsetParent = Vm;
a0.__getVisibleRectForElement = r0;
function d5(e, t, n) {
  var o, r, i = Jt.getDocument(e), a = i.defaultView || i.parentWindow, l = Jt.getWindowScrollLeft(a), s = Jt.getWindowScrollTop(a), u = Jt.viewportWidth(a), c = Jt.viewportHeight(a);
  "pageX" in t ? o = t.pageX : o = l + t.clientX, "pageY" in t ? r = t.pageY : r = s + t.clientY;
  var d = {
    left: o,
    top: r,
    width: 0,
    height: 0
  }, f = o >= 0 && o <= l + u && r >= 0 && r <= s + c, p = [n.points[0], "cc"];
  return JI(e, d, k1(k1({}, n), {}, {
    points: p
  }), f);
}
function Xn(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, r = e;
  if (Array.isArray(e) && (r = Do(e)[0]), !r)
    return null;
  const i = Ml(r, t, o);
  return i.props = n ? O(O({}, i.props), t) : i.props, wo(typeof i.props.class != "object", "class must be string"), i;
}
function f5(e, t, n) {
  El(Ml(e, O({}, t)), n);
}
const eT = (e) => (e || []).some((t) => dr(t) ? !(t.type === EP || t.type === Je && !eT(t.children)) : !0) ? e : null;
function Nh(e, t, n, o) {
  var r;
  const i = (r = e[t]) === null || r === void 0 ? void 0 : r.call(e, n);
  return eT(i) ? i : o?.();
}
const Rh = ((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 p5(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 h5(e, t) {
  e !== document.activeElement && bl(t, e) && typeof e.focus == "function" && e.focus();
}
function L1(e, t) {
  let n = null, o = null;
  function r(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 i = new Bk(r);
  return e && i.observe(e), () => {
    i.disconnect();
  };
}
const g5 = ((e, t) => {
  let n = !1, o = null;
  function r() {
    clearTimeout(o);
  }
  function i(a) {
    if (!n || a === !0) {
      if (e() === !1)
        return;
      n = !0, r(), o = setTimeout(() => {
        n = !1;
      }, t.value);
    } else
      r(), o = setTimeout(() => {
        n = !1, i();
      }, t.value);
  }
  return [i, () => {
    n = !1, r();
  }];
}), v5 = {
  align: Object,
  target: [Object, Function],
  onAlign: Function,
  monitorBufferTime: Number,
  monitorWindowResize: Boolean,
  disabled: Boolean
};
function H1(e) {
  return typeof e != "function" ? null : e();
}
function V1(e) {
  return typeof e != "object" || !e ? null : e;
}
const m5 = be({
  compatConfig: {
    MODE: 3
  },
  name: "Align",
  props: v5,
  emits: ["align"],
  setup(e, t) {
    let {
      expose: n,
      slots: o
    } = t;
    const r = le({}), i = le(), [a, l] = g5(() => {
      const {
        disabled: f,
        target: p,
        align: v,
        onAlign: g
      } = e;
      if (!f && p && i.value) {
        const m = i.value;
        let x;
        const S = H1(p), C = V1(p);
        r.value.element = S, r.value.point = C, r.value.align = v;
        const {
          activeElement: P
        } = document;
        return S && Rh(S) ? x = a0(m, S, v) : C && (x = d5(m, C, v)), h5(P, m), g && x && g(m, x), !0;
      }
      return !1;
    }, E(() => e.monitorBufferTime)), s = le({
      cancel: () => {
      }
    }), u = le({
      cancel: () => {
      }
    }), c = () => {
      const f = e.target, p = H1(f), v = V1(f);
      i.value !== u.value.element && (u.value.cancel(), u.value.element = i.value, u.value.cancel = L1(i.value, a)), (r.value.element !== p || !p5(r.value.point, v) || !ny(r.value.align, e.align)) && (a(), s.value.element !== p && (s.value.cancel(), s.value.element = p, s.value.cancel = L1(p, a)));
    };
    At(() => {
      Yt(() => {
        c();
      });
    }), Ya(() => {
      Yt(() => {
        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 = Ho(window, "resize", a)) : d.value && (d.value.remove(), d.value = null);
    }, {
      flush: "post"
    }), Vo(() => {
      s.value.cancel(), u.value.cancel(), d.value && d.value.remove(), l();
    }), n({
      forceAlign: () => a(!0)
    }), () => {
      const f = o?.default();
      return f ? Xn(f[0], {
        ref: i
      }, !0, !0) : null;
    };
  }
});
Ti("bottomLeft", "bottomRight", "topLeft", "topRight");
const b5 = (e) => e !== void 0 && (e === "topLeft" || e === "topRight") ? "slide-down" : "slide-up", _s = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  return O(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);
}, l0 = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  return O(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);
}, Ka = (e, t, n) => n !== void 0 ? n : `${e}-${t}`, y5 = be({
  compatConfig: {
    MODE: 3
  },
  name: "PopupInner",
  inheritAttrs: !1,
  props: e0,
  emits: ["mouseenter", "mouseleave", "mousedown", "touchstart", "align"],
  setup(e, t) {
    let {
      expose: n,
      attrs: o,
      slots: r
    } = t;
    const i = $e(), a = $e(), l = $e(), [s, u] = F6(Kt(e, "stretch")), c = () => {
      e.stretch && u(e.getRootDomNode());
    }, d = $e(!1);
    let f;
    Ie(() => e.visible, (I) => {
      clearTimeout(f), I ? f = setTimeout(() => {
        d.value = e.visible;
      }) : d.value = !1;
    }, {
      immediate: !0
    });
    const [p, v] = z6(d, c), g = $e(), m = () => e.point ? e.point : e.getRootDomNode, x = () => {
      var I;
      (I = i.value) === null || I === void 0 || I.forceAlign();
    }, S = (I, w) => {
      var T;
      const M = e.getClassNameFromAlign(w), R = l.value;
      l.value !== M && (l.value = M), p.value === "align" && (R !== M ? Promise.resolve().then(() => {
        x();
      }) : v(() => {
        var N;
        (N = g.value) === null || N === void 0 || N.call(g);
      }), (T = e.onAlign) === null || T === void 0 || T.call(e, I, w));
    }, C = E(() => {
      const I = typeof e.animation == "object" ? e.animation : t0(e);
      return ["onAfterEnter", "onAfterLeave"].forEach((w) => {
        const T = I[w];
        I[w] = (M) => {
          v(), p.value = "stable", T?.(M);
        };
      }), I;
    }), P = () => new Promise((I) => {
      g.value = I;
    });
    Ie([C, p], () => {
      !C.value && p.value === "motion" && v();
    }, {
      immediate: !0
    }), n({
      forceAlign: x,
      getElement: () => a.value.$el || a.value
    });
    const $ = E(() => {
      var I;
      return !(!((I = e.align) === null || I === void 0) && I.points && (p.value === "align" || p.value === "stable"));
    });
    return () => {
      var I;
      const {
        zIndex: w,
        align: T,
        prefixCls: M,
        destroyPopupOnHide: R,
        onMouseenter: N,
        onMouseleave: H,
        onTouchstart: L = () => {
        },
        onMousedown: F
      } = e, A = p.value, G = [O(O({}, s.value), {
        zIndex: w,
        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 = go((I = r.default) === null || I === void 0 ? void 0 : I.call(r, {
        visible: e.visible
      }));
      j.length > 1 && (j = h("div", {
        class: `${M}-content`
      }, [j]));
      const Z = Me(M, o.class, l.value, !e.arrow && `${M}-arrow-hidden`), K = d.value || !e.visible ? _s(C.value.name, C.value) : {};
      return h(Dr, Q(Q({
        ref: a
      }, K), {}, {
        onBeforeEnter: P
      }), {
        default: () => !R || e.visible ? ti(h(m5, {
          target: m(),
          key: "popup",
          ref: i,
          monitorWindowResize: !0,
          disabled: $.value,
          align: T,
          onAlign: S
        }, {
          default: () => h("div", {
            class: Z,
            onMouseenter: N,
            onMouseleave: H,
            onMousedown: cr(F, ["capture"]),
            [Bo ? "onTouchstartPassive" : "onTouchstart"]: cr(L, ["capture"]),
            style: G
          }, [j])
        }), [[Oi, d.value]]) : null
      });
    };
  }
}), x5 = be({
  compatConfig: {
    MODE: 3
  },
  name: "Popup",
  inheritAttrs: !1,
  props: A6,
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      expose: r
    } = t;
    const i = $e(!1), a = $e(!1), l = $e(), s = $e();
    return Ie([() => e.visible, () => e.mobile], () => {
      i.value = e.visible, e.visible && e.mobile && (a.value = !0);
    }, {
      immediate: !0,
      flush: "post"
    }), r({
      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 = O(O(O({}, e), n), {
        visible: i.value
      }), c = a.value ? h(N6, Q(Q({}, u), {}, {
        mobile: e.mobile,
        ref: l
      }), {
        default: o.default
      }) : h(y5, Q(Q({}, u), {}, {
        ref: l
      }), {
        default: o.default
      });
      return h("div", {
        ref: s
      }, [h(KI, u, null), c]);
    };
  }
});
function w5(e, t, n) {
  return n ? e[0] === t[0] : e[0] === t[0] && e[1] === t[1];
}
function j1(e, t, n) {
  const o = e[t] || {};
  return O(O({}, o), n);
}
function S5(e, t, n, o) {
  const {
    points: r
  } = n, i = Object.keys(e);
  for (let a = 0; a < i.length; a += 1) {
    const l = i[a];
    if (w5(e[l].points, r, o))
      return `${t}-placement-${l}`;
  }
  return "";
}
const Dd = {
  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(lL(this), O(O({}, this.$data), n));
        if (o === null)
          return;
        n = O(O({}, n), o || {});
      }
      O(this.$data, n), this._.isMounted && this.$forceUpdate(), Yt(() => {
        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, r = n.length; o < r; o++)
            n[o](...e.slice(1));
        else
          n(...e.slice(1));
    }
  }
}, tT = Symbol("PortalContextKey"), s0 = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
    inTriggerContext: !0
  };
  Bt(tT, {
    inTriggerContext: t.inTriggerContext,
    shouldRender: E(() => {
      const {
        sPopupVisible: n,
        popupRef: o,
        forceRender: r,
        autoDestroy: i
      } = e || {};
      let a = !1;
      return (n || o || r) && (a = !0), !n && i && (a = !1), a;
    })
  });
}, C5 = () => {
  s0({}, {
    inTriggerContext: !1
  });
  const e = zt(tT, {
    shouldRender: E(() => !1),
    inTriggerContext: !1
  });
  return {
    shouldRender: E(() => e.shouldRender.value || e.inTriggerContext === !1)
  };
}, nT = be({
  compatConfig: {
    MODE: 3
  },
  name: "Portal",
  inheritAttrs: !1,
  props: {
    getContainer: pe.func.isRequired,
    didUpdate: Function
  },
  setup(e, t) {
    let {
      slots: n
    } = t, o = !0, r;
    const {
      shouldRender: i
    } = C5();
    function a() {
      i.value && (r = e.getContainer());
    }
    nh(() => {
      o = !1, a();
    }), At(() => {
      r || a();
    });
    const l = Ie(i, () => {
      i.value && !r && (r = e.getContainer()), r && l();
    });
    return Ya(() => {
      Yt(() => {
        var s;
        i.value && ((s = e.didUpdate) === null || s === void 0 || s.call(e, e));
      });
    }), () => {
      var s;
      return i.value ? o ? (s = n.default) === null || s === void 0 ? void 0 : s.call(n) : r ? h(oh, {
        to: r
      }, n) : null : null;
    };
  }
});
let nv;
function Rp(e) {
  if (typeof document > "u")
    return 0;
  if (nv === 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 r = t.offsetWidth;
    n.style.overflow = "scroll";
    let i = t.offsetWidth;
    r === i && (i = n.clientWidth), document.body.removeChild(n), nv = r - i;
  }
  return nv;
}
function W1(e) {
  const t = e.match(/^(.*)px$/), n = Number(t?.[1]);
  return Number.isNaN(n) ? Rp() : n;
}
function $5(e) {
  if (typeof document > "u" || !e || !(e instanceof Element))
    return {
      width: 0,
      height: 0
    };
  const {
    width: t,
    height: n
  } = getComputedStyle(e, "::-webkit-scrollbar");
  return {
    width: W1(t),
    height: W1(n)
  };
}
const P5 = `vc-util-locker-${Date.now()}`;
let K1 = 0;
function O5() {
  return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight) && window.innerWidth > document.body.offsetWidth;
}
function k5(e) {
  const t = E(() => !!e && !!e.value);
  K1 += 1;
  const n = `${P5}_${K1}`;
  It((o) => {
    if (wr()) {
      if (t.value) {
        const r = Rp(), i = O5();
        gd(`
html body {
  overflow-y: hidden;
  ${i ? `width: calc(100% - ${r}px);` : ""}
}`, n);
      } else
        Ep(n);
      o(() => {
        Ep(n);
      });
    }
  }, {
    flush: "post"
  });
}
let Jl = 0;
const np = wr(), q1 = (e) => {
  if (!np)
    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;
}, u0 = be({
  compatConfig: {
    MODE: 3
  },
  name: "PortalWrapper",
  inheritAttrs: !1,
  props: {
    wrapperClassName: String,
    forceRender: {
      type: Boolean,
      default: void 0
    },
    getContainer: pe.any,
    visible: {
      type: Boolean,
      default: void 0
    },
    autoLock: ct(),
    didUpdate: Function
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = $e(), r = $e(), i = $e(), a = $e(1), l = wr() && document.createElement("div"), s = () => {
      var p, v;
      o.value === l && ((v = (p = o.value) === null || p === void 0 ? void 0 : p.parentNode) === null || v === void 0 || v.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 = q1(e.getContainer), u ? (u.appendChild(o.value), !0) : !1) : !0;
    }, d = () => np ? (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 Ya(() => {
      f(), c();
    }), k5(E(() => e.autoLock && e.visible && wr() && (o.value === document.body || o.value === l))), At(() => {
      let p = !1;
      Ie([() => e.visible, () => e.getContainer], (v, g) => {
        let [m, x] = v, [S, C] = g;
        np && (u = q1(e.getContainer), u === document.body && (m && !S ? Jl += 1 : p && (Jl -= 1))), p && (typeof x == "function" && typeof C == "function" ? x.toString() !== C.toString() : x !== C) && s(), p = !0;
      }, {
        immediate: !0,
        flush: "post"
      }), Yt(() => {
        c() || (i.value = Vt(() => {
          a.value += 1;
        }));
      });
    }), qt(() => {
      const {
        visible: p
      } = e;
      np && u === document.body && (Jl = p && Jl ? Jl - 1 : Jl), s(), Vt.cancel(i.value);
    }), () => {
      const {
        forceRender: p,
        visible: v
      } = e;
      let g = null;
      const m = {
        getOpenCount: () => Jl,
        getContainer: d
      };
      return a.value && (p || v || r.value) && (g = h(nT, {
        getContainer: d,
        ref: r,
        didUpdate: e.didUpdate
      }, {
        default: () => {
          var x;
          return (x = n.default) === null || x === void 0 ? void 0 : x.call(n, m);
        }
      })), g;
    };
  }
}), I5 = ["onClick", "onMousedown", "onTouchstart", "onMouseenter", "onMouseleave", "onFocus", "onBlur", "onContextmenu"], Ad = be({
  compatConfig: {
    MODE: 3
  },
  name: "Trigger",
  mixins: [Dd],
  inheritAttrs: !1,
  props: E6(),
  setup(e) {
    const t = E(() => {
      const {
        popupPlacement: r,
        popupAlign: i,
        builtinPlacements: a
      } = e;
      return r && a ? j1(a, r, i) : i;
    }), n = $e(null), o = (r) => {
      n.value = r;
    };
    return {
      vcTriggerContext: zt("vcTriggerContext", {}),
      popupRef: n,
      setPopupRef: o,
      triggerRef: $e(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, I5.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() {
    Bt("vcTriggerContext", {
      onPopupMouseDown: this.onPopupMouseDown,
      onPopupMouseenter: this.onPopupMouseenter,
      onPopupMouseleave: this.onPopupMouseleave
    }), s0(this);
  },
  deactivated() {
    this.setPopupVisible(!1);
  },
  mounted() {
    this.$nextTick(() => {
      this.updatedCal();
    });
  },
  updated() {
    this.$nextTick(() => {
      this.updatedCal();
    });
  },
  beforeUnmount() {
    this.clearDelayTimer(), this.clearOutsideHandler(), clearTimeout(this.mouseDownTimeout), Vt.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 = Ho(n, "mousedown", this.onDocumentClick)), this.touchOutsideHandler || (n = n || e.getDocument(this.getRootDomNode()), this.touchOutsideHandler = Ho(n, "touchstart", this.onDocumentClick, Bo ? {
          passive: !1
        } : !1)), !this.contextmenuOutsideHandler1 && this.isContextmenuToShow() && (n = n || e.getDocument(this.getRootDomNode()), this.contextmenuOutsideHandler1 = Ho(n, "scroll", this.onContextmenuClose)), !this.contextmenuOutsideHandler2 && this.isContextmenuToShow() && (this.contextmenuOutsideHandler2 = Ho(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 && bl((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) {
      bl(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
      (!bl(n, t) || this.isContextMenuOnly()) && !bl(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: r
      } = this.$props;
      if (r) {
        const i = ((t = (e = this.triggerRef) === null || e === void 0 ? void 0 : e.$el) === null || t === void 0 ? void 0 : t.nodeName) === "#comment" ? null : Qi(this.triggerRef);
        return Qi(r(i));
      }
      try {
        const i = ((o = (n = this.triggerRef) === null || n === void 0 ? void 0 : n.$el) === null || o === void 0 ? void 0 : o.nodeName) === "#comment" ? null : Qi(this.triggerRef);
        if (i)
          return i;
      } catch {
      }
      return Qi(this);
    },
    handleGetPopupClassFromAlign(e) {
      const t = [], n = this.$props, {
        popupPlacement: o,
        builtinPlacements: r,
        prefixCls: i,
        alignPoint: a,
        getPopupClassNameFromAlign: l
      } = n;
      return o && r && t.push(S5(r, i, e, a)), l && t.push(l(e)), t.join(" ");
    },
    getPopupAlign() {
      const e = this.$props, {
        popupPlacement: t,
        popupAlign: n,
        builtinPlacements: o
      } = e;
      return t && o ? j1(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: r,
        destroyPopupOnHide: i,
        popupClassName: a,
        popupAnimation: l,
        popupTransitionName: s,
        popupStyle: u,
        mask: c,
        maskAnimation: d,
        maskTransitionName: f,
        zIndex: p,
        stretch: v,
        alignPoint: g,
        mobile: m,
        arrow: x,
        forceRender: S
      } = this.$props, {
        sPopupVisible: C,
        point: P
      } = this.$data, $ = O(O({
        prefixCls: r,
        arrow: x,
        destroyPopupOnHide: i,
        visible: C,
        point: g ? P : null,
        align: this.align,
        animation: l,
        getClassNameFromAlign: t,
        stretch: v,
        getRootDomNode: n,
        mask: c,
        zIndex: p,
        transitionName: s,
        maskAnimation: d,
        maskTransitionName: f,
        class: a,
        style: u,
        onAlign: o.onPopupAlign || WI
      }, e), {
        ref: this.setPopupRef,
        mobile: m,
        forceRender: S
      });
      return h(x5, $, {
        default: this.$slots.popup || (() => jk(this, "popup"))
      });
    },
    attachParent(e) {
      Vt.cancel(this.attachId);
      const {
        getPopupContainer: t,
        getDocument: n
      } = this.$props, o = this.getRootDomNode();
      let r;
      t ? (o || t.length === 0) && (r = t(o)) : r = n(this.getRootDomNode()).body, r ? r.appendChild(e) : this.attachId = Vt(() => {
        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: r
      } = this;
      this.clearDelayTimer(), o !== e && (Ia(this, "popupVisible") || this.setState({
        sPopupVisible: e,
        prevPopupVisible: o
      }), r && r(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 r = n ? {
          pageX: n.pageX,
          pageY: n.pageY
        } : null;
        this.delayTimer = setTimeout(() => {
          this.setPopupVisible(e, r), 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 = Jw(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 = Do(Vk(this)), {
      alignPoint: n,
      getPopupContainer: o
    } = this.$props, r = t[0];
    this.childOriginEvents = Jw(r);
    const i = {
      key: "trigger"
    };
    this.isContextmenuToShow() ? i.onContextmenu = this.onContextmenu : i.onContextmenu = this.createTwoChains("onContextmenu"), this.isClickToHide() || this.isClickToShow() ? (i.onClick = this.onClick, i.onMousedown = this.onMousedown, i[Bo ? "onTouchstartPassive" : "onTouchstart"] = this.onTouchstart) : (i.onClick = this.createTwoChains("onClick"), i.onMousedown = this.createTwoChains("onMousedown"), i[Bo ? "onTouchstartPassive" : "onTouchstart"] = this.createTwoChains("onTouchstart")), this.isMouseEnterToShow() ? (i.onMouseenter = this.onMouseenter, n && (i.onMousemove = this.onMouseMove)) : i.onMouseenter = this.createTwoChains("onMouseenter"), this.isMouseLeaveToHide() ? i.onMouseleave = this.onMouseleave : i.onMouseleave = this.createTwoChains("onMouseleave"), this.isFocusToShow() || this.isBlurToHide() ? (i.onFocus = this.onFocus, i.onBlur = this.onBlur) : (i.onFocus = this.createTwoChains("onFocus"), i.onBlur = (u) => {
      u && (!u.relatedTarget || !bl(u.target, u.relatedTarget)) && this.createTwoChains("onBlur")(u);
    });
    const a = Me(r && r.props && r.props.class, e.class);
    a && (i.class = a);
    const l = Xn(r, O(O({}, i), {
      ref: "triggerRef"
    }), !0, !0), s = h(u0, {
      key: "portal",
      getContainer: o && (() => o(this.getRootDomNode())),
      didUpdate: this.handlePortalUpdate,
      visible: this.$data.sPopupVisible
    }, {
      default: this.getComponent
    });
    return h(Je, null, [l, s]);
  }
});
var T5 = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const _5 = (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
      }
    }
  };
}, M5 = be({
  name: "SelectTrigger",
  inheritAttrs: !1,
  props: {
    dropdownAlign: Object,
    visible: {
      type: Boolean,
      default: void 0
    },
    disabled: {
      type: Boolean,
      default: void 0
    },
    dropdownClassName: String,
    dropdownStyle: pe.object,
    placement: String,
    empty: {
      type: Boolean,
      default: void 0
    },
    prefixCls: String,
    popupClassName: String,
    animation: String,
    transitionName: String,
    getPopupContainer: Function,
    dropdownRender: Function,
    containerWidth: Number,
    dropdownMatchSelectWidth: pe.oneOfType([Number, Boolean]).def(!0),
    popupElement: pe.any,
    direction: String,
    getTriggerDOMNode: Function,
    onPopupVisibleChange: Function,
    onPopupMouseEnter: Function,
    onPopupFocusin: Function,
    onPopupFocusout: Function
  },
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      expose: r
    } = t;
    const i = E(() => {
      const {
        dropdownMatchSelectWidth: l
      } = e;
      return _5(l);
    }), a = le();
    return r({
      getPopupElement: () => a.value
    }), () => {
      const l = O(O({}, e), o), {
        empty: s = !1
      } = l, u = T5(l, ["empty"]), {
        visible: c,
        dropdownAlign: d,
        prefixCls: f,
        popupElement: p,
        dropdownClassName: v,
        dropdownStyle: g,
        direction: m = "ltr",
        placement: x,
        dropdownMatchSelectWidth: S,
        containerWidth: C,
        dropdownRender: P,
        animation: $,
        transitionName: I,
        getPopupContainer: w,
        getTriggerDOMNode: T,
        onPopupVisibleChange: M,
        onPopupMouseEnter: R,
        onPopupFocusin: N,
        onPopupFocusout: H
      } = u, L = `${f}-dropdown`;
      let F = p;
      P && (F = P({
        menuNode: p,
        props: e
      }));
      const A = $ ? `${L}-${$}` : I, G = O({
        minWidth: `${C}px`
      }, g);
      return typeof S == "number" ? G.width = `${S}px` : S && (G.width = `${C}px`), h(Ad, Q(Q({}, e), {}, {
        showAction: M ? ["click"] : [],
        hideAction: M ? ["click"] : [],
        popupPlacement: x || (m === "rtl" ? "bottomRight" : "bottomLeft"),
        builtinPlacements: i.value,
        prefixCls: L,
        popupTransitionName: A,
        popupAlign: d,
        popupVisible: c,
        getPopupContainer: w,
        popupClassName: Me(v, {
          [`${L}-empty`]: s
        }),
        popupStyle: G,
        getTriggerDOMNode: T,
        onPopupVisibleChange: M
      }), {
        default: n.default,
        popup: () => h("div", {
          ref: a,
          onMouseenter: R,
          onFocusin: N,
          onFocusout: H
        }, [F])
      });
    };
  }
}), it = {
  /**
   * 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
}, Ms = (e, t) => {
  let {
    slots: n
  } = t;
  var o;
  const {
    class: r,
    customizeIcon: i,
    customizeIconProps: a,
    onMousedown: l,
    onClick: s
  } = e;
  let u;
  return typeof i == "function" ? u = i(a) : u = dr(i) ? Ml(i) : i, h("span", {
    class: r,
    onMousedown: (c) => {
      c.preventDefault(), l && l(c);
    },
    style: {
      userSelect: "none",
      WebkitUserSelect: "none"
    },
    unselectable: "on",
    onClick: s,
    "aria-hidden": !0
  }, [u !== void 0 ? u : h("span", {
    class: r.split(/\s+/).map((c) => `${c}-icon`)
  }, [(o = n.default) === null || o === void 0 ? void 0 : o.call(n)])]);
};
Ms.inheritAttrs = !1;
Ms.displayName = "TransBtn";
Ms.props = {
  class: String,
  customizeIcon: pe.any,
  customizeIconProps: pe.any,
  onMousedown: Function,
  onClick: Function
};
var E5 = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const D5 = be({
  compatConfig: {
    MODE: 3
  },
  // inheritAttrs: false,
  props: {
    disabled: pe.looseBool,
    type: pe.string,
    value: pe.any,
    tag: {
      type: String,
      default: "input"
    },
    size: pe.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 = $e(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 = E5(e, ["tag", "value"]);
      return h(s, Q(Q({}, c), {}, {
        ref: o,
        value: u
      }), null);
    };
  }
});
function Y1(e) {
  const t = e.getBoundingClientRect(), n = document.documentElement;
  return {
    left: t.left + (window.scrollX || n.scrollLeft) - (n.clientLeft || document.body.clientLeft || 0),
    top: t.top + (window.scrollY || n.scrollTop) - (n.clientTop || document.body.clientTop || 0)
  };
}
function A5(e) {
  return Object.keys(e).reduce((t, n) => {
    const o = e[n];
    return typeof o > "u" || o === null || (t += `${n}: ${e[n]};`), t;
  }, "");
}
var N5 = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const Nd = be({
  compatConfig: {
    MODE: 3
  },
  inheritAttrs: !1,
  props: {
    disabled: pe.looseBool,
    type: pe.string,
    value: pe.any,
    lazy: pe.bool.def(!0),
    tag: {
      type: String,
      default: "input"
    },
    size: pe.string,
    style: pe.oneOfType([String, Object]),
    class: pe.string
  },
  emits: ["change", "input", "blur", "keydown", "focus", "compositionstart", "compositionend", "keyup", "paste", "mousedown"],
  setup(e, t) {
    let {
      emit: n,
      attrs: o,
      expose: r
    } = t;
    const i = $e(null), a = le(), l = le(!1);
    Ie([() => e.value, l], () => {
      l.value || (a.value = e.value);
    }, {
      immediate: !0
    });
    const s = (w) => {
      n("change", w);
    }, u = (w) => {
      l.value = !0, w.target.composing = !0, n("compositionstart", w);
    }, c = (w) => {
      l.value = !1, w.target.composing = !1, n("compositionend", w);
      const T = document.createEvent("HTMLEvents");
      T.initEvent("input", !0, !0), w.target.dispatchEvent(T), s(w);
    }, d = (w) => {
      if (l.value && e.lazy) {
        a.value = w.target.value;
        return;
      }
      n("input", w);
    }, f = (w) => {
      n("blur", w);
    }, p = (w) => {
      n("focus", w);
    }, v = () => {
      i.value && i.value.focus();
    }, g = () => {
      i.value && i.value.blur();
    }, m = (w) => {
      n("keydown", w);
    }, x = (w) => {
      n("keyup", w);
    }, S = (w, T, M) => {
      var R;
      (R = i.value) === null || R === void 0 || R.setSelectionRange(w, T, M);
    }, C = () => {
      var w;
      (w = i.value) === null || w === void 0 || w.select();
    };
    r({
      focus: v,
      blur: g,
      input: E(() => {
        var w;
        return (w = i.value) === null || w === void 0 ? void 0 : w.input;
      }),
      setSelectionRange: S,
      select: C,
      getSelectionStart: () => {
        var w;
        return (w = i.value) === null || w === void 0 ? void 0 : w.getSelectionStart();
      },
      getSelectionEnd: () => {
        var w;
        return (w = i.value) === null || w === void 0 ? void 0 : w.getSelectionEnd();
      },
      getScrollTop: () => {
        var w;
        return (w = i.value) === null || w === void 0 ? void 0 : w.getScrollTop();
      }
    });
    const P = (w) => {
      n("mousedown", w);
    }, $ = (w) => {
      n("paste", w);
    }, I = E(() => e.style && typeof e.style != "string" ? A5(e.style) : e.style);
    return () => {
      const {
        style: w,
        lazy: T
      } = e, M = N5(e, ["style", "lazy"]);
      return h(D5, Q(Q(Q({}, M), o), {}, {
        style: I.value,
        onInput: d,
        onChange: s,
        onBlur: f,
        onFocus: p,
        ref: i,
        value: a.value,
        onCompositionstart: u,
        onCompositionend: c,
        onKeyup: x,
        onKeydown: m,
        onPaste: $,
        onMousedown: P
      }), null);
    };
  }
}), R5 = {
  inputRef: pe.any,
  prefixCls: String,
  id: String,
  inputElement: pe.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: pe.oneOfType([pe.number, pe.string]),
  /** Pass accessibility props to input */
  attrs: pe.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
  }
}, oT = be({
  compatConfig: {
    MODE: 3
  },
  name: "SelectInput",
  inheritAttrs: !1,
  props: R5,
  setup(e) {
    let t = null;
    const n = zt("VCSelectContainerEvent");
    return () => {
      var o;
      const {
        prefixCls: r,
        id: i,
        inputElement: a,
        disabled: l,
        tabindex: s,
        autofocus: u,
        autocomplete: c,
        editable: d,
        activeDescendantId: f,
        value: p,
        onKeydown: v,
        onMousedown: g,
        onChange: m,
        onPaste: x,
        onCompositionstart: S,
        onCompositionend: C,
        onFocus: P,
        onBlur: $,
        open: I,
        inputRef: w,
        attrs: T
      } = e;
      let M = a || h(Nd, null, null);
      const R = M.props || {}, {
        onKeydown: N,
        onInput: H,
        onFocus: L,
        onBlur: F,
        onMousedown: A,
        onCompositionstart: G,
        onCompositionend: j,
        style: Z
      } = R;
      return M = Xn(M, O(O(O(O(O({
        type: "search"
      }, R), {
        id: i,
        ref: w,
        disabled: l,
        tabindex: s,
        lazy: !1,
        autocomplete: c || "off",
        autofocus: u,
        class: Me(`${r}-selection-search-input`, (o = M?.props) === null || o === void 0 ? void 0 : o.class),
        role: "combobox",
        "aria-expanded": I,
        "aria-haspopup": "listbox",
        "aria-owns": `${i}_list`,
        "aria-autocomplete": "list",
        "aria-controls": `${i}_list`,
        "aria-activedescendant": f
      }), T), {
        value: d ? p : "",
        readonly: !d,
        unselectable: d ? null : "on",
        style: O(O({}, Z), {
          opacity: d ? null : 0
        }),
        onKeydown: (W) => {
          v(W), N && N(W);
        },
        onMousedown: (W) => {
          g(W), A && A(W);
        },
        onInput: (W) => {
          m(W), H && H(W);
        },
        onCompositionstart(W) {
          S(W), G && G(W);
        },
        onCompositionend(W) {
          C(W), j && j(W);
        },
        onPaste: x,
        onFocus: function() {
          clearTimeout(t), L && L(arguments.length <= 0 ? void 0 : arguments[0]), P && P(arguments.length <= 0 ? void 0 : arguments[0]), n?.focus(arguments.length <= 0 ? void 0 : arguments[0]);
        },
        onBlur: function() {
          for (var W = arguments.length, K = new Array(W), q = 0; q < W; q++)
            K[q] = arguments[q];
          t = setTimeout(() => {
            F && F(K[0]), $ && $(K[0]), n?.blur(K[0]);
          }, 100);
        }
      }), M.type === "textarea" ? {} : {
        type: "search"
      }), !0, !0), M;
    };
  }
}), z5 = `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`, F5 = `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`, G1 = `${z5} ${F5}`.split(/[\s\n]+/), B5 = "aria-", L5 = "data-";
function U1(e, t) {
  return e.indexOf(t) === 0;
}
function Bs(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 = O({}, t);
  const o = {};
  return Object.keys(e).forEach((r) => {
    // Aria
    (n.aria && (r === "role" || U1(r, B5)) || // Data
    n.data && U1(r, L5) || // Attr
    n.attr && (G1.includes(r) || G1.includes(r.toLowerCase()))) && (o[r] = e[r]);
  }), o;
}
const rT = Symbol("OverflowContextProviderKey"), jm = be({
  compatConfig: {
    MODE: 3
  },
  name: "OverflowContextProvider",
  inheritAttrs: !1,
  props: {
    value: {
      type: Object
    }
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    return Bt(rT, E(() => e.value)), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
}), H5 = () => zt(rT, E(() => null));
var V5 = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const ru = void 0, op = be({
  compatConfig: {
    MODE: 3
  },
  name: "Item",
  props: {
    prefixCls: String,
    item: pe.any,
    renderItem: Function,
    responsive: Boolean,
    itemKey: {
      type: [String, Number]
    },
    registerSize: Function,
    display: Boolean,
    order: Number,
    component: pe.any,
    invalidate: Boolean
  },
  setup(e, t) {
    let {
      slots: n,
      expose: o
    } = t;
    const r = E(() => e.responsive && !e.display), i = le();
    o({
      itemNodeRef: i
    });
    function a(l) {
      e.registerSize(e.itemKey, l);
    }
    return Vo(() => {
      a(null);
    }), () => {
      var l;
      const {
        prefixCls: s,
        invalidate: u,
        item: c,
        renderItem: d,
        responsive: f,
        registerSize: p,
        itemKey: v,
        display: g,
        order: m,
        component: x = "div"
      } = e, S = V5(e, ["prefixCls", "invalidate", "item", "renderItem", "responsive", "registerSize", "itemKey", "display", "order", "component"]), C = (l = n.default) === null || l === void 0 ? void 0 : l.call(n), P = d && c !== ru ? d(c) : C;
      let $;
      u || ($ = {
        opacity: r.value ? 0 : 1,
        height: r.value ? 0 : ru,
        overflowY: r.value ? "hidden" : ru,
        order: f ? m : ru,
        pointerEvents: r.value ? "none" : ru,
        position: r.value ? "absolute" : ru
      });
      const I = {};
      return r.value && (I["aria-hidden"] = !0), h(Al, {
        disabled: !f,
        onResize: (w) => {
          let {
            offsetWidth: T
          } = w;
          a(T);
        }
      }, {
        default: () => h(x, Q(Q(Q({
          class: Me(!u && s),
          style: $
        }, I), S), {}, {
          ref: i
        }), {
          default: () => [P]
        })
      });
    };
  }
});
var ov = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const j5 = be({
  compatConfig: {
    MODE: 3
  },
  name: "RawItem",
  inheritAttrs: !1,
  props: {
    component: pe.any,
    title: pe.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 r = H5();
    return () => {
      var i;
      if (!r.value) {
        const {
          component: d = "div"
        } = e, f = ov(e, ["component"]);
        return h(d, Q(Q({}, f), o), {
          default: () => [(i = n.default) === null || i === void 0 ? void 0 : i.call(n)]
        });
      }
      const a = r.value, {
        className: l
      } = a, s = ov(a, ["className"]), {
        class: u
      } = o, c = ov(o, ["class"]);
      return h(jm, {
        value: null
      }, {
        default: () => [h(op, Q(Q(Q({
          class: Me(l, u)
        }, s), c), e), n)]
      });
    };
  }
});
var W5 = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const iT = "responsive", aT = "invalidate";
function K5(e) {
  return `+ ${e.length} ...`;
}
const q5 = () => ({
  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: pe.any,
  component: String,
  itemComponent: pe.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
}), za = be({
  name: "Overflow",
  inheritAttrs: !1,
  props: q5(),
  emits: ["visibleChange"],
  setup(e, t) {
    let {
      attrs: n,
      emit: o,
      slots: r
    } = t;
    const i = E(() => e.ssr === "full"), a = $e(null), l = E(() => a.value || 0), s = $e(/* @__PURE__ */ new Map()), u = $e(0), c = $e(0), d = $e(0), f = $e(null), p = $e(null), v = E(() => p.value === null && i.value ? Number.MAX_SAFE_INTEGER : p.value || 0), g = $e(!1), m = E(() => `${e.prefixCls}-item`), x = E(() => Math.max(u.value, c.value)), S = E(() => !!(e.data.length && e.maxCount === iT)), C = E(() => e.maxCount === aT), P = E(() => S.value || typeof e.maxCount == "number" && e.data.length > e.maxCount), $ = E(() => {
      let A = e.data;
      return S.value ? a.value === null && i.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;
    }), I = E(() => S.value ? e.data.slice(v.value + 1) : e.data.slice($.value.length)), w = (A, G) => {
      var j;
      return typeof e.itemKey == "function" ? e.itemKey(A) : (j = e.itemKey && A?.[e.itemKey]) !== null && j !== void 0 ? j : G;
    }, T = E(() => e.renderItem || ((A) => A)), M = (A, G) => {
      p.value = A, G || (g.value = A < e.data.length - 1, o("visibleChange", A));
    }, R = (A, G) => {
      a.value = G.clientWidth;
    }, N = (A, G) => {
      const j = new Map(s.value);
      G === null ? j.delete(A) : j.set(A, G), s.value = j;
    }, H = (A, G) => {
      u.value = c.value, c.value = G;
    }, L = (A, G) => {
      d.value = G;
    }, F = (A) => s.value.get(w($.value[A], A));
    return Ie([l, s, c, d, () => e.itemKey, $], () => {
      if (l.value && x.value && $.value) {
        let A = d.value;
        const G = $.value.length, j = G - 1;
        if (!G) {
          M(0), f.value = null;
          return;
        }
        for (let Z = 0; Z < G; Z += 1) {
          const W = F(Z);
          if (W === void 0) {
            M(Z - 1, !0);
            break;
          }
          if (A += W, // Only one means `totalWidth` is the final width
          j === 0 && A <= l.value || // Last two width will be the final width
          Z === j - 1 && A + F(j) <= l.value) {
            M(j), f.value = null;
            break;
          } else if (A + x.value > l.value) {
            M(Z - 1), f.value = A - W - d.value + c.value;
            break;
          }
        }
        e.suffix && F(0) + d.value > l.value && (f.value = null);
      }
    }), () => {
      const A = g.value && !!I.value.length, {
        itemComponent: G,
        renderRawItem: j,
        renderRawRest: Z,
        renderRest: W,
        prefixCls: K = "rc-overflow",
        suffix: q,
        component: U = "div",
        id: ae,
        onMousedown: se
      } = e, {
        class: ie,
        style: re
      } = n, te = W5(n, ["class", "style"]);
      let ve = {};
      f.value !== null && S.value && (ve = {
        position: "absolute",
        left: `${f.value}px`,
        top: 0
      });
      const ce = {
        prefixCls: m.value,
        responsive: S.value,
        component: G,
        invalidate: C.value
      }, fe = j ? (Ke, He) => {
        const Ne = w(Ke, He);
        return h(jm, {
          key: Ne,
          value: O(O({}, ce), {
            order: He,
            item: Ke,
            itemKey: Ne,
            registerSize: N,
            display: He <= v.value
          })
        }, {
          default: () => [j(Ke, He)]
        });
      } : (Ke, He) => {
        const Ne = w(Ke, He);
        return h(op, Q(Q({}, ce), {}, {
          order: He,
          key: Ne,
          item: Ke,
          renderItem: T.value,
          itemKey: Ne,
          registerSize: N,
          display: He <= v.value
        }), null);
      };
      let ge = () => null;
      const Te = {
        order: A ? v.value : Number.MAX_SAFE_INTEGER,
        className: `${m.value} ${m.value}-rest`,
        registerSize: H,
        display: A
      };
      if (Z)
        Z && (ge = () => h(jm, {
          value: O(O({}, ce), Te)
        }, {
          default: () => [Z(I.value)]
        }));
      else {
        const Ke = W || K5;
        ge = () => h(op, Q(Q({}, ce), Te), {
          default: () => typeof Ke == "function" ? Ke(I.value) : Ke
        });
      }
      const ze = () => {
        var Ke;
        return h(U, Q({
          id: ae,
          class: Me(!C.value && K, ie),
          style: re,
          onMousedown: se,
          role: e.role
        }, te), {
          default: () => [$.value.map(fe), P.value ? ge() : null, q && h(op, Q(Q({}, ce), {}, {
            order: v.value,
            class: `${m.value}-suffix`,
            registerSize: L,
            display: !0,
            style: ve
          }), {
            default: () => q
          }), (Ke = r.default) === null || Ke === void 0 ? void 0 : Ke.call(r)]
        });
      };
      return h(Al, {
        disabled: !S.value,
        onResize: R
      }, {
        default: ze
      });
    };
  }
});
za.Item = j5;
za.RESPONSIVE = iT;
za.INVALIDATE = aT;
const Y5 = Symbol("TreeSelectLegacyContextPropsKey");
function c0() {
  return zt(Y5, {});
}
const G5 = {
  id: String,
  prefixCls: String,
  values: pe.array,
  open: {
    type: Boolean,
    default: void 0
  },
  searchValue: String,
  inputRef: pe.any,
  placeholder: pe.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: pe.oneOfType([pe.number, pe.string]),
  compositionStatus: Boolean,
  removeIcon: pe.any,
  choiceTransitionName: String,
  maxTagCount: pe.oneOfType([pe.number, pe.string]),
  maxTagTextLength: Number,
  maxTagPlaceholder: pe.any.def(() => (e) => `+ ${e.length} ...`),
  tagRender: Function,
  onToggleOpen: {
    type: Function
  },
  onRemove: Function,
  onInputChange: Function,
  onInputPaste: Function,
  onInputKeyDown: Function,
  onInputMouseDown: Function,
  onInputCompositionStart: Function,
  onInputCompositionEnd: Function
}, X1 = (e) => {
  e.preventDefault(), e.stopPropagation();
}, U5 = be({
  name: "MultipleSelectSelector",
  inheritAttrs: !1,
  props: G5,
  setup(e) {
    const t = $e(), n = $e(0), o = $e(!1), r = c0(), i = E(() => `${e.prefixCls}-selection`), a = E(() => e.open || e.mode === "tags" ? e.searchValue : ""), l = E(() => e.mode === "tags" || e.showSearch && (e.open || o.value)), s = le("");
    It(() => {
      s.value = a.value;
    }), At(() => {
      Ie(s, () => {
        n.value = t.value.scrollWidth;
      }, {
        flush: "post",
        immediate: !0
      });
    });
    function u(v, g, m, x, S) {
      return h("span", {
        class: Me(`${i.value}-item`, {
          [`${i.value}-item-disabled`]: m
        }),
        title: typeof v == "string" || typeof v == "number" ? v.toString() : void 0
      }, [h("span", {
        class: `${i.value}-item-content`
      }, [g]), x && h(Ms, {
        class: `${i.value}-item-remove`,
        onMousedown: X1,
        onClick: S,
        customizeIcon: e.removeIcon
      }, {
        default: () => [Le("×")]
      })]);
    }
    function c(v, g, m, x, S, C) {
      var P;
      const $ = (w) => {
        X1(w), e.onToggleOpen(!open);
      };
      let I = C;
      return r.keyEntities && (I = ((P = r.keyEntities[v]) === null || P === void 0 ? void 0 : P.node) || {}), h("span", {
        key: v,
        onMousedown: $
      }, [e.tagRender({
        label: g,
        value: v,
        disabled: m,
        closable: x,
        onClose: S,
        option: I
      })]);
    }
    function d(v) {
      const {
        disabled: g,
        label: m,
        value: x,
        option: S
      } = v, C = !e.disabled && !g;
      let P = m;
      if (typeof e.maxTagTextLength == "number" && (typeof m == "string" || typeof m == "number")) {
        const I = String(P);
        I.length > e.maxTagTextLength && (P = `${I.slice(0, e.maxTagTextLength)}...`);
      }
      const $ = (I) => {
        var w;
        I && I.stopPropagation(), (w = e.onRemove) === null || w === void 0 || w.call(e, v);
      };
      return typeof e.tagRender == "function" ? c(x, P, g, C, $, S) : u(m, P, g, C, $);
    }
    function f(v) {
      const {
        maxTagPlaceholder: g = (x) => `+ ${x.length} ...`
      } = e, m = typeof g == "function" ? g(v) : g;
      return u(m, m, !1);
    }
    const p = (v) => {
      const g = v.target.composing;
      s.value = v.target.value, g || e.onInputChange(v);
    };
    return () => {
      const {
        id: v,
        prefixCls: g,
        values: m,
        open: x,
        inputRef: S,
        placeholder: C,
        disabled: P,
        autofocus: $,
        autocomplete: I,
        activeDescendantId: w,
        tabindex: T,
        compositionStatus: M,
        onInputPaste: R,
        onInputKeyDown: N,
        onInputMouseDown: H,
        onInputCompositionStart: L,
        onInputCompositionEnd: F
      } = e, A = h("div", {
        class: `${i.value}-search`,
        style: {
          width: n.value + "px"
        },
        key: "input"
      }, [h(oT, {
        inputRef: S,
        open: x,
        prefixCls: g,
        id: v,
        inputElement: null,
        disabled: P,
        autofocus: $,
        autocomplete: I,
        editable: l.value,
        activeDescendantId: w,
        value: s.value,
        onKeydown: N,
        onMousedown: H,
        onChange: p,
        onPaste: R,
        onCompositionstart: L,
        onCompositionend: F,
        tabindex: T,
        attrs: Bs(e, !0),
        onFocus: () => o.value = !0,
        onBlur: () => o.value = !1
      }, null), h("span", {
        ref: t,
        class: `${i.value}-search-mirror`,
        "aria-hidden": !0
      }, [s.value, Le(" ")])]), G = h(za, {
        prefixCls: `${i.value}-overflow`,
        data: m,
        renderItem: d,
        renderRest: f,
        suffix: A,
        itemKey: "key",
        maxCount: e.maxTagCount,
        key: "overflow"
      }, null);
      return h(Je, null, [G, !m.length && !a.value && !M && h("span", {
        class: `${i.value}-placeholder`
      }, [C])]);
    };
  }
}), X5 = {
  inputElement: pe.any,
  id: String,
  prefixCls: String,
  values: pe.array,
  open: {
    type: Boolean,
    default: void 0
  },
  searchValue: String,
  inputRef: pe.any,
  placeholder: pe.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: pe.oneOfType([pe.number, pe.string]),
  activeValue: String,
  backfill: {
    type: Boolean,
    default: void 0
  },
  optionLabelRender: Function,
  onInputChange: Function,
  onInputPaste: Function,
  onInputKeyDown: Function,
  onInputMouseDown: Function,
  onInputCompositionStart: Function,
  onInputCompositionEnd: Function
}, d0 = be({
  name: "SingleSelector",
  setup(e) {
    const t = $e(!1), n = E(() => e.mode === "combobox"), o = E(() => n.value || e.showSearch), r = E(() => {
      let c = e.searchValue || "";
      return n.value && e.activeValue && !t.value && (c = e.activeValue), c;
    }), i = c0();
    Ie([n, () => e.activeValue], () => {
      n.value && (t.value = !1);
    }, {
      immediate: !0
    });
    const a = E(() => e.mode !== "combobox" && !e.open && !e.showSearch ? !1 : !!r.value || e.compositionStatus), l = E(() => {
      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 h("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: v,
        prefixCls: g,
        id: m,
        values: x,
        inputRef: S,
        disabled: C,
        autofocus: P,
        autocomplete: $,
        activeDescendantId: I,
        open: w,
        tabindex: T,
        optionLabelRender: M,
        onInputKeyDown: R,
        onInputMouseDown: N,
        onInputPaste: H,
        onInputCompositionStart: L,
        onInputCompositionEnd: F
      } = e, A = x[0];
      let G = null;
      if (A && i.customSlots) {
        const j = (c = A.key) !== null && c !== void 0 ? c : A.value, Z = ((d = i.keyEntities[j]) === null || d === void 0 ? void 0 : d.node) || {};
        G = i.customSlots[(f = Z.slots) === null || f === void 0 ? void 0 : f.title] || i.customSlots.title || A.label, typeof G == "function" && (G = G(Z));
      } else
        G = M && A ? M(A.option) : A?.label;
      return h(Je, null, [h("span", {
        class: `${g}-selection-search`
      }, [h(oT, {
        inputRef: S,
        prefixCls: g,
        id: m,
        open: w,
        inputElement: v,
        disabled: C,
        autofocus: P,
        autocomplete: $,
        editable: o.value,
        activeDescendantId: I,
        value: r.value,
        onKeydown: R,
        onMousedown: N,
        onChange: u,
        onPaste: H,
        onCompositionstart: L,
        onCompositionend: F,
        tabindex: T,
        attrs: Bs(e, !0)
      }, null)]), !n.value && A && !a.value && h("span", {
        class: `${g}-selection-item`,
        title: l.value
      }, [h(Je, {
        key: (p = A.key) !== null && p !== void 0 ? p : A.value
      }, [G])]), s()]);
    };
  }
});
d0.props = X5;
d0.inheritAttrs = !1;
function Q5(e) {
  return ![
    // System function button
    it.ESC,
    it.SHIFT,
    it.BACKSPACE,
    it.TAB,
    it.WIN_KEY,
    it.ALT,
    it.META,
    it.WIN_KEY_RIGHT,
    it.CTRL,
    it.SEMICOLON,
    it.EQUALS,
    it.CAPS_LOCK,
    it.CONTEXT_MENU,
    // F1-F12
    it.F1,
    it.F2,
    it.F3,
    it.F4,
    it.F5,
    it.F6,
    it.F7,
    it.F8,
    it.F9,
    it.F10,
    it.F11,
    it.F12
  ].includes(e);
}
function lT() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 250, t = null, n;
  qt(() => {
    clearTimeout(n);
  });
  function o(r) {
    (r || t === null) && (t = r), clearTimeout(n), n = setTimeout(() => {
      t = null;
    }, e);
  }
  return [() => t, o];
}
function xd() {
  const e = (t) => {
    e.current = t;
  };
  return e;
}
const Z5 = be({
  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: pe.array,
    multiple: {
      type: Boolean,
      default: void 0
    },
    mode: String,
    searchValue: String,
    activeValue: String,
    inputElement: pe.any,
    autofocus: {
      type: Boolean,
      default: void 0
    },
    activeDescendantId: String,
    tabindex: pe.oneOfType([pe.number, pe.string]),
    disabled: {
      type: Boolean,
      default: void 0
    },
    placeholder: pe.any,
    removeIcon: pe.any,
    // Tags
    maxTagCount: pe.oneOfType([pe.number, pe.string]),
    maxTagTextLength: Number,
    maxTagPlaceholder: pe.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 = xd(), r = le(!1), [i, a] = lT(0), l = (x) => {
      const {
        which: S
      } = x;
      (S === it.UP || S === it.DOWN) && x.preventDefault(), e.onInputKeyDown && e.onInputKeyDown(x), S === it.ENTER && e.mode === "tags" && !r.value && !e.open && e.onSearchSubmit(x.target.value), Q5(S) && e.onToggleOpen(!0);
    }, s = () => {
      a(!0);
    };
    let u = null;
    const c = (x) => {
      e.onSearch(x, !0, r.value) !== !1 && e.onToggleOpen(!0);
    }, d = () => {
      r.value = !0;
    }, f = (x) => {
      r.value = !1, e.mode !== "combobox" && c(x.target.value);
    }, p = (x) => {
      let {
        target: {
          value: S
        }
      } = x;
      if (e.tokenWithEnter && u && /[\r\n]/.test(u)) {
        const C = u.replace(/[\r\n]+$/, "").replace(/\r\n/g, " ").replace(/[\r\n]/g, " ");
        S = S.replace(C, u);
      }
      u = null, c(S);
    }, v = (x) => {
      const {
        clipboardData: S
      } = x;
      u = S.getData("text");
    }, g = (x) => {
      let {
        target: S
      } = x;
      S !== o.current && (document.body.style.msTouchAction !== void 0 ? setTimeout(() => {
        o.current.focus();
      }) : o.current.focus());
    }, m = (x) => {
      const S = i();
      x.target !== o.current && !S && x.preventDefault(), (e.mode !== "combobox" && (!e.showSearch || !S) || !e.open) && (e.open && e.onSearch("", !0, !1), e.onToggleOpen());
    };
    return n({
      focus: () => {
        o.current.focus();
      },
      blur: () => {
        o.current.blur();
      }
    }), () => {
      const {
        prefixCls: x,
        domRef: S,
        mode: C
      } = e, P = {
        inputRef: o,
        onInputKeyDown: l,
        onInputMouseDown: s,
        onInputChange: p,
        onInputPaste: v,
        compositionStatus: r.value,
        onInputCompositionStart: d,
        onInputCompositionEnd: f
      }, $ = C === "multiple" || C === "tags" ? h(U5, Q(Q({}, e), P), null) : h(d0, Q(Q({}, e), P), null);
      return h("div", {
        ref: S,
        class: `${x}-selector`,
        onClick: g,
        onMousedown: m
      }, [$]);
    };
  }
});
function J5(e, t, n) {
  function o(r) {
    var i, a, l;
    let s = r.target;
    s.shadowRoot && r.composed && (s = r.composedPath()[0] || s);
    const u = [(i = e[0]) === null || i === void 0 ? void 0 : i.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);
  }
  At(() => {
    window.addEventListener("mousedown", o);
  }), qt(() => {
    window.removeEventListener("mousedown", o);
  });
}
function eH() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 10;
  const t = $e(!1);
  let n;
  const o = () => {
    clearTimeout(n);
  };
  return At(() => {
    o();
  }), [t, (i, a) => {
    o(), n = setTimeout(() => {
      t.value = i, a && a();
    }, e);
  }, o];
}
const sT = Symbol("BaseSelectContextKey");
function tH(e) {
  return Bt(sT, e);
}
function nH() {
  return zt(sT, {});
}
const f0 = (() => {
  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 uT(e) {
  if (!DP(e)) return $n(e);
  const t = new Proxy({}, {
    get(n, o, r) {
      return Reflect.get(e.value, o, r);
    },
    set(n, o, r) {
      return e.value[o] = r, !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 $n(t);
}
var oH = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const rH = ["value", "onChange", "removeIcon", "placeholder", "autofocus", "maxTagCount", "maxTagTextLength", "maxTagPlaceholder", "choiceTransitionName", "onInputKeyDown", "onPopupScroll", "tabindex", "OptionList", "notFoundContent"], iH = () => ({
  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: pe.any,
  /** Tell if provided `options` is empty */
  emptyOptions: Boolean
}), cT = () => ({
  showSearch: {
    type: Boolean,
    default: void 0
  },
  tagRender: {
    type: Function
  },
  optionLabelRender: {
    type: Function
  },
  direction: {
    type: String
  },
  // MISC
  tabindex: Number,
  autofocus: Boolean,
  notFoundContent: pe.any,
  placeholder: pe.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: pe.any,
  // >>> Search
  tokenSeparators: {
    type: Array
  },
  // >>> Icons
  allowClear: {
    type: Boolean,
    default: void 0
  },
  showArrow: {
    type: Boolean,
    default: void 0
  },
  inputIcon: pe.any,
  /** Clear all icon */
  clearIcon: pe.any,
  /** Selector remove icon */
  removeIcon: pe.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
}), aH = () => O(O({}, iH()), cT());
function p0(e) {
  return e === "tags" || e === "multiple";
}
const lH = be({
  compatConfig: {
    MODE: 3
  },
  name: "BaseSelect",
  inheritAttrs: !1,
  props: Mn(aH(), {
    showAction: [],
    notFoundContent: "Not Found"
  }),
  setup(e, t) {
    let {
      attrs: n,
      expose: o,
      slots: r
    } = t;
    const i = E(() => p0(e.mode)), a = E(() => e.showSearch !== void 0 ? e.showSearch : i.value || e.mode === "combobox"), l = $e(!1);
    At(() => {
      l.value = f0();
    });
    const s = c0(), u = $e(null), c = xd(), d = $e(null), f = $e(null), p = $e(null), v = le(!1), [g, m, x] = eH();
    o({
      focus: () => {
        var fe;
        (fe = f.value) === null || fe === void 0 || fe.focus();
      },
      blur: () => {
        var fe;
        (fe = f.value) === null || fe === void 0 || fe.blur();
      },
      scrollTo: (fe) => {
        var ge;
        return (ge = p.value) === null || ge === void 0 ? void 0 : ge.scrollTo(fe);
      }
    });
    const P = E(() => {
      var fe;
      if (e.mode !== "combobox")
        return e.searchValue;
      const ge = (fe = e.displayValues[0]) === null || fe === void 0 ? void 0 : fe.value;
      return typeof ge == "string" || typeof ge == "number" ? String(ge) : "";
    }), $ = e.open !== void 0 ? e.open : e.defaultOpen, I = $e($), w = $e($), T = (fe) => {
      I.value = e.open !== void 0 ? e.open : fe, w.value = I.value;
    };
    Ie(() => e.open, () => {
      T(e.open);
    });
    const M = E(() => !e.notFoundContent && e.emptyOptions);
    It(() => {
      w.value = I.value, (e.disabled || M.value && w.value && e.mode === "combobox") && (w.value = !1);
    });
    const R = E(() => M.value ? !1 : w.value), N = (fe) => {
      const ge = fe !== void 0 ? fe : !w.value;
      w.value !== ge && !e.disabled && (T(ge), e.onDropdownVisibleChange && e.onDropdownVisibleChange(ge), !ge && U.value && (U.value = !1, m(!1, () => {
        K.value = !1, v.value = !1;
      })));
    }, H = E(() => (e.tokenSeparators || []).some((fe) => [`
`, `\r
`].includes(fe))), L = (fe, ge, Te) => {
      var ze, Ke;
      let He = !0, Ne = fe;
      (ze = e.onActiveValueChange) === null || ze === void 0 || ze.call(e, null);
      const Xe = Te ? null : T6(fe, e.tokenSeparators);
      return e.mode !== "combobox" && Xe && (Ne = "", (Ke = e.onSearchSplit) === null || Ke === void 0 || Ke.call(e, Xe), N(!1), He = !1), e.onSearch && P.value !== Ne && e.onSearch(Ne, {
        source: ge ? "typing" : "effect"
      }), He;
    }, F = (fe) => {
      var ge;
      !fe || !fe.trim() || (ge = e.onSearch) === null || ge === void 0 || ge.call(e, fe, {
        source: "submit"
      });
    };
    Ie(w, () => {
      !w.value && !i.value && e.mode !== "combobox" && L("", !1, !1);
    }, {
      immediate: !0,
      flush: "post"
    }), Ie(() => e.disabled, () => {
      I.value && e.disabled && T(!1), e.disabled && !v.value && m(!1);
    }, {
      immediate: !0
    });
    const [A, G] = lT(), j = function(fe) {
      var ge;
      const Te = A(), {
        which: ze
      } = fe;
      if (ze === it.ENTER && (e.mode !== "combobox" && fe.preventDefault(), w.value || N(!0)), G(!!P.value), ze === it.BACKSPACE && !Te && i.value && !P.value && e.displayValues.length) {
        const Xe = [...e.displayValues];
        let De = null;
        for (let Fe = Xe.length - 1; Fe >= 0; Fe -= 1) {
          const Ve = Xe[Fe];
          if (!Ve.disabled) {
            Xe.splice(Fe, 1), De = Ve;
            break;
          }
        }
        De && e.onDisplayValuesChange(Xe, {
          type: "remove",
          values: [De]
        });
      }
      for (var Ke = arguments.length, He = new Array(Ke > 1 ? Ke - 1 : 0), Ne = 1; Ne < Ke; Ne++)
        He[Ne - 1] = arguments[Ne];
      w.value && p.value && p.value.onKeydown(fe, ...He), (ge = e.onKeydown) === null || ge === void 0 || ge.call(e, fe, ...He);
    }, Z = function(fe) {
      for (var ge = arguments.length, Te = new Array(ge > 1 ? ge - 1 : 0), ze = 1; ze < ge; ze++)
        Te[ze - 1] = arguments[ze];
      w.value && p.value && p.value.onKeyup(fe, ...Te), e.onKeyup && e.onKeyup(fe, ...Te);
    }, W = (fe) => {
      const ge = e.displayValues.filter((Te) => Te !== fe);
      e.onDisplayValuesChange(ge, {
        type: "remove",
        values: [fe]
      });
    }, K = $e(!1), q = function() {
      m(!0), e.disabled || (e.onFocus && !K.value && e.onFocus(...arguments), e.showAction && e.showAction.includes("focus") && N(!0)), K.value = !0;
    }, U = le(!1), ae = function() {
      if (U.value || (v.value = !0, m(!1, () => {
        K.value = !1, v.value = !1, N(!1);
      }), e.disabled))
        return;
      const fe = P.value;
      fe && (e.mode === "tags" ? e.onSearch(fe, {
        source: "submit"
      }) : e.mode === "multiple" && e.onSearch("", {
        source: "blur"
      })), e.onBlur && e.onBlur(...arguments);
    }, se = () => {
      U.value = !0;
    }, ie = () => {
      U.value = !1;
    };
    Bt("VCSelectContainerEvent", {
      focus: q,
      blur: ae
    });
    const re = [];
    At(() => {
      re.forEach((fe) => clearTimeout(fe)), re.splice(0, re.length);
    }), qt(() => {
      re.forEach((fe) => clearTimeout(fe)), re.splice(0, re.length);
    });
    const te = function(fe) {
      var ge, Te;
      const {
        target: ze
      } = fe, Ke = (ge = d.value) === null || ge === void 0 ? void 0 : ge.getPopupElement();
      if (Ke && Ke.contains(ze)) {
        const De = setTimeout(() => {
          var Fe;
          const Ve = re.indexOf(De);
          Ve !== -1 && re.splice(Ve, 1), x(), !l.value && !Ke.contains(document.activeElement) && ((Fe = f.value) === null || Fe === void 0 || Fe.focus());
        });
        re.push(De);
      }
      for (var He = arguments.length, Ne = new Array(He > 1 ? He - 1 : 0), Xe = 1; Xe < He; Xe++)
        Ne[Xe - 1] = arguments[Xe];
      (Te = e.onMousedown) === null || Te === void 0 || Te.call(e, fe, ...Ne);
    }, ve = $e(null), ce = () => {
    };
    return At(() => {
      Ie(R, () => {
        var fe;
        if (R.value) {
          const ge = Math.ceil((fe = u.value) === null || fe === void 0 ? void 0 : fe.offsetWidth);
          ve.value !== ge && !Number.isNaN(ge) && (ve.value = ge);
        }
      }, {
        immediate: !0,
        flush: "post"
      });
    }), J5([u, d], R, N), tH(uT(O(O({}, ys(e)), {
      open: w,
      triggerOpen: R,
      showSearch: a,
      multiple: i,
      toggleOpen: N
    }))), () => {
      const fe = O(O({}, e), n), {
        prefixCls: ge,
        id: Te,
        open: ze,
        defaultOpen: Ke,
        mode: He,
        // Search related
        showSearch: Ne,
        searchValue: Xe,
        onSearch: De,
        // Icons
        allowClear: Fe,
        clearIcon: Ve,
        showArrow: ot,
        inputIcon: je,
        // Others
        disabled: Pe,
        loading: Ge,
        getInputElement: Se,
        getPopupContainer: Ce,
        placement: Ae,
        // Dropdown
        animation: qe,
        transitionName: We,
        dropdownStyle: tt,
        dropdownClassName: Ee,
        dropdownMatchSelectWidth: Re,
        dropdownRender: Be,
        dropdownAlign: rt,
        showAction: pt,
        direction: at,
        // Tags
        tokenSeparators: ft,
        tagRender: wt,
        optionLabelRender: Ct,
        // Events
        onPopupScroll: St,
        onDropdownVisibleChange: yt,
        onFocus: Ot,
        onBlur: Wt,
        onKeyup: Xt,
        onKeydown: ln,
        onMousedown: pn,
        onClear: gt,
        omitDomProps: En,
        getRawInputElement: hn,
        displayValues: Kn,
        onDisplayValuesChange: so,
        emptyOptions: Uo,
        activeDescendantId: Ue,
        activeValue: ht,
        OptionList: vt
      } = fe, Zt = oH(fe, ["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"]), Zn = He === "combobox" && Se && Se() || null, Qn = typeof hn == "function" && hn(), $o = O({}, Zt);
      let Sn;
      Qn && (Sn = (Jn) => {
        N(Jn);
      }), rH.forEach((Jn) => {
        delete $o[Jn];
      }), En?.forEach((Jn) => {
        delete $o[Jn];
      });
      const Tt = ot !== void 0 ? ot : Ge || !i.value && He !== "combobox";
      let po;
      Tt && (po = h(Ms, {
        class: Me(`${ge}-arrow`, {
          [`${ge}-arrow-loading`]: Ge
        }),
        customizeIcon: je,
        customizeIconProps: {
          loading: Ge,
          searchValue: P.value,
          open: w.value,
          focused: g.value,
          showSearch: a.value
        }
      }, null));
      let zo;
      const un = () => {
        gt?.(), so([], {
          type: "clear",
          values: Kn
        }), L("", !1, !1);
      };
      !Pe && Fe && (Kn.length || P.value) && (zo = h(Ms, {
        class: `${ge}-clear`,
        onMousedown: un,
        customizeIcon: Ve
      }, {
        default: () => [Le("×")]
      }));
      const Dn = h(vt, {
        ref: p
      }, O(O({}, s.customSlots), {
        option: r.option
      })), cn = Me(ge, n.class, {
        [`${ge}-focused`]: g.value,
        [`${ge}-multiple`]: i.value,
        [`${ge}-single`]: !i.value,
        [`${ge}-allow-clear`]: Fe,
        [`${ge}-show-arrow`]: Tt,
        [`${ge}-disabled`]: Pe,
        [`${ge}-loading`]: Ge,
        [`${ge}-open`]: w.value,
        [`${ge}-customize-input`]: Zn,
        [`${ge}-show-search`]: a.value
      }), An = h(M5, {
        ref: d,
        disabled: Pe,
        prefixCls: ge,
        visible: R.value,
        popupElement: Dn,
        containerWidth: ve.value,
        animation: qe,
        transitionName: We,
        dropdownStyle: tt,
        dropdownClassName: Ee,
        direction: at,
        dropdownMatchSelectWidth: Re,
        dropdownRender: Be,
        dropdownAlign: rt,
        placement: Ae,
        getPopupContainer: Ce,
        empty: Uo,
        getTriggerDOMNode: () => c.current,
        onPopupVisibleChange: Sn,
        onPopupMouseEnter: ce,
        onPopupFocusin: se,
        onPopupFocusout: ie
      }, {
        default: () => Qn ? Ao(Qn) && Xn(Qn, {
          ref: c
        }, !1, !0) : h(Z5, Q(Q({}, e), {}, {
          domRef: c,
          prefixCls: ge,
          inputElement: Zn,
          ref: f,
          id: Te,
          showSearch: a.value,
          mode: He,
          activeDescendantId: Ue,
          tagRender: wt,
          optionLabelRender: Ct,
          values: Kn,
          open: w.value,
          onToggleOpen: N,
          activeValue: ht,
          searchValue: P.value,
          onSearch: L,
          onSearchSubmit: F,
          onRemove: W,
          tokenWithEnter: H.value
        }), null)
      });
      let er;
      return Qn ? er = An : er = h("div", Q(Q({}, $o), {}, {
        class: cn,
        ref: u,
        onMousedown: te,
        onKeydown: j,
        onKeyup: Z
      }), [g.value && !w.value && h("span", {
        style: {
          width: 0,
          height: 0,
          position: "absolute",
          overflow: "hidden",
          opacity: 0
        },
        "aria-live": "polite"
      }, [`${Kn.map((Jn) => {
        let {
          label: hr,
          value: jo
        } = Jn;
        return ["number", "string"].includes(typeof hr) ? hr : jo;
      }).join(", ")}`]), An, po, zo]), er;
    };
  }
}), zh = (e, t) => {
  let {
    height: n,
    offset: o,
    prefixCls: r,
    onInnerResize: i
  } = 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 = O(O({}, u), {
    transform: `translateY(${o}px)`,
    position: "absolute",
    left: 0,
    right: 0,
    top: 0
  })), h("div", {
    style: s
  }, [h(Al, {
    onResize: (c) => {
      let {
        offsetHeight: d
      } = c;
      d && i && i();
    }
  }, {
    default: () => [h("div", {
      style: u,
      class: Me({
        [`${r}-holder-inner`]: r
      })
    }, [(l = a.default) === null || l === void 0 ? void 0 : l.call(a)])]
  })]);
};
zh.displayName = "Filter";
zh.inheritAttrs = !1;
zh.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 dT = (e, t) => {
  let {
    setRef: n
  } = e, {
    slots: o
  } = t;
  var r;
  const i = go((r = o.default) === null || r === void 0 ? void 0 : r.call(o));
  return i && i.length ? Ml(i[0], {
    ref: n
  }) : i;
};
dT.props = {
  setRef: {
    type: Function,
    default: () => {
    }
  }
};
const sH = 20;
function Q1(e) {
  return "touches" in e ? e.touches[0].pageY : e.pageY;
}
const uH = be({
  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: xd(),
      thumbRef: xd(),
      visibleTimeout: null,
      state: $n({
        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)), Vt.cancel(this.moveRaf);
    },
    // ======================= Thumb =======================
    onMouseDown(e) {
      const {
        onStartMove: t
      } = this.$props;
      O(this.state, {
        dragging: !0,
        pageY: Q1(e),
        startTop: this.getTop()
      }), t(), this.patchEvents(), e.stopPropagation(), e.preventDefault();
    },
    onMouseMove(e) {
      const {
        dragging: t,
        pageY: n,
        startTop: o
      } = this.state, {
        onScroll: r
      } = this.$props;
      if (Vt.cancel(this.moveRaf), t) {
        const i = Q1(e) - n, a = o + i, l = this.getEnableScrollRange(), s = this.getEnableHeightRange(), u = s ? a / s : 0, c = Math.ceil(u * l);
        this.moveRaf = Vt(() => {
          r(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, sH), 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", r = this.getTop() + "px", i = this.showScroll(), a = i && t;
    return h("div", {
      ref: this.scrollbarRef,
      class: Me(`${n}-scrollbar`, {
        [`${n}-scrollbar-show`]: i
      }),
      style: {
        width: "8px",
        top: 0,
        bottom: 0,
        right: 0,
        position: "absolute",
        display: a ? void 0 : "none"
      },
      onMousedown: this.onContainerMouseDown,
      onMousemove: this.delayHidden
    }, [h("div", {
      ref: this.thumbRef,
      class: Me(`${n}-scrollbar-thumb`, {
        [`${n}-scrollbar-thumb-moving`]: e
      }),
      style: {
        width: "100%",
        height: o,
        top: r,
        left: 0,
        position: "absolute",
        background: "rgba(0, 0, 0, 0.5)",
        borderRadius: "99px",
        cursor: "pointer",
        userSelect: "none"
      },
      onMousedown: this.onMouseDown
    }, null)]);
  }
});
function cH(e, t, n, o) {
  const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = le(Symbol("update"));
  Ie(e, () => {
    a.value = Symbol("update");
  });
  let l;
  function s() {
    Vt.cancel(l);
  }
  function u() {
    s(), l = Vt(() => {
      r.forEach((d, f) => {
        if (d && d.offsetParent) {
          const {
            offsetHeight: p
          } = d;
          i.get(f) !== p && (a.value = Symbol("update"), i.set(f, d.offsetHeight));
        }
      });
    });
  }
  function c(d, f) {
    const p = t(d);
    r.get(p), f ? (r.set(p, f.$el || f), u()) : r.delete(p);
  }
  return Vo(() => {
    s();
  }), [c, u, i, a];
}
function dH(e, t, n, o, r, i, a, l) {
  let s;
  return (u) => {
    if (u == null) {
      l();
      return;
    }
    Vt.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((m) => r(m) === u.key);
      const {
        offset: v = 0
      } = u, g = (m, x) => {
        if (m < 0 || !e.value) return;
        const S = e.value.clientHeight;
        let C = !1, P = x;
        if (S) {
          const $ = x || p;
          let I = 0, w = 0, T = 0;
          const M = Math.min(c.length, f);
          for (let H = 0; H <= M; H += 1) {
            const L = r(c[H]);
            w = I;
            const F = n.get(L);
            T = w + (F === void 0 ? d : F), I = T, H === f && F === void 0 && (C = !0);
          }
          const R = e.value.scrollTop;
          let N = null;
          switch ($) {
            case "top":
              N = w - v;
              break;
            case "bottom":
              N = T - S + v;
              break;
            default: {
              const H = R + S;
              w < R ? P = "top" : T > H && (P = "bottom");
            }
          }
          N !== null && N !== R && a(N);
        }
        s = Vt(() => {
          C && i(), g(m - 1, P);
        }, 2);
      };
      g(5);
    }
  };
}
const fH = typeof navigator == "object" && /Firefox/i.test(navigator.userAgent), fT = ((e, t) => {
  let n = !1, o = null;
  function r() {
    clearTimeout(o), n = !0, o = setTimeout(() => {
      n = !1;
    }, 50);
  }
  return function(i) {
    let a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
    const l = (
      // Pass origin wheel when on the top
      i < 0 && e.value || // Pass origin wheel when on the bottom
      i > 0 && t.value
    );
    return a && l ? (clearTimeout(o), n = !1) : (!l || n) && r(), !n && l;
  };
});
function pH(e, t, n, o) {
  let r = 0, i = null, a = null, l = !1;
  const s = fT(t, n);
  function u(d) {
    if (!e.value) return;
    Vt.cancel(i);
    const {
      deltaY: f
    } = d;
    r += f, a = f, !s(f) && (fH || d.preventDefault(), i = Vt(() => {
      o(r * (l ? 10 : 1)), r = 0;
    }));
  }
  function c(d) {
    e.value && (l = d.detail === a);
  }
  return [u, c];
}
const hH = 14 / 15;
function gH(e, t, n) {
  let o = !1, r = 0, i = null, a = null;
  const l = () => {
    i && (i.removeEventListener("touchmove", s), i.removeEventListener("touchend", u));
  }, s = (f) => {
    if (o) {
      const p = Math.ceil(f.touches[0].pageY);
      let v = r - p;
      r = p, n(v) && f.preventDefault(), clearInterval(a), a = setInterval(() => {
        v *= hH, (!n(v, !0) || Math.abs(v) <= 0.1) && clearInterval(a);
      }, 16);
    }
  }, u = () => {
    o = !1, l();
  }, c = (f) => {
    l(), f.touches.length === 1 && !o && (o = !0, r = Math.ceil(f.touches[0].pageY), i = f.target, i.addEventListener("touchmove", s, {
      passive: !1
    }), i.addEventListener("touchend", u));
  }, d = () => {
  };
  At(() => {
    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
    });
  }), qt(() => {
    document.removeEventListener("touchmove", d);
  });
}
var vH = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const mH = [], bH = {
  overflowY: "auto",
  overflowAnchor: "none"
};
function yH(e, t, n, o, r, i) {
  let {
    getKey: a
  } = i;
  return e.slice(t, n + 1).map((l, s) => {
    const u = t + s, c = r(l, u, {
      // style: status === 'MEASURE_START' ? { visibility: 'hidden' } : {},
    }), d = a(l);
    return h(dT, {
      key: d,
      setRef: (f) => o(l, f)
    }, {
      default: () => [c]
    });
  });
}
const pT = be({
  compatConfig: {
    MODE: 3
  },
  name: "List",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    data: pe.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 = E(() => {
      const {
        height: W,
        itemHeight: K,
        virtual: q
      } = e;
      return !!(q !== !1 && W && K);
    }), r = E(() => {
      const {
        height: W,
        itemHeight: K,
        data: q
      } = e;
      return o.value && q && K * q.length > W;
    }), i = $n({
      scrollTop: 0,
      scrollMoving: !1
    }), a = E(() => e.data || mH), l = $e([]);
    Ie(a, () => {
      l.value = fr(a.value).slice();
    }, {
      immediate: !0
    });
    const s = $e((W) => {
    });
    Ie(() => e.itemKey, (W) => {
      typeof W == "function" ? s.value = W : s.value = (K) => K?.[W];
    }, {
      immediate: !0
    });
    const u = $e(), c = $e(), d = $e(), f = (W) => s.value(W), p = {
      getKey: f
    };
    function v(W) {
      let K;
      typeof W == "function" ? K = W(i.scrollTop) : K = W;
      const q = I(K);
      u.value && (u.value.scrollTop = q), i.scrollTop = q;
    }
    const [g, m, x, S] = cH(l, f), C = $n({
      scrollHeight: void 0,
      start: 0,
      end: 0,
      offset: void 0
    }), P = $e(0);
    At(() => {
      Yt(() => {
        var W;
        P.value = ((W = c.value) === null || W === void 0 ? void 0 : W.offsetHeight) || 0;
      });
    }), Ya(() => {
      Yt(() => {
        var W;
        P.value = ((W = c.value) === null || W === void 0 ? void 0 : W.offsetHeight) || 0;
      });
    }), Ie([o, l], () => {
      o.value || O(C, {
        scrollHeight: void 0,
        start: 0,
        end: l.value.length - 1,
        offset: void 0
      });
    }, {
      immediate: !0
    }), Ie([o, l, P, r], () => {
      o.value && !r.value && O(C, {
        scrollHeight: P.value,
        start: 0,
        end: l.value.length - 1,
        offset: void 0
      }), u.value && (i.scrollTop = u.value.scrollTop);
    }, {
      immediate: !0
    }), Ie([r, o, () => i.scrollTop, l, S, () => e.height, P], () => {
      if (!o.value || !r.value)
        return;
      let W = 0, K, q, U;
      const ae = l.value.length, se = l.value, ie = i.scrollTop, {
        itemHeight: re,
        height: te
      } = e, ve = ie + te;
      for (let ce = 0; ce < ae; ce += 1) {
        const fe = se[ce], ge = f(fe);
        let Te = x.get(ge);
        Te === void 0 && (Te = re);
        const ze = W + Te;
        K === void 0 && ze >= ie && (K = ce, q = W), U === void 0 && ze > ve && (U = ce), W = ze;
      }
      K === void 0 && (K = 0, q = 0, U = Math.ceil(te / re)), U === void 0 && (U = ae - 1), U = Math.min(U + 1, ae), O(C, {
        scrollHeight: W,
        start: K,
        end: U,
        offset: q
      });
    }, {
      immediate: !0
    });
    const $ = E(() => C.scrollHeight - e.height);
    function I(W) {
      let K = W;
      return Number.isNaN($.value) || (K = Math.min(K, $.value)), K = Math.max(K, 0), K;
    }
    const w = E(() => i.scrollTop <= 0), T = E(() => i.scrollTop >= $.value), M = fT(w, T);
    function R(W) {
      v(W);
    }
    function N(W) {
      var K;
      const {
        scrollTop: q
      } = W.currentTarget;
      q !== i.scrollTop && v(q), (K = e.onScroll) === null || K === void 0 || K.call(e, W);
    }
    const [H, L] = pH(o, w, T, (W) => {
      v((K) => K + W);
    });
    gH(o, u, (W, K) => M(W, K) ? !1 : (H({
      preventDefault() {
      },
      deltaY: W
    }), !0));
    function F(W) {
      o.value && W.preventDefault();
    }
    const A = () => {
      u.value && (u.value.removeEventListener("wheel", H, Bo ? {
        passive: !1
      } : !1), u.value.removeEventListener("DOMMouseScroll", L), u.value.removeEventListener("MozMousePixelScroll", F));
    };
    It(() => {
      Yt(() => {
        u.value && (A(), u.value.addEventListener("wheel", H, Bo ? {
          passive: !1
        } : !1), u.value.addEventListener("DOMMouseScroll", L), u.value.addEventListener("MozMousePixelScroll", F));
      });
    }), qt(() => {
      A();
    });
    const G = dH(u, l, x, e, f, m, v, () => {
      var W;
      (W = d.value) === null || W === void 0 || W.delayHidden();
    });
    n({
      scrollTo: G
    });
    const j = E(() => {
      let W = null;
      return e.height && (W = O({
        [e.fullHeight ? "height" : "maxHeight"]: e.height + "px"
      }, bH), o.value && (W.overflowY = "hidden", i.scrollMoving && (W.pointerEvents = "none"))), W;
    });
    return Ie([() => C.start, () => C.end, l], () => {
      if (e.onVisibleChange) {
        const W = l.value.slice(C.start, C.end + 1);
        e.onVisibleChange(W, l.value);
      }
    }, {
      flush: "post"
    }), {
      state: i,
      mergedData: l,
      componentStyle: j,
      onFallbackScroll: N,
      onScrollBar: R,
      componentRef: u,
      useVirtual: o,
      calRes: C,
      collectHeight: m,
      setInstance: g,
      sharedConfig: p,
      scrollBarRef: d,
      fillerInnerRef: c,
      delayHideScrollBar: () => {
        var W;
        (W = d.value) === null || W === void 0 || W.delayHidden();
      }
    };
  },
  render() {
    const e = O(O({}, this.$props), this.$attrs), {
      prefixCls: t = "rc-virtual-list",
      height: n,
      itemHeight: o,
      // eslint-disable-next-line no-unused-vars
      fullHeight: r,
      data: i,
      itemKey: a,
      virtual: l,
      component: s = "div",
      onScroll: u,
      children: c = this.$slots.default,
      style: d,
      class: f
    } = e, p = vH(e, ["prefixCls", "height", "itemHeight", "fullHeight", "data", "itemKey", "virtual", "component", "onScroll", "children", "style", "class"]), v = Me(t, f), {
      scrollTop: g
    } = this.state, {
      scrollHeight: m,
      offset: x,
      start: S,
      end: C
    } = this.calRes, {
      componentStyle: P,
      onFallbackScroll: $,
      onScrollBar: I,
      useVirtual: w,
      collectHeight: T,
      sharedConfig: M,
      setInstance: R,
      mergedData: N,
      delayHideScrollBar: H
    } = this;
    return h("div", Q({
      style: O(O({}, d), {
        position: "relative"
      }),
      class: v
    }, p), [h(s, {
      class: `${t}-holder`,
      style: P,
      ref: "componentRef",
      onScroll: $,
      onMouseenter: H
    }, {
      default: () => [h(zh, {
        prefixCls: t,
        height: m,
        offset: x,
        onInnerResize: T,
        ref: "fillerInnerRef"
      }, {
        default: () => yH(N, S, C, R, c, M)
      })]
    }), w && h(uH, {
      ref: "scrollBarRef",
      prefixCls: t,
      scrollTop: g,
      height: n,
      scrollHeight: m,
      count: N.length,
      onScroll: I,
      onStartMove: () => {
        this.state.scrollMoving = !0;
      },
      onStopMove: () => {
        this.state.scrollMoving = !1;
      }
    }, null)]);
  }
});
function hT(e, t, n) {
  const o = le(e());
  return Ie(t, (r, i) => {
    n ? n(r, i) && (o.value = e()) : o.value = e();
  }), o;
}
function xH() {
  return /(mac\sos|macintosh)/i.test(navigator.appVersion);
}
const gT = Symbol("SelectContextKey");
function wH(e) {
  return Bt(gT, e);
}
function SH() {
  return zt(gT, {});
}
var CH = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
function Z1(e) {
  return typeof e == "string" || typeof e == "number";
}
const $H = be({
  compatConfig: {
    MODE: 3
  },
  name: "OptionList",
  inheritAttrs: !1,
  setup(e, t) {
    let {
      expose: n,
      slots: o
    } = t;
    const r = nH(), i = SH(), a = E(() => `${r.prefixCls}-item`), l = hT(() => i.flattenOptions, [() => r.open, () => i.flattenOptions], ($) => $[0]), s = xd(), u = ($) => {
      $.preventDefault();
    }, c = ($) => {
      s.current && s.current.scrollTo(typeof $ == "number" ? {
        index: $
      } : $);
    }, d = function($) {
      let I = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
      const w = l.value.length;
      for (let T = 0; T < w; T += 1) {
        const M = ($ + T * I + w) % w, {
          group: R,
          data: N
        } = l.value[M];
        if (!R && !N.disabled)
          return M;
      }
      return -1;
    }, f = $n({
      activeIndex: d(0)
    }), p = function($) {
      let I = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
      f.activeIndex = $;
      const w = {
        source: I ? "keyboard" : "mouse"
      }, T = l.value[$];
      if (!T) {
        i.onActiveValue(null, -1, w);
        return;
      }
      i.onActiveValue(T.value, $, w);
    };
    Ie([() => l.value.length, () => r.searchValue], () => {
      p(i.defaultActiveFirstOption !== !1 ? d(0) : -1);
    }, {
      immediate: !0
    });
    const v = ($) => i.rawValues.has($) && r.mode !== "combobox";
    Ie([() => r.open, () => r.searchValue], () => {
      if (!r.multiple && r.open && i.rawValues.size === 1) {
        const $ = Array.from(i.rawValues)[0], I = fr(l.value).findIndex((w) => {
          let {
            data: T
          } = w;
          return T[i.fieldNames.value] === $;
        });
        I !== -1 && (p(I), Yt(() => {
          c(I);
        }));
      }
      r.open && Yt(() => {
        var $;
        ($ = s.current) === null || $ === void 0 || $.scrollTo(void 0);
      });
    }, {
      immediate: !0,
      flush: "post"
    });
    const g = ($) => {
      $ !== void 0 && i.onSelect($, {
        selected: !i.rawValues.has($)
      }), r.multiple || r.toggleOpen(!1);
    }, m = ($) => typeof $.label == "function" ? $.label() : $.label;
    function x($) {
      const I = l.value[$];
      if (!I) return null;
      const w = I.data || {}, {
        value: T
      } = w, {
        group: M
      } = I, R = Bs(w, !0), N = m(I);
      return I ? h("div", Q(Q({
        "aria-label": typeof N == "string" && !M ? N : null
      }, R), {}, {
        key: $,
        role: M ? "presentation" : "option",
        id: `${r.id}_list_${$}`,
        "aria-selected": v(T)
      }), [T]) : null;
    }
    return n({
      onKeydown: ($) => {
        const {
          which: I,
          ctrlKey: w
        } = $;
        switch (I) {
          // >>> Arrow keys & ctrl + n/p on Mac
          case it.N:
          case it.P:
          case it.UP:
          case it.DOWN: {
            let T = 0;
            if (I === it.UP ? T = -1 : I === it.DOWN ? T = 1 : xH() && w && (I === it.N ? T = 1 : I === it.P && (T = -1)), T !== 0) {
              const M = d(f.activeIndex + T, T);
              c(M), p(M, !0);
            }
            break;
          }
          // >>> Select
          case it.ENTER: {
            const T = l.value[f.activeIndex];
            T && !T.data.disabled ? g(T.value) : g(void 0), r.open && $.preventDefault();
            break;
          }
          // >>> Close
          case it.ESC:
            r.toggleOpen(!1), r.open && $.stopPropagation();
        }
      },
      onKeyup: () => {
      },
      scrollTo: ($) => {
        c($);
      }
    }), () => {
      const {
        id: $,
        notFoundContent: I,
        onPopupScroll: w
      } = r, {
        menuItemSelectedIcon: T,
        fieldNames: M,
        virtual: R,
        listHeight: N,
        listItemHeight: H
      } = i, L = o.option, {
        activeIndex: F
      } = f, A = Object.keys(M).map((G) => M[G]);
      return l.value.length === 0 ? h("div", {
        role: "listbox",
        id: `${$}_list`,
        class: `${a.value}-empty`,
        onMousedown: u
      }, [I]) : h(Je, null, [h("div", {
        role: "listbox",
        id: `${$}_list`,
        style: {
          height: 0,
          width: 0,
          overflow: "hidden"
        }
      }, [x(F - 1), x(F), x(F + 1)]), h(pT, {
        itemKey: "key",
        ref: s,
        data: l.value,
        height: N,
        itemHeight: H,
        fullHeight: !1,
        onMousedown: u,
        onScroll: w,
        virtual: R
      }, {
        default: (G, j) => {
          var Z;
          const {
            group: W,
            groupOption: K,
            data: q,
            value: U
          } = G, {
            key: ae
          } = q, se = typeof G.label == "function" ? G.label() : G.label;
          if (W) {
            const Ve = (Z = q.title) !== null && Z !== void 0 ? Z : Z1(se) && se;
            return h("div", {
              class: Me(a.value, `${a.value}-group`),
              title: Ve
            }, [L ? L(q) : se !== void 0 ? se : ae]);
          }
          const {
            disabled: ie,
            title: re,
            children: te,
            style: ve,
            class: ce,
            className: fe
          } = q, ge = CH(q, ["disabled", "title", "children", "style", "class", "className"]), Te = Fn(ge, A), ze = v(U), Ke = `${a.value}-option`, He = Me(a.value, Ke, ce, fe, {
            [`${Ke}-grouped`]: K,
            [`${Ke}-active`]: F === j && !ie,
            [`${Ke}-disabled`]: ie,
            [`${Ke}-selected`]: ze
          }), Ne = m(G), Xe = !T || typeof T == "function" || ze, De = typeof Ne == "number" ? Ne : Ne || U;
          let Fe = Z1(De) ? De.toString() : void 0;
          return re !== void 0 && (Fe = re), h("div", Q(Q({}, Te), {}, {
            "aria-selected": ze,
            class: He,
            title: Fe,
            onMousemove: (Ve) => {
              ge.onMousemove && ge.onMousemove(Ve), !(F === j || ie) && p(j);
            },
            onClick: (Ve) => {
              ie || g(U), ge.onClick && ge.onClick(Ve);
            },
            style: ve
          }), [h("div", {
            class: `${Ke}-content`
          }, [L ? L(q) : De]), Ao(T) || ze, Xe && h(Ms, {
            class: `${a.value}-option-state`,
            customizeIcon: T,
            customizeIconProps: {
              isSelected: ze
            }
          }, {
            default: () => [ze ? "✓" : null]
          })]);
        }
      })]);
    };
  }
});
var PH = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
function OH(e) {
  const t = e, {
    key: n,
    children: o
  } = t, r = t.props, {
    value: i,
    disabled: a
  } = r, l = PH(r, ["value", "disabled"]), s = o?.default;
  return O({
    key: n,
    value: i !== void 0 ? i : n,
    children: s,
    disabled: a || a === ""
  }, l);
}
function h0(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  return go(e).map((o, r) => {
    var i;
    if (!Ao(o) || !o.type)
      return null;
    const {
      type: {
        isSelectOptGroup: a
      },
      key: l,
      children: s,
      props: u
    } = o;
    if (t || !a)
      return OH(o);
    const c = s && s.default ? s.default() : void 0, d = u?.label || ((i = s.label) === null || i === void 0 ? void 0 : i.call(s)) || l;
    return O(O({
      key: `__RC_SELECT_GRP__${l === null ? r : String(l)}__`
    }, u), {
      label: d,
      options: h0(c || [])
    });
  }).filter((o) => o);
}
function kH(e, t, n) {
  const o = $e(), r = $e(), i = $e(), a = $e([]);
  return Ie([e, t], () => {
    e.value ? a.value = fr(e.value).slice() : a.value = h0(t.value);
  }, {
    immediate: !0,
    deep: !0
  }), It(() => {
    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 v = 0; v < f.length; v += 1) {
        const g = f[v];
        !g[c.options] || p ? (s.set(g[c.value], g), u.set(g[c.label], g)) : d(g[c.options], !0);
      }
    }
    d(l), o.value = l, r.value = s, i.value = u;
  }), {
    options: o,
    valueOptions: r,
    labelOptions: i
  };
}
let J1 = 0;
const IH = process.env.NODE_ENV !== "test" && wr();
function TH() {
  let e;
  return IH ? (e = J1, J1 += 1) : e = "TEST_OR_SSR", e;
}
function _H() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : le("");
  const t = `rc_select_${TH()}`;
  return e.value || t;
}
function g0(e) {
  return Array.isArray(e) ? e : e !== void 0 ? [e] : [];
}
const MH = typeof window < "u" && window.document && window.document.documentElement;
process.env.NODE_ENV;
function EH(e) {
  const {
    mode: t,
    options: n,
    children: o,
    backfill: r,
    allowClear: i,
    placeholder: a,
    getInputElement: l,
    showSearch: s,
    onSearch: u,
    defaultOpen: c,
    autofocus: d,
    labelInValue: f,
    value: p,
    inputValue: v,
    optionLabelProp: g
  } = e, m = p0(t), x = s !== void 0 ? s : m || t === "combobox", S = n || h0(o);
  if (mr(t !== "tags" || S.every((C) => !C.disabled), "Please avoid setting option to disabled in tags mode since user can always type text as tag."), mr(t !== "combobox" || !g, "`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."), mr(t === "combobox" || !r, "`backfill` only works with `combobox` mode."), mr(t === "combobox" || !l, "`getInputElement` only work with `combobox` mode."), Pm(t !== "combobox" || !l || !i || !a, "Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."), u && !x && t !== "combobox" && t !== "tags" && mr(!1, "`onSearch` should work with `showSearch` instead of use alone."), Pm(!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 C = g0(p);
    mr(!f || C.every((P) => typeof P == "object" && ("key" in P || "value" in P)), "`value` should in shape of `{ value: string | number, label?: any }` when you set `labelInValue` to `true`"), mr(!m || Array.isArray(p), "`value` should be array when `mode` is `multiple` or `tags`");
  }
  if (o) {
    let C = null;
    o.some((P) => {
      var $;
      if (!Ao(P) || !P.type)
        return !1;
      const {
        type: I
      } = P;
      return I.isSelectOption ? !1 : I.isSelectOptGroup ? !((($ = P.children) === null || $ === void 0 ? void 0 : $.default()) || []).every((M) => !Ao(M) || !P.type || M.type.isSelectOption ? !0 : (C = M.type, !1)) : (C = I, !0);
    }), C && mr(!1, `\`children\` should be \`Select.Option\` or \`Select.OptGroup\` instead of \`${C.displayName || C.name || C}\`.`), mr(v === void 0, "`inputValue` is deprecated, please use `searchValue` instead.");
  }
}
function rv(e, t) {
  return g0(e).join("").toUpperCase().includes(t);
}
const DH = ((e, t, n, o, r) => E(() => {
  const i = n.value, a = r?.value, l = o?.value;
  if (!i || l === !1)
    return e.value;
  const {
    options: s,
    label: u,
    value: c
  } = t.value, d = [], f = typeof l == "function", p = i.toUpperCase(), v = f ? l : (m, x) => a ? rv(x[a], p) : x[s] ? rv(x[u !== "children" ? u : "label"], p) : rv(x[c], p), g = f ? (m) => Fm(m) : (m) => m;
  return e.value.forEach((m) => {
    if (m[s]) {
      if (v(i, g(m)))
        d.push(m);
      else {
        const S = m[s].filter((C) => v(i, g(C)));
        S.length && d.push(O(O({}, m), {
          [s]: S
        }));
      }
      return;
    }
    v(i, g(m)) && d.push(m);
  }), d;
})), AH = ((e, t) => {
  const n = $e({
    values: /* @__PURE__ */ new Map(),
    options: /* @__PURE__ */ new Map()
  });
  return [E(() => {
    const {
      values: i,
      options: a
    } = n.value, l = e.value.map((c) => {
      var d;
      return c.label === void 0 ? O(O({}, c), {
        label: (d = i.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;
  }), (i) => t.value.get(i) || n.value.options.get(i)];
});
function sr(e, t) {
  const {
    defaultValue: n,
    value: o = le()
  } = t || {};
  let r = typeof e == "function" ? e() : e;
  o.value !== void 0 && (r = _(o)), n !== void 0 && (r = typeof n == "function" ? n() : n);
  const i = le(r), a = le(r);
  It(() => {
    let s = o.value !== void 0 ? o.value : i.value;
    t.postState && (s = t.postState(s)), a.value = s;
  });
  function l(s) {
    const u = a.value;
    i.value = s, fr(a.value) !== s && t.onChange && t.onChange(s, u);
  }
  return Ie(o, () => {
    i.value = o.value;
  }), [a, l];
}
function Cn(e) {
  const t = typeof e == "function" ? e() : e, n = le(t);
  function o(r) {
    n.value = r;
  }
  return [n, o];
}
const NH = ["inputValue"];
function vT() {
  return O(O({}, cT()), {
    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: pe.any,
    mode: String,
    labelInValue: {
      type: Boolean,
      default: void 0
    },
    value: pe.any,
    defaultValue: pe.any,
    onChange: Function,
    children: Array
  });
}
function RH(e) {
  return !e || typeof e != "object";
}
const zH = be({
  compatConfig: {
    MODE: 3
  },
  name: "VcSelect",
  inheritAttrs: !1,
  props: Mn(vT(), {
    prefixCls: "vc-select",
    autoClearSearchValue: !0,
    listHeight: 200,
    listItemHeight: 20,
    dropdownMatchSelectWidth: !0
  }),
  setup(e, t) {
    let {
      expose: n,
      attrs: o,
      slots: r
    } = t;
    const i = _H(Kt(e, "id")), a = E(() => p0(e.mode)), l = E(() => !!(!e.options && e.children)), s = E(() => e.filterOption === void 0 && e.mode === "combobox" ? !1 : e.filterOption), u = E(() => jI(e.fieldNames, l.value)), [c, d] = sr("", {
      value: E(() => e.searchValue !== void 0 ? e.searchValue : e.inputValue),
      postState: (ce) => ce || ""
    }), f = kH(Kt(e, "options"), Kt(e, "children"), u), {
      valueOptions: p,
      labelOptions: v,
      options: g
    } = f, m = (ce) => g0(ce).map((ge) => {
      var Te, ze;
      let Ke, He, Ne, Xe;
      RH(ge) ? Ke = ge : (Ne = ge.key, He = ge.label, Ke = (Te = ge.value) !== null && Te !== void 0 ? Te : Ne);
      const De = p.value.get(Ke);
      return De && (He === void 0 && (He = De?.[e.optionLabelProp || u.value.label]), Ne === void 0 && (Ne = (ze = De?.key) !== null && ze !== void 0 ? ze : Ke), Xe = De?.disabled), {
        label: He,
        value: Ke,
        key: Ne,
        disabled: Xe,
        option: De
      };
    }), [x, S] = sr(e.defaultValue, {
      value: Kt(e, "value")
    }), C = E(() => {
      var ce;
      const fe = m(x.value);
      return e.mode === "combobox" && !(!((ce = fe[0]) === null || ce === void 0) && ce.value) ? [] : fe;
    }), [P, $] = AH(C, p), I = E(() => {
      if (!e.mode && P.value.length === 1) {
        const ce = P.value[0];
        if (ce.value === null && (ce.label === null || ce.label === void 0))
          return [];
      }
      return P.value.map((ce) => {
        var fe;
        return O(O({}, ce), {
          label: (fe = typeof ce.label == "function" ? ce.label() : ce.label) !== null && fe !== void 0 ? fe : ce.value
        });
      });
    }), w = E(() => new Set(P.value.map((ce) => ce.value)));
    It(() => {
      var ce;
      if (e.mode === "combobox") {
        const fe = (ce = P.value[0]) === null || ce === void 0 ? void 0 : ce.value;
        fe != null && d(String(fe));
      }
    }, {
      flush: "post"
    });
    const T = (ce, fe) => {
      const ge = fe ?? ce;
      return {
        [u.value.value]: ce,
        [u.value.label]: ge
      };
    }, M = $e();
    It(() => {
      if (e.mode !== "tags") {
        M.value = g.value;
        return;
      }
      const ce = g.value.slice(), fe = (ge) => p.value.has(ge);
      [...P.value].sort((ge, Te) => ge.value < Te.value ? -1 : 1).forEach((ge) => {
        const Te = ge.value;
        fe(Te) || ce.push(T(Te, ge.label));
      }), M.value = ce;
    });
    const R = DH(M, u, c, s, Kt(e, "optionFilterProp")), N = E(() => e.mode !== "tags" || !c.value || R.value.some((ce) => ce[e.optionFilterProp || "value"] === c.value) ? R.value : [T(c.value), ...R.value]), H = E(() => e.filterSort ? [...N.value].sort((ce, fe) => e.filterSort(ce, fe)) : N.value), L = E(() => I6(H.value, {
      fieldNames: u.value,
      childrenAsData: l.value
    })), F = (ce) => {
      const fe = m(ce);
      if (S(fe), e.onChange && // Trigger event only when value changed
      (fe.length !== P.value.length || fe.some((ge, Te) => {
        var ze;
        return ((ze = P.value[Te]) === null || ze === void 0 ? void 0 : ze.value) !== ge?.value;
      }))) {
        const ge = e.labelInValue ? fe.map((ze) => O(O({}, ze), {
          originLabel: ze.label,
          label: typeof ze.label == "function" ? ze.label() : ze.label
        })) : fe.map((ze) => ze.value), Te = fe.map((ze) => Fm($(ze.value)));
        e.onChange(
          // Value
          a.value ? ge : ge[0],
          // Option
          a.value ? Te : Te[0]
        );
      }
    }, [A, G] = Cn(null), [j, Z] = Cn(0), W = E(() => e.defaultActiveFirstOption !== void 0 ? e.defaultActiveFirstOption : e.mode !== "combobox"), K = function(ce, fe) {
      let {
        source: ge = "keyboard"
      } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
      Z(fe), e.backfill && e.mode === "combobox" && ce !== null && ge === "keyboard" && G(String(ce));
    }, q = (ce, fe) => {
      const ge = () => {
        var Te;
        const ze = $(ce), Ke = ze?.[u.value.label];
        return [e.labelInValue ? {
          label: typeof Ke == "function" ? Ke() : Ke,
          originLabel: Ke,
          value: ce,
          key: (Te = ze?.key) !== null && Te !== void 0 ? Te : ce
        } : ce, Fm(ze)];
      };
      if (fe && e.onSelect) {
        const [Te, ze] = ge();
        e.onSelect(Te, ze);
      } else if (!fe && e.onDeselect) {
        const [Te, ze] = ge();
        e.onDeselect(Te, ze);
      }
    }, U = (ce, fe) => {
      let ge;
      const Te = a.value ? fe.selected : !0;
      Te ? ge = a.value ? [...P.value, ce] : [ce] : ge = P.value.filter((ze) => ze.value !== ce), F(ge), q(ce, Te), e.mode === "combobox" ? G("") : (!a.value || e.autoClearSearchValue) && (d(""), G(""));
    }, ae = (ce, fe) => {
      F(ce), (fe.type === "remove" || fe.type === "clear") && fe.values.forEach((ge) => {
        q(ge.value, !1);
      });
    }, se = (ce, fe) => {
      var ge;
      if (d(ce), G(null), fe.source === "submit") {
        const Te = (ce || "").trim();
        if (Te) {
          const ze = Array.from(/* @__PURE__ */ new Set([...w.value, Te]));
          F(ze), q(Te, !0), d("");
        }
        return;
      }
      fe.source !== "blur" && (e.mode === "combobox" && F(ce), (ge = e.onSearch) === null || ge === void 0 || ge.call(e, ce));
    }, ie = (ce) => {
      let fe = ce;
      e.mode !== "tags" && (fe = ce.map((Te) => {
        const ze = v.value.get(Te);
        return ze?.value;
      }).filter((Te) => Te !== void 0));
      const ge = Array.from(/* @__PURE__ */ new Set([...w.value, ...fe]));
      F(ge), ge.forEach((Te) => {
        q(Te, !0);
      });
    }, re = E(() => e.virtual !== !1 && e.dropdownMatchSelectWidth !== !1);
    wH(uT(O(O({}, f), {
      flattenOptions: L,
      onActiveValue: K,
      defaultActiveFirstOption: W,
      onSelect: U,
      menuItemSelectedIcon: Kt(e, "menuItemSelectedIcon"),
      rawValues: w,
      fieldNames: u,
      virtual: re,
      listHeight: Kt(e, "listHeight"),
      listItemHeight: Kt(e, "listItemHeight"),
      childrenAsData: l
    }))), process.env.NODE_ENV !== "production" && It(() => {
      EH(e);
    }, {
      flush: "post"
    });
    const te = le();
    n({
      focus() {
        var ce;
        (ce = te.value) === null || ce === void 0 || ce.focus();
      },
      blur() {
        var ce;
        (ce = te.value) === null || ce === void 0 || ce.blur();
      },
      scrollTo(ce) {
        var fe;
        (fe = te.value) === null || fe === void 0 || fe.scrollTo(ce);
      }
    });
    const ve = E(() => Fn(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 () => h(lH, Q(Q(Q({}, ve.value), o), {}, {
      id: i,
      prefixCls: e.prefixCls,
      ref: te,
      omitDomProps: NH,
      mode: e.mode,
      displayValues: I.value,
      onDisplayValuesChange: ae,
      searchValue: c.value,
      onSearch: se,
      onSearchSplit: ie,
      dropdownMatchSelectWidth: e.dropdownMatchSelectWidth,
      OptionList: $H,
      emptyOptions: !L.value.length,
      activeValue: A.value,
      activeDescendantId: `${i}_list_${j.value}`
    }), r);
  }
}), v0 = () => null;
v0.isSelectOption = !0;
v0.displayName = "ASelectOption";
const m0 = () => null;
m0.isSelectOptGroup = !0;
m0.displayName = "ASelectOptGroup";
var FH = { 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" }, BH = Symbol("iconContext"), mT = function() {
  return zt(BH, {
    prefixCls: le("anticon"),
    rootClassName: le(""),
    csp: le()
  });
};
function b0() {
  return !!(typeof window < "u" && window.document && window.document.createElement);
}
function LH(e, t) {
  return e && e.contains ? e.contains(t) : !1;
}
var eS = "data-vc-order", HH = "vc-icon-key", Wm = /* @__PURE__ */ new Map();
function bT() {
  var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.mark;
  return t ? t.startsWith("data-") ? t : "data-".concat(t) : HH;
}
function y0(e) {
  if (e.attachTo)
    return e.attachTo;
  var t = document.querySelector("head");
  return t || document.body;
}
function VH(e) {
  return e === "queue" ? "prependQueue" : e ? "prepend" : "append";
}
function yT(e) {
  return Array.from((Wm.get(e) || e).children).filter(function(t) {
    return t.tagName === "STYLE";
  });
}
function xT(e) {
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  if (!b0())
    return null;
  var n = t.csp, o = t.prepend, r = document.createElement("style");
  r.setAttribute(eS, VH(o)), n && n.nonce && (r.nonce = n.nonce), r.innerHTML = e;
  var i = y0(t), a = i.firstChild;
  if (o) {
    if (o === "queue") {
      var l = yT(i).filter(function(s) {
        return ["prepend", "prependQueue"].includes(s.getAttribute(eS));
      });
      if (l.length)
        return i.insertBefore(r, l[l.length - 1].nextSibling), r;
    }
    i.insertBefore(r, a);
  } else
    i.appendChild(r);
  return r;
}
function jH(e) {
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = y0(t);
  return yT(n).find(function(o) {
    return o.getAttribute(bT(t)) === e;
  });
}
function WH(e, t) {
  var n = Wm.get(e);
  if (!n || !LH(document, n)) {
    var o = xT("", t), r = o.parentNode;
    Wm.set(e, r), e.removeChild(o);
  }
}
function KH(e, t) {
  var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, o = y0(n);
  WH(o, n);
  var r = jH(t, n);
  if (r)
    return n.csp && n.csp.nonce && r.nonce !== n.csp.nonce && (r.nonce = n.csp.nonce), r.innerHTML !== e && (r.innerHTML = e), r;
  var i = xT(e, n);
  return i.setAttribute(bT(n), t), i;
}
function tS(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      qH(e, r, n[r]);
    });
  }
  return e;
}
function qH(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
function YH(e, t) {
  process.env.NODE_ENV !== "production" && !e && console !== void 0 && console.error("Warning: ".concat(t));
}
function GH(e, t) {
  YH(e, "[@ant-design/icons-vue] ".concat(t));
}
function nS(e) {
  return typeof e == "object" && typeof e.name == "string" && typeof e.theme == "string" && (typeof e.icon == "object" || typeof e.icon == "function");
}
function Km(e, t, n) {
  return n ? ko(e.tag, tS({
    key: t
  }, n, e.attrs), (e.children || []).map(function(o, r) {
    return Km(o, "".concat(t, "-").concat(e.tag, "-").concat(r));
  })) : ko(e.tag, tS({
    key: t
  }, e.attrs), (e.children || []).map(function(o, r) {
    return Km(o, "".concat(t, "-").concat(e.tag, "-").concat(r));
  }));
}
function wT(e) {
  return Ha(e)[0];
}
function ST(e) {
  return e ? Array.isArray(e) ? e : [e] : [];
}
var UH = `
.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 CT(e) {
  return e && e.getRootNode && e.getRootNode();
}
function XH(e) {
  return b0() ? CT(e) instanceof ShadowRoot : !1;
}
function QH(e) {
  return XH(e) ? CT(e) : null;
}
var ZH = function() {
  var t = mT(), n = t.prefixCls, o = t.csp, r = pr(), i = UH;
  n && (i = i.replace(/anticon/g, n.value)), Yt(function() {
    if (b0()) {
      var a = r.vnode.el, l = QH(a);
      KH(i, "@ant-design-vue-icons", {
        prepend: !0,
        csp: o.value,
        attachTo: l
      });
    }
  });
}, JH = ["icon", "primaryColor", "secondaryColor"];
function eV(e, t) {
  if (e == null) return {};
  var n = tV(e, t), o, r;
  if (Object.getOwnPropertySymbols) {
    var i = Object.getOwnPropertySymbols(e);
    for (r = 0; r < i.length; r++)
      o = i[r], !(t.indexOf(o) >= 0) && Object.prototype.propertyIsEnumerable.call(e, o) && (n[o] = e[o]);
  }
  return n;
}
function tV(e, t) {
  if (e == null) return {};
  var n = {}, o = Object.keys(e), r, i;
  for (i = 0; i < o.length; i++)
    r = o[i], !(t.indexOf(r) >= 0) && (n[r] = e[r]);
  return n;
}
function rp(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      nV(e, r, n[r]);
    });
  }
  return e;
}
function nV(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Qc = $n({
  primaryColor: "#333",
  secondaryColor: "#E6E6E6",
  calculated: !1
});
function oV(e) {
  var t = e.primaryColor, n = e.secondaryColor;
  Qc.primaryColor = t, Qc.secondaryColor = n || wT(t), Qc.calculated = !!n;
}
function rV() {
  return rp({}, Qc);
}
var zl = function(t, n) {
  var o = rp({}, t, n.attrs), r = o.icon, i = o.primaryColor, a = o.secondaryColor, l = eV(o, JH), s = Qc;
  if (i && (s = {
    primaryColor: i,
    secondaryColor: a || wT(i)
  }), GH(nS(r), "icon should be icon definiton, but got ".concat(r)), !nS(r))
    return null;
  var u = r;
  return u && typeof u.icon == "function" && (u = rp({}, u, {
    icon: u.icon(s.primaryColor, s.secondaryColor)
  })), Km(u.icon, "svg-".concat(u.name), rp({}, l, {
    "data-icon": u.name,
    width: "1em",
    height: "1em",
    fill: "currentColor",
    "aria-hidden": "true"
  }));
};
zl.props = {
  icon: Object,
  primaryColor: String,
  secondaryColor: String,
  focusable: String
};
zl.inheritAttrs = !1;
zl.displayName = "IconBase";
zl.getTwoToneColors = rV;
zl.setTwoToneColors = oV;
function iV(e, t) {
  return uV(e) || sV(e, t) || lV(e, t) || aV();
}
function aV() {
  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 lV(e, t) {
  if (e) {
    if (typeof e == "string") return oS(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 oS(e, t);
  }
}
function oS(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 sV(e, t) {
  var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
  if (n != null) {
    var o = [], r = !0, i = !1, a, l;
    try {
      for (n = n.call(e); !(r = (a = n.next()).done) && (o.push(a.value), !(t && o.length === t)); r = !0)
        ;
    } catch (s) {
      i = !0, l = s;
    } finally {
      try {
        !r && n.return != null && n.return();
      } finally {
        if (i) throw l;
      }
    }
    return o;
  }
}
function uV(e) {
  if (Array.isArray(e)) return e;
}
function $T(e) {
  var t = ST(e), n = iV(t, 2), o = n[0], r = n[1];
  return zl.setTwoToneColors({
    primaryColor: o,
    secondaryColor: r
  });
}
function cV() {
  var e = zl.getTwoToneColors();
  return e.calculated ? [e.primaryColor, e.secondaryColor] : e.primaryColor;
}
var dV = be({
  name: "InsertStyles",
  setup: function() {
    return ZH(), function() {
      return null;
    };
  }
}), fV = ["class", "icon", "spin", "rotate", "tabindex", "twoToneColor", "onClick"];
function pV(e, t) {
  return mV(e) || vV(e, t) || gV(e, t) || hV();
}
function hV() {
  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 gV(e, t) {
  if (e) {
    if (typeof e == "string") return rS(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 rS(e, t);
  }
}
function rS(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 vV(e, t) {
  var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
  if (n != null) {
    var o = [], r = !0, i = !1, a, l;
    try {
      for (n = n.call(e); !(r = (a = n.next()).done) && (o.push(a.value), !(t && o.length === t)); r = !0)
        ;
    } catch (s) {
      i = !0, l = s;
    } finally {
      try {
        !r && n.return != null && n.return();
      } finally {
        if (i) throw l;
      }
    }
    return o;
  }
}
function mV(e) {
  if (Array.isArray(e)) return e;
}
function iS(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      Hc(e, r, n[r]);
    });
  }
  return e;
}
function Hc(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
function bV(e, t) {
  if (e == null) return {};
  var n = yV(e, t), o, r;
  if (Object.getOwnPropertySymbols) {
    var i = Object.getOwnPropertySymbols(e);
    for (r = 0; r < i.length; r++)
      o = i[r], !(t.indexOf(o) >= 0) && Object.prototype.propertyIsEnumerable.call(e, o) && (n[o] = e[o]);
  }
  return n;
}
function yV(e, t) {
  if (e == null) return {};
  var n = {}, o = Object.keys(e), r, i;
  for (i = 0; i < o.length; i++)
    r = o[i], !(t.indexOf(r) >= 0) && (n[r] = e[r]);
  return n;
}
$T(M8.primary);
var an = function(t, n) {
  var o, r = iS({}, t, n.attrs), i = r.class, a = r.icon, l = r.spin, s = r.rotate, u = r.tabindex, c = r.twoToneColor, d = r.onClick, f = bV(r, fV), p = mT(), v = p.prefixCls, g = p.rootClassName, m = (o = {}, Hc(o, g.value, !!g.value), Hc(o, v.value, !0), Hc(o, "".concat(v.value, "-").concat(a.name), !!a.name), Hc(o, "".concat(v.value, "-spin"), !!l || a.name === "loading"), o), x = u;
  x === void 0 && d && (x = -1);
  var S = s ? {
    msTransform: "rotate(".concat(s, "deg)"),
    transform: "rotate(".concat(s, "deg)")
  } : void 0, C = ST(c), P = pV(C, 2), $ = P[0], I = P[1];
  return h("span", iS({
    role: "img",
    "aria-label": a.name
  }, f, {
    onClick: d,
    class: [m, i],
    tabindex: x
  }), [h(zl, {
    icon: a,
    primaryColor: $,
    secondaryColor: I,
    style: S
  }, null), h(dV, null, null)]);
};
an.props = {
  spin: Boolean,
  rotate: Number,
  icon: Object,
  twoToneColor: [String, Array]
};
an.displayName = "AntdIcon";
an.inheritAttrs = !1;
an.getTwoToneColor = cV;
an.setTwoToneColor = $T;
function aS(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      xV(e, r, n[r]);
    });
  }
  return e;
}
function xV(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Rd = function(t, n) {
  var o = aS({}, t, n.attrs);
  return h(an, aS({}, o, {
    icon: FH
  }), null);
};
Rd.displayName = "DownOutlined";
Rd.inheritAttrs = !1;
var wV = { 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 lS(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      SV(e, r, n[r]);
    });
  }
  return e;
}
function SV(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Mi = function(t, n) {
  var o = lS({}, t, n.attrs);
  return h(an, lS({}, o, {
    icon: wV
  }), null);
};
Mi.displayName = "LoadingOutlined";
Mi.inheritAttrs = !1;
var CV = { 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 sS(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      $V(e, r, n[r]);
    });
  }
  return e;
}
function $V(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var x0 = function(t, n) {
  var o = sS({}, t, n.attrs);
  return h(an, sS({}, o, {
    icon: CV
  }), null);
};
x0.displayName = "CheckOutlined";
x0.inheritAttrs = !1;
var PV = { 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 uS(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      OV(e, r, n[r]);
    });
  }
  return e;
}
function OV(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var la = function(t, n) {
  var o = uS({}, t, n.attrs);
  return h(an, uS({}, o, {
    icon: PV
  }), null);
};
la.displayName = "CloseOutlined";
la.inheritAttrs = !1;
var kV = { 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 cS(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      IV(e, r, n[r]);
    });
  }
  return e;
}
function IV(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Fr = function(t, n) {
  var o = cS({}, t, n.attrs);
  return h(an, cS({}, o, {
    icon: kV
  }), null);
};
Fr.displayName = "CloseCircleFilled";
Fr.inheritAttrs = !1;
var TV = { 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 dS(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      _V(e, r, n[r]);
    });
  }
  return e;
}
function _V(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var zd = function(t, n) {
  var o = dS({}, t, n.attrs);
  return h(an, dS({}, o, {
    icon: TV
  }), null);
};
zd.displayName = "SearchOutlined";
zd.inheritAttrs = !1;
function MV(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  const {
    loading: n,
    multiple: o,
    prefixCls: r,
    hasFeedback: i,
    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 ?? h(Fr, null, null), p = (x) => h(Je, null, [l !== !1 && x, i && a]);
  let v = null;
  if (s !== void 0)
    v = p(s);
  else if (n)
    v = p(h(Mi, {
      spin: !0
    }, null));
  else {
    const x = `${r}-suffix`;
    v = (S) => {
      let {
        open: C,
        showSearch: P
      } = S;
      return p(C && P ? h(zd, {
        class: x
      }, null) : h(Rd, {
        class: x
      }, null));
    };
  }
  let g = null;
  c !== void 0 ? g = c : o ? g = h(x0, null, null) : g = null;
  let m = null;
  return d !== void 0 ? m = d : m = h(la, null, null), {
    clearIcon: f,
    suffixIcon: v,
    itemIcon: g,
    removeIcon: m
  };
}
function w0(e) {
  const t = Symbol("contextKey");
  return {
    useProvide: (r, i) => {
      const a = $n({});
      return Bt(t, a), It(() => {
        O(a, r, i || {});
      }), a;
    },
    useInject: () => zt(t, e) || {}
  };
}
const zp = Symbol("ContextProps"), Fp = Symbol("InternalContextProps"), EV = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : E(() => !0);
  const n = le(/* @__PURE__ */ new Map()), o = (a, l) => {
    n.value.set(a, l), n.value = new Map(n.value);
  }, r = (a) => {
    n.value.delete(a), n.value = new Map(n.value);
  }, i = pr();
  Ie([t, n], () => {
    if (process.env.NODE_ENV !== "production" && t.value && n.value.size > 1) {
      dn(!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 = i;
      for (; a.parent; )
        console.warn("at", a.type), a = a.parent;
    }
  }), Bt(zp, e), Bt(Fp, {
    addFormItemField: o,
    removeFormItemField: r
  });
}, qm = {
  id: E(() => {
  }),
  onFieldBlur: () => {
  },
  onFieldChange: () => {
  },
  clearValidate: () => {
  }
}, Ym = {
  addFormItemField: () => {
  },
  removeFormItemField: () => {
  }
}, Br = () => {
  const e = zt(Fp, Ym), t = Symbol("FormItemFieldKey"), n = pr();
  return e.addFormItemField(t, n.type), qt(() => {
    e.removeFormItemField(t);
  }), Bt(Fp, Ym), Bt(zp, qm), zt(zp, qm);
}, Gm = be({
  compatConfig: {
    MODE: 3
  },
  name: "AFormItemRest",
  setup(e, t) {
    let {
      slots: n
    } = t;
    return Bt(Fp, Ym), Bt(zp, qm), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
}), Nr = w0({}), Bp = be({
  name: "NoFormStatus",
  setup(e, t) {
    let {
      slots: n
    } = t;
    return Nr.useProvide({}), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
});
function $i(e, t, n) {
  return Me({
    [`${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 Ls = (e, t) => t || e, DV = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [t]: {
      display: "inline-flex",
      "&-block": {
        display: "flex",
        width: "100%"
      },
      "&-vertical": {
        flexDirection: "column"
      }
    }
  };
}, AV = (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"
        }
      }
    }
  };
}, PT = On("Space", (e) => [AV(e), DV(e)]), NV = () => ({
  compactSize: String,
  compactDirection: pe.oneOf(Ti("horizontal", "vertical")).def("horizontal"),
  isFirstItem: ct(),
  isLastItem: ct()
}), Fh = w0(null), dc = (e, t) => {
  const n = Fh.useInject(), o = E(() => {
    if (!n || FP(n)) return "";
    const {
      compactDirection: r,
      isFirstItem: i,
      isLastItem: a
    } = n, l = r === "vertical" ? "-vertical-" : "-";
    return Me({
      [`${e.value}-compact${l}item`]: !0,
      [`${e.value}-compact${l}first-item`]: i,
      [`${e.value}-compact${l}last-item`]: a,
      [`${e.value}-compact${l}item-rtl`]: t.value === "rtl"
    });
  });
  return {
    compactSize: E(() => n?.compactSize),
    compactDirection: E(() => n?.compactDirection),
    compactItemClassnames: o
  };
}, wd = be({
  name: "NoCompactStyle",
  setup(e, t) {
    let {
      slots: n
    } = t;
    return Fh.useProvide(null), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
}), RV = () => ({
  prefixCls: String,
  size: {
    type: String
  },
  direction: pe.oneOf(Ti("horizontal", "vertical")).def("horizontal"),
  align: pe.oneOf(Ti("start", "end", "center", "baseline")),
  block: {
    type: Boolean,
    default: void 0
  }
}), zV = be({
  name: "CompactItem",
  props: NV(),
  setup(e, t) {
    let {
      slots: n
    } = t;
    return Fh.useProvide(e), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
}), Um = be({
  name: "ASpaceCompact",
  inheritAttrs: !1,
  props: RV(),
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const {
      prefixCls: r,
      direction: i
    } = Nt("space-compact", e), a = Fh.useInject(), [l, s] = PT(r), u = E(() => Me(r.value, s.value, {
      [`${r.value}-rtl`]: i.value === "rtl",
      [`${r.value}-block`]: e.block,
      [`${r.value}-vertical`]: e.direction === "vertical"
    }));
    return () => {
      var c;
      const d = go(((c = o.default) === null || c === void 0 ? void 0 : c.call(o)) || []);
      return d.length === 0 ? null : l(h("div", Q(Q({}, n), {}, {
        class: [u.value, n.class]
      }), [d.map((f, p) => {
        var v;
        const g = f && f.key || `${r.value}-item-${p}`, m = !a || FP(a);
        return h(zV, {
          key: g,
          compactSize: (v = e.size) !== null && v !== void 0 ? v : "middle",
          compactDirection: e.direction,
          isFirstItem: p === 0 && (m || a?.isFirstItem),
          isLastItem: p === d.length - 1 && (m || a?.isLastItem)
        }, {
          default: () => [f]
        });
      })]));
    };
  }
}), FV = (e) => ({
  animationDuration: e,
  animationFillMode: "both"
}), BV = (e) => ({
  animationDuration: e,
  animationFillMode: "both"
}), Bh = function(e, t, n, o) {
  const i = (arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1) ? "&" : "";
  return {
    [`
      ${i}${e}-enter,
      ${i}${e}-appear
    `]: O(O({}, FV(o)), {
      animationPlayState: "paused"
    }),
    [`${i}${e}-leave`]: O(O({}, BV(o)), {
      animationPlayState: "paused"
    }),
    [`
      ${i}${e}-enter${e}-enter-active,
      ${i}${e}-appear${e}-appear-active
    `]: {
      animationName: t,
      animationPlayState: "running"
    },
    [`${i}${e}-leave${e}-leave-active`]: {
      animationName: n,
      animationPlayState: "running",
      pointerEvents: "none"
    }
  };
}, LV = new tn("antFadeIn", {
  "0%": {
    opacity: 0
  },
  "100%": {
    opacity: 1
  }
}), HV = new tn("antFadeOut", {
  "0%": {
    opacity: 1
  },
  "100%": {
    opacity: 0
  }
}), VV = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  const {
    antCls: n
  } = e, o = `${n}-fade`, r = t ? "&" : "";
  return [Bh(o, LV, HV, e.motionDurationMid, t), {
    [`
        ${r}${o}-enter,
        ${r}${o}-appear
      `]: {
      opacity: 0,
      animationTimingFunction: "linear"
    },
    [`${r}${o}-leave`]: {
      animationTimingFunction: "linear"
    }
  }];
}, jV = new tn("antMoveDownIn", {
  "0%": {
    transform: "translate3d(0, 100%, 0)",
    transformOrigin: "0 0",
    opacity: 0
  },
  "100%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  }
}), WV = new tn("antMoveDownOut", {
  "0%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  },
  "100%": {
    transform: "translate3d(0, 100%, 0)",
    transformOrigin: "0 0",
    opacity: 0
  }
}), KV = new tn("antMoveLeftIn", {
  "0%": {
    transform: "translate3d(-100%, 0, 0)",
    transformOrigin: "0 0",
    opacity: 0
  },
  "100%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  }
}), qV = new tn("antMoveLeftOut", {
  "0%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  },
  "100%": {
    transform: "translate3d(-100%, 0, 0)",
    transformOrigin: "0 0",
    opacity: 0
  }
}), YV = new tn("antMoveRightIn", {
  "0%": {
    transform: "translate3d(100%, 0, 0)",
    transformOrigin: "0 0",
    opacity: 0
  },
  "100%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  }
}), GV = new tn("antMoveRightOut", {
  "0%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  },
  "100%": {
    transform: "translate3d(100%, 0, 0)",
    transformOrigin: "0 0",
    opacity: 0
  }
}), UV = new tn("antMoveUpIn", {
  "0%": {
    transform: "translate3d(0, -100%, 0)",
    transformOrigin: "0 0",
    opacity: 0
  },
  "100%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  }
}), XV = new tn("antMoveUpOut", {
  "0%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  },
  "100%": {
    transform: "translate3d(0, -100%, 0)",
    transformOrigin: "0 0",
    opacity: 0
  }
}), QV = {
  "move-up": {
    inKeyframes: UV,
    outKeyframes: XV
  },
  "move-down": {
    inKeyframes: jV,
    outKeyframes: WV
  },
  "move-left": {
    inKeyframes: KV,
    outKeyframes: qV
  },
  "move-right": {
    inKeyframes: YV,
    outKeyframes: GV
  }
}, Xu = (e, t) => {
  const {
    antCls: n
  } = e, o = `${n}-${t}`, {
    inKeyframes: r,
    outKeyframes: i
  } = QV[t];
  return [Bh(o, r, i, e.motionDurationMid), {
    [`
        ${o}-enter,
        ${o}-appear
      `]: {
      opacity: 0,
      animationTimingFunction: e.motionEaseOutCirc
    },
    [`${o}-leave`]: {
      animationTimingFunction: e.motionEaseInOutCirc
    }
  }];
}, Lh = new tn("antSlideUpIn", {
  "0%": {
    transform: "scaleY(0.8)",
    transformOrigin: "0% 0%",
    opacity: 0
  },
  "100%": {
    transform: "scaleY(1)",
    transformOrigin: "0% 0%",
    opacity: 1
  }
}), Hh = new tn("antSlideUpOut", {
  "0%": {
    transform: "scaleY(1)",
    transformOrigin: "0% 0%",
    opacity: 1
  },
  "100%": {
    transform: "scaleY(0.8)",
    transformOrigin: "0% 0%",
    opacity: 0
  }
}), Vh = new tn("antSlideDownIn", {
  "0%": {
    transform: "scaleY(0.8)",
    transformOrigin: "100% 100%",
    opacity: 0
  },
  "100%": {
    transform: "scaleY(1)",
    transformOrigin: "100% 100%",
    opacity: 1
  }
}), jh = new tn("antSlideDownOut", {
  "0%": {
    transform: "scaleY(1)",
    transformOrigin: "100% 100%",
    opacity: 1
  },
  "100%": {
    transform: "scaleY(0.8)",
    transformOrigin: "100% 100%",
    opacity: 0
  }
}), ZV = new tn("antSlideLeftIn", {
  "0%": {
    transform: "scaleX(0.8)",
    transformOrigin: "0% 0%",
    opacity: 0
  },
  "100%": {
    transform: "scaleX(1)",
    transformOrigin: "0% 0%",
    opacity: 1
  }
}), JV = new tn("antSlideLeftOut", {
  "0%": {
    transform: "scaleX(1)",
    transformOrigin: "0% 0%",
    opacity: 1
  },
  "100%": {
    transform: "scaleX(0.8)",
    transformOrigin: "0% 0%",
    opacity: 0
  }
}), ej = new tn("antSlideRightIn", {
  "0%": {
    transform: "scaleX(0.8)",
    transformOrigin: "100% 0%",
    opacity: 0
  },
  "100%": {
    transform: "scaleX(1)",
    transformOrigin: "100% 0%",
    opacity: 1
  }
}), tj = new tn("antSlideRightOut", {
  "0%": {
    transform: "scaleX(1)",
    transformOrigin: "100% 0%",
    opacity: 1
  },
  "100%": {
    transform: "scaleX(0.8)",
    transformOrigin: "100% 0%",
    opacity: 0
  }
}), nj = {
  "slide-up": {
    inKeyframes: Lh,
    outKeyframes: Hh
  },
  "slide-down": {
    inKeyframes: Vh,
    outKeyframes: jh
  },
  "slide-left": {
    inKeyframes: ZV,
    outKeyframes: JV
  },
  "slide-right": {
    inKeyframes: ej,
    outKeyframes: tj
  }
}, oa = (e, t) => {
  const {
    antCls: n
  } = e, o = `${n}-${t}`, {
    inKeyframes: r,
    outKeyframes: i
  } = nj[t];
  return [Bh(o, r, i, e.motionDurationMid), {
    [`
      ${o}-enter,
      ${o}-appear
    `]: {
      transform: "scale(0)",
      transformOrigin: "0% 0%",
      opacity: 0,
      animationTimingFunction: e.motionEaseOutQuint
    },
    [`${o}-leave`]: {
      animationTimingFunction: e.motionEaseInQuint
    }
  }];
}, S0 = new tn("antZoomIn", {
  "0%": {
    transform: "scale(0.2)",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    opacity: 1
  }
}), oj = new tn("antZoomOut", {
  "0%": {
    transform: "scale(1)"
  },
  "100%": {
    transform: "scale(0.2)",
    opacity: 0
  }
}), fS = new tn("antZoomBigIn", {
  "0%": {
    transform: "scale(0.8)",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    opacity: 1
  }
}), pS = new tn("antZoomBigOut", {
  "0%": {
    transform: "scale(1)"
  },
  "100%": {
    transform: "scale(0.8)",
    opacity: 0
  }
}), rj = new tn("antZoomUpIn", {
  "0%": {
    transform: "scale(0.8)",
    transformOrigin: "50% 0%",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    transformOrigin: "50% 0%"
  }
}), ij = new tn("antZoomUpOut", {
  "0%": {
    transform: "scale(1)",
    transformOrigin: "50% 0%"
  },
  "100%": {
    transform: "scale(0.8)",
    transformOrigin: "50% 0%",
    opacity: 0
  }
}), aj = new tn("antZoomLeftIn", {
  "0%": {
    transform: "scale(0.8)",
    transformOrigin: "0% 50%",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    transformOrigin: "0% 50%"
  }
}), lj = new tn("antZoomLeftOut", {
  "0%": {
    transform: "scale(1)",
    transformOrigin: "0% 50%"
  },
  "100%": {
    transform: "scale(0.8)",
    transformOrigin: "0% 50%",
    opacity: 0
  }
}), sj = new tn("antZoomRightIn", {
  "0%": {
    transform: "scale(0.8)",
    transformOrigin: "100% 50%",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    transformOrigin: "100% 50%"
  }
}), uj = new tn("antZoomRightOut", {
  "0%": {
    transform: "scale(1)",
    transformOrigin: "100% 50%"
  },
  "100%": {
    transform: "scale(0.8)",
    transformOrigin: "100% 50%",
    opacity: 0
  }
}), cj = new tn("antZoomDownIn", {
  "0%": {
    transform: "scale(0.8)",
    transformOrigin: "50% 100%",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    transformOrigin: "50% 100%"
  }
}), dj = new tn("antZoomDownOut", {
  "0%": {
    transform: "scale(1)",
    transformOrigin: "50% 100%"
  },
  "100%": {
    transform: "scale(0.8)",
    transformOrigin: "50% 100%",
    opacity: 0
  }
}), fj = {
  zoom: {
    inKeyframes: S0,
    outKeyframes: oj
  },
  "zoom-big": {
    inKeyframes: fS,
    outKeyframes: pS
  },
  "zoom-big-fast": {
    inKeyframes: fS,
    outKeyframes: pS
  },
  "zoom-left": {
    inKeyframes: aj,
    outKeyframes: lj
  },
  "zoom-right": {
    inKeyframes: sj,
    outKeyframes: uj
  },
  "zoom-up": {
    inKeyframes: rj,
    outKeyframes: ij
  },
  "zoom-down": {
    inKeyframes: cj,
    outKeyframes: dj
  }
}, Fd = (e, t) => {
  const {
    antCls: n
  } = e, o = `${n}-${t}`, {
    inKeyframes: r,
    outKeyframes: i
  } = fj[t];
  return [Bh(o, r, i, 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
    }
  }];
}, Wh = (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`
    }
  }
}), hS = (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"
  };
}, pj = (e) => {
  const {
    antCls: t,
    componentCls: n
  } = e, o = `${n}-item`;
  return [
    {
      [`${n}-dropdown`]: O(O({}, fn(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: Lh
        },
        [`
            &${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: Vh
        },
        [`&${t}-slide-up-leave${t}-slide-up-leave-active${n}-dropdown-placement-bottomLeft`]: {
          animationName: Hh
        },
        [`&${t}-slide-up-leave${t}-slide-up-leave-active${n}-dropdown-placement-topLeft`]: {
          animationName: jh
        },
        "&-hidden": {
          display: "none"
        },
        "&-empty": {
          color: e.colorTextDisabled
        },
        // ========================= Options =========================
        [`${o}-empty`]: O(O({}, hS(e)), {
          color: e.colorTextDisabled
        }),
        [`${o}`]: O(O({}, hS(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": O({
              flex: "auto"
            }, Va),
            "&-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
    oa(e, "slide-up"),
    oa(e, "slide-down"),
    Xu(e, "move-up"),
    Xu(e, "move-down")
  ];
}, iu = 2;
function OT(e) {
  let {
    controlHeightSM: t,
    controlHeight: n,
    lineWidth: o
  } = e;
  const r = (n - t) / 2 - o, i = Math.ceil(r / 2);
  return [r, i];
}
function iv(e, t) {
  const {
    componentCls: n,
    iconCls: o
  } = e, r = `${n}-selection-overflow`, i = e.controlHeightSM, [a] = OT(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 ===========================
      [r]: {
        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 - iu}px ${iu * 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: `${iu}px 0`,
          lineHeight: `${i}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: i,
        marginTop: iu,
        marginBottom: iu,
        lineHeight: `${i - 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: iu * 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": O(O({}, uc()), {
          display: "inline-block",
          color: e.colorIcon,
          fontWeight: "bold",
          fontSize: 10,
          lineHeight: "inherit",
          cursor: "pointer",
          [`> ${o}`]: {
            verticalAlign: "-0.2em"
          },
          "&:hover": {
            color: e.colorIconHover
          }
        })
      },
      // ========================== Input ==========================
      [`${r}-item + ${r}-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: i,
          fontFamily: e.fontFamily,
          lineHeight: `${i}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 hj(e) {
  const {
    componentCls: t
  } = e, n = Qt(e, {
    controlHeight: e.controlHeightSM,
    controlHeightSM: e.controlHeightXS,
    borderRadius: e.borderRadiusSM,
    borderRadiusSM: e.borderRadiusXS
  }), [, o] = OT(e);
  return [
    iv(e),
    // ======================== Small ========================
    // Shared
    iv(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
    iv(Qt(e, {
      fontSize: e.fontSizeLG,
      controlHeight: e.controlHeightLG,
      controlHeightSM: e.controlHeight,
      borderRadius: e.borderRadiusLG,
      borderRadiusSM: e.borderRadius
    }), "lg")
  ];
}
function av(e, t) {
  const {
    componentCls: n,
    inputPaddingHorizontalBase: o,
    borderRadius: r
  } = e, i = 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`]: O(O({}, fn(e)), {
        display: "flex",
        borderRadius: r,
        [`${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: `${i}px`,
          transition: `all ${e.motionDurationSlow}`,
          // Firefox inline-block position calculation is not same as Chrome & Safari. Patch this:
          "@supports (-moz-appearance: meterbar)": {
            lineHeight: `${i}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: i
          },
          "&:after": {
            lineHeight: `${i}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 gj(e) {
  const {
    componentCls: t
  } = e, n = e.controlPaddingHorizontalSM - e.lineWidth;
  return [
    av(e),
    // ======================== Small ========================
    // Shared
    av(Qt(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
    av(Qt(e, {
      controlHeight: e.controlHeightLG,
      fontSize: e.fontSizeLG,
      borderRadius: e.borderRadiusLG
    }), "lg")
  ];
}
function vj(e, t, n) {
  const {
    focusElCls: o,
    focus: r,
    borderElCls: i
  } = n, a = i ? "> *" : "", l = ["hover", r ? "focus" : null, "active"].filter(Boolean).map((s) => `&:${s} ${a}`).join(",");
  return {
    [`&-item:not(${t}-last-item)`]: {
      marginInlineEnd: -e.lineWidth
    },
    "&-item": O(O({
      [l]: {
        zIndex: 2
      }
    }, o ? {
      [`&${o}`]: {
        zIndex: 2
      }
    } : {}), {
      [`&[disabled] ${a}`]: {
        zIndex: 0
      }
    })
  };
}
function mj(e, t, n) {
  const {
    borderElCls: o
  } = n, r = o ? `> ${o}` : "";
  return {
    [`&-item:not(${t}-first-item):not(${t}-last-item) ${r}`]: {
      borderRadius: 0
    },
    [`&-item:not(${t}-last-item)${t}-first-item`]: {
      [`& ${r}, &${e}-sm ${r}, &${e}-lg ${r}`]: {
        borderStartEndRadius: 0,
        borderEndEndRadius: 0
      }
    },
    [`&-item:not(${t}-first-item)${t}-last-item`]: {
      [`& ${r}, &${e}-sm ${r}, &${e}-lg ${r}`]: {
        borderStartStartRadius: 0,
        borderEndStartRadius: 0
      }
    }
  };
}
function Bd(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
    focus: !0
  };
  const {
    componentCls: n
  } = e, o = `${n}-compact`;
  return {
    [o]: O(O({}, vj(e, o, t)), mj(n, o, t))
  };
}
const bj = (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"
      }
    }
  };
}, lv = function(e, t) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
  const {
    componentCls: o,
    borderHoverColor: r,
    outlineColor: i,
    antCls: a
  } = t, l = n ? {
    [`${o}-selector`]: {
      borderColor: r
    }
  } : {};
  return {
    [e]: {
      [`&:not(${o}-disabled):not(${o}-customize-input):not(${a}-pagination-size-changer)`]: O(O({}, l), {
        [`${o}-focused& ${o}-selector`]: {
          borderColor: r,
          boxShadow: `0 0 0 ${t.controlOutlineWidth}px ${i}`,
          borderInlineEndWidth: `${t.controlLineWidth}px !important`,
          outline: 0
        },
        [`&:hover ${o}-selector`]: {
          borderColor: r,
          borderInlineEndWidth: `${t.controlLineWidth}px !important`
        }
      })
    }
  };
}, yj = (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"
      }
    }
  };
}, xj = (e) => {
  const {
    componentCls: t,
    inputPaddingHorizontalBase: n,
    iconCls: o
  } = e;
  return {
    [t]: O(O({}, fn(e)), {
      position: "relative",
      display: "inline-block",
      cursor: "pointer",
      [`&:not(${t}-customize-input) ${t}-selector`]: O(O({}, bj(e)), yj(e)),
      // [`&:not(&-disabled):hover ${selectCls}-selector`]: {
      //   ...genHoverStyle(token),
      // },
      // ======================== Selection ========================
      [`${t}-selection-item`]: O({
        flex: 1,
        fontWeight: "normal"
      }, Va),
      // ======================= Placeholder =======================
      [`${t}-selection-placeholder`]: O(O({}, Va), {
        flex: 1,
        color: e.colorTextPlaceholder,
        pointerEvents: "none"
      }),
      // ========================== Arrow ==========================
      [`${t}-arrow`]: O(O({}, uc()), {
        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
      }
    }
  };
}, wj = (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
    xj(e),
    // Single
    gj(e),
    // Multiple
    hj(e),
    // Dropdown
    pj(e),
    // =====================================================
    // ==                       RTL                       ==
    // =====================================================
    {
      [`${t}-rtl`]: {
        direction: "rtl"
      }
    },
    // =====================================================
    // ==                     Status                      ==
    // =====================================================
    lv(t, Qt(e, {
      borderHoverColor: e.colorPrimaryHover,
      outlineColor: e.controlOutline
    })),
    lv(`${t}-status-error`, Qt(e, {
      borderHoverColor: e.colorErrorHover,
      outlineColor: e.colorErrorOutline
    }), !0),
    lv(`${t}-status-warning`, Qt(e, {
      borderHoverColor: e.colorWarningHover,
      outlineColor: e.colorWarningOutline
    }), !0),
    // =====================================================
    // ==             Space Compact                       ==
    // =====================================================
    Bd(e, {
      borderElCls: `${t}-selector`,
      focusElCls: `${t}-focused`
    })
  ];
}, Sj = On("Select", (e, t) => {
  let {
    rootPrefixCls: n
  } = t;
  const o = Qt(e, {
    rootPrefixCls: n,
    inputPaddingHorizontalBase: e.paddingSM - 1
  });
  return [wj(o)];
}, (e) => ({
  zIndexPopup: e.zIndexPopupBase + 50
})), C0 = () => O(O({}, Fn(vT(), ["inputIcon", "mode", "getInputElement", "getRawInputElement", "backfill"])), {
  value: en([Array, Object, String, Number]),
  defaultValue: en([Array, Object, String, Number]),
  notFoundContent: pe.any,
  suffixIcon: pe.any,
  itemIcon: pe.any,
  size: rn(),
  mode: rn(),
  bordered: ct(!0),
  transitionName: String,
  choiceTransitionName: rn(""),
  popupClassName: String,
  /** @deprecated Please use `popupClassName` instead */
  dropdownClassName: String,
  placement: rn(),
  status: rn(),
  "onUpdate:value": et()
}), gS = "SECRET_COMBOBOX_MODE_DO_NOT_USE", Et = be({
  compatConfig: {
    MODE: 3
  },
  name: "ASelect",
  Option: v0,
  OptGroup: m0,
  inheritAttrs: !1,
  props: Mn(C0(), {
    listHeight: 256,
    listItemHeight: 24
  }),
  SECRET_COMBOBOX_MODE_DO_NOT_USE: gS,
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      emit: o,
      slots: r,
      expose: i
    } = t;
    const a = le(), l = Br(), s = Nr.useInject(), u = E(() => Ls(s.status, e.status)), c = () => {
      var q;
      (q = a.value) === null || q === void 0 || q.focus();
    }, d = () => {
      var q;
      (q = a.value) === null || q === void 0 || q.blur();
    }, f = (q) => {
      var U;
      (U = a.value) === null || U === void 0 || U.scrollTo(q);
    }, p = E(() => {
      const {
        mode: q
      } = e;
      if (q !== "combobox")
        return q === gS ? "combobox" : q;
    });
    process.env.NODE_ENV !== "production" && dn(!e.dropdownClassName, "Select", "`dropdownClassName` is deprecated. Please use `popupClassName` instead.");
    const {
      prefixCls: v,
      direction: g,
      renderEmpty: m,
      size: x,
      getPrefixCls: S,
      getPopupContainer: C,
      disabled: P,
      select: $
    } = Nt("select", e), {
      compactSize: I,
      compactItemClassnames: w
    } = dc(v, g), T = E(() => I.value || x.value), M = _i(), R = E(() => {
      var q;
      return (q = P.value) !== null && q !== void 0 ? q : M.value;
    }), [N, H] = Sj(v), L = E(() => S()), F = E(() => e.placement !== void 0 ? e.placement : g.value === "rtl" ? "bottomRight" : "bottomLeft"), A = E(() => Ka(L.value, b5(F.value), e.transitionName)), G = E(() => Me({
      [`${v.value}-lg`]: T.value === "large",
      [`${v.value}-sm`]: T.value === "small",
      [`${v.value}-rtl`]: g.value === "rtl",
      [`${v.value}-borderless`]: !e.bordered,
      [`${v.value}-in-form-item`]: s.isFormItemInput
    }, $i(v.value, u.value, s.hasFeedback), w.value, H.value)), j = function() {
      for (var q = arguments.length, U = new Array(q), ae = 0; ae < q; ae++)
        U[ae] = arguments[ae];
      o("update:value", U[0]), o("change", ...U), l.onFieldChange();
    }, Z = (q) => {
      o("blur", q), l.onFieldBlur();
    };
    i({
      blur: d,
      focus: c,
      scrollTo: f
    });
    const W = E(() => p.value === "multiple" || p.value === "tags"), K = E(() => e.showArrow !== void 0 ? e.showArrow : e.loading || !(W.value || p.value === "combobox"));
    return () => {
      var q, U, ae, se;
      const {
        notFoundContent: ie,
        listHeight: re = 256,
        listItemHeight: te = 24,
        popupClassName: ve,
        dropdownClassName: ce,
        virtual: fe,
        dropdownMatchSelectWidth: ge,
        id: Te = l.id.value,
        placeholder: ze = (q = r.placeholder) === null || q === void 0 ? void 0 : q.call(r),
        showArrow: Ke
      } = e, {
        hasFeedback: He,
        feedbackIcon: Ne
      } = s;
      let Xe;
      ie !== void 0 ? Xe = ie : r.notFoundContent ? Xe = r.notFoundContent() : p.value === "combobox" ? Xe = null : Xe = m?.("Select") || h(Zy, {
        componentName: "Select"
      }, null);
      const {
        suffixIcon: De,
        itemIcon: Fe,
        removeIcon: Ve,
        clearIcon: ot
      } = MV(O(O({}, e), {
        multiple: W.value,
        prefixCls: v.value,
        hasFeedback: He,
        feedbackIcon: Ne,
        showArrow: K.value
      }), r), je = Fn(e, ["prefixCls", "suffixIcon", "itemIcon", "removeIcon", "clearIcon", "size", "bordered", "status"]), Pe = Me(ve || ce, {
        [`${v.value}-dropdown-${g.value}`]: g.value === "rtl"
      }, H.value);
      return N(h(zH, Q(Q(Q({
        ref: a,
        virtual: fe,
        dropdownMatchSelectWidth: ge
      }, je), n), {}, {
        showSearch: (U = e.showSearch) !== null && U !== void 0 ? U : (ae = $?.value) === null || ae === void 0 ? void 0 : ae.showSearch,
        placeholder: ze,
        listHeight: re,
        listItemHeight: te,
        mode: p.value,
        prefixCls: v.value,
        direction: g.value,
        inputIcon: De,
        menuItemSelectedIcon: Fe,
        removeIcon: Ve,
        clearIcon: ot,
        notFoundContent: Xe,
        class: [G.value, n.class],
        getPopupContainer: C?.value,
        dropdownClassName: Pe,
        onChange: j,
        onBlur: Z,
        id: Te,
        dropdownRender: je.dropdownRender || r.dropdownRender,
        transitionName: A.value,
        children: (se = r.default) === null || se === void 0 ? void 0 : se.call(r),
        tagRender: e.tagRender || r.tagRender,
        optionLabelRender: r.optionLabel,
        maxTagPlaceholder: e.maxTagPlaceholder || r.maxTagPlaceholder,
        showArrow: He || Ke,
        disabled: R.value
      }), {
        option: r.option
      }));
    };
  }
});
Et.install = function(e) {
  return e.component(Et.name, Et), e.component(Et.Option.displayName, Et.Option), e.component(Et.OptGroup.displayName, Et.OptGroup), e;
};
const Cj = Et.Option;
Et.OptGroup;
var $j = { 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 vS(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      Pj(e, r, n[r]);
    });
  }
  return e;
}
function Pj(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var $0 = function(t, n) {
  var o = vS({}, t, n.attrs);
  return h(an, vS({}, o, {
    icon: $j
  }), null);
};
$0.displayName = "CheckCircleOutlined";
$0.inheritAttrs = !1;
var Oj = { 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 mS(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      kj(e, r, n[r]);
    });
  }
  return e;
}
function kj(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var P0 = function(t, n) {
  var o = mS({}, t, n.attrs);
  return h(an, mS({}, o, {
    icon: Oj
  }), null);
};
P0.displayName = "ExclamationCircleOutlined";
P0.inheritAttrs = !1;
var Ij = { 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 bS(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      Tj(e, r, n[r]);
    });
  }
  return e;
}
function Tj(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var O0 = function(t, n) {
  var o = bS({}, t, n.attrs);
  return h(an, bS({}, o, {
    icon: Ij
  }), null);
};
O0.displayName = "InfoCircleOutlined";
O0.inheritAttrs = !1;
var _j = { 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 yS(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      Mj(e, r, n[r]);
    });
  }
  return e;
}
function Mj(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var k0 = function(t, n) {
  var o = yS({}, t, n.attrs);
  return h(an, yS({}, o, {
    icon: _j
  }), null);
};
k0.displayName = "CloseCircleOutlined";
k0.inheritAttrs = !1;
var Ej = { 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 xS(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      Dj(e, r, n[r]);
    });
  }
  return e;
}
function Dj(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Fl = function(t, n) {
  var o = xS({}, t, n.attrs);
  return h(an, xS({}, o, {
    icon: Ej
  }), null);
};
Fl.displayName = "CheckCircleFilled";
Fl.inheritAttrs = !1;
var Aj = { 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 wS(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      Nj(e, r, n[r]);
    });
  }
  return e;
}
function Nj(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Bl = function(t, n) {
  var o = wS({}, t, n.attrs);
  return h(an, wS({}, o, {
    icon: Aj
  }), null);
};
Bl.displayName = "ExclamationCircleFilled";
Bl.inheritAttrs = !1;
var Rj = { 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 SS(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      zj(e, r, n[r]);
    });
  }
  return e;
}
function zj(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Hs = function(t, n) {
  var o = SS({}, t, n.attrs);
  return h(an, SS({}, o, {
    icon: Rj
  }), null);
};
Hs.displayName = "InfoCircleFilled";
Hs.inheritAttrs = !1;
const Pf = ["xxxl", "xxl", "xl", "lg", "md", "sm", "xs"], Fj = (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 kT() {
  const [, e] = cc();
  return E(() => {
    const t = Fj(e.value), n = /* @__PURE__ */ new Map();
    let o = -1, r = {};
    return {
      matchHandlers: {},
      dispatch(i) {
        return r = i, n.forEach((a) => a(r)), n.size >= 1;
      },
      subscribe(i) {
        return n.size || this.register(), o += 1, n.set(o, i), i(r), o;
      },
      unsubscribe(i) {
        n.delete(i), n.size || this.unregister();
      },
      unregister() {
        Object.keys(t).forEach((i) => {
          const a = t[i], l = this.matchHandlers[a];
          l?.mql.removeListener(l?.listener);
        }), n.clear();
      },
      register() {
        Object.keys(t).forEach((i) => {
          const a = t[i], l = (u) => {
            let {
              matches: c
            } = u;
            this.dispatch(O(O({}, r), {
              [i]: c
            }));
          }, s = window.matchMedia(a);
          s.addListener(l), this.matchHandlers[a] = {
            mql: s,
            listener: l
          }, l(s);
        });
      },
      responsiveMap: t
    };
  });
}
function IT() {
  const e = $e({});
  let t = null;
  const n = kT();
  return At(() => {
    t = n.value.subscribe((o) => {
      e.value = o;
    });
  }), Vo(() => {
    n.value.unsubscribe(t);
  }), e;
}
function gi(e) {
  const t = $e();
  return It(() => {
    t.value = e();
  }, {
    flush: "sync"
    // needed so updates are immediate.
  }), t;
}
const jr = {
  adjustX: 1,
  adjustY: 1
}, Wr = [0, 0], TT = {
  left: {
    points: ["cr", "cl"],
    overflow: jr,
    offset: [-4, 0],
    targetOffset: Wr
  },
  right: {
    points: ["cl", "cr"],
    overflow: jr,
    offset: [4, 0],
    targetOffset: Wr
  },
  top: {
    points: ["bc", "tc"],
    overflow: jr,
    offset: [0, -4],
    targetOffset: Wr
  },
  bottom: {
    points: ["tc", "bc"],
    overflow: jr,
    offset: [0, 4],
    targetOffset: Wr
  },
  topLeft: {
    points: ["bl", "tl"],
    overflow: jr,
    offset: [0, -4],
    targetOffset: Wr
  },
  leftTop: {
    points: ["tr", "tl"],
    overflow: jr,
    offset: [-4, 0],
    targetOffset: Wr
  },
  topRight: {
    points: ["br", "tr"],
    overflow: jr,
    offset: [0, -4],
    targetOffset: Wr
  },
  rightTop: {
    points: ["tl", "tr"],
    overflow: jr,
    offset: [4, 0],
    targetOffset: Wr
  },
  bottomRight: {
    points: ["tr", "br"],
    overflow: jr,
    offset: [0, 4],
    targetOffset: Wr
  },
  rightBottom: {
    points: ["bl", "br"],
    overflow: jr,
    offset: [4, 0],
    targetOffset: Wr
  },
  bottomLeft: {
    points: ["tl", "bl"],
    overflow: jr,
    offset: [0, 4],
    targetOffset: Wr
  },
  leftBottom: {
    points: ["br", "bl"],
    overflow: jr,
    offset: [-4, 0],
    targetOffset: Wr
  }
}, Bj = {
  prefixCls: String,
  id: String,
  overlayInnerStyle: pe.any
}, Lj = be({
  compatConfig: {
    MODE: 3
  },
  name: "TooltipContent",
  props: Bj,
  setup(e, t) {
    let {
      slots: n
    } = t;
    return () => {
      var o;
      return h("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 Hj = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
function CS() {
}
const Vj = be({
  compatConfig: {
    MODE: 3
  },
  name: "Tooltip",
  inheritAttrs: !1,
  props: {
    trigger: pe.any.def(["hover"]),
    defaultVisible: {
      type: Boolean,
      default: void 0
    },
    visible: {
      type: Boolean,
      default: void 0
    },
    placement: pe.string.def("right"),
    transitionName: String,
    animation: pe.any,
    afterVisibleChange: pe.func.def(() => {
    }),
    overlayStyle: {
      type: Object,
      default: void 0
    },
    overlayClassName: String,
    prefixCls: pe.string.def("rc-tooltip"),
    mouseEnterDelay: pe.number.def(0.1),
    mouseLeaveDelay: pe.number.def(0.1),
    getPopupContainer: Function,
    destroyTooltipOnHide: {
      type: Boolean,
      default: !1
    },
    align: pe.object.def(() => ({})),
    arrowContent: pe.any.def(null),
    tipId: String,
    builtinPlacements: pe.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: r
    } = t;
    const i = $e(), a = () => {
      const {
        prefixCls: c,
        tipId: d,
        overlayInnerStyle: f
      } = e;
      return [e.arrow ? h("div", {
        class: `${c}-arrow`,
        key: "arrow"
      }, [ei(n, e, "arrowContent")]) : null, h(Lj, {
        key: "content",
        prefixCls: c,
        id: d,
        overlayInnerStyle: f
      }, {
        overlay: n.overlay
      })];
    };
    r({
      getPopupDomNode: () => i.value.getPopupDomNode(),
      triggerDOM: i,
      forcePopupAlign: () => {
        var c;
        return (c = i.value) === null || c === void 0 ? void 0 : c.forcePopupAlign();
      }
    });
    const s = $e(!1), u = $e(!1);
    return It(() => {
      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: v,
        prefixCls: g,
        afterVisibleChange: m,
        transitionName: x,
        animation: S,
        placement: C,
        align: P,
        destroyTooltipOnHide: $,
        defaultVisible: I
      } = e, w = Hj(e, ["overlayClassName", "trigger", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "prefixCls", "afterVisibleChange", "transitionName", "animation", "placement", "align", "destroyTooltipOnHide", "defaultVisible"]), T = O({}, w);
      e.visible !== void 0 && (T.popupVisible = e.visible);
      const M = O(O(O({
        popupClassName: c,
        prefixCls: g,
        action: d,
        builtinPlacements: TT,
        popupPlacement: C,
        popupAlign: P,
        afterPopupVisibleChange: m,
        popupTransitionName: x,
        popupAnimation: S,
        defaultPopupVisible: I,
        destroyPopupOnHide: s.value,
        autoDestroy: u.value,
        mouseLeaveDelay: p,
        popupStyle: v,
        mouseEnterDelay: f
      }, T), o), {
        onPopupVisibleChange: e.onVisibleChange || CS,
        onPopupAlign: e.onPopupAlign || CS,
        ref: i,
        arrow: !!e.arrow,
        popup: a()
      });
      return h(Ad, M, {
        default: n.default
      });
    };
  }
}), _T = (() => ({
  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: Mt(),
  overlayInnerStyle: Mt(),
  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: Mt(),
  builtinPlacements: Mt(),
  children: Array,
  /** @deprecated Please use `onOpenChange` instead. */
  onVisibleChange: Function,
  /** @deprecated Please use `onUpdate:open` instead. */
  "onUpdate:visible": Function,
  onOpenChange: Function,
  "onUpdate:open": Function
})), jj = {
  adjustX: 1,
  adjustY: 1
}, $S = {
  adjustX: 0,
  adjustY: 0
}, Wj = [0, 0];
function PS(e) {
  return typeof e == "boolean" ? e ? jj : $S : O(O({}, $S), e);
}
function MT(e) {
  const {
    arrowWidth: t = 4,
    horizontalArrowShift: n = 16,
    verticalArrowShift: o = 8,
    autoAdjustOverflow: r,
    arrowPointAtCenter: i
  } = 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] = i ? O(O({}, a[l]), {
      overflow: PS(r),
      targetOffset: Wj
    }) : O(O({}, TT[l]), {
      overflow: PS(r)
    }), a[l].ignoreShake = !0;
  }), a;
}
function Lp() {
  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 Kj = md.map((e) => `${e}-inverse`), qj = ["success", "processing", "error", "default", "warning"];
function ET(e) {
  return (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0) ? [...Kj, ...md].includes(e) : md.includes(e);
}
function Yj(e) {
  return qj.includes(e);
}
function Gj(e, t) {
  const n = ET(t), o = Me({
    [`${e}-${t}`]: t && n
  }), r = {}, i = {};
  return t && !n && (r.background = t, i["--antd-arrow-background-color"] = t), {
    className: o,
    overlayStyle: r,
    arrowStyle: i
  };
}
function Of(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
  return e.map((n) => `${t}${n}`).join(",");
}
const DT = 8;
function AT(e) {
  const t = DT, {
    sizePopupArrow: n,
    contentRadius: o,
    borderRadiusOuter: r,
    limitVerticalRadius: i
  } = e, a = n / 2 - Math.ceil(r * (Math.sqrt(2) - 1)), l = (o > 12 ? o + 2 : 12) - a, s = i ? t - a : l;
  return {
    dropdownArrowOffset: l,
    dropdownArrowOffsetVertical: s
  };
}
function NT(e, t) {
  const {
    componentCls: n,
    sizePopupArrow: o,
    marginXXS: r,
    borderRadiusXS: i,
    borderRadiusOuter: a,
    boxShadowPopoverArrow: l
  } = e, {
    colorBg: s,
    showArrowCls: u,
    contentRadius: c = e.borderRadiusLG,
    limitVerticalRadius: d
  } = t, {
    dropdownArrowOffsetVertical: f,
    dropdownArrowOffset: p
  } = AT({
    sizePopupArrow: o,
    contentRadius: c,
    borderRadiusOuter: a,
    limitVerticalRadius: d
  }), v = o / 2 + r;
  return {
    [n]: {
      // ============================ Basic ============================
      [`${n}-arrow`]: [O(O({
        position: "absolute",
        zIndex: 1,
        display: "block"
      }, Gy(o, i, 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
      [Of(["&-placement-topLeft", "&-placement-top", "&-placement-topRight"].map((g) => g += ":not(&-arrow-hidden)"), u)]: {
        paddingBottom: v
      },
      // >>>>> Bottom
      [Of(["&-placement-bottomLeft", "&-placement-bottom", "&-placement-bottomRight"].map((g) => g += ":not(&-arrow-hidden)"), u)]: {
        paddingTop: v
      },
      // >>>>> Left
      [Of(["&-placement-leftTop", "&-placement-left", "&-placement-leftBottom"].map((g) => g += ":not(&-arrow-hidden)"), u)]: {
        paddingRight: {
          _skip_check_: !0,
          value: v
        }
      },
      // >>>>> Right
      [Of(["&-placement-rightTop", "&-placement-right", "&-placement-rightBottom"].map((g) => g += ":not(&-arrow-hidden)"), u)]: {
        paddingLeft: {
          _skip_check_: !0,
          value: v
        }
      }
    }
  };
}
const Uj = (e) => {
  const {
    componentCls: t,
    // ant-tooltip
    tooltipMaxWidth: n,
    tooltipColor: o,
    tooltipBg: r,
    tooltipBorderRadius: i,
    zIndexPopup: a,
    controlHeight: l,
    boxShadowSecondary: s,
    paddingSM: u,
    paddingXS: c,
    tooltipRadiusOuter: d
  } = e;
  return [
    {
      [t]: O(O(O(O({}, fn(e)), {
        position: "absolute",
        zIndex: a,
        display: "block",
        "&": [{
          width: "max-content"
        }, {
          width: "intrinsic"
        }],
        maxWidth: n,
        visibility: "visible",
        "&-hidden": {
          display: "none"
        },
        "--antd-arrow-background-color": r,
        // 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: r,
          borderRadius: i,
          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(i, DT)
          }
        },
        [`${t}-content`]: {
          position: "relative"
        }
      }), OI(e, (f, p) => {
        let {
          darkColor: v
        } = p;
        return {
          [`&${t}-${f}`]: {
            [`${t}-inner`]: {
              backgroundColor: v
            },
            [`${t}-arrow`]: {
              "--antd-arrow-background-color": v
            }
          }
        };
      })), {
        // RTL
        "&-rtl": {
          direction: "rtl"
        }
      })
    },
    // Arrow Style
    NT(Qt(e, {
      borderRadiusOuter: d
    }), {
      colorBg: "var(--antd-arrow-background-color)",
      showArrowCls: "",
      contentRadius: i,
      limitVerticalRadius: !0
    }),
    // Pure Render
    {
      [`${t}-pure`]: {
        position: "relative",
        maxWidth: "none"
      }
    }
  ];
}, Xj = ((e, t) => On("Tooltip", (o) => {
  if (t?.value === !1)
    return [];
  const {
    borderRadius: r,
    colorTextLightSolid: i,
    colorBgDefault: a,
    borderRadiusOuter: l
  } = o, s = Qt(o, {
    // default variables
    tooltipMaxWidth: 250,
    tooltipColor: i,
    tooltipBorderRadius: r,
    tooltipBg: a,
    tooltipRadiusOuter: l > 4 ? 4 : l
  });
  return [Uj(s), Fd(o, "zoom-big-fast")];
}, (o) => {
  let {
    zIndexPopupBase: r,
    colorBgSpotlight: i
  } = o;
  return {
    zIndexPopup: r + 70,
    colorBgDefault: i
  };
})(e)), Qj = (e, t) => {
  const n = {}, o = O({}, e);
  return t.forEach((r) => {
    e && r in e && (n[r] = e[r], delete o[r]);
  }), {
    picked: n,
    omitted: o
  };
}, RT = () => O(O({}, _T()), {
  title: pe.any
}), Zj = () => ({
  trigger: "hover",
  align: {},
  placement: "top",
  mouseEnterDelay: 0.1,
  mouseLeaveDelay: 0.1,
  arrowPointAtCenter: !1,
  autoAdjustOverflow: !0
}), Jj = be({
  compatConfig: {
    MODE: 3
  },
  name: "ATooltip",
  inheritAttrs: !1,
  props: Mn(RT(), {
    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: r,
      expose: i
    } = t;
    process.env.NODE_ENV !== "production" && [["visible", "open"], ["onVisibleChange", "onOpenChange"]].forEach((R) => {
      let [N, H] = R;
      wo(e[N] === void 0, "Tooltip", `\`${N}\` is deprecated, please use \`${H}\` instead.`);
    });
    const {
      prefixCls: a,
      getPopupContainer: l,
      direction: s,
      rootPrefixCls: u
    } = Nt("tooltip", e), c = E(() => {
      var R;
      return (R = e.open) !== null && R !== void 0 ? R : e.visible;
    }), d = le(Lp([e.open, e.visible])), f = le();
    let p;
    Ie(c, (R) => {
      Vt.cancel(p), p = Vt(() => {
        d.value = !!R;
      });
    });
    const v = () => {
      var R;
      const N = (R = e.title) !== null && R !== void 0 ? R : n.title;
      return !N && N !== 0;
    }, g = (R) => {
      const N = v();
      c.value === void 0 && (d.value = N ? !1 : R), N || (o("update:visible", R), o("visibleChange", R), o("update:open", R), o("openChange", R));
    };
    i({
      getPopupDomNode: () => f.value.getPopupDomNode(),
      open: d,
      forcePopupAlign: () => {
        var R;
        return (R = f.value) === null || R === void 0 ? void 0 : R.forcePopupAlign();
      }
    });
    const x = E(() => {
      var R;
      const {
        builtinPlacements: N,
        autoAdjustOverflow: H,
        arrow: L,
        arrowPointAtCenter: F
      } = e;
      let A = F;
      return typeof L == "object" && (A = (R = L.pointAtCenter) !== null && R !== void 0 ? R : F), N || MT({
        arrowPointAtCenter: A,
        autoAdjustOverflow: H
      });
    }), S = (R) => R || R === "", C = (R) => {
      const N = R.type;
      if (typeof N == "object" && R.props && ((N.__ANT_BUTTON === !0 || N === "button") && S(R.props.disabled) || N.__ANT_SWITCH === !0 && (S(R.props.disabled) || S(R.props.loading)) || N.__ANT_RADIO === !0 && S(R.props.disabled))) {
        const {
          picked: H,
          omitted: L
        } = Qj(sL(R), ["position", "left", "right", "top", "bottom", "float", "display", "zIndex"]), F = O(O({
          display: "inline-block"
        }, H), {
          cursor: "not-allowed",
          lineHeight: 1,
          width: R.props && R.props.block ? "100%" : void 0
        }), A = O(O({}, L), {
          pointerEvents: "none"
        }), G = Xn(R, {
          style: A
        }, !0);
        return h("span", {
          style: F,
          class: `${a.value}-disabled-compatible-wrapper`
        }, [G]);
      }
      return R;
    }, P = () => {
      var R, N;
      return (R = e.title) !== null && R !== void 0 ? R : (N = n.title) === null || N === void 0 ? void 0 : N.call(n);
    }, $ = (R, N) => {
      const H = x.value, L = Object.keys(H).find((F) => {
        var A, G;
        return H[F].points[0] === ((A = N.points) === null || A === void 0 ? void 0 : A[0]) && H[F].points[1] === ((G = N.points) === null || G === void 0 ? void 0 : G[1]);
      });
      if (L) {
        const F = R.getBoundingClientRect(), A = {
          top: "50%",
          left: "50%"
        };
        L.indexOf("top") >= 0 || L.indexOf("Bottom") >= 0 ? A.top = `${F.height - N.offset[1]}px` : (L.indexOf("Top") >= 0 || L.indexOf("bottom") >= 0) && (A.top = `${-N.offset[1]}px`), L.indexOf("left") >= 0 || L.indexOf("Right") >= 0 ? A.left = `${F.width - N.offset[0]}px` : (L.indexOf("right") >= 0 || L.indexOf("Left") >= 0) && (A.left = `${-N.offset[0]}px`), R.style.transformOrigin = `${A.left} ${A.top}`;
      }
    }, I = E(() => Gj(a.value, e.color)), w = E(() => r["data-popover-inject"]), [T, M] = Xj(a, E(() => !w.value));
    return () => {
      var R, N;
      const {
        openClassName: H,
        overlayClassName: L,
        overlayStyle: F,
        overlayInnerStyle: A
      } = e;
      let G = (N = Do((R = n.default) === null || R === void 0 ? void 0 : R.call(n))) !== null && N !== void 0 ? N : null;
      G = G.length === 1 ? G[0] : G;
      let j = d.value;
      if (c.value === void 0 && v() && (j = !1), !G)
        return null;
      const Z = C(Ao(G) && !uL(G) ? G : h("span", null, [G])), W = Me({
        [H || `${a.value}-open`]: !0,
        [Z.props && Z.props.class]: Z.props && Z.props.class
      }), K = Me(L, {
        [`${a.value}-rtl`]: s.value === "rtl"
      }, I.value.className, M.value), q = O(O({}, I.value.overlayStyle), A), U = I.value.arrowStyle, ae = O(O(O({}, r), e), {
        prefixCls: a.value,
        arrow: !!e.arrow,
        getPopupContainer: l?.value,
        builtinPlacements: x.value,
        visible: j,
        ref: f,
        overlayClassName: K,
        overlayStyle: O(O({}, U), F),
        overlayInnerStyle: q,
        onVisibleChange: g,
        onPopupAlign: $,
        transitionName: Ka(u.value, "zoom-big-fast", e.transitionName)
      });
      return T(h(Vj, ae, {
        default: () => [d.value ? Xn(Z, {
          class: W
        }) : Z],
        arrowContent: () => h("span", {
          class: `${a.value}-arrow-content`
        }, null),
        overlay: P
      }));
    };
  }
}), Lo = ii(Jj), eW = (e) => {
  const {
    componentCls: t,
    popoverBg: n,
    popoverColor: o,
    width: r,
    fontWeightStrong: i,
    popoverPadding: a,
    boxShadowSecondary: l,
    colorTextHeading: s,
    borderRadiusLG: u,
    zIndexPopup: c,
    marginXS: d,
    colorBgElevated: f
  } = e;
  return [
    {
      [t]: O(O({}, fn(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: r,
          marginBottom: d,
          color: s,
          fontWeight: i
        },
        [`${t}-inner-content`]: {
          color: o
        }
      })
    },
    // Arrow Style
    NT(e, {
      colorBg: "var(--antd-arrow-background-color)"
    }),
    // Pure Render
    {
      [`${t}-pure`]: {
        position: "relative",
        maxWidth: "none",
        [`${t}-content`]: {
          display: "inline-block"
        }
      }
    }
  ];
}, tW = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [t]: md.map((n) => {
      const o = e[`${n}-6`];
      return {
        [`&${t}-${n}`]: {
          "--antd-arrow-background-color": o,
          [`${t}-inner`]: {
            backgroundColor: o
          },
          [`${t}-arrow`]: {
            background: "transparent"
          }
        }
      };
    })
  };
}, nW = (e) => {
  const {
    componentCls: t,
    lineWidth: n,
    lineType: o,
    colorSplit: r,
    paddingSM: i,
    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} ${r}`
      },
      [`${t}-inner-content`]: {
        padding: `${i}px ${p}px`
      }
    }
  };
}, oW = On("Popover", (e) => {
  const {
    colorBgElevated: t,
    colorText: n,
    wireframe: o
  } = e, r = Qt(e, {
    popoverBg: t,
    popoverColor: n,
    popoverPadding: 12
    // Fixed Value
  });
  return [eW(r), tW(r), o && nW(r), Fd(r, "zoom-big")];
}, (e) => {
  let {
    zIndexPopupBase: t
  } = e;
  return {
    zIndexPopup: t + 30,
    width: 177
  };
}), rW = () => O(O({}, _T()), {
  content: Tr(),
  title: Tr()
}), iW = be({
  compatConfig: {
    MODE: 3
  },
  name: "APopover",
  inheritAttrs: !1,
  props: Mn(rW(), O(O({}, Zj()), {
    trigger: "hover",
    placement: "top",
    mouseEnterDelay: 0.1,
    mouseLeaveDelay: 0.1
  })),
  setup(e, t) {
    let {
      expose: n,
      slots: o,
      attrs: r
    } = t;
    const i = le();
    wo(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 = i.value) === null || f === void 0 ? void 0 : f.getPopupDomNode) === null || p === void 0 ? void 0 : p.call(f);
      }
    });
    const {
      prefixCls: a,
      configProvider: l
    } = Nt("popover", e), [s, u] = oW(a), c = E(() => l.getPrefixCls()), d = () => {
      var f, p;
      const {
        title: v = Do((f = o.title) === null || f === void 0 ? void 0 : f.call(o)),
        content: g = Do((p = o.content) === null || p === void 0 ? void 0 : p.call(o))
      } = e, m = !!(Array.isArray(v) ? v.length : v), x = !!(Array.isArray(g) ? g.length : v);
      return !m && !x ? null : h(Je, null, [m && h("div", {
        class: `${a.value}-title`
      }, [v]), h("div", {
        class: `${a.value}-inner-content`
      }, [g])]);
    };
    return () => {
      const f = Me(e.overlayClassName, u.value);
      return s(h(Lo, Q(Q(Q({}, Fn(e, ["title", "content"])), r), {}, {
        prefixCls: a.value,
        ref: i,
        overlayClassName: f,
        transitionName: Ka(c.value, "zoom-big", e.transitionName),
        "data-popover-inject": !0
      }), {
        title: d,
        default: o.default
      }));
    };
  }
}), aW = ii(iW), OS = (e) => !isNaN(parseFloat(e)) && isFinite(e), au = {
  adjustX: 1,
  adjustY: 1
}, lu = [0, 0], lW = {
  topLeft: {
    points: ["bl", "tl"],
    overflow: au,
    offset: [0, -4],
    targetOffset: lu
  },
  topCenter: {
    points: ["bc", "tc"],
    overflow: au,
    offset: [0, -4],
    targetOffset: lu
  },
  topRight: {
    points: ["br", "tr"],
    overflow: au,
    offset: [0, -4],
    targetOffset: lu
  },
  bottomLeft: {
    points: ["tl", "bl"],
    overflow: au,
    offset: [0, 4],
    targetOffset: lu
  },
  bottomCenter: {
    points: ["tc", "bc"],
    overflow: au,
    offset: [0, 4],
    targetOffset: lu
  },
  bottomRight: {
    points: ["tr", "br"],
    overflow: au,
    offset: [0, 4],
    targetOffset: lu
  }
};
var sW = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const zT = be({
  compatConfig: {
    MODE: 3
  },
  props: {
    minOverlayWidthMatchTrigger: {
      type: Boolean,
      default: void 0
    },
    arrow: {
      type: Boolean,
      default: !1
    },
    prefixCls: pe.string.def("rc-dropdown"),
    transitionName: String,
    overlayClassName: pe.string.def(""),
    openClassName: String,
    animation: pe.any,
    align: pe.object,
    overlayStyle: {
      type: Object,
      default: void 0
    },
    placement: pe.string.def("bottomLeft"),
    overlay: pe.any,
    trigger: pe.oneOfType([pe.string, pe.arrayOf(pe.string)]).def("hover"),
    alignPoint: {
      type: Boolean,
      default: void 0
    },
    showAction: pe.array,
    hideAction: pe.array,
    getPopupContainer: Function,
    visible: {
      type: Boolean,
      default: void 0
    },
    defaultVisible: {
      type: Boolean,
      default: !1
    },
    mouseEnterDelay: pe.number.def(0.15),
    mouseLeaveDelay: pe.number.def(0.1)
  },
  emits: ["visibleChange", "overlayClick"],
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      expose: r
    } = t;
    const i = le(!!e.visible);
    Ie(() => e.visible, (p) => {
      p !== void 0 && (i.value = p);
    });
    const a = le();
    r({
      triggerRef: a
    });
    const l = (p) => {
      e.visible === void 0 && (i.value = !1), o("overlayClick", p);
    }, s = (p) => {
      e.visible === void 0 && (i.value = p), o("visibleChange", p);
    }, u = () => {
      var p;
      const v = (p = n.overlay) === null || p === void 0 ? void 0 : p.call(n), g = {
        prefixCls: `${e.prefixCls}-menu`,
        onClick: l
      };
      return h(Je, {
        key: Hk
      }, [e.arrow && h("div", {
        class: `${e.prefixCls}-arrow`
      }, null), Xn(v, g, !1)]);
    }, c = E(() => {
      const {
        minOverlayWidthMatchTrigger: p = !e.alignPoint
      } = e;
      return p;
    }), d = () => {
      var p;
      const v = (p = n.default) === null || p === void 0 ? void 0 : p.call(n);
      return i.value && v ? Xn(v[0], {
        class: e.openClassName || `${e.prefixCls}-open`
      }, !1) : v;
    }, f = E(() => !e.hideAction && e.trigger.indexOf("contextmenu") !== -1 ? ["click"] : e.hideAction);
    return () => {
      const {
        prefixCls: p,
        arrow: v,
        showAction: g,
        overlayStyle: m,
        trigger: x,
        placement: S,
        align: C,
        getPopupContainer: P,
        transitionName: $,
        animation: I,
        overlayClassName: w
      } = e, T = sW(e, ["prefixCls", "arrow", "showAction", "overlayStyle", "trigger", "placement", "align", "getPopupContainer", "transitionName", "animation", "overlayClassName"]);
      return h(Ad, Q(Q({}, T), {}, {
        prefixCls: p,
        ref: a,
        popupClassName: Me(w, {
          [`${p}-show-arrow`]: v
        }),
        popupStyle: m,
        builtinPlacements: lW,
        action: x,
        showAction: g,
        hideAction: f.value || [],
        popupPlacement: S,
        popupAlign: C,
        popupTransitionName: $,
        popupAnimation: I,
        popupVisible: i.value,
        stretch: c.value ? "minWidth" : "",
        onPopupVisibleChange: s,
        getPopupContainer: P
      }), {
        popup: u,
        default: d
      });
    };
  }
}), uW = (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
        }
      }
    }
  };
}, cW = On("Wave", (e) => [uW(e)]);
function dW(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 sv(e) {
  return e && e !== "#fff" && e !== "#ffffff" && e !== "rgb(255, 255, 255)" && e !== "rgba(255, 255, 255, 1)" && dW(e) && !/rgba\((?:\d*, ){3}0\)/.test(e) && // any transparent rgba color
  e !== "transparent";
}
function fW(e) {
  const {
    borderTopColor: t,
    borderColor: n,
    backgroundColor: o
  } = getComputedStyle(e);
  return sv(t) ? t : sv(n) ? n : sv(o) ? o : null;
}
function uv(e) {
  return Number.isNaN(e) ? 0 : e;
}
const pW = be({
  props: {
    target: Mt(),
    className: String
  },
  setup(e) {
    const t = $e(null), [n, o] = Cn(null), [r, i] = Cn([]), [a, l] = Cn(0), [s, u] = Cn(0), [c, d] = Cn(0), [f, p] = Cn(0), [v, g] = Cn(!1);
    function m() {
      const {
        target: w
      } = e, T = getComputedStyle(w);
      o(fW(w));
      const M = T.position === "static", {
        borderLeftWidth: R,
        borderTopWidth: N
      } = T;
      l(M ? w.offsetLeft : uv(-parseFloat(R))), u(M ? w.offsetTop : uv(-parseFloat(N))), d(w.offsetWidth), p(w.offsetHeight);
      const {
        borderTopLeftRadius: H,
        borderTopRightRadius: L,
        borderBottomLeftRadius: F,
        borderBottomRightRadius: A
      } = T;
      i([H, L, A, F].map((G) => uv(parseFloat(G))));
    }
    let x, S, C;
    const P = () => {
      clearTimeout(C), Vt.cancel(S), x?.disconnect();
    }, $ = () => {
      var w;
      const T = (w = t.value) === null || w === void 0 ? void 0 : w.parentElement;
      T && (El(null, T), T.parentElement && T.parentElement.removeChild(T));
    };
    At(() => {
      P(), C = setTimeout(() => {
        $();
      }, 5e3);
      const {
        target: w
      } = e;
      w && (S = Vt(() => {
        m(), g(!0);
      }), typeof ResizeObserver < "u" && (x = new ResizeObserver(m), x.observe(w)));
    }), qt(() => {
      P();
    });
    const I = (w) => {
      w.propertyName === "opacity" && $();
    };
    return () => {
      if (!v.value)
        return null;
      const w = {
        left: `${a.value}px`,
        top: `${s.value}px`,
        width: `${c.value}px`,
        height: `${f.value}px`,
        borderRadius: r.value.map((T) => `${T}px`).join(" ")
      };
      return n && (w["--wave-color"] = n.value), h(Dr, {
        appear: !0,
        name: "wave-motion",
        appearFromClass: "wave-motion-appear",
        appearActiveClass: "wave-motion-appear",
        appearToClass: "wave-motion-appear wave-motion-appear-active"
      }, {
        default: () => [h("div", {
          ref: t,
          class: e.className,
          style: w,
          onTransitionend: I
        }, null)]
      });
    };
  }
});
function hW(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), El(h(pW, {
    target: e,
    className: t
  }, null), n), () => {
    El(null, n), n.parentElement && n.parentElement.removeChild(n);
  };
}
function gW(e, t) {
  const n = pr();
  let o;
  function r() {
    var i;
    const a = Qi(n);
    o?.(), !(!((i = t?.value) === null || i === void 0) && i.disabled || !a) && (o = hW(a, e.value));
  }
  return qt(() => {
    o?.();
  }), r;
}
const I0 = be({
  compatConfig: {
    MODE: 3
  },
  name: "Wave",
  props: {
    disabled: Boolean
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = pr(), {
      prefixCls: r,
      wave: i
    } = Nt("wave", e), [, a] = cW(r), l = gW(E(() => Me(r.value, a.value)), i);
    let s;
    const u = () => {
      Qi(o).removeEventListener("click", s, !0);
    };
    return At(() => {
      Ie(() => e.disabled, () => {
        u(), Yt(() => {
          const c = Qi(o);
          c?.removeEventListener("click", s, !0), !(!c || c.nodeType !== 1 || e.disabled) && (s = (d) => {
            d.target.tagName === "INPUT" || !Rh(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"
      });
    }), qt(() => {
      u();
    }), () => {
      var c;
      return (c = n.default) === null || c === void 0 ? void 0 : c.call(n)[0];
    };
  }
});
function FT(e) {
  return e === "danger" ? {
    danger: !0
  } : {
    type: e
  };
}
const BT = () => ({
  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: pe.any,
  href: String,
  target: String,
  title: String,
  onClick: Wu(),
  onMousedown: Wu()
}), kS = (e) => {
  e && (e.style.width = "0px", e.style.opacity = "0", e.style.transform = "scale(0)");
}, IS = (e) => {
  Yt(() => {
    e && (e.style.width = `${e.scrollWidth}px`, e.style.opacity = "1", e.style.transform = "scale(1)");
  });
}, TS = (e) => {
  e && e.style && (e.style.width = null, e.style.opacity = null, e.style.transform = null);
}, vW = be({
  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 h("span", {
          class: `${n}-loading-icon`
        }, [h(Mi, null, null)]);
      const r = !!o;
      return h(Dr, {
        name: `${n}-loading-icon-motion`,
        onBeforeEnter: kS,
        onEnter: IS,
        onAfterEnter: TS,
        onBeforeLeave: IS,
        onLeave: (i) => {
          setTimeout(() => {
            kS(i);
          });
        },
        onAfterLeave: TS
      }, {
        default: () => [r ? h("span", {
          class: `${n}-loading-icon`
        }, [h(Mi, null, null)]) : null]
      });
    };
  }
}), _S = (e, t) => ({
  // Border
  [`> span, > ${e}`]: {
    "&:not(:last-child)": {
      [`&, & > ${e}`]: {
        "&:not(:disabled)": {
          borderInlineEndColor: t
        }
      }
    },
    "&:not(:first-child)": {
      [`&, & > ${e}`]: {
        "&:not(:disabled)": {
          borderInlineStartColor: t
        }
      }
    }
  }
}), mW = (e) => {
  const {
    componentCls: t,
    fontSize: n,
    lineWidth: o,
    colorPrimaryHover: r,
    colorErrorHover: i
  } = 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
      _S(`${t}-primary`, r),
      _S(`${t}-danger`, i)
    ]
  };
};
function bW(e, t) {
  return {
    // border collapse
    [`&-item:not(${t}-last-item)`]: {
      marginBottom: -e.lineWidth
    },
    "&-item": {
      "&:hover,&:focus,&:active": {
        zIndex: 2
      },
      "&[disabled]": {
        zIndex: 0
      }
    }
  };
}
function yW(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 xW(e) {
  const t = `${e.componentCls}-compact-vertical`;
  return {
    [t]: O(O({}, bW(e, t)), yW(e.componentCls, t))
  };
}
const wW = (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)": O({}, Nl(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: '""'
            }
          }
        }
      }
    }
  };
}, qa = (e, t) => ({
  "&:not(:disabled)": {
    "&:hover": e,
    "&:active": t
  }
}), SW = (e) => ({
  minWidth: e.controlHeight,
  paddingInlineStart: 0,
  paddingInlineEnd: 0,
  borderRadius: "50%"
}), CW = (e) => ({
  borderRadius: e.controlHeight,
  paddingInlineStart: e.controlHeight / 2,
  paddingInlineEnd: e.controlHeight / 2
}), Xm = (e) => ({
  cursor: "not-allowed",
  borderColor: e.colorBorder,
  color: e.colorTextDisabled,
  backgroundColor: e.colorBgContainerDisabled,
  boxShadow: "none"
}), Hp = (e, t, n, o, r, i, a) => ({
  [`&${e}-background-ghost`]: O(O({
    color: t || void 0,
    backgroundColor: "transparent",
    borderColor: n || void 0,
    boxShadow: "none"
  }, qa(O({
    backgroundColor: "transparent"
  }, i), O({
    backgroundColor: "transparent"
  }, a))), {
    "&:disabled": {
      cursor: "not-allowed",
      color: o || void 0,
      borderColor: r || void 0
    }
  })
}), T0 = (e) => ({
  "&:disabled": O({}, Xm(e))
}), LT = (e) => O({}, T0(e)), Vp = (e) => ({
  "&:disabled": {
    cursor: "not-allowed",
    color: e.colorTextDisabled
  }
}), HT = (e) => O(O(O(O(O({}, LT(e)), {
  backgroundColor: e.colorBgContainer,
  borderColor: e.colorBorder,
  boxShadow: `0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`
}), qa({
  color: e.colorPrimaryHover,
  borderColor: e.colorPrimaryHover
}, {
  color: e.colorPrimaryActive,
  borderColor: e.colorPrimaryActive
})), Hp(e.componentCls, e.colorBgContainer, e.colorBgContainer, e.colorTextDisabled, e.colorBorder)), {
  [`&${e.componentCls}-dangerous`]: O(O(O({
    color: e.colorError,
    borderColor: e.colorError
  }, qa({
    color: e.colorErrorHover,
    borderColor: e.colorErrorBorderHover
  }, {
    color: e.colorErrorActive,
    borderColor: e.colorErrorActive
  })), Hp(e.componentCls, e.colorError, e.colorError, e.colorTextDisabled, e.colorBorder)), T0(e))
}), $W = (e) => O(O(O(O(O({}, LT(e)), {
  color: e.colorTextLightSolid,
  backgroundColor: e.colorPrimary,
  boxShadow: `0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`
}), qa({
  color: e.colorTextLightSolid,
  backgroundColor: e.colorPrimaryHover
}, {
  color: e.colorTextLightSolid,
  backgroundColor: e.colorPrimaryActive
})), Hp(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`]: O(O(O({
    backgroundColor: e.colorError,
    boxShadow: `0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`
  }, qa({
    backgroundColor: e.colorErrorHover
  }, {
    backgroundColor: e.colorErrorActive
  })), Hp(e.componentCls, e.colorError, e.colorError, e.colorTextDisabled, e.colorBorder, {
    color: e.colorErrorHover,
    borderColor: e.colorErrorHover
  }, {
    color: e.colorErrorActive,
    borderColor: e.colorErrorActive
  })), T0(e))
}), PW = (e) => O(O({}, HT(e)), {
  borderStyle: "dashed"
}), OW = (e) => O(O(O({
  color: e.colorLink
}, qa({
  color: e.colorLinkHover
}, {
  color: e.colorLinkActive
})), Vp(e)), {
  [`&${e.componentCls}-dangerous`]: O(O({
    color: e.colorError
  }, qa({
    color: e.colorErrorHover
  }, {
    color: e.colorErrorActive
  })), Vp(e))
}), kW = (e) => O(O(O({}, qa({
  color: e.colorText,
  backgroundColor: e.colorBgTextHover
}, {
  color: e.colorText,
  backgroundColor: e.colorBgTextActive
})), Vp(e)), {
  [`&${e.componentCls}-dangerous`]: O(O({
    color: e.colorError
  }, Vp(e)), qa({
    color: e.colorErrorHover,
    backgroundColor: e.colorErrorBg
  }, {
    color: e.colorErrorHover,
    backgroundColor: e.colorErrorBg
  }))
}), IW = (e) => O(O({}, Xm(e)), {
  [`&${e.componentCls}:hover`]: O({}, Xm(e))
}), TW = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-default`]: HT(e),
    [`${t}-primary`]: $W(e),
    [`${t}-dashed`]: PW(e),
    [`${t}-link`]: OW(e),
    [`${t}-text`]: kW(e),
    [`${t}-disabled`]: IW(e)
  };
}, _0 = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
  const {
    componentCls: n,
    iconCls: o,
    controlHeight: r,
    fontSize: i,
    lineHeight: a,
    lineWidth: l,
    borderRadius: s,
    buttonPaddingHorizontal: u
  } = e, c = Math.max(0, (r - i * a) / 2 - l), d = u - l, f = `${n}-icon-only`;
  return [
    // Size
    {
      [`${n}${t}`]: {
        fontSize: i,
        height: r,
        padding: `${c}px ${d}px`,
        borderRadius: s,
        [`&${f}`]: {
          width: r,
          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}`]: SW(e)
    },
    {
      [`${n}${n}-round${t}`]: CW(e)
    }
  ];
}, _W = (e) => _0(e), MW = (e) => {
  const t = Qt(e, {
    controlHeight: e.controlHeightSM,
    padding: e.paddingXS,
    buttonPaddingHorizontal: 8,
    borderRadius: e.borderRadiusSM
  });
  return _0(t, `${e.componentCls}-sm`);
}, EW = (e) => {
  const t = Qt(e, {
    controlHeight: e.controlHeightLG,
    fontSize: e.fontSizeLG,
    borderRadius: e.borderRadiusLG
  });
  return _0(t, `${e.componentCls}-lg`);
}, DW = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [t]: {
      [`&${t}-block`]: {
        width: "100%"
      }
    }
  };
}, AW = On("Button", (e) => {
  const {
    controlTmpOutline: t,
    paddingContentHorizontal: n
  } = e, o = Qt(e, {
    colorOutlineDefault: t,
    buttonPaddingHorizontal: n
  });
  return [
    // Shared
    wW(o),
    // Size
    MW(o),
    _W(o),
    EW(o),
    // Block
    DW(o),
    // Group (type, ghost, danger, disabled, loading)
    TW(o),
    // Button Group
    mW(o),
    // Space Compact
    Bd(e, {
      focus: !1
    }),
    xW(e)
  ];
}), NW = () => ({
  prefixCls: String,
  size: {
    type: String
  }
}), VT = w0(), Qm = be({
  compatConfig: {
    MODE: 3
  },
  name: "AButtonGroup",
  props: NW(),
  setup(e, t) {
    let {
      slots: n
    } = t;
    const {
      prefixCls: o,
      direction: r
    } = Nt("btn-group", e), [, , i] = cc();
    VT.useProvide($n({
      size: E(() => e.size)
    }));
    const a = E(() => {
      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:
          dn(!l, "Button.Group", "Invalid prop `size`.");
      }
      return {
        [`${o.value}`]: !0,
        [`${o.value}-${s}`]: s,
        [`${o.value}-rtl`]: r.value === "rtl",
        [i.value]: !0
      };
    });
    return () => {
      var l;
      return h("div", {
        class: a.value
      }, [go((l = n.default) === null || l === void 0 ? void 0 : l.call(n))]);
    };
  }
}), MS = /^[\u4e00-\u9fa5]{2}$/, ES = MS.test.bind(MS);
function kf(e) {
  return e === "text" || e === "link";
}
const Ft = be({
  compatConfig: {
    MODE: 3
  },
  name: "AButton",
  inheritAttrs: !1,
  __ANT_BUTTON: !0,
  props: Mn(BT(), {
    type: "default"
  }),
  slots: Object,
  // emits: ['click', 'mousedown'],
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      emit: r,
      expose: i
    } = t;
    const {
      prefixCls: a,
      autoInsertSpaceInButton: l,
      direction: s,
      size: u
    } = Nt("btn", e), [c, d] = AW(a), f = VT.useInject(), p = _i(), v = E(() => {
      var A;
      return (A = e.disabled) !== null && A !== void 0 ? A : p.value;
    }), g = $e(null), m = $e(void 0);
    let x = !1;
    const S = $e(!1), C = $e(!1), P = E(() => l.value !== !1), {
      compactSize: $,
      compactItemClassnames: I
    } = dc(a, s), w = E(() => typeof e.loading == "object" && e.loading.delay ? e.loading.delay || !0 : !!e.loading);
    Ie(w, (A) => {
      clearTimeout(m.value), typeof w.value == "number" ? m.value = setTimeout(() => {
        S.value = A;
      }, w.value) : S.value = A;
    }, {
      immediate: !0
    });
    const T = E(() => {
      const {
        type: A,
        shape: G = "default",
        ghost: j,
        block: Z,
        danger: W
      } = e, K = a.value, q = {
        large: "lg",
        small: "sm",
        middle: void 0
      }, U = $.value || f?.size || u.value, ae = U && q[U] || "";
      return [I.value, {
        [d.value]: !0,
        [`${K}`]: !0,
        [`${K}-${G}`]: G !== "default" && G,
        [`${K}-${A}`]: A,
        [`${K}-${ae}`]: ae,
        [`${K}-loading`]: S.value,
        [`${K}-background-ghost`]: j && !kf(A),
        [`${K}-two-chinese-chars`]: C.value && P.value,
        [`${K}-block`]: Z,
        [`${K}-dangerous`]: !!W,
        [`${K}-rtl`]: s.value === "rtl"
      }];
    }), M = () => {
      const A = g.value;
      if (!A || l.value === !1)
        return;
      const G = A.textContent;
      x && ES(G) ? C.value || (C.value = !0) : C.value && (C.value = !1);
    }, R = (A) => {
      if (S.value || v.value) {
        A.preventDefault();
        return;
      }
      r("click", A);
    }, N = (A) => {
      r("mousedown", A);
    }, H = (A, G) => {
      const j = G ? " " : "";
      if (A.type === Zb) {
        let Z = A.children.trim();
        return ES(Z) && (Z = Z.split("").join(j)), h("span", null, [Z]);
      }
      return A;
    };
    return It(() => {
      dn(!(e.ghost && kf(e.type)), "Button", "`link` or `text` button can't be a `ghost` button.");
    }), At(M), Ya(M), qt(() => {
      m.value && clearTimeout(m.value);
    }), i({
      focus: () => {
        var A;
        (A = g.value) === null || A === void 0 || A.focus();
      },
      blur: () => {
        var A;
        (A = g.value) === null || A === void 0 || A.blur();
      }
    }), () => {
      var A, G;
      const {
        icon: j = (A = n.icon) === null || A === void 0 ? void 0 : A.call(n)
      } = e, Z = go((G = n.default) === null || G === void 0 ? void 0 : G.call(n));
      x = Z.length === 1 && !j && !kf(e.type);
      const {
        type: W,
        htmlType: K,
        href: q,
        title: U,
        target: ae
      } = e, se = S.value ? "loading" : j, ie = O(O({}, o), {
        title: U,
        disabled: v.value,
        class: [T.value, o.class, {
          [`${a.value}-icon-only`]: Z.length === 0 && !!se
        }],
        onClick: R,
        onMousedown: N
      });
      v.value || delete ie.disabled;
      const re = j && !S.value ? j : h(vW, {
        existIcon: !!j,
        prefixCls: a.value,
        loading: !!S.value
      }, null), te = Z.map((ce) => H(ce, x && P.value));
      if (q !== void 0)
        return c(h("a", Q(Q({}, ie), {}, {
          href: q,
          target: ae,
          ref: g
        }), [re, te]));
      let ve = h("button", Q(Q({}, ie), {}, {
        ref: g,
        type: K
      }), [re, te]);
      if (!kf(W)) {
        const ce = /* @__PURE__ */ (function() {
          return ve;
        })();
        ve = h(I0, {
          ref: "wave",
          disabled: !!S.value
        }, {
          default: () => [ce]
        });
      }
      return c(ve);
    };
  }
});
Ft.Group = Qm;
Ft.install = function(e) {
  return e.component(Ft.name, Ft), e.component(Qm.name, Qm), e;
};
const jT = () => ({
  arrow: en([Boolean, Object]),
  trigger: {
    type: [Array, String]
  },
  menu: Mt(),
  overlay: pe.any,
  /** @deprecated Please use `open` instead */
  visible: ct(),
  open: ct(),
  disabled: ct(),
  danger: ct(),
  autofocus: ct(),
  align: Mt(),
  getPopupContainer: Function,
  prefixCls: String,
  transitionName: String,
  placement: String,
  overlayClassName: String,
  overlayStyle: Mt(),
  forceRender: ct(),
  mouseEnterDelay: Number,
  mouseLeaveDelay: Number,
  openClassName: String,
  minOverlayWidthMatchTrigger: ct(),
  destroyPopupOnHide: ct(),
  /** @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
  }
}), cv = BT(), RW = () => O(O({}, jT()), {
  type: cv.type,
  size: String,
  htmlType: cv.htmlType,
  href: String,
  disabled: ct(),
  prefixCls: String,
  icon: pe.any,
  title: String,
  loading: cv.loading,
  onClick: Wu()
});
var zW = { 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 DS(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      FW(e, r, n[r]);
    });
  }
  return e;
}
function FW(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Ld = function(t, n) {
  var o = DS({}, t, n.attrs);
  return h(an, DS({}, o, {
    icon: zW
  }), null);
};
Ld.displayName = "EllipsisOutlined";
Ld.inheritAttrs = !1;
const BW = (e) => {
  const {
    componentCls: t,
    antCls: n,
    paddingXS: o,
    opacityLoading: r
  } = e;
  return {
    [`${t}-button`]: {
      whiteSpace: "nowrap",
      [`&${n}-btn-group > ${n}-btn`]: {
        [`&-loading, &-loading + ${n}-btn`]: {
          cursor: "default",
          pointerEvents: "none",
          opacity: r
        },
        [`&:last-child:not(:first-child):not(${n}-btn-icon-only)`]: {
          paddingInline: o
        }
      }
    }
  };
}, LW = (e) => {
  const {
    componentCls: t,
    menuCls: n,
    colorError: o,
    colorTextLightSolid: r
  } = e, i = `${n}-item`;
  return {
    [`${t}, ${t}-menu-submenu`]: {
      [`${n} ${i}`]: {
        [`&${i}-danger:not(${i}-disabled)`]: {
          color: o,
          "&:hover": {
            color: r,
            backgroundColor: o
          }
        }
      }
    }
  };
}, HW = (e) => {
  const {
    componentCls: t,
    menuCls: n,
    zIndexPopup: o,
    dropdownArrowDistance: r,
    dropdownArrowOffset: i,
    sizePopupArrow: a,
    antCls: l,
    iconCls: s,
    motionDurationMid: u,
    dropdownPaddingVertical: c,
    fontSize: d,
    dropdownEdgeChildPadding: f,
    colorTextDisabled: p,
    fontSizeIcon: v,
    controlPaddingHorizontal: g,
    colorBgElevated: m,
    boxShadowPopoverArrow: x
  } = e;
  return [
    {
      [t]: O(O({}, fn(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: -r + 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: v
          },
          [`${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: r
        },
        [`
        &-show-arrow${t}-placement-bottomLeft,
        &-show-arrow${t}-placement-bottom,
        &-show-arrow${t}-placement-bottomRight
      `]: {
          paddingTop: r
        },
        // Note: .popover-arrow is outer, .popover-arrow:after is inner
        [`${t}-arrow`]: O({
          position: "absolute",
          zIndex: 1,
          display: "block"
        }, Gy(a, e.borderRadiusXS, e.borderRadiusOuter, m, x)),
        [`
        &-placement-top > ${t}-arrow,
        &-placement-topLeft > ${t}-arrow,
        &-placement-topRight > ${t}-arrow
      `]: {
          bottom: r,
          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: i
          }
        },
        [`&-placement-topRight > ${t}-arrow`]: {
          right: {
            _skip_check_: !0,
            value: i
          }
        },
        [`
          &-placement-bottom > ${t}-arrow,
          &-placement-bottomLeft > ${t}-arrow,
          &-placement-bottomRight > ${t}-arrow
        `]: {
          top: r,
          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: i
          }
        },
        [`&-placement-bottomRight > ${t}-arrow`]: {
          right: {
            _skip_check_: !0,
            value: i
          }
        },
        // =============================================================
        // ==                         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: Lh
        },
        [`&${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: Vh
        },
        [`&${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: Hh
        },
        [`&${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: jh
        }
      })
    },
    {
      // =============================================================
      // ==                          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]: O(O({
          padding: f,
          listStyleType: "none",
          backgroundColor: m,
          backgroundClip: "padding-box",
          borderRadius: e.borderRadiusLG,
          outline: "none",
          boxShadow: e.boxShadowSecondary
        }, Nl(e)), {
          [`${n}-item-group-title`]: {
            padding: `${c}px ${g}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`]: O(O({
            clear: "both",
            margin: 0,
            padding: `${c}px ${g}px`,
            color: e.colorText,
            fontWeight: "normal",
            fontSize: d,
            lineHeight: e.lineHeight,
            cursor: "pointer",
            transition: `all ${u}`,
            "&:hover, &-active": {
              backgroundColor: e.controlItemBgHover
            }
          }, Nl(e)), {
            "&-selected": {
              color: e.colorPrimary,
              backgroundColor: e.controlItemBgActive,
              "&:hover, &-active": {
                backgroundColor: e.controlItemBgActiveHover
              }
            },
            "&-disabled": {
              color: p,
              cursor: "not-allowed",
              "&:hover": {
                color: p,
                backgroundColor: m,
                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: v,
                fontStyle: "normal"
              }
            }
          }),
          [`${n}-item-group-list`]: {
            margin: `0 ${e.marginXS}px`,
            padding: 0,
            listStyle: "none"
          },
          [`${n}-submenu-title`]: {
            paddingInlineEnd: g + e.fontSizeSM
          },
          [`${n}-submenu-vertical`]: {
            position: "relative"
          },
          [`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]: {
            [`&, ${t}-menu-submenu-arrow-icon`]: {
              color: p,
              backgroundColor: m,
              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
    [oa(e, "slide-up"), oa(e, "slide-down"), Xu(e, "move-up"), Xu(e, "move-down"), Fd(e, "zoom-big")]
  ];
}, WT = On("Dropdown", (e, t) => {
  let {
    rootPrefixCls: n
  } = t;
  const {
    marginXXS: o,
    sizePopupArrow: r,
    controlHeight: i,
    fontSize: a,
    lineHeight: l,
    paddingXXS: s,
    componentCls: u,
    borderRadiusOuter: c,
    borderRadiusLG: d
  } = e, f = (i - a * l) / 2, {
    dropdownArrowOffset: p
  } = AT({
    sizePopupArrow: r,
    contentRadius: d,
    borderRadiusOuter: c
  }), v = Qt(e, {
    menuCls: `${u}-menu`,
    rootPrefixCls: n,
    dropdownArrowDistance: r / 2 + o,
    dropdownArrowOffset: p,
    dropdownPaddingVertical: f,
    dropdownEdgeChildPadding: s
  });
  return [HW(v), BW(v), LW(v)];
}, (e) => ({
  zIndexPopup: e.zIndexPopupBase + 50
}));
var VW = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const jW = Ft.Group, jp = be({
  compatConfig: {
    MODE: 3
  },
  name: "ADropdownButton",
  inheritAttrs: !1,
  __ANT_BUTTON: !0,
  props: Mn(RW(), {
    trigger: "hover",
    placement: "bottomRight",
    type: "default"
  }),
  // emits: ['click', 'visibleChange', 'update:visible'],s
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      emit: r
    } = t;
    const i = (f) => {
      r("update:visible", f), r("visibleChange", f), r("update:open", f), r("openChange", f);
    }, {
      prefixCls: a,
      direction: l,
      getPopupContainer: s
    } = Nt("dropdown", e), u = E(() => `${a.value}-button`), [c, d] = WT(a);
    return () => {
      var f, p;
      const v = O(O({}, e), o), {
        type: g = "default",
        disabled: m,
        danger: x,
        loading: S,
        htmlType: C,
        class: P = "",
        overlay: $ = (f = n.overlay) === null || f === void 0 ? void 0 : f.call(n),
        trigger: I,
        align: w,
        open: T,
        visible: M,
        onVisibleChange: R,
        placement: N = l.value === "rtl" ? "bottomLeft" : "bottomRight",
        href: H,
        title: L,
        icon: F = ((p = n.icon) === null || p === void 0 ? void 0 : p.call(n)) || h(Ld, null, null),
        mouseEnterDelay: A,
        mouseLeaveDelay: G,
        overlayClassName: j,
        overlayStyle: Z,
        destroyPopupOnHide: W,
        onClick: K,
        "onUpdate:open": q
      } = v, U = VW(v, ["type", "disabled", "danger", "loading", "htmlType", "class", "overlay", "trigger", "align", "open", "visible", "onVisibleChange", "placement", "href", "title", "icon", "mouseEnterDelay", "mouseLeaveDelay", "overlayClassName", "overlayStyle", "destroyPopupOnHide", "onClick", "onUpdate:open"]), ae = {
        align: w,
        disabled: m,
        trigger: m ? [] : I,
        placement: N,
        getPopupContainer: s?.value,
        onOpenChange: i,
        mouseEnterDelay: A,
        mouseLeaveDelay: G,
        open: T ?? M,
        overlayClassName: j,
        overlayStyle: Z,
        destroyPopupOnHide: W
      }, se = h(Ft, {
        danger: x,
        type: g,
        disabled: m,
        loading: S,
        onClick: K,
        htmlType: C,
        href: H,
        title: L
      }, {
        default: n.default
      }), ie = h(Ft, {
        danger: x,
        type: g,
        icon: F
      }, null);
      return c(h(jW, Q(Q({}, U), {}, {
        class: Me(u.value, P, d.value)
      }), {
        default: () => [n.leftButton ? n.leftButton({
          button: se
        }) : se, h(Er, ae, {
          default: () => [n.rightButton ? n.rightButton({
            button: ie
          }) : ie],
          overlay: () => $
        })]
      }));
    };
  }
});
var WW = { 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 AS(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      KW(e, r, n[r]);
    });
  }
  return e;
}
function KW(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Es = function(t, n) {
  var o = AS({}, t, n.attrs);
  return h(an, AS({}, o, {
    icon: WW
  }), null);
};
Es.displayName = "RightOutlined";
Es.inheritAttrs = !1;
const KT = Symbol("OverrideContextKey"), qT = () => zt(KT, void 0), YT = (e) => {
  var t, n, o;
  const {
    prefixCls: r,
    mode: i,
    selectable: a,
    validator: l,
    onClick: s,
    expandIcon: u
  } = qT() || {};
  Bt(KT, {
    prefixCls: E(() => {
      var c, d;
      return (d = (c = e.prefixCls) === null || c === void 0 ? void 0 : c.value) !== null && d !== void 0 ? d : r?.value;
    }),
    mode: E(() => {
      var c, d;
      return (d = (c = e.mode) === null || c === void 0 ? void 0 : c.value) !== null && d !== void 0 ? d : i?.value;
    }),
    selectable: E(() => {
      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
  });
}, Er = be({
  compatConfig: {
    MODE: 3
  },
  name: "ADropdown",
  inheritAttrs: !1,
  props: Mn(jT(), {
    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: r
    } = t;
    const {
      prefixCls: i,
      rootPrefixCls: a,
      direction: l,
      getPopupContainer: s
    } = Nt("dropdown", e), [u, c] = WT(i);
    process.env.NODE_ENV !== "production" && [["visible", "open"], ["onVisibleChange", "onOpenChange"], ["onUpdate:visible", "onUpdate:open"]].forEach((m) => {
      let [x, S] = m;
      wo(e[x] === void 0, "Dropdown", `\`${x}\` is deprecated which will be removed in next major version, please use \`${S}\` instead.`);
    });
    const d = E(() => {
      const {
        placement: m = "",
        transitionName: x
      } = e;
      return x !== void 0 ? x : m.includes("top") ? `${a.value}-slide-down` : `${a.value}-slide-up`;
    });
    YT({
      prefixCls: E(() => `${i.value}-menu`),
      expandIcon: E(() => h("span", {
        class: `${i.value}-menu-submenu-arrow`
      }, [h(Es, {
        class: `${i.value}-menu-submenu-arrow-icon`
      }, null)])),
      mode: E(() => "vertical"),
      selectable: E(() => !1),
      onClick: () => {
      },
      validator: (m) => {
        let {
          mode: x
        } = m;
        wo(!x || x === "vertical", "Dropdown", `mode="${x}" is not supported for Dropdown's Menu.`);
      }
    });
    const f = () => {
      var m, x, S;
      const C = e.overlay || ((m = n.overlay) === null || m === void 0 ? void 0 : m.call(n)), P = Array.isArray(C) ? C[0] : C;
      if (!P) return null;
      const $ = P.props || {};
      dn(!$.mode || $.mode === "vertical", "Dropdown", `mode="${$.mode}" is not supported for Dropdown's Menu.`);
      const {
        selectable: I = !1,
        expandIcon: w = (S = (x = P.children) === null || x === void 0 ? void 0 : x.expandIcon) === null || S === void 0 ? void 0 : S.call(x)
      } = $, T = typeof w < "u" && Ao(w) ? w : h("span", {
        class: `${i.value}-menu-submenu-arrow`
      }, [h(Es, {
        class: `${i.value}-menu-submenu-arrow-icon`
      }, null)]);
      return Ao(P) ? Xn(P, {
        mode: "vertical",
        selectable: I,
        expandIcon: () => T
      }) : P;
    }, p = E(() => {
      const m = e.placement;
      if (!m)
        return l.value === "rtl" ? "bottomRight" : "bottomLeft";
      if (m.includes("Center")) {
        const x = m.slice(0, m.indexOf("Center"));
        return dn(!m.includes("Center"), "Dropdown", `You are using '${m}' placement in Dropdown, which is deprecated. Try to use '${x}' instead.`), x;
      }
      return m;
    }), v = E(() => typeof e.visible == "boolean" ? e.visible : e.open), g = (m) => {
      r("update:visible", m), r("visibleChange", m), r("update:open", m), r("openChange", m);
    };
    return () => {
      var m, x;
      const {
        arrow: S,
        trigger: C,
        disabled: P,
        overlayClassName: $
      } = e, I = (m = n.default) === null || m === void 0 ? void 0 : m.call(n)[0], w = Xn(I, O({
        class: Me((x = I?.props) === null || x === void 0 ? void 0 : x.class, {
          [`${i.value}-rtl`]: l.value === "rtl"
        }, `${i.value}-trigger`)
      }, P ? {
        disabled: P
      } : {})), T = Me($, c.value, {
        [`${i.value}-rtl`]: l.value === "rtl"
      }), M = P ? [] : C;
      let R;
      M && M.includes("contextmenu") && (R = !0);
      const N = MT({
        arrowPointAtCenter: typeof S == "object" && S.pointAtCenter,
        autoAdjustOverflow: !0
      }), H = Fn(O(O(O({}, e), o), {
        visible: v.value,
        builtinPlacements: N,
        overlayClassName: T,
        arrow: !!S,
        alignPoint: R,
        prefixCls: i.value,
        getPopupContainer: s?.value,
        transitionName: d.value,
        trigger: M,
        onVisibleChange: g,
        placement: p.value
      }), ["overlay", "onUpdate:visible"]);
      return u(h(zT, H, {
        default: () => [w],
        overlay: f
      }));
    };
  }
});
Er.Button = jp;
function qW(e, t, n, o) {
  let r;
  if (r !== void 0)
    return !!r;
  if (e === t)
    return !0;
  if (typeof e != "object" || !e || typeof t != "object" || !t)
    return !1;
  const i = Object.keys(e), a = Object.keys(t);
  if (i.length !== a.length)
    return !1;
  const l = Object.prototype.hasOwnProperty.bind(t);
  for (let s = 0; s < i.length; s++) {
    const u = i[s];
    if (!l(u))
      return !1;
    const c = e[u], d = t[u];
    if (r = void 0, r === !1 || r === void 0 && c !== d)
      return !1;
  }
  return !0;
}
function vu(e, t) {
  return qW(fr(e), fr(t));
}
const GT = Symbol("menuContextKey"), UT = (e) => {
  Bt(GT, e);
}, Xa = () => zt(GT), XT = Symbol("ForceRenderKey"), YW = (e) => {
  Bt(XT, e);
}, QT = () => zt(XT, !1), ZT = Symbol("menuFirstLevelContextKey"), JT = (e) => {
  Bt(ZT, e);
}, GW = () => zt(ZT, !0), Wp = be({
  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 = Xa(), r = O({}, o);
    return e.mode !== void 0 && (r.mode = Kt(e, "mode")), e.overflowDisabled !== void 0 && (r.overflowDisabled = Kt(e, "overflowDisabled")), UT(r), () => {
      var i;
      return (i = n.default) === null || i === void 0 ? void 0 : i.call(n);
    };
  }
}), UW = Symbol("siderCollapsed"), If = "$$__vc-menu-more__key", e_ = Symbol("KeyPathContext"), M0 = () => zt(e_, {
  parentEventKeys: E(() => []),
  parentKeys: E(() => []),
  parentInfo: {}
}), XW = (e, t, n) => {
  const {
    parentEventKeys: o,
    parentKeys: r
  } = M0(), i = E(() => [...o.value, e]), a = E(() => [...r.value, t]);
  return Bt(e_, {
    parentEventKeys: i,
    parentKeys: a,
    parentInfo: n
  }), a;
}, t_ = Symbol("measure"), NS = be({
  compatConfig: {
    MODE: 3
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    return Bt(t_, !0), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
}), E0 = () => zt(t_, !1);
function n_(e) {
  const {
    mode: t,
    rtl: n,
    inlineIndent: o
  } = Xa();
  return E(() => t.value !== "inline" ? null : n.value ? {
    paddingRight: `${e.value * o.value}px`
  } : {
    paddingLeft: `${e.value * o.value}px`
  });
}
let QW = 0;
const ZW = () => ({
  id: String,
  role: String,
  disabled: Boolean,
  danger: Boolean,
  title: {
    type: [String, Boolean],
    default: void 0
  },
  icon: pe.any,
  onMouseenter: Function,
  onMouseleave: Function,
  onClick: Function,
  onKeydown: Function,
  onFocus: Function,
  // Internal user prop
  originItemValue: Mt()
}), Qu = be({
  compatConfig: {
    MODE: 3
  },
  name: "AMenuItem",
  inheritAttrs: !1,
  props: ZW(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      attrs: r
    } = t;
    const i = pr(), a = E0(), l = typeof i.vnode.key == "symbol" ? String(i.vnode.key) : i.vnode.key;
    dn(typeof i.vnode.key != "symbol", "MenuItem", `MenuItem \`:key="${String(l)}"\` not support Symbol type`);
    const s = `menu_item_${++QW}_$$_${l}`, {
      parentEventKeys: u,
      parentKeys: c
    } = M0(), {
      prefixCls: d,
      activeKeys: f,
      disabled: p,
      changeActiveKeys: v,
      rtl: g,
      inlineCollapsed: m,
      siderCollapsed: x,
      onItemClick: S,
      selectedKeys: C,
      registerMenuInfo: P,
      unRegisterMenuInfo: $
    } = Xa(), I = GW(), w = $e(!1), T = E(() => [...c.value, l]);
    P(s, {
      eventKey: s,
      key: l,
      parentEventKeys: u,
      parentKeys: c,
      isLeaf: !0
    }), qt(() => {
      $(s);
    }), Ie(f, () => {
      w.value = !!f.value.find((q) => q === l);
    }, {
      immediate: !0
    });
    const R = E(() => p.value || e.disabled), N = E(() => C.value.includes(l)), H = E(() => {
      const q = `${d.value}-item`;
      return {
        [`${q}`]: !0,
        [`${q}-danger`]: e.danger,
        [`${q}-active`]: w.value,
        [`${q}-selected`]: N.value,
        [`${q}-disabled`]: R.value
      };
    }), L = (q) => ({
      key: l,
      eventKey: s,
      keyPath: T.value,
      eventKeyPath: [...u.value, s],
      domEvent: q,
      item: O(O({}, e), r)
    }), F = (q) => {
      if (R.value)
        return;
      const U = L(q);
      o("click", q), S(U);
    }, A = (q) => {
      R.value || (v(T.value), o("mouseenter", q));
    }, G = (q) => {
      R.value || (v([]), o("mouseleave", q));
    }, j = (q) => {
      if (o("keydown", q), q.which === it.ENTER) {
        const U = L(q);
        o("click", q), S(U);
      }
    }, Z = (q) => {
      v(T.value), o("focus", q);
    }, W = (q, U) => {
      const ae = h("span", {
        class: `${d.value}-title-content`
      }, [U]);
      return (!q || Ao(U) && U.type === "span") && U && m.value && I && typeof U == "string" ? h("div", {
        class: `${d.value}-inline-collapsed-noicon`
      }, [U.charAt(0)]) : ae;
    }, K = n_(E(() => T.value.length));
    return () => {
      var q, U, ae, se, ie;
      if (a) return null;
      const re = (q = e.title) !== null && q !== void 0 ? q : (U = n.title) === null || U === void 0 ? void 0 : U.call(n), te = go((ae = n.default) === null || ae === void 0 ? void 0 : ae.call(n)), ve = te.length;
      let ce = re;
      typeof re > "u" ? ce = I && ve ? te : "" : re === !1 && (ce = "");
      const fe = {
        title: ce
      };
      !x.value && !m.value && (fe.title = null, fe.open = !1);
      const ge = {};
      e.role === "option" && (ge["aria-selected"] = N.value);
      const Te = (se = e.icon) !== null && se !== void 0 ? se : (ie = n.icon) === null || ie === void 0 ? void 0 : ie.call(n, e);
      return h(Lo, Q(Q({}, fe), {}, {
        placement: g.value ? "left" : "right",
        overlayClassName: `${d.value}-inline-collapsed-tooltip`
      }), {
        default: () => [h(za.Item, Q(Q(Q({
          component: "li"
        }, r), {}, {
          id: e.id,
          style: O(O({}, r.style || {}), K.value),
          class: [H.value, {
            [`${r.class}`]: !!r.class,
            [`${d.value}-item-only-child`]: (Te ? ve + 1 : ve) === 1
          }],
          role: e.role || "menuitem",
          tabindex: e.disabled ? null : -1,
          "data-menu-id": l,
          "aria-disabled": e.disabled
        }, ge), {}, {
          onMouseenter: A,
          onMouseleave: G,
          onClick: F,
          onKeydown: j,
          onFocus: Z,
          title: typeof re == "string" ? re : void 0
        }), {
          default: () => [Xn(typeof Te == "function" ? Te(e.originItemValue) : Te, {
            class: `${d.value}-item-icon`
          }, !1), W(Te, te)]
        })]
      });
    };
  }
}), Pl = {
  adjustX: 1,
  adjustY: 1
}, JW = {
  topLeft: {
    points: ["bl", "tl"],
    overflow: Pl,
    offset: [0, -7]
  },
  bottomLeft: {
    points: ["tl", "bl"],
    overflow: Pl,
    offset: [0, 7]
  },
  leftTop: {
    points: ["tr", "tl"],
    overflow: Pl,
    offset: [-4, 0]
  },
  rightTop: {
    points: ["tl", "tr"],
    overflow: Pl,
    offset: [4, 0]
  }
}, e7 = {
  topLeft: {
    points: ["bl", "tl"],
    overflow: Pl,
    offset: [0, -7]
  },
  bottomLeft: {
    points: ["tl", "bl"],
    overflow: Pl,
    offset: [0, 7]
  },
  rightTop: {
    points: ["tr", "tl"],
    overflow: Pl,
    offset: [-4, 0]
  },
  leftTop: {
    points: ["tl", "tr"],
    overflow: Pl,
    offset: [4, 0]
  }
}, t7 = {
  horizontal: "bottomLeft",
  vertical: "rightTop",
  "vertical-left": "rightTop",
  "vertical-right": "leftTop"
}, RS = be({
  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 r = $e(!1), {
      getPopupContainer: i,
      rtl: a,
      subMenuOpenDelay: l,
      subMenuCloseDelay: s,
      builtinPlacements: u,
      triggerSubMenuAction: c,
      forceSubMenuRender: d,
      motion: f,
      defaultMotions: p,
      rootClassName: v
    } = Xa(), g = QT(), m = E(() => a.value ? O(O({}, e7), u.value) : O(O({}, JW), u.value)), x = E(() => t7[e.mode]), S = $e();
    Ie(() => e.visible, ($) => {
      Vt.cancel(S.value), S.value = Vt(() => {
        r.value = $;
      });
    }, {
      immediate: !0
    }), qt(() => {
      Vt.cancel(S.value);
    });
    const C = ($) => {
      o("visibleChange", $);
    }, P = E(() => {
      var $, I;
      const w = f.value || (($ = p.value) === null || $ === void 0 ? void 0 : $[e.mode]) || ((I = p.value) === null || I === void 0 ? void 0 : I.other), T = typeof w == "function" ? w() : w;
      return T ? _s(T.name, {
        css: !0
      }) : void 0;
    });
    return () => {
      const {
        prefixCls: $,
        popupClassName: I,
        mode: w,
        popupOffset: T,
        disabled: M
      } = e;
      return h(Ad, {
        prefixCls: $,
        popupClassName: Me(`${$}-popup`, {
          [`${$}-rtl`]: a.value
        }, I, v.value),
        stretch: w === "horizontal" ? "minWidth" : null,
        getPopupContainer: i.value,
        builtinPlacements: m.value,
        popupPlacement: x.value,
        popupVisible: r.value,
        popupAlign: T && {
          offset: T
        },
        action: M ? [] : [c.value],
        mouseEnterDelay: l.value,
        mouseLeaveDelay: s.value,
        onPopupVisibleChange: C,
        forceRender: g || d.value,
        popupAnimation: P.value
      }, {
        popup: n.popup,
        default: n.default
      });
    };
  }
}), D0 = (e, t) => {
  let {
    slots: n,
    attrs: o
  } = t;
  var r;
  const {
    prefixCls: i,
    mode: a
  } = Xa();
  return h("ul", Q(Q({}, o), {}, {
    class: Me(i.value, `${i.value}-sub`, `${i.value}-${a.value === "inline" ? "inline" : "vertical"}`),
    "data-menu-list": !0
  }), [(r = n.default) === null || r === void 0 ? void 0 : r.call(n)]);
};
D0.displayName = "SubMenuList";
const n7 = be({
  compatConfig: {
    MODE: 3
  },
  name: "InlineSubMenuList",
  inheritAttrs: !1,
  props: {
    id: String,
    open: Boolean,
    keyPath: Array
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = E(() => "inline"), {
      motion: r,
      mode: i,
      defaultMotions: a
    } = Xa(), l = E(() => i.value === o.value), s = le(!l.value), u = E(() => l.value ? e.open : !1);
    Ie(i, () => {
      l.value && (s.value = !1);
    }, {
      flush: "post"
    });
    const c = E(() => {
      var d, f;
      const p = r.value || ((d = a.value) === null || d === void 0 ? void 0 : d[o.value]) || ((f = a.value) === null || f === void 0 ? void 0 : f.other), v = typeof p == "function" ? p() : p;
      return O(O({}, v), {
        appear: e.keyPath.length <= 1
      });
    });
    return () => {
      var d;
      return s.value ? null : h(Wp, {
        mode: o.value
      }, {
        default: () => [h(Dr, c.value, {
          default: () => [ti(h(D0, {
            id: e.id
          }, {
            default: () => [(d = n.default) === null || d === void 0 ? void 0 : d.call(n)]
          }), [[Oi, u.value]])]
        })]
      });
    };
  }
});
let zS = 0;
const o7 = () => ({
  icon: pe.any,
  title: pe.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: Mt()
}), Zu = be({
  compatConfig: {
    MODE: 3
  },
  name: "ASubMenu",
  inheritAttrs: !1,
  props: o7(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      emit: r
    } = t;
    var i, a;
    JT(!1);
    const l = E0(), s = pr(), u = typeof s.vnode.key == "symbol" ? String(s.vnode.key) : s.vnode.key;
    dn(typeof s.vnode.key != "symbol", "SubMenu", `SubMenu \`:key="${String(u)}"\` not support Symbol type`);
    const c = wm(u) ? u : `sub_menu_${++zS}_$$_not_set_key`, d = (i = e.eventKey) !== null && i !== void 0 ? i : wm(u) ? `sub_menu_${++zS}_$$_${u}` : c, {
      parentEventKeys: f,
      parentInfo: p,
      parentKeys: v
    } = M0(), g = E(() => [...v.value, c]), m = $e([]), x = {
      eventKey: d,
      key: c,
      parentEventKeys: f,
      childrenEventKeys: m,
      parentKeys: v
    };
    (a = p.childrenEventKeys) === null || a === void 0 || a.value.push(d), qt(() => {
      var Fe;
      p.childrenEventKeys && (p.childrenEventKeys.value = (Fe = p.childrenEventKeys) === null || Fe === void 0 ? void 0 : Fe.value.filter((Ve) => Ve != d));
    }), XW(d, c, x);
    const {
      prefixCls: S,
      activeKeys: C,
      disabled: P,
      changeActiveKeys: $,
      mode: I,
      inlineCollapsed: w,
      openKeys: T,
      overflowDisabled: M,
      onOpenChange: R,
      registerMenuInfo: N,
      unRegisterMenuInfo: H,
      selectedSubMenuKeys: L,
      expandIcon: F,
      theme: A
    } = Xa(), G = u != null, j = !l && (QT() || !G);
    YW(j), (l && G || !l && !G || j) && (N(d, x), qt(() => {
      H(d);
    }));
    const Z = E(() => `${S.value}-submenu`), W = E(() => P.value || e.disabled), K = $e(), q = $e(), U = E(() => T.value.includes(c)), ae = E(() => !M.value && U.value), se = E(() => L.value.includes(c)), ie = $e(!1);
    Ie(C, () => {
      ie.value = !!C.value.find((Fe) => Fe === c);
    }, {
      immediate: !0
    });
    const re = (Fe) => {
      W.value || (r("titleClick", Fe, c), I.value === "inline" && R(c, !U.value));
    }, te = (Fe) => {
      W.value || ($(g.value), r("mouseenter", Fe));
    }, ve = (Fe) => {
      W.value || ($([]), r("mouseleave", Fe));
    }, ce = n_(E(() => g.value.length)), fe = (Fe) => {
      I.value !== "inline" && R(c, Fe);
    }, ge = () => {
      $(g.value);
    }, Te = d && `${d}-popup`, ze = E(() => Me(S.value, `${S.value}-${e.theme || A.value}`, e.popupClassName)), Ke = (Fe, Ve) => {
      if (!Ve)
        return w.value && !v.value.length && Fe && typeof Fe == "string" ? h("div", {
          class: `${S.value}-inline-collapsed-noicon`
        }, [Fe.charAt(0)]) : h("span", {
          class: `${S.value}-title-content`
        }, [Fe]);
      const ot = Ao(Fe) && Fe.type === "span";
      return h(Je, null, [Xn(typeof Ve == "function" ? Ve(e.originItemValue) : Ve, {
        class: `${S.value}-item-icon`
      }, !1), ot ? Fe : h("span", {
        class: `${S.value}-title-content`
      }, [Fe])]);
    }, He = E(() => I.value !== "inline" && g.value.length > 1 ? "vertical" : I.value), Ne = E(() => I.value === "horizontal" ? "vertical" : I.value), Xe = E(() => He.value === "horizontal" ? "vertical" : He.value), De = () => {
      var Fe, Ve;
      const ot = Z.value, je = (Fe = e.icon) !== null && Fe !== void 0 ? Fe : (Ve = n.icon) === null || Ve === void 0 ? void 0 : Ve.call(n, e), Pe = e.expandIcon || n.expandIcon || F.value, Ge = Ke(ei(n, e, "title"), je);
      return h("div", {
        style: ce.value,
        class: `${ot}-title`,
        tabindex: W.value ? null : -1,
        ref: K,
        title: typeof Ge == "string" ? Ge : null,
        "data-menu-id": c,
        "aria-expanded": ae.value,
        "aria-haspopup": !0,
        "aria-controls": Te,
        "aria-disabled": W.value,
        onClick: re,
        onFocus: ge
      }, [Ge, I.value !== "horizontal" && Pe ? Pe(O(O({}, e), {
        isOpen: ae.value
      })) : h("i", {
        class: `${ot}-arrow`
      }, null)]);
    };
    return () => {
      var Fe;
      if (l)
        return G ? (Fe = n.default) === null || Fe === void 0 ? void 0 : Fe.call(n) : null;
      const Ve = Z.value;
      let ot = () => null;
      if (!M.value && I.value !== "inline") {
        const je = I.value === "horizontal" ? [0, 8] : [10, 0];
        ot = () => h(RS, {
          mode: He.value,
          prefixCls: Ve,
          visible: !e.internalPopupClose && ae.value,
          popupClassName: ze.value,
          popupOffset: e.popupOffset || je,
          disabled: W.value,
          onVisibleChange: fe
        }, {
          default: () => [De()],
          popup: () => h(Wp, {
            mode: Xe.value
          }, {
            default: () => [h(D0, {
              id: Te,
              ref: q
            }, {
              default: n.default
            })]
          })
        });
      } else
        ot = () => h(RS, null, {
          default: De
        });
      return h(Wp, {
        mode: Ne.value
      }, {
        default: () => [h(za.Item, Q(Q({
          component: "li"
        }, o), {}, {
          role: "none",
          class: Me(Ve, `${Ve}-${I.value}`, o.class, {
            [`${Ve}-open`]: ae.value,
            [`${Ve}-active`]: ie.value,
            [`${Ve}-selected`]: se.value,
            [`${Ve}-disabled`]: W.value
          }),
          onMouseenter: te,
          onMouseleave: ve,
          "data-submenu-id": c
        }), {
          default: () => h(Je, null, [ot(), !M.value && h(n7, {
            id: Te,
            open: ae.value,
            keyPath: g.value
          }, {
            default: n.default
          })])
        })]
      });
    };
  }
});
function o_(e, t) {
  return e.classList ? e.classList.contains(t) : ` ${e.className} `.indexOf(` ${t} `) > -1;
}
function Zm(e, t) {
  e.classList ? e.classList.add(t) : o_(e, t) || (e.className = `${e.className} ${t}`);
}
function Jm(e, t) {
  if (e.classList)
    e.classList.remove(t);
  else if (o_(e, t)) {
    const n = e.className;
    e.className = ` ${n} `.replace(` ${t} `, " ");
  }
}
const Kh = 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", Zm(n, e);
    },
    onEnter: (n) => {
      Yt(() => {
        n.style.height = `${n.scrollHeight}px`, n.style.opacity = "1";
      });
    },
    onAfterEnter: (n) => {
      n && (Jm(n, e), n.style.height = null, n.style.opacity = null);
    },
    onBeforeLeave: (n) => {
      Zm(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 && (Jm(n, e), n.style && (n.style.height = null, n.style.opacity = null));
    }
  };
}, r7 = () => ({
  title: pe.any,
  // Internal user prop
  originItemValue: Mt()
}), Kp = be({
  compatConfig: {
    MODE: 3
  },
  name: "AMenuItemGroup",
  inheritAttrs: !1,
  props: r7(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: r
    } = Xa(), i = E(() => `${r.value}-item-group`), a = E0();
    return () => {
      var l, s;
      return a ? (l = n.default) === null || l === void 0 ? void 0 : l.call(n) : h("li", Q(Q({}, o), {}, {
        onClick: (u) => u.stopPropagation(),
        class: i.value
      }), [h("div", {
        title: typeof e.title == "string" ? e.title : void 0,
        class: `${i.value}-title`
      }, [ei(n, e, "title")]), h("ul", {
        class: `${i.value}-list`
      }, [(s = n.default) === null || s === void 0 ? void 0 : s.call(n)])]);
    };
  }
}), i7 = () => ({
  prefixCls: String,
  dashed: Boolean
}), qp = be({
  compatConfig: {
    MODE: 3
  },
  name: "AMenuDivider",
  props: i7(),
  setup(e) {
    const {
      prefixCls: t
    } = Xa(), n = E(() => ({
      [`${t.value}-item-divider`]: !0,
      [`${t.value}-item-divider-dashed`]: !!e.dashed
    }));
    return () => h("li", {
      class: n.value
    }, null);
  }
});
var a7 = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
function eb(e, t, n) {
  return (e || []).map((o, r) => {
    if (o && typeof o == "object") {
      const i = o, {
        label: a,
        children: l,
        key: s,
        type: u
      } = i, c = a7(i, ["label", "children", "key", "type"]), d = s ?? `tmp-${r}`, f = n ? n.parentKeys.slice() : [], p = [], v = {
        eventKey: d,
        key: d,
        parentEventKeys: le(f),
        parentKeys: le(f),
        childrenEventKeys: le(p),
        isLeaf: !1
      };
      if (l || u === "group") {
        if (u === "group") {
          const m = eb(l, t, n);
          return h(Kp, Q(Q({
            key: d
          }, c), {}, {
            title: a,
            originItemValue: o
          }), {
            default: () => [m]
          });
        }
        t.set(d, v), n && n.childrenEventKeys.push(d);
        const g = eb(l, t, {
          childrenEventKeys: p,
          parentKeys: [].concat(f, d)
        });
        return h(Zu, Q(Q({
          key: d
        }, c), {}, {
          title: a,
          originItemValue: o
        }), {
          default: () => [g]
        });
      }
      return u === "divider" ? h(qp, Q({
        key: d
      }, c), null) : (v.isLeaf = !0, t.set(d, v), h(Qu, Q(Q({
        key: d
      }, c), {}, {
        originItemValue: o
      }), {
        default: () => [a]
      }));
    }
    return null;
  }).filter((o) => o);
}
function l7(e) {
  const t = $e([]), n = $e(!1), o = $e(/* @__PURE__ */ new Map());
  return Ie(() => e.items, () => {
    const r = /* @__PURE__ */ new Map();
    n.value = !1, e.items ? (n.value = !0, t.value = eb(e.items, r)) : t.value = void 0, o.value = r;
  }, {
    immediate: !0,
    deep: !0
  }), {
    itemsNodes: t,
    store: o,
    hasItmes: n
  };
}
const s7 = (e) => {
  const {
    componentCls: t,
    motionDurationSlow: n,
    menuHorizontalHeight: o,
    colorSplit: r,
    lineWidth: i,
    lineType: a,
    menuItemPaddingInline: l
  } = e;
  return {
    [`${t}-horizontal`]: {
      lineHeight: `${o}px`,
      border: 0,
      borderBottom: `${i}px ${a} ${r}`,
      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"
      }
    }
  };
}, u7 = (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})`
        }
      }
    }
  };
}, FS = (e) => O({}, Wa(e)), BS = (e, t) => {
  const {
    componentCls: n,
    colorItemText: o,
    colorItemTextSelected: r,
    colorGroupTitle: i,
    colorItemBg: a,
    colorSubItemBg: l,
    colorItemBgSelected: s,
    colorActiveBarHeight: u,
    colorActiveBarWidth: c,
    colorActiveBarBorderSize: d,
    motionDurationSlow: f,
    motionEaseInOut: p,
    motionEaseOut: v,
    menuItemPaddingInline: g,
    motionDurationMid: m,
    colorItemTextHover: x,
    lineType: S,
    colorSplit: C,
    // Disabled
    colorItemTextDisabled: P,
    // Danger
    colorDangerItemText: $,
    colorDangerItemTextHover: I,
    colorDangerItemTextSelected: w,
    colorDangerItemBgActive: T,
    colorDangerItemBgSelected: M,
    colorItemBgHover: R,
    menuSubMenuBg: N,
    // Horizontal
    colorItemTextSelectedHorizontal: H,
    colorItemBgSelectedHorizontal: L
  } = e;
  return {
    [`${n}-${t}`]: {
      color: o,
      background: a,
      [`&${n}-root:focus-visible`]: O({}, FS(e)),
      // ======================== Item ========================
      [`${n}-item-group-title`]: {
        color: i
      },
      [`${n}-submenu-selected`]: {
        [`> ${n}-submenu-title`]: {
          color: r
        }
      },
      // Disabled
      [`${n}-item-disabled, ${n}-submenu-disabled`]: {
        color: `${P} !important`
      },
      // Hover
      [`${n}-item:hover, ${n}-submenu-title:hover`]: {
        [`&:not(${n}-item-selected):not(${n}-submenu-selected)`]: {
          color: x
        }
      },
      [`&:not(${n}-horizontal)`]: {
        [`${n}-item:not(${n}-item-selected)`]: {
          "&:hover": {
            backgroundColor: R
          },
          "&:active": {
            backgroundColor: s
          }
        },
        [`${n}-submenu-title`]: {
          "&:hover": {
            backgroundColor: R
          },
          "&:active": {
            backgroundColor: s
          }
        }
      },
      // Danger - only Item has
      [`${n}-item-danger`]: {
        color: $,
        [`&${n}-item:hover`]: {
          [`&:not(${n}-item-selected):not(${n}-submenu-selected)`]: {
            color: I
          }
        },
        [`&${n}-item:active`]: {
          background: T
        }
      },
      [`${n}-item a`]: {
        "&, &:hover": {
          color: "inherit"
        }
      },
      [`${n}-item-selected`]: {
        color: r,
        // Danger
        [`&${n}-item-danger`]: {
          color: w
        },
        "a, a:hover": {
          color: "inherit"
        }
      },
      [`& ${n}-item-selected`]: {
        backgroundColor: s,
        // Danger
        [`&${n}-item-danger`]: {
          backgroundColor: M
        }
      },
      [`${n}-item, ${n}-submenu-title`]: {
        [`&:not(${n}-item-disabled):focus-visible`]: O({}, FS(e))
      },
      [`&${n}-submenu > ${n}`]: {
        backgroundColor: N
      },
      [`&${n}-popup > ${n}`]: {
        backgroundColor: a
      },
      // ====================== Horizontal ======================
      [`&${n}-horizontal`]: O(O({}, t === "dark" ? {
        borderBottom: 0
      } : {}), {
        [`> ${n}-item, > ${n}-submenu`]: {
          top: d,
          marginTop: -d,
          marginBottom: 0,
          borderRadius: 0,
          "&::after": {
            position: "absolute",
            insetInline: g,
            bottom: 0,
            borderBottom: `${u}px solid transparent`,
            transition: `border-color ${f} ${p}`,
            content: '""'
          },
          "&:hover, &-active, &-open": {
            "&::after": {
              borderBottomWidth: u,
              borderBottomColor: H
            }
          },
          "&-selected": {
            color: H,
            backgroundColor: L,
            "&::after": {
              borderBottomWidth: u,
              borderBottomColor: H
            }
          }
        }
      }),
      // ================== Inline & Vertical ===================
      //
      [`&${n}-root`]: {
        [`&${n}-inline, &${n}-vertical`]: {
          borderInlineEnd: `${d}px ${S} ${C}`
        }
      },
      // ======================== 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 ${r}`,
            transform: "scaleY(0.0001)",
            opacity: 0,
            transition: [`transform ${m} ${v}`, `opacity ${m} ${v}`].join(","),
            content: '""'
          },
          // Danger
          [`&${n}-item-danger`]: {
            "&::after": {
              borderInlineEndColor: w
            }
          }
        },
        [`${n}-selected, ${n}-item-selected`]: {
          "&::after": {
            transform: "scaleY(1)",
            opacity: 1,
            transition: [`transform ${m} ${p}`, `opacity ${m} ${p}`].join(",")
          }
        }
      }
    }
  };
}, LS = (e) => {
  const {
    componentCls: t,
    menuItemHeight: n,
    itemMarginInline: o,
    padding: r,
    menuArrowSize: i,
    marginXS: a,
    marginXXS: l
  } = e, s = r + i + a;
  return {
    [`${t}-item`]: {
      position: "relative"
    },
    [`${t}-item, ${t}-submenu-title`]: {
      height: n,
      lineHeight: `${n}px`,
      paddingInline: r,
      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
    }
  };
}, c7 = (e) => {
  const {
    componentCls: t,
    iconCls: n,
    menuItemHeight: o,
    colorTextLightSolid: r,
    dropdownWidth: i,
    controlHeightLG: a,
    motionDurationMid: l,
    motionEaseOut: s,
    paddingXL: u,
    fontSizeSM: c,
    fontSizeLG: d,
    motionDurationSlow: f,
    paddingXS: p,
    boxShadowSecondary: v
  } = e, g = {
    height: o,
    lineHeight: `${o}px`,
    listStylePosition: "inside",
    listStyleType: "disc"
  };
  return [
    {
      [t]: {
        "&-inline, &-vertical": O({
          [`&${t}-root`]: {
            boxShadow: "none"
          }
        }, LS(e))
      },
      [`${t}-submenu-popup`]: {
        [`${t}-vertical`]: O(O({}, LS(e)), {
          boxShadow: v
        })
      }
    },
    // Vertical only
    {
      [`${t}-submenu-popup ${t}-vertical${t}-sub`]: {
        minWidth: i,
        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`]: g,
          [`& ${t}-item-group-title`]: {
            paddingInlineStart: u
          }
        },
        // >>>>> Item
        [`${t}-item`]: g
      }
    },
    // 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: r
          }
        },
        [`${t}-item-group-title`]: O(O({}, Va), {
          paddingInline: p
        })
      }
    }
  ];
}, HS = (e) => {
  const {
    componentCls: t,
    fontSize: n,
    motionDurationSlow: o,
    motionDurationMid: r,
    motionEaseInOut: i,
    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} ${i}`].join(","),
      [`${t}-item-icon, ${l}`]: {
        minWidth: n,
        fontSize: n,
        transition: [`font-size ${r} ${a}`, `margin ${o} ${i}`, `color ${o}`].join(","),
        "+ span": {
          marginInlineStart: s - n,
          opacity: 1,
          transition: [`opacity ${o} ${i}`, `margin ${o}`, `color ${o}`].join(",")
        }
      },
      [`${t}-item-icon`]: O({}, uc()),
      [`&${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"
      }
    }
  };
}, VS = (e) => {
  const {
    componentCls: t,
    motionDurationSlow: n,
    motionEaseInOut: o,
    borderRadius: r,
    menuArrowSize: i,
    menuArrowOffset: a
  } = e;
  return {
    [`${t}-submenu`]: {
      "&-expand-icon, &-arrow": {
        position: "absolute",
        top: "50%",
        insetInlineEnd: e.margin,
        width: i,
        color: "currentcolor",
        transform: "translateY(-50%)",
        transition: `transform ${n} ${o}, opacity ${n}`
      },
      "&-arrow": {
        // →
        "&::before, &::after": {
          position: "absolute",
          width: i * 0.6,
          height: i * 0.15,
          backgroundColor: "currentcolor",
          borderRadius: r,
          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})`
        }
      }
    }
  };
}, d7 = (e) => {
  const {
    antCls: t,
    componentCls: n,
    fontSize: o,
    motionDurationSlow: r,
    motionDurationMid: i,
    motionEaseInOut: a,
    lineHeight: l,
    paddingXS: s,
    padding: u,
    colorSplit: c,
    lineWidth: d,
    zIndexPopup: f,
    borderRadiusLG: p,
    radiusSubMenuItem: v,
    menuArrowSize: g,
    menuArrowOffset: m,
    lineType: x,
    menuPanelMaskInset: S
  } = e;
  return [
    // Misc
    {
      "": {
        [`${n}`]: O(O({}, ja()), {
          // Hidden
          "&-hidden": {
            display: "none"
          }
        })
      },
      [`${n}-submenu-hidden`]: {
        display: "none"
      }
    },
    {
      [n]: O(O(O(O(O(O(O({}, fn(e)), ja()), {
        marginBottom: 0,
        paddingInlineStart: 0,
        // Override default ul/ol
        fontSize: o,
        lineHeight: 0,
        listStyle: "none",
        outline: "none",
        transition: `width ${r} 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 ${r}`
        },
        [`&-horizontal ${n}-submenu`]: {
          transition: [`border-color ${r} ${a}`, `background ${r} ${a}`].join(",")
        },
        [`${n}-submenu, ${n}-submenu-inline`]: {
          transition: [`border-color ${r} ${a}`, `background ${r} ${a}`, `padding ${i} ${a}`].join(",")
        },
        [`${n}-submenu ${n}-sub`]: {
          cursor: "initial",
          transition: [`background ${r} ${a}`, `padding ${r} ${a}`].join(",")
        },
        [`${n}-title-content`]: {
          transition: `color ${r}`
        },
        [`${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: x,
          borderWidth: 0,
          borderTopWidth: d,
          marginBlock: d,
          padding: 0,
          "&-dashed": {
            borderStyle: "dashed"
          }
        }
      }), HS(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: `${S}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: S
          },
          [`> ${n}`]: O(O(O({
            borderRadius: p
          }, HS(e)), VS(e)), {
            [`${n}-item, ${n}-submenu > ${n}-submenu-title`]: {
              borderRadius: v
            },
            [`${n}-submenu-title::after`]: {
              transition: `transform ${r} ${a}`
            }
          })
        }
      }), VS(e)), {
        [`&-inline-collapsed ${n}-submenu-arrow,
        &-inline ${n}-submenu-arrow`]: {
          // ↓
          "&::before": {
            transform: `rotate(-45deg) translateX(${m})`
          },
          "&::after": {
            transform: `rotate(45deg) translateX(-${m})`
          }
        },
        [`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]: {
          // ↑
          transform: `translateY(-${g * 0.2}px)`,
          "&::after": {
            transform: `rotate(-45deg) translateX(-${m})`
          },
          "&::before": {
            transform: `rotate(45deg) translateX(${m})`
          }
        }
      })
    },
    // Integration with header element so menu items have the same height
    {
      [`${t}-layout-header`]: {
        [n]: {
          lineHeight: "inherit"
        }
      }
    }
  ];
}, f7 = ((e, t) => On("Menu", (o, r) => {
  let {
    overrideComponentToken: i
  } = r;
  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, v = Qt(o, {
    menuItemHeight: d,
    menuItemPaddingInline: o.margin,
    menuArrowSize: p,
    menuHorizontalHeight: d * 1.15,
    menuArrowOffset: `${p * 0.25}px`,
    menuPanelMaskInset: -7,
    menuSubMenuBg: a
  }), g = new In(c).setAlpha(0.65).toRgbString(), m = Qt(v, {
    colorItemText: g,
    colorItemTextHover: c,
    colorGroupTitle: g,
    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
  }, O({}, i));
  return [
    // Basic
    d7(v),
    // Horizontal
    s7(v),
    // Vertical
    c7(v),
    // Theme
    BS(v, "light"),
    BS(m, "dark"),
    // RTL
    u7(v),
    // Motion
    Wh(v),
    oa(v, "slide-up"),
    oa(v, "slide-down"),
    Fd(v, "zoom-big")
  ];
}, (o) => {
  const {
    colorPrimary: r,
    colorError: i,
    colorTextDisabled: a,
    colorErrorBg: l,
    colorText: s,
    colorTextDescription: u,
    colorBgContainer: c,
    colorFillAlter: d,
    colorFillContent: f,
    lineWidth: p,
    lineWidthBold: v,
    controlItemBgActive: g,
    colorBgTextHover: m
  } = o;
  return {
    dropdownWidth: 160,
    zIndexPopup: o.zIndexPopupBase + 50,
    radiusItem: o.borderRadiusLG,
    radiusSubMenuItem: o.borderRadiusSM,
    colorItemText: s,
    colorItemTextHover: s,
    colorItemTextHoverHorizontal: r,
    colorGroupTitle: u,
    colorItemTextSelected: r,
    colorItemTextSelectedHorizontal: r,
    colorItemBg: c,
    colorItemBgHover: m,
    colorItemBgActive: f,
    colorSubItemBg: d,
    colorItemBgSelected: g,
    colorItemBgSelectedHorizontal: "transparent",
    colorActiveBarWidth: 0,
    colorActiveBarHeight: v,
    colorActiveBarBorderSize: p,
    // Disabled
    colorItemTextDisabled: a,
    // Danger
    colorDangerItemText: i,
    colorDangerItemTextHover: i,
    colorDangerItemTextSelected: i,
    colorDangerItemBgActive: l,
    colorDangerItemBgSelected: l,
    itemMarginInline: o.marginXXS
  };
})(e)), p7 = () => ({
  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
}), jS = [], fo = be({
  compatConfig: {
    MODE: 3
  },
  name: "AMenu",
  inheritAttrs: !1,
  props: p7(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      attrs: r
    } = t;
    const {
      direction: i,
      getPrefixCls: a
    } = Nt("menu", e), l = qT(), s = E(() => {
      var te;
      return a("menu", e.prefixCls || ((te = l?.prefixCls) === null || te === void 0 ? void 0 : te.value));
    }), [u, c] = f7(s, E(() => !l)), d = $e(/* @__PURE__ */ new Map()), f = zt(UW, le(void 0)), p = E(() => f.value !== void 0 ? f.value : e.inlineCollapsed), {
      itemsNodes: v
    } = l7(e), g = $e(!1);
    At(() => {
      g.value = !0;
    }), It(() => {
      dn(!(e.inlineCollapsed === !0 && e.mode !== "inline"), "Menu", "`inlineCollapsed` should only be used when `mode` is inline."), dn(!(f.value !== void 0 && e.inlineCollapsed === !0), "Menu", "`inlineCollapsed` not control Menu under Sider. Should set `collapsed` on Sider instead.");
    });
    const m = le([]), x = le([]), S = le({});
    Ie(d, () => {
      const te = {};
      for (const ve of d.value.values())
        te[ve.key] = ve;
      S.value = te;
    }, {
      flush: "post"
    }), It(() => {
      if (e.activeKey !== void 0) {
        let te = [];
        const ve = e.activeKey ? S.value[e.activeKey] : void 0;
        ve && e.activeKey !== void 0 ? te = Sg([].concat(_(ve.parentKeys), e.activeKey)) : te = [], vu(m.value, te) || (m.value = te);
      }
    }), Ie(() => e.selectedKeys, (te) => {
      te && (x.value = te.slice());
    }, {
      immediate: !0,
      deep: !0
    });
    const C = le([]);
    Ie([S, x], () => {
      let te = [];
      x.value.forEach((ve) => {
        const ce = S.value[ve];
        ce && (te = te.concat(_(ce.parentKeys)));
      }), te = Sg(te), vu(C.value, te) || (C.value = te);
    }, {
      immediate: !0
    });
    const P = (te) => {
      if (e.selectable) {
        const {
          key: ve
        } = te, ce = x.value.includes(ve);
        let fe;
        e.multiple ? ce ? fe = x.value.filter((Te) => Te !== ve) : fe = [...x.value, ve] : fe = [ve];
        const ge = O(O({}, te), {
          selectedKeys: fe
        });
        vu(fe, x.value) || (e.selectedKeys === void 0 && (x.value = fe), o("update:selectedKeys", fe), ce && e.multiple ? o("deselect", ge) : o("select", ge));
      }
      R.value !== "inline" && !e.multiple && $.value.length && L(jS);
    }, $ = le([]);
    Ie(() => e.openKeys, function() {
      let te = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : $.value;
      vu($.value, te) || ($.value = te.slice());
    }, {
      immediate: !0,
      deep: !0
    });
    let I;
    const w = (te) => {
      clearTimeout(I), I = setTimeout(() => {
        e.activeKey === void 0 && (m.value = te), o("update:activeKey", te[te.length - 1]);
      });
    }, T = E(() => !!e.disabled), M = E(() => i.value === "rtl"), R = le("vertical"), N = $e(!1);
    It(() => {
      var te;
      (e.mode === "inline" || e.mode === "vertical") && p.value ? (R.value = "vertical", N.value = p.value) : (R.value = e.mode, N.value = !1), !((te = l?.mode) === null || te === void 0) && te.value && (R.value = l.mode.value);
    });
    const H = E(() => R.value === "inline"), L = (te) => {
      $.value = te, o("update:openKeys", te), o("openChange", te);
    }, F = le($.value), A = $e(!1);
    Ie($, () => {
      H.value && (F.value = $.value);
    }, {
      immediate: !0
    }), Ie(H, () => {
      if (!A.value) {
        A.value = !0;
        return;
      }
      H.value ? $.value = F.value : L(jS);
    }, {
      immediate: !0
    });
    const G = E(() => ({
      [`${s.value}`]: !0,
      [`${s.value}-root`]: !0,
      [`${s.value}-${R.value}`]: !0,
      [`${s.value}-inline-collapsed`]: N.value,
      [`${s.value}-rtl`]: M.value,
      [`${s.value}-${e.theme}`]: !0
    })), j = E(() => a()), Z = E(() => ({
      horizontal: {
        name: `${j.value}-slide-up`
      },
      inline: Kh(`${j.value}-motion-collapse`),
      other: {
        name: `${j.value}-zoom-big`
      }
    }));
    JT(!0);
    const W = function() {
      let te = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
      const ve = [], ce = d.value;
      return te.forEach((fe) => {
        const {
          key: ge,
          childrenEventKeys: Te
        } = ce.get(fe);
        ve.push(ge, ...W(_(Te)));
      }), ve;
    }, K = (te) => {
      var ve;
      o("click", te), P(te), (ve = l?.onClick) === null || ve === void 0 || ve.call(l);
    }, q = (te, ve) => {
      var ce;
      const fe = ((ce = S.value[te]) === null || ce === void 0 ? void 0 : ce.childrenEventKeys) || [];
      let ge = $.value.filter((Te) => Te !== te);
      if (ve)
        ge.push(te);
      else if (R.value !== "inline") {
        const Te = W(_(fe));
        ge = Sg(ge.filter((ze) => !Te.includes(ze)));
      }
      vu($, ge) || L(ge);
    }, U = (te, ve) => {
      d.value.set(te, ve), d.value = new Map(d.value);
    }, ae = (te) => {
      d.value.delete(te), d.value = new Map(d.value);
    }, se = le(0), ie = E(() => {
      var te;
      return e.expandIcon || n.expandIcon || !((te = l?.expandIcon) === null || te === void 0) && te.value ? (ve) => {
        let ce = e.expandIcon || n.expandIcon;
        return ce = typeof ce == "function" ? ce(ve) : ce, Xn(ce, {
          class: `${s.value}-submenu-expand-icon`
        }, !1);
      } : null;
    });
    UT({
      prefixCls: s,
      activeKeys: m,
      openKeys: $,
      selectedKeys: x,
      changeActiveKeys: w,
      disabled: T,
      rtl: M,
      mode: R,
      inlineIndent: E(() => e.inlineIndent),
      subMenuCloseDelay: E(() => e.subMenuCloseDelay),
      subMenuOpenDelay: E(() => e.subMenuOpenDelay),
      builtinPlacements: E(() => e.builtinPlacements),
      triggerSubMenuAction: E(() => e.triggerSubMenuAction),
      getPopupContainer: E(() => e.getPopupContainer),
      inlineCollapsed: N,
      theme: E(() => e.theme),
      siderCollapsed: f,
      defaultMotions: E(() => g.value ? Z.value : null),
      motion: E(() => g.value ? e.motion : null),
      overflowDisabled: $e(void 0),
      onOpenChange: q,
      onItemClick: K,
      registerMenuInfo: U,
      unRegisterMenuInfo: ae,
      selectedSubMenuKeys: C,
      expandIcon: ie,
      forceSubMenuRender: E(() => e.forceSubMenuRender),
      rootClassName: c
    });
    const re = () => {
      var te;
      return v.value || go((te = n.default) === null || te === void 0 ? void 0 : te.call(n));
    };
    return () => {
      var te;
      const ve = re(), ce = se.value >= ve.length - 1 || R.value !== "horizontal" || e.disabledOverflow, fe = (Te) => R.value !== "horizontal" || e.disabledOverflow ? Te : (
        // Need wrap for overflow dropdown that do not response for open
        Te.map((ze, Ke) => (
          // Always wrap provider to avoid sub node re-mount
          h(Wp, {
            key: ze.key,
            overflowDisabled: Ke > se.value
          }, {
            default: () => ze
          })
        ))
      ), ge = ((te = n.overflowedIndicator) === null || te === void 0 ? void 0 : te.call(n)) || h(Ld, null, null);
      return u(h(za, Q(Q({}, r), {}, {
        onMousedown: e.onMousedown,
        prefixCls: `${s.value}-overflow`,
        component: "ul",
        itemComponent: Qu,
        class: [G.value, r.class, c.value],
        role: "menu",
        id: e.id,
        data: fe(ve),
        renderRawItem: (Te) => Te,
        renderRawRest: (Te) => {
          const ze = Te.length, Ke = ze ? ve.slice(-ze) : null;
          return h(Je, null, [h(Zu, {
            eventKey: If,
            key: If,
            title: ge,
            disabled: ce,
            internalPopupClose: ze === 0
          }, {
            default: () => Ke
          }), h(NS, null, {
            default: () => [h(Zu, {
              eventKey: If,
              key: If,
              title: ge,
              disabled: ce,
              internalPopupClose: ze === 0
            }, {
              default: () => Ke
            })]
          })]);
        },
        maxCount: R.value !== "horizontal" || e.disabledOverflow ? za.INVALIDATE : za.RESPONSIVE,
        ssr: "full",
        "data-menu-list": !0,
        onVisibleChange: (Te) => {
          se.value = Te;
        }
      }), {
        default: () => [h(oh, {
          to: "body"
        }, {
          default: () => [h("div", {
            style: {
              display: "none"
            },
            "aria-hidden": !0
          }, [h(NS, null, {
            default: () => [fe(re())]
          })])]
        })]
      }));
    };
  }
});
fo.install = function(e) {
  return e.component(fo.name, fo), e.component(Qu.name, Qu), e.component(Zu.name, Zu), e.component(qp.name, qp), e.component(Kp.name, Kp), e;
};
fo.Item = Qu;
fo.Divider = qp;
fo.SubMenu = Zu;
fo.ItemGroup = Kp;
yo.extend(KE);
yo.extend(WE);
yo.extend(BE);
yo.extend(LE);
yo.extend(HE);
yo.extend(VE);
yo.extend(jE);
yo.extend((e, t) => {
  const n = t.prototype, o = n.format;
  n.format = function(i) {
    const a = (i || "").replace("Wo", "wo");
    return o.bind(this)(a);
  };
});
const h7 = {
  // 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"
}, es = (e) => h7[e] || e.split("_")[0], WS = () => {
  Pm(!1, "Not match any format. Please help to fire a issue about this.");
}, g7 = /\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|k{1,2}|S/g;
function KS(e, t, n) {
  const o = [...new Set(e.split(n))];
  let r = 0;
  for (let i = 0; i < o.length; i++) {
    const a = o[i];
    if (r += a.length, r > t)
      return a;
    r += n.length;
  }
}
const qS = (e, t) => {
  if (!e) return null;
  if (yo.isDayjs(e))
    return e;
  const n = t.matchAll(g7);
  let o = yo(e, t);
  if (n === null)
    return o;
  for (const r of n) {
    const i = r[0], a = r.index;
    if (i === "Q") {
      const l = e.slice(a - 1, a), s = KS(e, a, l).match(/\d+/)[0];
      o = o.quarter(parseInt(s));
    }
    if (i.toLowerCase() === "wo") {
      const l = e.slice(a - 1, a), s = KS(e, a, l).match(/\d+/)[0];
      o = o.week(parseInt(s));
    }
    i.toLowerCase() === "ww" && (o = o.week(parseInt(e.slice(a, a + i.length)))), i.toLowerCase() === "w" && (o = o.week(parseInt(e.slice(a, a + i.length + 1))));
  }
  return o;
}, v7 = {
  // get
  getNow: () => yo(),
  getFixedDate: (e) => yo(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) => yo().locale(es(e)).localeData().firstDayOfWeek(),
    getWeekFirstDate: (e, t) => t.locale(es(e)).weekday(0),
    getWeek: (e, t) => t.locale(es(e)).week(),
    getShortWeekDays: (e) => yo().locale(es(e)).localeData().weekdaysMin(),
    getShortMonths: (e) => yo().locale(es(e)).localeData().monthsShort(),
    format: (e, t, n) => t.locale(es(e)).format(n),
    parse: (e, t, n) => {
      const o = es(e);
      for (let r = 0; r < n.length; r += 1) {
        const i = n[r], a = t;
        if (i.includes("wo") || i.includes("Wo")) {
          const s = a.split("-")[0], u = a.split("-")[1], c = yo(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 WS(), null;
        }
        const l = yo(a, i, !0).locale(o);
        if (l.isValid())
          return l;
      }
      return t || WS(), null;
    }
  },
  toDate: (e, t) => Array.isArray(e) ? e.map((n) => qS(n, t)) : qS(e, t),
  toString: (e, t) => Array.isArray(e) ? e.map((n) => yo.isDayjs(n) ? n.format(t) : n) : yo.isDayjs(e) ? e.format(t) : e
};
function vo(e) {
  const t = AE();
  return O(O({}, e), t);
}
const r_ = Symbol("PanelContextProps"), A0 = (e) => {
  Bt(r_, e);
}, sa = () => zt(r_, {}), Tf = {
  visibility: "hidden"
};
function Ll(e, t) {
  let {
    slots: n
  } = t;
  var o;
  const r = vo(e), {
    prefixCls: i,
    prevIcon: a = "‹",
    nextIcon: l = "›",
    superPrevIcon: s = "«",
    superNextIcon: u = "»",
    onSuperPrev: c,
    onSuperNext: d,
    onPrev: f,
    onNext: p
  } = r, {
    hideNextBtn: v,
    hidePrevBtn: g
  } = sa();
  return h("div", {
    class: i
  }, [c && h("button", {
    type: "button",
    onClick: c,
    tabindex: -1,
    class: `${i}-super-prev-btn`,
    style: g.value ? Tf : {}
  }, [s]), f && h("button", {
    type: "button",
    onClick: f,
    tabindex: -1,
    class: `${i}-prev-btn`,
    style: g.value ? Tf : {}
  }, [a]), h("div", {
    class: `${i}-view`
  }, [(o = n.default) === null || o === void 0 ? void 0 : o.call(n)]), p && h("button", {
    type: "button",
    onClick: p,
    tabindex: -1,
    class: `${i}-next-btn`,
    style: v.value ? Tf : {}
  }, [l]), d && h("button", {
    type: "button",
    onClick: d,
    tabindex: -1,
    class: `${i}-super-next-btn`,
    style: v.value ? Tf : {}
  }, [u])]);
}
Ll.displayName = "Header";
Ll.inheritAttrs = !1;
function N0(e) {
  const t = vo(e), {
    prefixCls: n,
    generateConfig: o,
    viewDate: r,
    onPrevDecades: i,
    onNextDecades: a
  } = t, {
    hideHeader: l
  } = sa();
  if (l)
    return null;
  const s = `${n}-header`, u = o.getYear(r), c = Math.floor(u / Ma) * Ma, d = c + Ma - 1;
  return h(Ll, Q(Q({}, t), {}, {
    prefixCls: s,
    onSuperPrev: i,
    onSuperNext: a
  }), {
    default: () => [c, Le("-"), d]
  });
}
N0.displayName = "DecadeHeader";
N0.inheritAttrs = !1;
function i_(e, t, n, o, r) {
  let i = e.setHour(t, n);
  return i = e.setMinute(i, o), i = e.setSecond(i, r), i;
}
function ip(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 m7(e, t, n, o, r, i) {
  const a = Math.floor(e / o) * o;
  if (a < e)
    return [a, 60 - r, 60 - i];
  const l = Math.floor(t / r) * r;
  if (l < t)
    return [a, l, 60 - i];
  const s = Math.floor(n / i) * i;
  return [a, l, s];
}
function b7(e, t) {
  const n = e.getYear(t), o = e.getMonth(t) + 1, r = e.getEndDate(e.getFixedDate(`${n}-${o}-01`)), i = e.getDate(r), a = o < 10 ? `0${o}` : `${o}`;
  return `${n}-${a}-${i}`;
}
function Vs(e) {
  const {
    prefixCls: t,
    disabledDate: n,
    onSelect: o,
    picker: r,
    rowNum: i,
    colNum: a,
    prefixColumn: l,
    rowClassName: s,
    baseDate: u,
    getCellClassName: c,
    getCellText: d,
    getCellNode: f,
    getCellDate: p,
    generateConfig: v,
    titleCell: g,
    headerCells: m
  } = vo(e), {
    onDateMouseenter: x,
    onDateMouseleave: S,
    mode: C
  } = sa(), P = `${t}-cell`, $ = [];
  for (let I = 0; I < i; I += 1) {
    const w = [];
    let T;
    for (let M = 0; M < a; M += 1) {
      const R = I * a + M, N = p(u, R), H = rb({
        cellDate: N,
        mode: C.value,
        disabledDate: n,
        generateConfig: v
      });
      M === 0 && (T = N, l && w.push(l(T)));
      const L = g && g(N);
      w.push(h("td", {
        key: M,
        title: L,
        class: Me(P, O({
          [`${P}-disabled`]: H,
          [`${P}-start`]: d(N) === 1 || r === "year" && Number(L) % 10 === 0,
          [`${P}-end`]: L === b7(v, N) || r === "year" && Number(L) % 10 === 9
        }, c(N))),
        onClick: (F) => {
          F.stopPropagation(), H || o(N);
        },
        onMouseenter: () => {
          !H && x && x(N);
        },
        onMouseleave: () => {
          !H && S && S(N);
        }
      }, [f ? f(N) : h("div", {
        class: `${P}-inner`
      }, [d(N)])]));
    }
    $.push(h("tr", {
      key: I,
      class: s && s(T)
    }, [w]));
  }
  return h("div", {
    class: `${t}-body`
  }, [h("table", {
    class: `${t}-content`
  }, [m && h("thead", null, [h("tr", null, [m])]), h("tbody", null, [$])])]);
}
Vs.displayName = "PanelBody";
Vs.inheritAttrs = !1;
const tb = 3, YS = 4;
function R0(e) {
  const t = vo(e), n = xi - 1, {
    prefixCls: o,
    viewDate: r,
    generateConfig: i
  } = t, a = `${o}-cell`, l = i.getYear(r), s = Math.floor(l / xi) * xi, u = Math.floor(l / Ma) * Ma, c = u + Ma - 1, d = i.setYear(r, u - Math.ceil((tb * YS * xi - Ma) / 2)), f = (p) => {
    const v = i.getYear(p), g = v + n;
    return {
      [`${a}-in-view`]: u <= v && g <= c,
      [`${a}-selected`]: v === s
    };
  };
  return h(Vs, Q(Q({}, t), {}, {
    rowNum: YS,
    colNum: tb,
    baseDate: d,
    getCellText: (p) => {
      const v = i.getYear(p);
      return `${v}-${v + n}`;
    },
    getCellClassName: f,
    getCellDate: (p, v) => i.addYear(p, v * xi)
  }), null);
}
R0.displayName = "DecadeBody";
R0.inheritAttrs = !1;
const _f = /* @__PURE__ */ new Map();
function y7(e, t) {
  let n;
  function o() {
    Rh(e) ? t() : n = Vt(() => {
      o();
    });
  }
  return o(), () => {
    Vt.cancel(n);
  };
}
function nb(e, t, n) {
  if (_f.get(e) && Vt.cancel(_f.get(e)), n <= 0) {
    _f.set(e, Vt(() => {
      e.scrollTop = t;
    }));
    return;
  }
  const r = (t - e.scrollTop) / n * 10;
  _f.set(e, Vt(() => {
    e.scrollTop += r, e.scrollTop !== t && nb(e, t, n - 10);
  }));
}
function fc(e, t) {
  let {
    onLeftRight: n,
    onCtrlLeftRight: o,
    onUpDown: r,
    onPageUpDown: i,
    onEnter: a
  } = t;
  const {
    which: l,
    ctrlKey: s,
    metaKey: u
  } = e;
  switch (l) {
    case it.LEFT:
      if (s || u) {
        if (o)
          return o(-1), !0;
      } else if (n)
        return n(-1), !0;
      break;
    case it.RIGHT:
      if (s || u) {
        if (o)
          return o(1), !0;
      } else if (n)
        return n(1), !0;
      break;
    case it.UP:
      if (r)
        return r(-1), !0;
      break;
    case it.DOWN:
      if (r)
        return r(1), !0;
      break;
    case it.PAGE_UP:
      if (i)
        return i(-1), !0;
      break;
    case it.PAGE_DOWN:
      if (i)
        return i(1), !0;
      break;
    case it.ENTER:
      if (a)
        return a(), !0;
      break;
  }
  return !1;
}
function a_(e, t, n, o) {
  let r = e;
  if (!r)
    switch (t) {
      case "time":
        r = o ? "hh:mm:ss a" : "HH:mm:ss";
        break;
      case "week":
        r = "gggg-wo";
        break;
      case "month":
        r = "YYYY-MM";
        break;
      case "quarter":
        r = "YYYY-[Q]Q";
        break;
      case "year":
        r = "YYYY";
        break;
      default:
        r = n ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
    }
  return r;
}
function l_(e, t, n) {
  const o = e === "time" ? 8 : 10, r = typeof t == "function" ? t(n.getNow()).length : t.length;
  return Math.max(o, r) + 2;
}
let Mc = null;
const Mf = /* @__PURE__ */ new Set();
function x7(e) {
  return !Mc && typeof window < "u" && window.addEventListener && (Mc = (t) => {
    [...Mf].forEach((n) => {
      n(t);
    });
  }, window.addEventListener("mousedown", Mc)), Mf.add(e), () => {
    Mf.delete(e), Mf.size === 0 && (window.removeEventListener("mousedown", Mc), Mc = null);
  };
}
function w7(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 S7 = (e) => e === "month" || e === "date" ? "year" : e, C7 = (e) => e === "date" ? "month" : e, $7 = (e) => e === "month" || e === "date" ? "quarter" : e, P7 = (e) => e === "date" ? "week" : e, O7 = {
  year: S7,
  month: C7,
  quarter: $7,
  week: P7,
  time: null,
  date: null
};
function s_(e, t) {
  return process.env.NODE_ENV === "test" ? !1 : e.some((n) => n && n.contains(t));
}
const xi = 10, Ma = xi * 10;
function z0(e) {
  const t = vo(e), {
    prefixCls: n,
    onViewDateChange: o,
    generateConfig: r,
    viewDate: i,
    operationRef: a,
    onSelect: l,
    onPanelChange: s
  } = t, u = `${n}-decade-panel`;
  a.value = {
    onKeydown: (f) => fc(f, {
      onLeftRight: (p) => {
        l(r.addYear(i, p * xi), "key");
      },
      onCtrlLeftRight: (p) => {
        l(r.addYear(i, p * Ma), "key");
      },
      onUpDown: (p) => {
        l(r.addYear(i, p * xi * tb), "key");
      },
      onEnter: () => {
        s("year", i);
      }
    })
  };
  const c = (f) => {
    const p = r.addYear(i, f * Ma);
    o(p), s(null, p);
  }, d = (f) => {
    l(f, "mouse"), s("year", f);
  };
  return h("div", {
    class: u
  }, [h(N0, Q(Q({}, t), {}, {
    prefixCls: n,
    onPrevDecades: () => {
      c(-1);
    },
    onNextDecades: () => {
      c(1);
    }
  }), null), h(R0, Q(Q({}, t), {}, {
    prefixCls: n,
    onSelect: d
  }), null)]);
}
z0.displayName = "DecadePanel";
z0.inheritAttrs = !1;
const ap = 7;
function js(e, t) {
  if (!e && !t)
    return !0;
  if (!e || !t)
    return !1;
}
function k7(e, t, n) {
  const o = js(t, n);
  if (typeof o == "boolean")
    return o;
  const r = Math.floor(e.getYear(t) / 10), i = Math.floor(e.getYear(n) / 10);
  return r === i;
}
function qh(e, t, n) {
  const o = js(t, n);
  return typeof o == "boolean" ? o : e.getYear(t) === e.getYear(n);
}
function ob(e, t) {
  return Math.floor(e.getMonth(t) / 3) + 1;
}
function u_(e, t, n) {
  const o = js(t, n);
  return typeof o == "boolean" ? o : qh(e, t, n) && ob(e, t) === ob(e, n);
}
function F0(e, t, n) {
  const o = js(t, n);
  return typeof o == "boolean" ? o : qh(e, t, n) && e.getMonth(t) === e.getMonth(n);
}
function Ea(e, t, n) {
  const o = js(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 I7(e, t, n) {
  const o = js(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 c_(e, t, n, o) {
  const r = js(n, o);
  return typeof r == "boolean" ? r : e.locale.getWeek(t, n) === e.locale.getWeek(t, o);
}
function _u(e, t, n) {
  return Ea(e, t, n) && I7(e, t, n);
}
function Ef(e, t, n, o) {
  return !t || !n || !o ? !1 : !Ea(e, t, o) && !Ea(e, n, o) && e.isAfter(o, t) && e.isAfter(n, o);
}
function T7(e, t, n) {
  const o = t.locale.getWeekFirstDay(e), r = t.setDate(n, 1), i = t.getWeekDay(r);
  let a = t.addDate(r, o - i);
  return t.getMonth(a) === t.getMonth(n) && t.getDate(a) > 1 && (a = t.addDate(a, -7)), a;
}
function Zc(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 qo(e, t) {
  let {
    generateConfig: n,
    locale: o,
    format: r
  } = t;
  return typeof r == "function" ? r(e) : n.locale.format(o.locale, e, r);
}
function d_(e, t) {
  let {
    generateConfig: n,
    locale: o,
    formatList: r
  } = t;
  return !e || typeof r[0] == "function" ? null : n.locale.parse(o.locale, e, r);
}
function rb(e) {
  let {
    cellDate: t,
    mode: n,
    disabledDate: o,
    generateConfig: r
  } = e;
  if (!o) return !1;
  const i = (a, l, s) => {
    let u = l;
    for (; u <= s; ) {
      let c;
      switch (a) {
        case "date": {
          if (c = r.setDate(t, u), !o(c))
            return !1;
          break;
        }
        case "month": {
          if (c = r.setMonth(t, u), !rb({
            cellDate: c,
            mode: "month",
            generateConfig: r,
            disabledDate: o
          }))
            return !1;
          break;
        }
        case "year": {
          if (c = r.setYear(t, u), !rb({
            cellDate: c,
            mode: "year",
            generateConfig: r,
            disabledDate: o
          }))
            return !1;
          break;
        }
      }
      u += 1;
    }
    return !0;
  };
  switch (n) {
    case "date":
    case "week":
      return o(t);
    case "month": {
      const l = r.getDate(r.getEndDate(t));
      return i("date", 1, l);
    }
    case "quarter": {
      const a = Math.floor(r.getMonth(t) / 3) * 3, l = a + 2;
      return i("month", a, l);
    }
    case "year":
      return i("month", 0, 11);
    case "decade": {
      const a = r.getYear(t), l = Math.floor(a / xi) * xi, s = l + xi - 1;
      return i("year", l, s);
    }
  }
}
function B0(e) {
  const t = vo(e), {
    hideHeader: n
  } = sa();
  if (n.value)
    return null;
  const {
    prefixCls: o,
    generateConfig: r,
    locale: i,
    value: a,
    format: l
  } = t, s = `${o}-header`;
  return h(Ll, {
    prefixCls: s
  }, {
    default: () => [a ? qo(a, {
      locale: i,
      format: l,
      generateConfig: r
    }) : " "]
  });
}
B0.displayName = "TimeHeader";
B0.inheritAttrs = !1;
const Df = be({
  name: "TimeUnitColumn",
  props: ["prefixCls", "units", "onSelect", "value", "active", "hideDisabledOptions"],
  setup(e) {
    const {
      open: t
    } = sa(), n = $e(null), o = le(/* @__PURE__ */ new Map()), r = le();
    return Ie(() => e.value, () => {
      const i = o.value.get(e.value);
      i && t.value !== !1 && nb(n.value, i.offsetTop, 120);
    }), qt(() => {
      var i;
      (i = r.value) === null || i === void 0 || i.call(r);
    }), Ie(t, () => {
      var i;
      (i = r.value) === null || i === void 0 || i.call(r), Yt(() => {
        if (t.value) {
          const a = o.value.get(e.value);
          a && (r.value = y7(a, () => {
            nb(n.value, a.offsetTop, 0);
          }));
        }
      });
    }, {
      immediate: !0,
      flush: "post"
    }), () => {
      const {
        prefixCls: i,
        units: a,
        onSelect: l,
        value: s,
        active: u,
        hideDisabledOptions: c
      } = e, d = `${i}-cell`;
      return h("ul", {
        class: Me(`${i}-column`, {
          [`${i}-column-active`]: u
        }),
        ref: n,
        style: {
          position: "relative"
        }
      }, [a.map((f) => c && f.disabled ? null : h("li", {
        key: f.value,
        ref: (p) => {
          o.value.set(f.value, p);
        },
        class: Me(d, {
          [`${d}-disabled`]: f.disabled,
          [`${d}-selected`]: s === f.value
        }),
        onClick: () => {
          f.disabled || l(f.value);
        }
      }, [h("div", {
        class: `${d}-inner`
      }, [f.label])]))]);
    };
  }
});
function f_(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 _7 = function() {
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
    t[n] = arguments[n];
  return t;
};
function p_(e) {
  return e == null ? [] : Array.isArray(e) ? e : [e];
}
function h_(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 on(e, t) {
  return e ? e[t] : null;
}
function Ur(e, t, n) {
  const o = [on(e, 0), on(e, 1)];
  return o[n] = typeof t == "function" ? t(o[n]) : t, !o[0] && !o[1] ? null : o;
}
function dv(e, t, n, o) {
  const r = [];
  for (let i = e; i <= t; i += n)
    r.push({
      label: f_(i, 2),
      value: i,
      disabled: (o || []).includes(i)
    });
  return r;
}
const M7 = be({
  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 = E(() => e.value ? e.generateConfig.getHour(e.value) : -1), n = E(() => e.use12Hours ? t.value >= 12 : !1), o = E(() => e.use12Hours ? t.value % 12 : t.value), r = E(() => e.value ? e.generateConfig.getMinute(e.value) : -1), i = E(() => e.value ? e.generateConfig.getSecond(e.value) : -1), a = le(e.generateConfig.getNow()), l = le(), s = le(), u = le();
    Jb(() => {
      a.value = e.generateConfig.getNow();
    }), It(() => {
      if (e.disabledTime) {
        const m = e.disabledTime(a);
        [l.value, s.value, u.value] = [m.disabledHours, m.disabledMinutes, m.disabledSeconds];
      } else
        [l.value, s.value, u.value] = [e.disabledHours, e.disabledMinutes, e.disabledSeconds];
    });
    const c = (m, x, S, C) => {
      let P = e.value || e.generateConfig.getNow();
      const $ = Math.max(0, x), I = Math.max(0, S), w = Math.max(0, C);
      return P = i_(e.generateConfig, P, !e.use12Hours || !m ? $ : $ + 12, I, w), P;
    }, d = E(() => {
      var m;
      return dv(0, 23, (m = e.hourStep) !== null && m !== void 0 ? m : 1, l.value && l.value());
    }), f = E(() => {
      if (!e.use12Hours)
        return [!1, !1];
      const m = [!0, !0];
      return d.value.forEach((x) => {
        let {
          disabled: S,
          value: C
        } = x;
        S || (C >= 12 ? m[1] = !1 : m[0] = !1);
      }), m;
    }), p = E(() => e.use12Hours ? d.value.filter(n.value ? (m) => m.value >= 12 : (m) => m.value < 12).map((m) => {
      const x = m.value % 12, S = x === 0 ? "12" : f_(x, 2);
      return O(O({}, m), {
        label: S,
        value: x
      });
    }) : d.value), v = E(() => {
      var m;
      return dv(0, 59, (m = e.minuteStep) !== null && m !== void 0 ? m : 1, s.value && s.value(t.value));
    }), g = E(() => {
      var m;
      return dv(0, 59, (m = e.secondStep) !== null && m !== void 0 ? m : 1, u.value && u.value(t.value, r.value));
    });
    return () => {
      const {
        prefixCls: m,
        operationRef: x,
        activeColumnIndex: S,
        showHour: C,
        showMinute: P,
        showSecond: $,
        use12Hours: I,
        hideDisabledOptions: w,
        onSelect: T
      } = e, M = [], R = `${m}-content`, N = `${m}-time-panel`;
      x.value = {
        onUpDown: (F) => {
          const A = M[S];
          if (A) {
            const G = A.units.findIndex((Z) => Z.value === A.value), j = A.units.length;
            for (let Z = 1; Z < j; Z += 1) {
              const W = A.units[(G + F * Z + j) % j];
              if (W.disabled !== !0) {
                A.onSelect(W.value);
                break;
              }
            }
          }
        }
      };
      function H(F, A, G, j, Z) {
        F !== !1 && M.push({
          node: Xn(A, {
            prefixCls: N,
            value: G,
            active: S === M.length,
            onSelect: Z,
            units: j,
            hideDisabledOptions: w
          }),
          onSelect: Z,
          value: G,
          units: j
        });
      }
      H(C, h(Df, {
        key: "hour"
      }, null), o.value, p.value, (F) => {
        T(c(n.value, F, r.value, i.value), "mouse");
      }), H(P, h(Df, {
        key: "minute"
      }, null), r.value, v.value, (F) => {
        T(c(n.value, o.value, F, i.value), "mouse");
      }), H($, h(Df, {
        key: "second"
      }, null), i.value, g.value, (F) => {
        T(c(n.value, o.value, r.value, F), "mouse");
      });
      let L = -1;
      return typeof n.value == "boolean" && (L = n.value ? 1 : 0), H(I === !0, h(Df, {
        key: "12hours"
      }, null), L, [{
        label: "AM",
        value: 0,
        disabled: f.value[0]
      }, {
        label: "PM",
        value: 1,
        disabled: f.value[1]
      }], (F) => {
        T(c(!!F, o.value, r.value, i.value), "mouse");
      }), h("div", {
        class: R
      }, [M.map((F) => {
        let {
          node: A
        } = F;
        return A;
      })]);
    };
  }
}), E7 = (e) => e.filter((t) => t !== !1).length;
function Yh(e) {
  const t = vo(e), {
    generateConfig: n,
    format: o = "HH:mm:ss",
    prefixCls: r,
    active: i,
    operationRef: a,
    showHour: l,
    showMinute: s,
    showSecond: u,
    use12Hours: c = !1,
    onSelect: d,
    value: f
  } = t, p = `${r}-time-panel`, v = le(), g = le(-1), m = E7([l, s, u, c]);
  return a.value = {
    onKeydown: (x) => fc(x, {
      onLeftRight: (S) => {
        g.value = (g.value + S + m) % m;
      },
      onUpDown: (S) => {
        g.value === -1 ? g.value = 0 : v.value && v.value.onUpDown(S);
      },
      onEnter: () => {
        d(f || n.getNow(), "key"), g.value = -1;
      }
    }),
    onBlur: () => {
      g.value = -1;
    }
  }, h("div", {
    class: Me(p, {
      [`${p}-active`]: i
    })
  }, [h(B0, Q(Q({}, t), {}, {
    format: o,
    prefixCls: r
  }), null), h(M7, Q(Q({}, t), {}, {
    prefixCls: r,
    activeColumnIndex: g.value,
    operationRef: v
  }), null)]);
}
Yh.displayName = "TimePanel";
Yh.inheritAttrs = !1;
function Gh(e) {
  let {
    cellPrefixCls: t,
    generateConfig: n,
    rangedValue: o,
    hoverRangedValue: r,
    isInView: i,
    isSameCell: a,
    offsetCell: l,
    today: s,
    value: u
  } = e;
  function c(d) {
    const f = l(d, -1), p = l(d, 1), v = on(o, 0), g = on(o, 1), m = on(r, 0), x = on(r, 1), S = Ef(n, m, x, d);
    function C(M) {
      return a(v, M);
    }
    function P(M) {
      return a(g, M);
    }
    const $ = a(m, d), I = a(x, d), w = (S || I) && (!i(f) || P(f)), T = (S || $) && (!i(p) || C(p));
    return {
      // In view
      [`${t}-in-view`]: i(d),
      // Range
      [`${t}-in-range`]: Ef(n, v, g, d),
      [`${t}-range-start`]: C(d),
      [`${t}-range-end`]: P(d),
      [`${t}-range-start-single`]: C(d) && !g,
      [`${t}-range-end-single`]: P(d) && !v,
      [`${t}-range-start-near-hover`]: C(d) && (a(f, m) || Ef(n, m, x, f)),
      [`${t}-range-end-near-hover`]: P(d) && (a(p, x) || Ef(n, m, x, p)),
      // Range Hover
      [`${t}-range-hover`]: S,
      [`${t}-range-hover-start`]: $,
      [`${t}-range-hover-end`]: I,
      // Range Edge
      [`${t}-range-hover-edge-start`]: w,
      [`${t}-range-hover-edge-end`]: T,
      [`${t}-range-hover-edge-start-near-range`]: w && a(f, g),
      [`${t}-range-hover-edge-end-near-range`]: T && a(p, v),
      // Others
      [`${t}-today`]: a(s, d),
      [`${t}-selected`]: a(u, d)
    };
  }
  return c;
}
const g_ = Symbol("RangeContextProps"), D7 = (e) => {
  Bt(g_, e);
}, Hd = () => zt(g_, {
  rangedValue: le(),
  hoverRangedValue: le(),
  inRange: le(),
  panelPosition: le()
}), A7 = be({
  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 D7(o), Ie(() => e.value, () => {
      Object.keys(e.value).forEach((r) => {
        o[r] && (o[r].value = e.value[r]);
      });
    }), () => {
      var r;
      return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
    };
  }
});
function Uh(e) {
  const t = vo(e), {
    prefixCls: n,
    generateConfig: o,
    prefixColumn: r,
    locale: i,
    rowCount: a,
    viewDate: l,
    value: s,
    dateRender: u
  } = t, {
    rangedValue: c,
    hoverRangedValue: d
  } = Hd(), f = T7(i.locale, o, l), p = `${n}-cell`, v = o.locale.getWeekFirstDay(i.locale), g = o.getNow(), m = [], x = i.shortWeekDays || (o.locale.getShortWeekDays ? o.locale.getShortWeekDays(i.locale) : []);
  r && m.push(h("th", {
    key: "empty",
    "aria-label": "empty cell"
  }, null));
  for (let P = 0; P < ap; P += 1)
    m.push(h("th", {
      key: P
    }, [x[(P + v) % ap]]));
  const S = Gh({
    cellPrefixCls: p,
    today: g,
    value: s,
    generateConfig: o,
    rangedValue: r ? null : c.value,
    hoverRangedValue: r ? null : d.value,
    isSameCell: (P, $) => Ea(o, P, $),
    isInView: (P) => F0(o, P, l),
    offsetCell: (P, $) => o.addDate(P, $)
  }), C = u ? (P) => u({
    current: P,
    today: g
  }) : void 0;
  return h(Vs, Q(Q({}, t), {}, {
    rowNum: a,
    colNum: ap,
    baseDate: f,
    getCellNode: C,
    getCellText: o.getDate,
    getCellClassName: S,
    getCellDate: o.addDate,
    titleCell: (P) => qo(P, {
      locale: i,
      format: "YYYY-MM-DD",
      generateConfig: o
    }),
    headerCells: m
  }), null);
}
Uh.displayName = "DateBody";
Uh.inheritAttrs = !1;
Uh.props = [
  "prefixCls",
  "generateConfig",
  "value?",
  "viewDate",
  "locale",
  "rowCount",
  "onSelect",
  "dateRender?",
  "disabledDate?",
  // Used for week panel
  "prefixColumn?",
  "rowClassName?"
];
function L0(e) {
  const t = vo(e), {
    prefixCls: n,
    generateConfig: o,
    locale: r,
    viewDate: i,
    onNextMonth: a,
    onPrevMonth: l,
    onNextYear: s,
    onPrevYear: u,
    onYearClick: c,
    onMonthClick: d
  } = t, {
    hideHeader: f
  } = sa();
  if (f.value)
    return null;
  const p = `${n}-header`, v = r.shortMonths || (o.locale.getShortMonths ? o.locale.getShortMonths(r.locale) : []), g = o.getMonth(i), m = h("button", {
    type: "button",
    key: "year",
    onClick: c,
    tabindex: -1,
    class: `${n}-year-btn`
  }, [qo(i, {
    locale: r,
    format: r.yearFormat,
    generateConfig: o
  })]), x = h("button", {
    type: "button",
    key: "month",
    onClick: d,
    tabindex: -1,
    class: `${n}-month-btn`
  }, [r.monthFormat ? qo(i, {
    locale: r,
    format: r.monthFormat,
    generateConfig: o
  }) : v[g]]), S = r.monthBeforeYear ? [x, m] : [m, x];
  return h(Ll, Q(Q({}, t), {}, {
    prefixCls: p,
    onSuperPrev: u,
    onPrev: l,
    onNext: a,
    onSuperNext: s
  }), {
    default: () => [S]
  });
}
L0.displayName = "DateHeader";
L0.inheritAttrs = !1;
const N7 = 6;
function Vd(e) {
  const t = vo(e), {
    prefixCls: n,
    panelName: o = "date",
    keyboardConfig: r,
    active: i,
    operationRef: a,
    generateConfig: l,
    value: s,
    viewDate: u,
    onViewDateChange: c,
    onPanelChange: d,
    onSelect: f
  } = t, p = `${n}-${o}-panel`;
  a.value = {
    onKeydown: (m) => fc(m, O({
      onLeftRight: (x) => {
        f(l.addDate(s || u, x), "key");
      },
      onCtrlLeftRight: (x) => {
        f(l.addYear(s || u, x), "key");
      },
      onUpDown: (x) => {
        f(l.addDate(s || u, x * ap), "key");
      },
      onPageUpDown: (x) => {
        f(l.addMonth(s || u, x), "key");
      }
    }, r))
  };
  const v = (m) => {
    const x = l.addYear(u, m);
    c(x), d(null, x);
  }, g = (m) => {
    const x = l.addMonth(u, m);
    c(x), d(null, x);
  };
  return h("div", {
    class: Me(p, {
      [`${p}-active`]: i
    })
  }, [h(L0, Q(Q({}, t), {}, {
    prefixCls: n,
    value: s,
    viewDate: u,
    onPrevYear: () => {
      v(-1);
    },
    onNextYear: () => {
      v(1);
    },
    onPrevMonth: () => {
      g(-1);
    },
    onNextMonth: () => {
      g(1);
    },
    onMonthClick: () => {
      d("month", u);
    },
    onYearClick: () => {
      d("year", u);
    }
  }), null), h(Uh, Q(Q({}, t), {}, {
    onSelect: (m) => f(m, "mouse"),
    prefixCls: n,
    value: s,
    viewDate: u,
    rowCount: N7
  }), null)]);
}
Vd.displayName = "DatePanel";
Vd.inheritAttrs = !1;
const GS = _7("date", "time");
function H0(e) {
  const t = vo(e), {
    prefixCls: n,
    operationRef: o,
    generateConfig: r,
    value: i,
    defaultValue: a,
    disabledTime: l,
    showTime: s,
    onSelect: u
  } = t, c = `${n}-datetime-panel`, d = le(null), f = le({}), p = le({}), v = typeof s == "object" ? O({}, s) : {};
  function g(C) {
    const P = GS.indexOf(d.value) + C;
    return GS[P] || null;
  }
  const m = (C) => {
    p.value.onBlur && p.value.onBlur(C), d.value = null;
  };
  o.value = {
    onKeydown: (C) => {
      if (C.which === it.TAB) {
        const P = g(C.shiftKey ? -1 : 1);
        return d.value = P, P && C.preventDefault(), !0;
      }
      if (d.value) {
        const P = d.value === "date" ? f : p;
        return P.value && P.value.onKeydown && P.value.onKeydown(C), !0;
      }
      return [it.LEFT, it.RIGHT, it.UP, it.DOWN].includes(C.which) ? (d.value = "date", !0) : !1;
    },
    onBlur: m,
    onClose: m
  };
  const x = (C, P) => {
    let $ = C;
    P === "date" && !i && v.defaultValue ? ($ = r.setHour($, r.getHour(v.defaultValue)), $ = r.setMinute($, r.getMinute(v.defaultValue)), $ = r.setSecond($, r.getSecond(v.defaultValue))) : P === "time" && !i && a && ($ = r.setYear($, r.getYear(a)), $ = r.setMonth($, r.getMonth(a)), $ = r.setDate($, r.getDate(a))), u && u($, "mouse");
  }, S = l ? l(i || null) : {};
  return h("div", {
    class: Me(c, {
      [`${c}-active`]: d.value
    })
  }, [h(Vd, Q(Q({}, t), {}, {
    operationRef: f,
    active: d.value === "date",
    onSelect: (C) => {
      x(ip(r, C, !i && typeof s == "object" ? s.defaultValue : null), "date");
    }
  }), null), h(Yh, Q(Q(Q(Q({}, t), {}, {
    format: void 0
  }, v), S), {}, {
    disabledTime: null,
    defaultValue: void 0,
    operationRef: p,
    active: d.value === "time",
    onSelect: (C) => {
      x(C, "time");
    }
  }), null)]);
}
H0.displayName = "DatetimePanel";
H0.inheritAttrs = !1;
function V0(e) {
  const t = vo(e), {
    prefixCls: n,
    generateConfig: o,
    locale: r,
    value: i
  } = t, a = `${n}-cell`, l = (c) => h("td", {
    key: "week",
    class: Me(a, `${a}-week`)
  }, [o.locale.getWeek(r.locale, c)]), s = `${n}-week-panel-row`, u = (c) => Me(s, {
    [`${s}-selected`]: c_(o, r.locale, i, c)
  });
  return h(Vd, Q(Q({}, t), {}, {
    panelName: "week",
    prefixColumn: l,
    rowClassName: u,
    keyboardConfig: {
      onLeftRight: null
    }
  }), null);
}
V0.displayName = "WeekPanel";
V0.inheritAttrs = !1;
function j0(e) {
  const t = vo(e), {
    prefixCls: n,
    generateConfig: o,
    locale: r,
    viewDate: i,
    onNextYear: a,
    onPrevYear: l,
    onYearClick: s
  } = t, {
    hideHeader: u
  } = sa();
  if (u.value)
    return null;
  const c = `${n}-header`;
  return h(Ll, Q(Q({}, t), {}, {
    prefixCls: c,
    onSuperPrev: l,
    onSuperNext: a
  }), {
    default: () => [h("button", {
      type: "button",
      onClick: s,
      class: `${n}-year-btn`
    }, [qo(i, {
      locale: r,
      format: r.yearFormat,
      generateConfig: o
    })])]
  });
}
j0.displayName = "MonthHeader";
j0.inheritAttrs = !1;
const v_ = 3, R7 = 4;
function W0(e) {
  const t = vo(e), {
    prefixCls: n,
    locale: o,
    value: r,
    viewDate: i,
    generateConfig: a,
    monthCellRender: l
  } = t, {
    rangedValue: s,
    hoverRangedValue: u
  } = Hd(), c = `${n}-cell`, d = Gh({
    cellPrefixCls: c,
    value: r,
    generateConfig: a,
    rangedValue: s.value,
    hoverRangedValue: u.value,
    isSameCell: (g, m) => F0(a, g, m),
    isInView: () => !0,
    offsetCell: (g, m) => a.addMonth(g, m)
  }), f = o.shortMonths || (a.locale.getShortMonths ? a.locale.getShortMonths(o.locale) : []), p = a.setMonth(i, 0), v = l ? (g) => l({
    current: g,
    locale: o
  }) : void 0;
  return h(Vs, Q(Q({}, t), {}, {
    rowNum: R7,
    colNum: v_,
    baseDate: p,
    getCellNode: v,
    getCellText: (g) => o.monthFormat ? qo(g, {
      locale: o,
      format: o.monthFormat,
      generateConfig: a
    }) : f[a.getMonth(g)],
    getCellClassName: d,
    getCellDate: a.addMonth,
    titleCell: (g) => qo(g, {
      locale: o,
      format: "YYYY-MM",
      generateConfig: a
    })
  }), null);
}
W0.displayName = "MonthBody";
W0.inheritAttrs = !1;
function K0(e) {
  const t = vo(e), {
    prefixCls: n,
    operationRef: o,
    onViewDateChange: r,
    generateConfig: i,
    value: a,
    viewDate: l,
    onPanelChange: s,
    onSelect: u
  } = t, c = `${n}-month-panel`;
  o.value = {
    onKeydown: (f) => fc(f, {
      onLeftRight: (p) => {
        u(i.addMonth(a || l, p), "key");
      },
      onCtrlLeftRight: (p) => {
        u(i.addYear(a || l, p), "key");
      },
      onUpDown: (p) => {
        u(i.addMonth(a || l, p * v_), "key");
      },
      onEnter: () => {
        s("date", a || l);
      }
    })
  };
  const d = (f) => {
    const p = i.addYear(l, f);
    r(p), s(null, p);
  };
  return h("div", {
    class: c
  }, [h(j0, Q(Q({}, t), {}, {
    prefixCls: n,
    onPrevYear: () => {
      d(-1);
    },
    onNextYear: () => {
      d(1);
    },
    onYearClick: () => {
      s("year", l);
    }
  }), null), h(W0, Q(Q({}, t), {}, {
    prefixCls: n,
    onSelect: (f) => {
      u(f, "mouse"), s("date", f);
    }
  }), null)]);
}
K0.displayName = "MonthPanel";
K0.inheritAttrs = !1;
function q0(e) {
  const t = vo(e), {
    prefixCls: n,
    generateConfig: o,
    locale: r,
    viewDate: i,
    onNextYear: a,
    onPrevYear: l,
    onYearClick: s
  } = t, {
    hideHeader: u
  } = sa();
  if (u.value)
    return null;
  const c = `${n}-header`;
  return h(Ll, Q(Q({}, t), {}, {
    prefixCls: c,
    onSuperPrev: l,
    onSuperNext: a
  }), {
    default: () => [h("button", {
      type: "button",
      onClick: s,
      class: `${n}-year-btn`
    }, [qo(i, {
      locale: r,
      format: r.yearFormat,
      generateConfig: o
    })])]
  });
}
q0.displayName = "QuarterHeader";
q0.inheritAttrs = !1;
const z7 = 4, F7 = 1;
function Y0(e) {
  const t = vo(e), {
    prefixCls: n,
    locale: o,
    value: r,
    viewDate: i,
    generateConfig: a
  } = t, {
    rangedValue: l,
    hoverRangedValue: s
  } = Hd(), u = `${n}-cell`, c = Gh({
    cellPrefixCls: u,
    value: r,
    generateConfig: a,
    rangedValue: l.value,
    hoverRangedValue: s.value,
    isSameCell: (f, p) => u_(a, f, p),
    isInView: () => !0,
    offsetCell: (f, p) => a.addMonth(f, p * 3)
  }), d = a.setDate(a.setMonth(i, 0), 1);
  return h(Vs, Q(Q({}, t), {}, {
    rowNum: F7,
    colNum: z7,
    baseDate: d,
    getCellText: (f) => qo(f, {
      locale: o,
      format: o.quarterFormat || "[Q]Q",
      generateConfig: a
    }),
    getCellClassName: c,
    getCellDate: (f, p) => a.addMonth(f, p * 3),
    titleCell: (f) => qo(f, {
      locale: o,
      format: "YYYY-[Q]Q",
      generateConfig: a
    })
  }), null);
}
Y0.displayName = "QuarterBody";
Y0.inheritAttrs = !1;
function G0(e) {
  const t = vo(e), {
    prefixCls: n,
    operationRef: o,
    onViewDateChange: r,
    generateConfig: i,
    value: a,
    viewDate: l,
    onPanelChange: s,
    onSelect: u
  } = t, c = `${n}-quarter-panel`;
  o.value = {
    onKeydown: (f) => fc(f, {
      onLeftRight: (p) => {
        u(i.addMonth(a || l, p * 3), "key");
      },
      onCtrlLeftRight: (p) => {
        u(i.addYear(a || l, p), "key");
      },
      onUpDown: (p) => {
        u(i.addYear(a || l, p), "key");
      }
    })
  };
  const d = (f) => {
    const p = i.addYear(l, f);
    r(p), s(null, p);
  };
  return h("div", {
    class: c
  }, [h(q0, Q(Q({}, t), {}, {
    prefixCls: n,
    onPrevYear: () => {
      d(-1);
    },
    onNextYear: () => {
      d(1);
    },
    onYearClick: () => {
      s("year", l);
    }
  }), null), h(Y0, Q(Q({}, t), {}, {
    prefixCls: n,
    onSelect: (f) => {
      u(f, "mouse");
    }
  }), null)]);
}
G0.displayName = "QuarterPanel";
G0.inheritAttrs = !1;
function U0(e) {
  const t = vo(e), {
    prefixCls: n,
    generateConfig: o,
    viewDate: r,
    onPrevDecade: i,
    onNextDecade: a,
    onDecadeClick: l
  } = t, {
    hideHeader: s
  } = sa();
  if (s.value)
    return null;
  const u = `${n}-header`, c = o.getYear(r), d = Math.floor(c / Ol) * Ol, f = d + Ol - 1;
  return h(Ll, Q(Q({}, t), {}, {
    prefixCls: u,
    onSuperPrev: i,
    onSuperNext: a
  }), {
    default: () => [h("button", {
      type: "button",
      onClick: l,
      class: `${n}-decade-btn`
    }, [d, Le("-"), f])]
  });
}
U0.displayName = "YearHeader";
U0.inheritAttrs = !1;
const ib = 3, US = 4;
function X0(e) {
  const t = vo(e), {
    prefixCls: n,
    value: o,
    viewDate: r,
    locale: i,
    generateConfig: a
  } = t, {
    rangedValue: l,
    hoverRangedValue: s
  } = Hd(), u = `${n}-cell`, c = a.getYear(r), d = Math.floor(c / Ol) * Ol, f = d + Ol - 1, p = a.setYear(r, d - Math.ceil((ib * US - Ol) / 2)), v = (m) => {
    const x = a.getYear(m);
    return d <= x && x <= f;
  }, g = Gh({
    cellPrefixCls: u,
    value: o,
    generateConfig: a,
    rangedValue: l.value,
    hoverRangedValue: s.value,
    isSameCell: (m, x) => qh(a, m, x),
    isInView: v,
    offsetCell: (m, x) => a.addYear(m, x)
  });
  return h(Vs, Q(Q({}, t), {}, {
    rowNum: US,
    colNum: ib,
    baseDate: p,
    getCellText: a.getYear,
    getCellClassName: g,
    getCellDate: a.addYear,
    titleCell: (m) => qo(m, {
      locale: i,
      format: "YYYY",
      generateConfig: a
    })
  }), null);
}
X0.displayName = "YearBody";
X0.inheritAttrs = !1;
const Ol = 10;
function Q0(e) {
  const t = vo(e), {
    prefixCls: n,
    operationRef: o,
    onViewDateChange: r,
    generateConfig: i,
    value: a,
    viewDate: l,
    sourceMode: s,
    onSelect: u,
    onPanelChange: c
  } = t, d = `${n}-year-panel`;
  o.value = {
    onKeydown: (p) => fc(p, {
      onLeftRight: (v) => {
        u(i.addYear(a || l, v), "key");
      },
      onCtrlLeftRight: (v) => {
        u(i.addYear(a || l, v * Ol), "key");
      },
      onUpDown: (v) => {
        u(i.addYear(a || l, v * ib), "key");
      },
      onEnter: () => {
        c(s === "date" ? "date" : "month", a || l);
      }
    })
  };
  const f = (p) => {
    const v = i.addYear(l, p * 10);
    r(v), c(null, v);
  };
  return h("div", {
    class: d
  }, [h(U0, Q(Q({}, t), {}, {
    prefixCls: n,
    onPrevDecade: () => {
      f(-1);
    },
    onNextDecade: () => {
      f(1);
    },
    onDecadeClick: () => {
      c("decade", l);
    }
  }), null), h(X0, Q(Q({}, t), {}, {
    prefixCls: n,
    onSelect: (p) => {
      c(s === "date" ? "date" : "month", p), u(p, "mouse");
    }
  }), null)]);
}
Q0.displayName = "YearPanel";
Q0.inheritAttrs = !1;
function m_(e, t, n) {
  return n ? h("div", {
    class: `${e}-footer-extra`
  }, [n(t)]) : null;
}
function b_(e) {
  let {
    prefixCls: t,
    components: n = {},
    needConfirmButton: o,
    onNow: r,
    onOk: i,
    okDisabled: a,
    showNow: l,
    locale: s
  } = e, u, c;
  if (o) {
    const d = n.button || "button";
    r && l !== !1 && (u = h("li", {
      class: `${t}-now`
    }, [h("a", {
      class: `${t}-now-btn`,
      onClick: r
    }, [s.now])])), c = o && h("li", {
      class: `${t}-ok`
    }, [h(d, {
      disabled: a,
      onClick: (f) => {
        f.stopPropagation(), i && i();
      }
    }, {
      default: () => [s.ok]
    })]);
  }
  return !u && !c ? null : h("ul", {
    class: `${t}-ranges`
  }, [u, c]);
}
function B7() {
  return be({
    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 = E(() => e.picker === "date" && !!e.showTime || e.picker === "time"), r = E(() => 24 % e.hourStep === 0), i = E(() => 60 % e.minuteStep === 0), a = E(() => 60 % e.secondStep === 0);
      process.env.NODE_ENV !== "production" && It(() => {
        const {
          generateConfig: j,
          value: Z,
          hourStep: W = 1,
          minuteStep: K = 1,
          secondStep: q = 1
        } = e;
        wn(!Z || j.isValidate(Z), "Invalidate date pass to `value`."), wn(!Z || j.isValidate(Z), "Invalidate date pass to `defaultValue`."), wn(r.value, `\`hourStep\` ${W} is invalid. It should be a factor of 24.`), wn(i.value, `\`minuteStep\` ${K} is invalid. It should be a factor of 60.`), wn(a.value, `\`secondStep\` ${q} is invalid. It should be a factor of 60.`);
      });
      const l = sa(), {
        operationRef: s,
        onSelect: u,
        hideRanges: c,
        defaultOpenValue: d
      } = l, {
        inRange: f,
        panelPosition: p,
        rangedValue: v,
        hoverRangedValue: g
      } = Hd(), m = le({}), [x, S] = sr(null, {
        value: Kt(e, "value"),
        defaultValue: e.defaultValue,
        postState: (j) => !j && d?.value && e.picker === "time" ? d.value : j
      }), [C, P] = sr(null, {
        value: Kt(e, "pickerValue"),
        defaultValue: e.defaultPickerValue || x.value,
        postState: (j) => {
          const {
            generateConfig: Z,
            showTime: W,
            defaultValue: K
          } = e, q = Z.getNow();
          return j ? !x.value && e.showTime ? typeof W == "object" ? ip(Z, Array.isArray(j) ? j[0] : j, W.defaultValue || q) : K ? ip(Z, Array.isArray(j) ? j[0] : j, K) : ip(Z, Array.isArray(j) ? j[0] : j, q) : j : q;
        }
      }), $ = (j) => {
        P(j), e.onPickerValueChange && e.onPickerValueChange(j);
      }, I = (j) => {
        const Z = O7[e.picker];
        return Z ? Z(j) : j;
      }, [w, T] = sr(() => e.picker === "time" ? "time" : I("date"), {
        value: Kt(e, "mode")
      });
      Ie(() => e.picker, () => {
        T(e.picker);
      });
      const M = le(w.value), R = (j) => {
        M.value = j;
      }, N = (j, Z) => {
        const {
          onPanelChange: W,
          generateConfig: K
        } = e, q = I(j || w.value);
        R(w.value), T(q), W && (w.value !== q || _u(K, C.value, C.value)) && W(Z, q);
      }, H = function(j, Z) {
        let W = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
        const {
          picker: K,
          generateConfig: q,
          onSelect: U,
          onChange: ae,
          disabledDate: se
        } = e;
        (w.value === K || W) && (S(j), U && U(j), u && u(j, Z), ae && !_u(q, j, x.value) && !se?.(j) && ae(j));
      }, L = (j) => m.value && m.value.onKeydown ? ([it.LEFT, it.RIGHT, it.UP, it.DOWN, it.PAGE_UP, it.PAGE_DOWN, it.ENTER].includes(j.which) && j.preventDefault(), m.value.onKeydown(j)) : (wn(!1, "Panel not correct handle keyDown event. Please help to fire issue about this."), !1), F = (j) => {
        m.value && m.value.onBlur && m.value.onBlur(j);
      }, A = () => {
        const {
          generateConfig: j,
          hourStep: Z,
          minuteStep: W,
          secondStep: K
        } = e, q = j.getNow(), U = m7(j.getHour(q), j.getMinute(q), j.getSecond(q), r.value ? Z : 1, i.value ? W : 1, a.value ? K : 1), ae = i_(
          j,
          q,
          U[0],
          // hour
          U[1],
          // minute
          U[2]
        );
        H(ae, "submit");
      }, G = E(() => {
        const {
          prefixCls: j,
          direction: Z
        } = e;
        return Me(`${j}-panel`, {
          [`${j}-panel-has-range`]: v && v.value && v.value[0] && v.value[1],
          [`${j}-panel-has-range-hover`]: g && g.value && g.value[0] && g.value[1],
          [`${j}-panel-rtl`]: Z === "rtl"
        });
      });
      return A0(O(O({}, l), {
        mode: w,
        hideHeader: E(() => {
          var j;
          return e.hideHeader !== void 0 ? e.hideHeader : (j = l.hideHeader) === null || j === void 0 ? void 0 : j.value;
        }),
        hidePrevBtn: E(() => f.value && p.value === "right"),
        hideNextBtn: E(() => f.value && p.value === "left")
      })), Ie(() => e.value, () => {
        e.value && P(e.value);
      }), () => {
        const {
          prefixCls: j = "ant-picker",
          locale: Z,
          generateConfig: W,
          disabledDate: K,
          picker: q = "date",
          tabindex: U = 0,
          showNow: ae,
          showTime: se,
          showToday: ie,
          renderExtraFooter: re,
          onMousedown: te,
          onOk: ve,
          components: ce
        } = e;
        s && p.value !== "right" && (s.value = {
          onKeydown: L,
          onClose: () => {
            m.value && m.value.onClose && m.value.onClose();
          }
        });
        let fe;
        const ge = O(O(O({}, n), e), {
          operationRef: m,
          prefixCls: j,
          viewDate: C.value,
          value: x.value,
          onViewDateChange: $,
          sourceMode: M.value,
          onPanelChange: N,
          disabledDate: K
        });
        switch (delete ge.onChange, delete ge.onSelect, w.value) {
          case "decade":
            fe = h(z0, Q(Q({}, ge), {}, {
              onSelect: (He, Ne) => {
                $(He), H(He, Ne);
              }
            }), null);
            break;
          case "year":
            fe = h(Q0, Q(Q({}, ge), {}, {
              onSelect: (He, Ne) => {
                $(He), H(He, Ne);
              }
            }), null);
            break;
          case "month":
            fe = h(K0, Q(Q({}, ge), {}, {
              onSelect: (He, Ne) => {
                $(He), H(He, Ne);
              }
            }), null);
            break;
          case "quarter":
            fe = h(G0, Q(Q({}, ge), {}, {
              onSelect: (He, Ne) => {
                $(He), H(He, Ne);
              }
            }), null);
            break;
          case "week":
            fe = h(V0, Q(Q({}, ge), {}, {
              onSelect: (He, Ne) => {
                $(He), H(He, Ne);
              }
            }), null);
            break;
          case "time":
            delete ge.showTime, fe = h(Yh, Q(Q(Q({}, ge), typeof se == "object" ? se : null), {}, {
              onSelect: (He, Ne) => {
                $(He), H(He, Ne);
              }
            }), null);
            break;
          default:
            se ? fe = h(H0, Q(Q({}, ge), {}, {
              onSelect: (He, Ne) => {
                $(He), H(He, Ne);
              }
            }), null) : fe = h(Vd, Q(Q({}, ge), {}, {
              onSelect: (He, Ne) => {
                $(He), H(He, Ne);
              }
            }), null);
        }
        let Te, ze;
        c?.value || (Te = m_(j, w.value, re), ze = b_({
          prefixCls: j,
          components: ce,
          needConfirmButton: o.value,
          okDisabled: !x.value || K && K(x.value),
          locale: Z,
          showNow: ae,
          onNow: o.value && A,
          onOk: () => {
            x.value && (H(x.value, "submit", !0), ve && ve(x.value));
          }
        }));
        let Ke;
        if (ie && w.value === "date" && q === "date" && !se) {
          const He = W.getNow(), Ne = `${j}-today-btn`, Xe = K && K(He);
          Ke = h("a", {
            class: Me(Ne, Xe && `${Ne}-disabled`),
            "aria-disabled": Xe,
            onClick: () => {
              Xe || H(He, "mouse", !0);
            }
          }, [Z.today]);
        }
        return h("div", {
          tabindex: U,
          class: Me(G.value, n.class),
          style: n.style,
          onKeydown: L,
          onBlur: F,
          onMousedown: te
        }, [fe, Te || ze || Ke ? h("div", {
          class: `${j}-footer`
        }, [Te, ze, Ke]) : null]);
      };
    }
  });
}
const L7 = B7(), y_ = ((e) => h(L7, e)), H7 = {
  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 x_(e, t) {
  let {
    slots: n
  } = t;
  const {
    prefixCls: o,
    popupStyle: r,
    visible: i,
    dropdownClassName: a,
    dropdownAlign: l,
    transitionName: s,
    getPopupContainer: u,
    range: c,
    popupPlacement: d,
    direction: f
  } = vo(e), p = `${o}-dropdown`;
  return h(Ad, {
    showAction: [],
    hideAction: [],
    popupPlacement: d !== void 0 ? d : f === "rtl" ? "bottomRight" : "bottomLeft",
    builtinPlacements: H7,
    prefixCls: p,
    popupTransitionName: s,
    popupAlign: l,
    popupVisible: i,
    popupClassName: Me(a, {
      [`${p}-range`]: c,
      [`${p}-rtl`]: f === "rtl"
    }),
    popupStyle: r,
    getPopupContainer: u
  }, {
    default: n.default,
    popup: n.popupElement
  });
}
const w_ = be({
  name: "PresetPanel",
  props: {
    prefixCls: String,
    presets: {
      type: Array,
      default: () => []
    },
    onClick: Function,
    onHover: Function
  },
  setup(e) {
    return () => e.presets.length ? h("div", {
      class: `${e.prefixCls}-presets`
    }, [h("ul", null, [e.presets.map((t, n) => {
      let {
        label: o,
        value: r
      } = t;
      return h("li", {
        key: n,
        onClick: (i) => {
          i.stopPropagation(), e.onClick(r);
        },
        onMouseenter: () => {
          var i;
          (i = e.onHover) === null || i === void 0 || i.call(e, r);
        },
        onMouseleave: () => {
          var i;
          (i = e.onHover) === null || i === void 0 || i.call(e, null);
        }
      }, [o]);
    })])]) : null;
  }
});
function ab(e) {
  let {
    open: t,
    value: n,
    isClickOutside: o,
    triggerOpen: r,
    forwardKeydown: i,
    onKeydown: a,
    blurToCancel: l,
    onSubmit: s,
    onCancel: u,
    onFocus: c,
    onBlur: d
  } = e;
  const f = $e(!1), p = $e(!1), v = $e(!1), g = $e(!1), m = $e(!1), x = E(() => ({
    onMousedown: () => {
      f.value = !0, r(!0);
    },
    onKeydown: (C) => {
      if (a(C, () => {
        m.value = !0;
      }), !m.value) {
        switch (C.which) {
          case it.ENTER: {
            t.value ? s() !== !1 && (f.value = !0) : r(!0), C.preventDefault();
            return;
          }
          case it.TAB: {
            f.value && t.value && !C.shiftKey ? (f.value = !1, C.preventDefault()) : !f.value && t.value && !i(C) && C.shiftKey && (f.value = !0, C.preventDefault());
            return;
          }
          case it.ESC: {
            f.value = !0, u();
            return;
          }
        }
        !t.value && ![it.SHIFT].includes(C.which) ? r(!0) : f.value || i(C);
      }
    },
    onFocus: (C) => {
      f.value = !0, p.value = !0, c && c(C);
    },
    onBlur: (C) => {
      if (v.value || !o(document.activeElement)) {
        v.value = !1;
        return;
      }
      l.value ? setTimeout(() => {
        let {
          activeElement: P
        } = document;
        for (; P && P.shadowRoot; )
          P = P.shadowRoot.activeElement;
        o(P) && u();
      }, 0) : t.value && (r(!1), g.value && s()), p.value = !1, d && d(C);
    }
  }));
  Ie(t, () => {
    g.value = !1;
  }), Ie(n, () => {
    g.value = !0;
  });
  const S = $e();
  return At(() => {
    S.value = x7((C) => {
      const P = w7(C);
      if (t.value) {
        const $ = o(P);
        $ ? (!p.value || $) && r(!1) : (v.value = !0, Vt(() => {
          v.value = !1;
        }));
      }
    });
  }), qt(() => {
    S.value && S.value();
  }), [x, {
    focused: p,
    typing: f
  }];
}
function lb(e) {
  let {
    valueTexts: t,
    onTextChange: n
  } = e;
  const o = le("");
  function r(a) {
    o.value = a, n(a);
  }
  function i() {
    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) && i();
  }, {
    immediate: !0
  }), [o, r, i];
}
function Yp(e, t) {
  let {
    formatList: n,
    generateConfig: o,
    locale: r
  } = t;
  const i = hT(() => {
    if (!e.value)
      return [[""], ""];
    let s = "";
    const u = [];
    for (let c = 0; c < n.value.length; c += 1) {
      const d = n.value[c], f = qo(e.value, {
        generateConfig: o.value,
        locale: r.value,
        format: d
      });
      u.push(f), c === 0 && (s = f);
    }
    return [u, s];
  }, [e, n], (s, u) => u[0] !== s[0] || !vu(u[1], s[1])), a = E(() => i.value[0]), l = E(() => i.value[1]);
  return [a, l];
}
function sb(e, t) {
  let {
    formatList: n,
    generateConfig: o,
    locale: r
  } = t;
  const i = le(null);
  let a;
  function l(d) {
    let f = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
    if (Vt.cancel(a), f) {
      i.value = d;
      return;
    }
    a = Vt(() => {
      i.value = d;
    });
  }
  const [, s] = Yp(i, {
    formatList: n,
    generateConfig: o,
    locale: r
  });
  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);
  }), qt(() => {
    Vt.cancel(a);
  }), [s, u, c];
}
function S_(e, t) {
  return E(() => e?.value ? e.value : t?.value ? (mr(!1, "`ranges` is deprecated. Please use `presets` instead."), Object.keys(t.value).map((o) => {
    const r = t.value[o], i = typeof r == "function" ? r() : r;
    return {
      label: o,
      value: i
    };
  })) : []);
}
function C_(e) {
  const {
    picker: t,
    disabledHours: n,
    disabledMinutes: o,
    disabledSeconds: r
  } = e;
  t === "time" && (n || o || r) && wn(!1, "'disabledHours', 'disabledMinutes', 'disabledSeconds' will be removed in the next major version, please use 'disabledTime' instead.");
}
function V7() {
  return be({
    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 r = le(null), i = E(() => e.presets), a = S_(i), l = E(() => {
        var K;
        return (K = e.picker) !== null && K !== void 0 ? K : "date";
      }), s = E(() => l.value === "date" && !!e.showTime || l.value === "time");
      process.env.NODE_ENV !== "production" && C_(e);
      const u = E(() => p_(a_(e.format, l.value, e.showTime, e.use12Hours))), c = le(null), d = le(null), f = le(null), [p, v] = sr(null, {
        value: Kt(e, "value"),
        defaultValue: e.defaultValue
      }), g = le(p.value), m = (K) => {
        g.value = K;
      }, x = le(null), [S, C] = sr(!1, {
        value: Kt(e, "open"),
        defaultValue: e.defaultOpen,
        postState: (K) => e.disabled ? !1 : K,
        onChange: (K) => {
          e.onOpenChange && e.onOpenChange(K), !K && x.value && x.value.onClose && x.value.onClose();
        }
      }), [P, $] = Yp(g, {
        formatList: u,
        generateConfig: Kt(e, "generateConfig"),
        locale: Kt(e, "locale")
      }), [I, w, T] = lb({
        valueTexts: P,
        onTextChange: (K) => {
          const q = d_(K, {
            locale: e.locale,
            formatList: u.value,
            generateConfig: e.generateConfig
          });
          q && (!e.disabledDate || !e.disabledDate(q)) && m(q);
        }
      }), M = (K) => {
        const {
          onChange: q,
          generateConfig: U,
          locale: ae
        } = e;
        m(K), v(K), q && !_u(U, p.value, K) && q(K, K ? qo(K, {
          generateConfig: U,
          locale: ae,
          format: u.value[0]
        }) : "");
      }, R = (K) => {
        e.disabled && K || C(K);
      }, N = (K) => S.value && x.value && x.value.onKeydown ? x.value.onKeydown(K) : (wn(!1, "Picker not correct forward Keydown operation. Please help to fire issue about this."), !1), H = function() {
        e.onMouseup && e.onMouseup(...arguments), r.value && (r.value.focus(), R(!0));
      }, [L, {
        focused: F,
        typing: A
      }] = ab({
        blurToCancel: s,
        open: S,
        value: I,
        triggerOpen: R,
        forwardKeydown: N,
        isClickOutside: (K) => !s_([c.value, d.value, f.value], K),
        onSubmit: () => (
          // When user typing disabledDate with keyboard and enter, this value will be empty
          !g.value || // Normal disabled check
          e.disabledDate && e.disabledDate(g.value) ? !1 : (M(g.value), R(!1), T(), !0)
        ),
        onCancel: () => {
          R(!1), m(p.value), T();
        },
        onKeydown: (K, q) => {
          var U;
          (U = e.onKeydown) === null || U === void 0 || U.call(e, K, q);
        },
        onFocus: (K) => {
          var q;
          (q = e.onFocus) === null || q === void 0 || q.call(e, K);
        },
        onBlur: (K) => {
          var q;
          (q = e.onBlur) === null || q === void 0 || q.call(e, K);
        }
      });
      Ie([S, P], () => {
        S.value || (m(p.value), !P.value.length || P.value[0] === "" ? w("") : $.value !== I.value && T());
      }), Ie(l, () => {
        S.value || T();
      }), Ie(p, () => {
        m(p.value);
      });
      const [G, j, Z] = sb(I, {
        formatList: u,
        generateConfig: Kt(e, "generateConfig"),
        locale: Kt(e, "locale")
      }), W = (K, q) => {
        (q === "submit" || q !== "key" && !s.value) && (M(K), R(!1));
      };
      return A0({
        operationRef: x,
        hideHeader: E(() => l.value === "time"),
        onSelect: W,
        open: S,
        defaultOpenValue: Kt(e, "defaultOpenValue"),
        onDateMouseenter: j,
        onDateMouseleave: Z
      }), o({
        focus: () => {
          r.value && r.value.focus();
        },
        blur: () => {
          r.value && r.value.blur();
        }
      }), () => {
        const {
          prefixCls: K = "rc-picker",
          id: q,
          tabindex: U,
          dropdownClassName: ae,
          dropdownAlign: se,
          popupStyle: ie,
          transitionName: re,
          generateConfig: te,
          locale: ve,
          inputReadOnly: ce,
          allowClear: fe,
          autofocus: ge,
          picker: Te = "date",
          defaultOpenValue: ze,
          suffixIcon: Ke,
          clearIcon: He,
          disabled: Ne,
          placeholder: Xe,
          getPopupContainer: De,
          panelRender: Fe,
          onMousedown: Ve,
          onMouseenter: ot,
          onMouseleave: je,
          onContextmenu: Pe,
          onClick: Ge,
          onSelect: Se,
          direction: Ce,
          autocomplete: Ae = "off"
        } = e, qe = O(O(O({}, e), n), {
          class: Me({
            [`${K}-panel-focused`]: !A.value
          }),
          style: void 0,
          pickerValue: void 0,
          onPickerValueChange: void 0,
          onChange: null
        });
        let We = h("div", {
          class: `${K}-panel-layout`
        }, [h(w_, {
          prefixCls: K,
          presets: a.value,
          onClick: (at) => {
            M(at), R(!1);
          }
        }, null), h(y_, Q(Q({}, qe), {}, {
          generateConfig: te,
          value: g.value,
          locale: ve,
          tabindex: -1,
          onSelect: (at) => {
            Se?.(at), m(at);
          },
          direction: Ce,
          onPanelChange: (at, ft) => {
            const {
              onPanelChange: wt
            } = e;
            Z(!0), wt?.(at, ft);
          }
        }), null)]);
        Fe && (We = Fe(We));
        const tt = h("div", {
          class: `${K}-panel-container`,
          ref: c,
          onMousedown: (at) => {
            at.preventDefault();
          }
        }, [We]);
        let Ee;
        Ke && (Ee = h("span", {
          class: `${K}-suffix`
        }, [Ke]));
        let Re;
        fe && p.value && !Ne && (Re = h("span", {
          onMousedown: (at) => {
            at.preventDefault(), at.stopPropagation();
          },
          onMouseup: (at) => {
            at.preventDefault(), at.stopPropagation(), M(null), R(!1);
          },
          class: `${K}-clear`,
          role: "button"
        }, [He || h("span", {
          class: `${K}-clear-btn`
        }, null)]));
        const Be = O(O(O(O({
          id: q,
          tabindex: U,
          disabled: Ne,
          readonly: ce || typeof u.value[0] == "function" || !A.value,
          value: G.value || I.value,
          onInput: (at) => {
            w(at.target.value);
          },
          autofocus: ge,
          placeholder: Xe,
          ref: r,
          title: I.value
        }, L.value), {
          size: l_(Te, u.value[0], te)
        }), h_(e)), {
          autocomplete: Ae
        }), rt = e.inputRender ? e.inputRender(Be) : h("input", Be, null);
        process.env.NODE_ENV !== "production" && wn(!ze, "`defaultOpenValue` may confuse user for the current value status. Please use `defaultValue` instead.");
        const pt = Ce === "rtl" ? "bottomRight" : "bottomLeft";
        return h("div", {
          ref: f,
          class: Me(K, n.class, {
            [`${K}-disabled`]: Ne,
            [`${K}-focused`]: F.value,
            [`${K}-rtl`]: Ce === "rtl"
          }),
          style: n.style,
          onMousedown: Ve,
          onMouseup: H,
          onMouseenter: ot,
          onMouseleave: je,
          onContextmenu: Pe,
          onClick: Ge
        }, [h("div", {
          class: Me(`${K}-input`, {
            [`${K}-input-placeholder`]: !!G.value
          }),
          ref: d
        }, [rt, Ee, Re]), h(x_, {
          visible: S.value,
          popupStyle: ie,
          prefixCls: K,
          dropdownClassName: ae,
          dropdownAlign: se,
          getPopupContainer: De,
          transitionName: re,
          popupPlacement: pt,
          direction: Ce
        }, {
          default: () => [h("div", {
            style: {
              pointerEvents: "none",
              position: "absolute",
              top: 0,
              bottom: 0,
              left: 0,
              right: 0
            }
          }, null)],
          popupElement: () => tt
        })]);
      };
    }
  });
}
const j7 = V7();
function W7(e, t) {
  let {
    picker: n,
    locale: o,
    selectedValue: r,
    disabledDate: i,
    disabled: a,
    generateConfig: l
  } = e;
  const s = E(() => on(r.value, 0)), u = E(() => on(r.value, 1));
  function c(g) {
    return l.value.locale.getWeekFirstDate(o.value.locale, g);
  }
  function d(g) {
    const m = l.value.getYear(g), x = l.value.getMonth(g);
    return m * 100 + x;
  }
  function f(g) {
    const m = l.value.getYear(g), x = ob(l.value, g);
    return m * 10 + x;
  }
  return [(g) => {
    var m;
    if (i && (!((m = i?.value) === null || m === void 0) && m.call(i, g)))
      return !0;
    if (a[1] && u)
      return !Ea(l.value, g, u.value) && l.value.isAfter(g, u.value);
    if (t.value[1] && u.value)
      switch (n.value) {
        case "quarter":
          return f(g) > f(u.value);
        case "month":
          return d(g) > d(u.value);
        case "week":
          return c(g) > c(u.value);
        default:
          return !Ea(l.value, g, u.value) && l.value.isAfter(g, u.value);
      }
    return !1;
  }, (g) => {
    var m;
    if (!((m = i.value) === null || m === void 0) && m.call(i, g))
      return !0;
    if (a[0] && s)
      return !Ea(l.value, g, u.value) && l.value.isAfter(s.value, g);
    if (t.value[0] && s.value)
      switch (n.value) {
        case "quarter":
          return f(g) < f(s.value);
        case "month":
          return d(g) < d(s.value);
        case "week":
          return c(g) < c(s.value);
        default:
          return !Ea(l.value, g, s.value) && l.value.isAfter(s.value, g);
      }
    return !1;
  }];
}
function K7(e, t, n, o) {
  const r = Zc(e, n, o, 1);
  function i(a) {
    return a(e, t) ? "same" : a(r, t) ? "closing" : "far";
  }
  switch (n) {
    case "year":
      return i((a, l) => k7(o, a, l));
    case "quarter":
    case "month":
      return i((a, l) => qh(o, a, l));
    default:
      return i((a, l) => F0(o, a, l));
  }
}
function q7(e, t, n, o) {
  const r = on(e, 0), i = on(e, 1);
  if (t === 0)
    return r;
  if (r && i)
    switch (K7(r, i, n, o)) {
      case "same":
        return r;
      case "closing":
        return r;
      default:
        return Zc(i, n, o, -1);
    }
  return r;
}
function Y7(e) {
  let {
    values: t,
    picker: n,
    defaultDates: o,
    generateConfig: r
  } = e;
  const i = le([on(o, 0), on(o, 1)]), a = le(null), l = E(() => on(t.value, 0)), s = E(() => on(t.value, 1)), u = (p) => i.value[p] ? i.value[p] : on(a.value, p) || q7(t.value, p, n.value, r.value) || l.value || s.value || r.value.getNow(), c = le(null), d = le(null);
  It(() => {
    c.value = u(0), d.value = u(1);
  });
  function f(p, v) {
    if (p) {
      let g = Ur(a.value, p, v);
      i.value = Ur(i.value, null, v) || [null, null];
      const m = (v + 1) % 2;
      on(t.value, m) || (g = Ur(g, p, m)), a.value = g;
    } else (l.value || s.value) && (a.value = null);
  }
  return [c, d, f];
}
function G7(e) {
  return AP() ? (NP(e), !0) : !1;
}
function U7(e) {
  return typeof e == "function" ? e() : _(e);
}
function $_(e) {
  var t;
  const n = U7(e);
  return (t = n?.$el) !== null && t !== void 0 ? t : n;
}
function X7(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
  pr() ? At(e) : t ? e() : Yt(e);
}
function Q7(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  const n = $e(), o = () => n.value = !!e();
  return o(), X7(o, t), n;
}
var fv;
const P_ = typeof window < "u";
P_ && (!((fv = window?.navigator) === null || fv === void 0) && fv.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
const Z7 = P_ ? window : void 0;
var J7 = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
function e9(e, t) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  const {
    window: o = Z7
  } = n, r = J7(n, ["window"]);
  let i;
  const a = Q7(() => o && "ResizeObserver" in o), l = () => {
    i && (i.disconnect(), i = void 0);
  }, s = Ie(() => $_(e), (c) => {
    l(), a.value && o && c && (i = new ResizeObserver(t), i.observe(c, r));
  }, {
    immediate: !0,
    flush: "post"
  }), u = () => {
    l(), s();
  };
  return G7(u), {
    isSupported: a,
    stop: u
  };
}
function Ec(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, r = $e(t.width), i = $e(t.height);
  return e9(e, (a) => {
    let [l] = a;
    const s = o === "border-box" ? l.borderBoxSize : o === "content-box" ? l.contentBoxSize : l.devicePixelContentBoxSize;
    s ? (r.value = s.reduce((u, c) => {
      let {
        inlineSize: d
      } = c;
      return u + d;
    }, 0), i.value = s.reduce((u, c) => {
      let {
        blockSize: d
      } = c;
      return u + d;
    }, 0)) : (r.value = l.contentRect.width, i.value = l.contentRect.height);
  }, n), Ie(() => $_(e), (a) => {
    r.value = a ? t.width : 0, i.value = a ? t.height : 0;
  }), {
    width: r,
    height: i
  };
}
function XS(e, t) {
  return e && e[0] && e[1] && t.isAfter(e[0], e[1]) ? [e[1], e[0]] : e;
}
function QS(e, t, n, o) {
  return !!(e || o && o[t] || n[(t + 1) % 2]);
}
function t9() {
  return be({
    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 r = E(() => e.picker === "date" && !!e.showTime || e.picker === "time"), i = E(() => e.presets), a = E(() => e.ranges), l = S_(i, a), s = le({}), u = le(null), c = le(null), d = le(null), f = le(null), p = le(null), v = le(null), g = le(null), m = le(null);
      process.env.NODE_ENV !== "production" && C_(e);
      const x = E(() => p_(a_(e.format, e.picker, e.showTime, e.use12Hours))), [S, C] = sr(0, {
        value: Kt(e, "activePickerIndex")
      }), P = le(null), $ = E(() => {
        const {
          disabled: Ue
        } = e;
        return Array.isArray(Ue) ? Ue : [Ue || !1, Ue || !1];
      }), [I, w] = sr(null, {
        value: Kt(e, "value"),
        defaultValue: e.defaultValue,
        postState: (Ue) => e.picker === "time" && !e.order ? Ue : XS(Ue, e.generateConfig)
      }), [T, M, R] = Y7({
        values: I,
        picker: Kt(e, "picker"),
        defaultDates: e.defaultPickerValue,
        generateConfig: Kt(e, "generateConfig")
      }), [N, H] = sr(I.value, {
        postState: (Ue) => {
          let ht = Ue;
          if ($.value[0] && $.value[1])
            return ht;
          for (let vt = 0; vt < 2; vt += 1)
            $.value[vt] && !on(ht, vt) && !on(e.allowEmpty, vt) && (ht = Ur(ht, e.generateConfig.getNow(), vt));
          return ht;
        }
      }), [L, F] = sr([e.picker, e.picker], {
        value: Kt(e, "mode")
      });
      Ie(() => e.picker, () => {
        F([e.picker, e.picker]);
      });
      const A = (Ue, ht) => {
        var vt;
        F(Ue), (vt = e.onPanelChange) === null || vt === void 0 || vt.call(e, ht, Ue);
      }, [G, j] = W7({
        picker: Kt(e, "picker"),
        selectedValue: N,
        locale: Kt(e, "locale"),
        disabled: $,
        disabledDate: Kt(e, "disabledDate"),
        generateConfig: Kt(e, "generateConfig")
      }, s), [Z, W] = sr(!1, {
        value: Kt(e, "open"),
        defaultValue: e.defaultOpen,
        postState: (Ue) => $.value[S.value] ? !1 : Ue,
        onChange: (Ue) => {
          var ht;
          (ht = e.onOpenChange) === null || ht === void 0 || ht.call(e, Ue), !Ue && P.value && P.value.onClose && P.value.onClose();
        }
      }), K = E(() => Z.value && S.value === 0), q = E(() => Z.value && S.value === 1), U = le(0), ae = le(0), se = le(0), {
        width: ie
      } = Ec(u);
      Ie([Z, ie], () => {
        !Z.value && u.value && (se.value = ie.value);
      });
      const {
        width: re
      } = Ec(c), {
        width: te
      } = Ec(m), {
        width: ve
      } = Ec(d), {
        width: ce
      } = Ec(p);
      Ie([S, Z, re, te, ve, ce, () => e.direction], () => {
        ae.value = 0, S.value ? d.value && p.value && (ae.value = ve.value + ce.value, re.value && te.value && ae.value > re.value - te.value - (e.direction === "rtl" || m.value.offsetLeft > ae.value ? 0 : m.value.offsetLeft) && (U.value = ae.value)) : S.value === 0 && (U.value = 0);
      }, {
        immediate: !0
      });
      const fe = le();
      function ge(Ue, ht) {
        if (Ue)
          clearTimeout(fe.value), s.value[ht] = !0, C(ht), W(Ue), Z.value || R(null, ht);
        else if (S.value === ht) {
          W(Ue);
          const vt = s.value;
          fe.value = setTimeout(() => {
            vt === s.value && (s.value = {});
          });
        }
      }
      function Te(Ue) {
        ge(!0, Ue), setTimeout(() => {
          const ht = [v, g][Ue];
          ht.value && ht.value.focus();
        }, 0);
      }
      function ze(Ue, ht) {
        let vt = Ue, Zt = on(vt, 0), Zn = on(vt, 1);
        const {
          generateConfig: Qn,
          locale: $o,
          picker: Sn,
          order: Tt,
          onCalendarChange: po,
          allowEmpty: zo,
          onChange: un,
          showTime: Dn
        } = e;
        Zt && Zn && Qn.isAfter(Zt, Zn) && (// WeekPicker only compare week
        Sn === "week" && !c_(Qn, $o.locale, Zt, Zn) || // QuotaPicker only compare week
        Sn === "quarter" && !u_(Qn, Zt, Zn) || // Other non-TimePicker compare date
        Sn !== "week" && Sn !== "quarter" && Sn !== "time" && !(Dn ? _u(Qn, Zt, Zn) : Ea(Qn, Zt, Zn)) ? (ht === 0 ? (vt = [Zt, null], Zn = null) : (Zt = null, vt = [null, Zn]), s.value = {
          [ht]: !0
        }) : (Sn !== "time" || Tt !== !1) && (vt = XS(vt, Qn))), H(vt);
        const cn = vt && vt[0] ? qo(vt[0], {
          generateConfig: Qn,
          locale: $o,
          format: x.value[0]
        }) : "", An = vt && vt[1] ? qo(vt[1], {
          generateConfig: Qn,
          locale: $o,
          format: x.value[0]
        }) : "";
        po && po(vt, [cn, An], {
          range: ht === 0 ? "start" : "end"
        });
        const er = QS(Zt, 0, $.value, zo), Jn = QS(Zn, 1, $.value, zo);
        (vt === null || er && Jn) && (w(vt), un && (!_u(Qn, on(I.value, 0), Zt) || !_u(Qn, on(I.value, 1), Zn)) && un(vt, [cn, An]));
        let jo = null;
        ht === 0 && !$.value[1] ? jo = 1 : ht === 1 && !$.value[0] && (jo = 0), jo !== null && jo !== S.value && (!s.value[jo] || !on(vt, jo)) && on(vt, ht) ? Te(jo) : ge(!1, ht);
      }
      const Ke = (Ue) => Z && P.value && P.value.onKeydown ? P.value.onKeydown(Ue) : (wn(!1, "Picker not correct forward Keydown operation. Please help to fire issue about this."), !1), He = {
        formatList: x,
        generateConfig: Kt(e, "generateConfig"),
        locale: Kt(e, "locale")
      }, [Ne, Xe] = Yp(E(() => on(N.value, 0)), He), [De, Fe] = Yp(E(() => on(N.value, 1)), He), Ve = (Ue, ht) => {
        const vt = d_(Ue, {
          locale: e.locale,
          formatList: x.value,
          generateConfig: e.generateConfig
        });
        vt && !(ht === 0 ? G : j)(vt) && (H(Ur(N.value, vt, ht)), R(vt, ht));
      }, [ot, je, Pe] = lb({
        valueTexts: Ne,
        onTextChange: (Ue) => Ve(Ue, 0)
      }), [Ge, Se, Ce] = lb({
        valueTexts: De,
        onTextChange: (Ue) => Ve(Ue, 1)
      }), [Ae, qe] = Cn(null), [We, tt] = Cn(null), [Ee, Re, Be] = sb(ot, He), [rt, pt, at] = sb(Ge, He), ft = (Ue) => {
        tt(Ur(N.value, Ue, S.value)), S.value === 0 ? Re(Ue) : pt(Ue);
      }, wt = () => {
        tt(Ur(N.value, null, S.value)), S.value === 0 ? Be() : at();
      }, Ct = (Ue, ht) => ({
        forwardKeydown: Ke,
        onBlur: (vt) => {
          var Zt;
          (Zt = e.onBlur) === null || Zt === void 0 || Zt.call(e, vt);
        },
        isClickOutside: (vt) => !s_([c.value, d.value, f.value, u.value], vt),
        onFocus: (vt) => {
          var Zt;
          C(Ue), (Zt = e.onFocus) === null || Zt === void 0 || Zt.call(e, vt);
        },
        triggerOpen: (vt) => {
          ge(vt, Ue);
        },
        onSubmit: () => {
          if (
            // When user typing disabledDate with keyboard and enter, this value will be empty
            !N.value || // Normal disabled check
            e.disabledDate && e.disabledDate(N.value[Ue])
          )
            return !1;
          ze(N.value, Ue), ht();
        },
        onCancel: () => {
          ge(!1, Ue), H(I.value), ht();
        }
      }), [St, {
        focused: yt,
        typing: Ot
      }] = ab(O(O({}, Ct(0, Pe)), {
        blurToCancel: r,
        open: K,
        value: ot,
        onKeydown: (Ue, ht) => {
          var vt;
          (vt = e.onKeydown) === null || vt === void 0 || vt.call(e, Ue, ht);
        }
      })), [Wt, {
        focused: Xt,
        typing: ln
      }] = ab(O(O({}, Ct(1, Ce)), {
        blurToCancel: r,
        open: q,
        value: Ge,
        onKeydown: (Ue, ht) => {
          var vt;
          (vt = e.onKeydown) === null || vt === void 0 || vt.call(e, Ue, ht);
        }
      })), pn = (Ue) => {
        var ht;
        (ht = e.onClick) === null || ht === void 0 || ht.call(e, Ue), !Z.value && !v.value.contains(Ue.target) && !g.value.contains(Ue.target) && ($.value[0] ? $.value[1] || Te(1) : Te(0));
      }, gt = (Ue) => {
        var ht;
        (ht = e.onMousedown) === null || ht === void 0 || ht.call(e, Ue), Z.value && (yt.value || Xt.value) && !v.value.contains(Ue.target) && !g.value.contains(Ue.target) && Ue.preventDefault();
      }, En = E(() => {
        var Ue;
        return !((Ue = I.value) === null || Ue === void 0) && Ue[0] ? qo(I.value[0], {
          locale: e.locale,
          format: "YYYYMMDDHHmmss",
          generateConfig: e.generateConfig
        }) : "";
      }), hn = E(() => {
        var Ue;
        return !((Ue = I.value) === null || Ue === void 0) && Ue[1] ? qo(I.value[1], {
          locale: e.locale,
          format: "YYYYMMDDHHmmss",
          generateConfig: e.generateConfig
        }) : "";
      });
      Ie([Z, Ne, De], () => {
        Z.value || (H(I.value), !Ne.value.length || Ne.value[0] === "" ? je("") : Xe.value !== ot.value && Pe(), !De.value.length || De.value[0] === "" ? Se("") : Fe.value !== Ge.value && Ce());
      }), Ie([En, hn], () => {
        H(I.value);
      }), process.env.NODE_ENV !== "production" && It(() => {
        const {
          value: Ue,
          disabled: ht
        } = e;
        Ue && Array.isArray(ht) && (on(ht, 0) && !on(Ue, 0) || on(ht, 1) && !on(Ue, 1)) && wn(!1, "`disabled` should not set with empty `value`. You should set `allowEmpty` or `value` instead.");
      }), o({
        focus: () => {
          v.value && v.value.focus();
        },
        blur: () => {
          v.value && v.value.blur(), g.value && g.value.blur();
        }
      });
      const Kn = E(() => Z.value && We.value && We.value[0] && We.value[1] && e.generateConfig.isAfter(We.value[1], We.value[0]) ? We.value : null);
      function so() {
        let Ue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, ht = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
        const {
          generateConfig: vt,
          showTime: Zt,
          dateRender: Zn,
          direction: Qn,
          disabledTime: $o,
          prefixCls: Sn,
          locale: Tt
        } = e;
        let po = Zt;
        if (Zt && typeof Zt == "object" && Zt.defaultValue) {
          const un = Zt.defaultValue;
          po = O(O({}, Zt), {
            defaultValue: on(un, S.value) || void 0
          });
        }
        let zo = null;
        return Zn && (zo = (un) => {
          let {
            current: Dn,
            today: cn
          } = un;
          return Zn({
            current: Dn,
            today: cn,
            info: {
              range: S.value ? "end" : "start"
            }
          });
        }), h(A7, {
          value: {
            inRange: !0,
            panelPosition: Ue,
            rangedValue: Ae.value || N.value,
            hoverRangedValue: Kn.value
          }
        }, {
          default: () => [h(y_, Q(Q(Q({}, e), ht), {}, {
            dateRender: zo,
            showTime: po,
            mode: L.value[S.value],
            generateConfig: vt,
            style: void 0,
            direction: Qn,
            disabledDate: S.value === 0 ? G : j,
            disabledTime: (un) => $o ? $o(un, S.value === 0 ? "start" : "end") : !1,
            class: Me({
              [`${Sn}-panel-focused`]: S.value === 0 ? !Ot.value : !ln.value
            }),
            value: on(N.value, S.value),
            locale: Tt,
            tabIndex: -1,
            onPanelChange: (un, Dn) => {
              S.value === 0 && Be(!0), S.value === 1 && at(!0), A(Ur(L.value, Dn, S.value), Ur(N.value, un, S.value));
              let cn = un;
              Ue === "right" && L.value[S.value] === Dn && (cn = Zc(cn, Dn, vt, -1)), R(cn, S.value);
            },
            onOk: null,
            onSelect: void 0,
            onChange: void 0,
            defaultValue: S.value === 0 ? on(N.value, 1) : on(N.value, 0)
          }), null)]
        });
      }
      const Uo = (Ue, ht) => {
        const vt = Ur(N.value, Ue, S.value);
        ht === "submit" || ht !== "key" && !r.value ? (ze(vt, S.value), S.value === 0 ? Be() : at()) : H(vt);
      };
      return A0({
        operationRef: P,
        hideHeader: E(() => e.picker === "time"),
        onDateMouseenter: ft,
        onDateMouseleave: wt,
        hideRanges: E(() => !0),
        onSelect: Uo,
        open: Z
      }), () => {
        const {
          prefixCls: Ue = "rc-picker",
          id: ht,
          popupStyle: vt,
          dropdownClassName: Zt,
          transitionName: Zn,
          dropdownAlign: Qn,
          getPopupContainer: $o,
          generateConfig: Sn,
          locale: Tt,
          placeholder: po,
          autofocus: zo,
          picker: un = "date",
          showTime: Dn,
          separator: cn = "~",
          disabledDate: An,
          panelRender: er,
          allowClear: Jn,
          suffixIcon: hr,
          clearIcon: jo,
          inputReadOnly: ca,
          renderExtraFooter: da,
          onMouseenter: ai,
          onMouseleave: Di,
          onMouseup: Qa,
          onOk: Ai,
          components: Za,
          direction: li,
          autocomplete: Ni = "off"
        } = e, Hl = li === "rtl" ? {
          right: `${ae.value}px`
        } : {
          left: `${ae.value}px`
        };
        function tr() {
          let ro;
          const nr = m_(Ue, L.value[S.value], da), fa = b_({
            prefixCls: Ue,
            components: Za,
            needConfirmButton: r.value,
            okDisabled: !on(N.value, S.value) || An && An(N.value[S.value]),
            locale: Tt,
            onOk: () => {
              on(N.value, S.value) && (ze(N.value, S.value), Ai && Ai(N.value));
            }
          });
          if (un !== "time" && !Dn) {
            const Fo = S.value === 0 ? T.value : M.value, nl = Zc(Fo, un, Sn), rl = L.value[S.value] === un, Ri = so(rl ? "left" : !1, {
              pickerValue: Fo,
              onPickerValueChange: (Kl) => {
                R(Kl, S.value);
              }
            }), qs = so("right", {
              pickerValue: nl,
              onPickerValueChange: (Kl) => {
                R(Zc(Kl, un, Sn, -1), S.value);
              }
            });
            li === "rtl" ? ro = h(Je, null, [qs, rl && Ri]) : ro = h(Je, null, [Ri, rl && qs]);
          } else
            ro = so();
          let or = h("div", {
            class: `${Ue}-panel-layout`
          }, [h(w_, {
            prefixCls: Ue,
            presets: l.value,
            onClick: (Fo) => {
              ze(Fo, null), ge(!1, S.value);
            },
            onHover: (Fo) => {
              qe(Fo);
            }
          }, null), h("div", null, [h("div", {
            class: `${Ue}-panels`
          }, [ro]), (nr || fa) && h("div", {
            class: `${Ue}-footer`
          }, [nr, fa])])]);
          return er && (or = er(or)), h("div", {
            class: `${Ue}-panel-container`,
            style: {
              marginLeft: `${U.value}px`
            },
            ref: c,
            onMousedown: (Fo) => {
              Fo.preventDefault();
            }
          }, [or]);
        }
        const Ks = h("div", {
          class: Me(`${Ue}-range-wrapper`, `${Ue}-${un}-range-wrapper`),
          style: {
            minWidth: `${se.value}px`
          }
        }, [h("div", {
          ref: m,
          class: `${Ue}-range-arrow`,
          style: Hl
        }, null), tr()]);
        let Vl;
        hr && (Vl = h("span", {
          class: `${Ue}-suffix`
        }, [hr]));
        let Ja;
        Jn && (on(I.value, 0) && !$.value[0] || on(I.value, 1) && !$.value[1]) && (Ja = h("span", {
          onMousedown: (ro) => {
            ro.preventDefault(), ro.stopPropagation();
          },
          onMouseup: (ro) => {
            ro.preventDefault(), ro.stopPropagation();
            let nr = I.value;
            $.value[0] || (nr = Ur(nr, null, 0)), $.value[1] || (nr = Ur(nr, null, 1)), ze(nr, null), ge(!1, S.value);
          },
          class: `${Ue}-clear`
        }, [jo || h("span", {
          class: `${Ue}-clear-btn`
        }, null)]));
        const jl = {
          size: l_(un, x.value[0], Sn)
        };
        let Wl = 0, el = 0;
        d.value && f.value && p.value && (S.value === 0 ? el = d.value.offsetWidth : (Wl = ae.value, el = f.value.offsetWidth));
        const tl = li === "rtl" ? {
          right: `${Wl}px`
        } : {
          left: `${Wl}px`
        };
        return h("div", Q({
          ref: u,
          class: Me(Ue, `${Ue}-range`, n.class, {
            [`${Ue}-disabled`]: $.value[0] && $.value[1],
            [`${Ue}-focused`]: S.value === 0 ? yt.value : Xt.value,
            [`${Ue}-rtl`]: li === "rtl"
          }),
          style: n.style,
          onClick: pn,
          onMouseenter: ai,
          onMouseleave: Di,
          onMousedown: gt,
          onMouseup: Qa
        }, h_(e)), [h("div", {
          class: Me(`${Ue}-input`, {
            [`${Ue}-input-active`]: S.value === 0,
            [`${Ue}-input-placeholder`]: !!Ee.value
          }),
          ref: d
        }, [h("input", Q(Q(Q({
          id: ht,
          disabled: $.value[0],
          readonly: ca || typeof x.value[0] == "function" || !Ot.value,
          value: Ee.value || ot.value,
          onInput: (ro) => {
            je(ro.target.value);
          },
          autofocus: zo,
          placeholder: on(po, 0) || "",
          ref: v
        }, St.value), jl), {}, {
          autocomplete: Ni
        }), null)]), h("div", {
          class: `${Ue}-range-separator`,
          ref: p
        }, [cn]), h("div", {
          class: Me(`${Ue}-input`, {
            [`${Ue}-input-active`]: S.value === 1,
            [`${Ue}-input-placeholder`]: !!rt.value
          }),
          ref: f
        }, [h("input", Q(Q(Q({
          disabled: $.value[1],
          readonly: ca || typeof x.value[0] == "function" || !ln.value,
          value: rt.value || Ge.value,
          onInput: (ro) => {
            Se(ro.target.value);
          },
          placeholder: on(po, 1) || "",
          ref: g
        }, Wt.value), jl), {}, {
          autocomplete: Ni
        }), null)]), h("div", {
          class: `${Ue}-active-bar`,
          style: O(O({}, tl), {
            width: `${el}px`,
            position: "absolute"
          })
        }, null), Vl, Ja, h(x_, {
          visible: Z.value,
          popupStyle: vt,
          prefixCls: Ue,
          dropdownClassName: Zt,
          dropdownAlign: Qn,
          getPopupContainer: $o,
          transitionName: Zn,
          range: !0,
          direction: li
        }, {
          default: () => [h("div", {
            style: {
              pointerEvents: "none",
              position: "absolute",
              top: 0,
              bottom: 0,
              left: 0,
              right: 0
            }
          }, null)],
          popupElement: () => Ks
        })]);
      };
    }
  });
}
const n9 = t9();
var o9 = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const r9 = {
  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: pe.any,
  required: Boolean
}, O_ = be({
  compatConfig: {
    MODE: 3
  },
  name: "Checkbox",
  inheritAttrs: !1,
  props: Mn(r9, {
    prefixCls: "rc-checkbox",
    type: "checkbox",
    defaultChecked: !1
  }),
  emits: ["click", "change"],
  setup(e, t) {
    let {
      attrs: n,
      emit: o,
      expose: r
    } = t;
    const i = le(e.checked === void 0 ? e.defaultChecked : e.checked), a = le();
    Ie(() => e.checked, () => {
      i.value = e.checked;
    }), r({
      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 && (i.value = c.target.checked), c.shiftKey = l.value;
      const d = {
        target: O(O({}, 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: v,
        readonly: g,
        tabindex: m,
        autofocus: x,
        value: S,
        required: C
      } = e, P = o9(e, ["prefixCls", "name", "id", "type", "disabled", "readonly", "tabindex", "autofocus", "value", "required"]), {
        class: $,
        onFocus: I,
        onBlur: w,
        onKeydown: T,
        onKeypress: M,
        onKeyup: R
      } = n, N = O(O({}, P), n), H = Object.keys(N).reduce((A, G) => ((G.startsWith("data-") || G.startsWith("aria-") || G === "role") && (A[G] = N[G]), A), {}), L = Me(c, $, {
        [`${c}-checked`]: i.value,
        [`${c}-disabled`]: v
      }), F = O(O({
        name: d,
        id: f,
        type: p,
        readonly: g,
        disabled: v,
        tabindex: m,
        class: `${c}-input`,
        checked: !!i.value,
        autofocus: x,
        value: S
      }, H), {
        onChange: s,
        onClick: u,
        onFocus: I,
        onBlur: w,
        onKeydown: T,
        onKeypress: M,
        onKeyup: R,
        required: C
      });
      return h("span", {
        class: L
      }, [h("input", Q({
        ref: a
      }, F), null), h("span", {
        class: `${c}-inner`
      }, null)]);
    };
  }
}), k_ = Symbol("radioGroupContextKey"), i9 = (e) => {
  Bt(k_, e);
}, a9 = () => zt(k_, void 0), I_ = Symbol("radioOptionTypeContextKey"), l9 = (e) => {
  Bt(I_, e);
}, s9 = () => zt(I_, void 0), u9 = new tn("antRadioEffect", {
  "0%": {
    transform: "scale(1)",
    opacity: 0.5
  },
  "100%": {
    transform: "scale(1.6)",
    opacity: 0
  }
}), c9 = (e) => {
  const {
    componentCls: t,
    antCls: n
  } = e, o = `${t}-group`;
  return {
    [o]: O(O({}, fn(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"
      }
    })
  };
}, d9 = (e) => {
  const {
    componentCls: t,
    radioWrapperMarginRight: n,
    radioCheckedColor: o,
    radioSize: r,
    motionDurationSlow: i,
    motionDurationMid: a,
    motionEaseInOut: l,
    motionEaseInOutCirc: s,
    radioButtonBg: u,
    colorBorder: c,
    lineWidth: d,
    radioDotSize: f,
    colorBgContainerDisabled: p,
    colorTextDisabled: v,
    paddingXS: g,
    radioDotDisabledColor: m,
    lineType: x,
    radioDotDisabledSize: S,
    wireframe: C,
    colorWhite: P
  } = e, $ = `${t}-inner`;
  return {
    [`${t}-wrapper`]: O(O({}, fn(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 ${x} ${o}`,
        borderRadius: "50%",
        visibility: "hidden",
        animationName: u9,
        animationDuration: i,
        animationTimingFunction: l,
        animationFillMode: "both",
        content: '""'
      },
      [t]: O(O({}, fn(e)), {
        position: "relative",
        display: "inline-block",
        outline: "none",
        cursor: "pointer",
        alignSelf: "center"
      }),
      [`${t}-wrapper:hover &,
        &:hover ${$}`]: {
        borderColor: o
      },
      [`${t}-input:focus-visible + ${$}`]: O({}, Wa(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: r,
          height: r,
          marginBlockStart: r / -2,
          marginInlineStart: r / -2,
          backgroundColor: C ? o : P,
          borderBlockStart: 0,
          borderInlineStart: 0,
          borderRadius: r,
          transform: "scale(0)",
          opacity: 0,
          transition: `all ${i} ${s}`,
          content: '""'
        },
        boxSizing: "border-box",
        position: "relative",
        insetBlockStart: 0,
        insetInlineStart: 0,
        display: "block",
        width: r,
        height: r,
        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`]: {
        [$]: {
          borderColor: o,
          backgroundColor: C ? u : o,
          "&::after": {
            transform: `scale(${f / r})`,
            opacity: 1,
            transition: `all ${i} ${s}`
          }
        }
      },
      [`${t}-disabled`]: {
        cursor: "not-allowed",
        [$]: {
          backgroundColor: p,
          borderColor: c,
          cursor: "not-allowed",
          "&::after": {
            backgroundColor: m
          }
        },
        [`${t}-input`]: {
          cursor: "not-allowed"
        },
        [`${t}-disabled + span`]: {
          color: v,
          cursor: "not-allowed"
        },
        [`&${t}-checked`]: {
          [$]: {
            "&::after": {
              transform: `scale(${S / r})`
            }
          }
        }
      },
      [`span${t} + *`]: {
        paddingInlineStart: g,
        paddingInlineEnd: g
      }
    })
  };
}, f9 = (e) => {
  const {
    radioButtonColor: t,
    controlHeight: n,
    componentCls: o,
    lineWidth: r,
    lineType: i,
    colorBorder: a,
    motionDurationSlow: l,
    motionDurationMid: s,
    radioButtonPaddingHorizontal: u,
    fontSize: c,
    radioButtonBg: d,
    fontSizeLG: f,
    controlHeightLG: p,
    controlHeightSM: v,
    paddingXS: g,
    borderRadius: m,
    borderRadiusSM: x,
    borderRadiusLG: S,
    radioCheckedColor: C,
    radioButtonCheckedBg: P,
    radioButtonHoverColor: $,
    radioButtonActiveColor: I,
    radioSolidCheckedColor: w,
    colorTextDisabled: T,
    colorBgContainerDisabled: M,
    radioDisabledButtonCheckedColor: R,
    radioDisabledButtonCheckedBg: N
  } = e;
  return {
    [`${o}-button-wrapper`]: {
      position: "relative",
      display: "inline-block",
      height: n,
      margin: 0,
      paddingInline: u,
      paddingBlock: 0,
      color: t,
      fontSize: c,
      lineHeight: `${n - r * 2}px`,
      background: d,
      border: `${r}px ${i} ${a}`,
      // strange align fix for chrome but works
      // https://gw.alipayobjects.com/zos/rmsportal/VFTfKXJuogBAXcvfAUWJ.gif
      borderBlockStartWidth: r + 0.02,
      borderInlineStartWidth: 0,
      borderInlineEndWidth: r,
      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: -r,
          insetInlineStart: -r,
          display: "block",
          boxSizing: "content-box",
          width: 1,
          height: "100%",
          paddingBlock: r,
          paddingInline: 0,
          backgroundColor: a,
          transition: `background-color ${l}`,
          content: '""'
        }
      },
      "&:first-child": {
        borderInlineStart: `${r}px ${i} ${a}`,
        borderStartStartRadius: m,
        borderEndStartRadius: m
      },
      "&:last-child": {
        borderStartEndRadius: m,
        borderEndEndRadius: m
      },
      "&:first-child:last-child": {
        borderRadius: m
      },
      [`${o}-group-large &`]: {
        height: p,
        fontSize: f,
        lineHeight: `${p - r * 2}px`,
        "&:first-child": {
          borderStartStartRadius: S,
          borderEndStartRadius: S
        },
        "&:last-child": {
          borderStartEndRadius: S,
          borderEndEndRadius: S
        }
      },
      [`${o}-group-small &`]: {
        height: v,
        paddingInline: g - r,
        paddingBlock: 0,
        lineHeight: `${v - r * 2}px`,
        "&:first-child": {
          borderStartStartRadius: x,
          borderEndStartRadius: x
        },
        "&:last-child": {
          borderStartEndRadius: x,
          borderEndEndRadius: x
        }
      },
      "&:hover": {
        position: "relative",
        color: C
      },
      "&:has(:focus-visible)": O({}, Wa(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: C,
        background: P,
        borderColor: C,
        "&::before": {
          backgroundColor: C
        },
        "&:first-child": {
          borderColor: C
        },
        "&:hover": {
          color: $,
          borderColor: $,
          "&::before": {
            backgroundColor: $
          }
        },
        "&:active": {
          color: I,
          borderColor: I,
          "&::before": {
            backgroundColor: I
          }
        }
      },
      [`${o}-group-solid &-checked:not(${o}-button-wrapper-disabled)`]: {
        color: w,
        background: C,
        borderColor: C,
        "&:hover": {
          color: w,
          background: $,
          borderColor: $
        },
        "&:active": {
          color: w,
          background: I,
          borderColor: I
        }
      },
      "&-disabled": {
        color: T,
        backgroundColor: M,
        borderColor: a,
        cursor: "not-allowed",
        "&:first-child, &:hover": {
          color: T,
          backgroundColor: M,
          borderColor: a
        }
      },
      [`&-disabled${o}-button-wrapper-checked`]: {
        color: R,
        backgroundColor: N,
        borderColor: a,
        boxShadow: "none"
      }
    }
  };
}, T_ = On("Radio", (e) => {
  const {
    padding: t,
    lineWidth: n,
    controlItemBgActiveDisabled: o,
    colorTextDisabled: r,
    colorBgContainer: i,
    fontSizeLG: a,
    controlOutline: l,
    colorPrimaryHover: s,
    colorPrimaryActive: u,
    colorText: c,
    colorPrimary: d,
    marginXS: f,
    controlOutlineWidth: p,
    colorTextLightSolid: v,
    wireframe: g
  } = e, m = `0 0 0 ${p}px ${l}`, x = m, S = a, C = 4, P = S - C * 2, $ = g ? P : S - (C + n) * 2, I = d, w = c, T = s, M = u, R = t - n, L = Qt(e, {
    radioFocusShadow: m,
    radioButtonFocusShadow: x,
    radioSize: S,
    radioDotSize: $,
    radioDotDisabledSize: P,
    radioCheckedColor: I,
    radioDotDisabledColor: r,
    radioSolidCheckedColor: v,
    radioButtonBg: i,
    radioButtonCheckedBg: i,
    radioButtonColor: w,
    radioButtonHoverColor: T,
    radioButtonActiveColor: M,
    radioButtonPaddingHorizontal: R,
    radioDisabledButtonCheckedBg: o,
    radioDisabledButtonCheckedColor: r,
    radioWrapperMarginRight: f
  });
  return [c9(L), d9(L), f9(L)];
});
var p9 = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const __ = () => ({
  prefixCls: String,
  checked: ct(),
  disabled: ct(),
  isGroup: ct(),
  value: pe.any,
  name: String,
  id: String,
  autofocus: ct(),
  onChange: et(),
  onFocus: et(),
  onBlur: et(),
  onClick: et(),
  "onUpdate:checked": et(),
  "onUpdate:value": et()
}), To = be({
  compatConfig: {
    MODE: 3
  },
  name: "ARadio",
  inheritAttrs: !1,
  props: __(),
  setup(e, t) {
    let {
      emit: n,
      expose: o,
      slots: r,
      attrs: i
    } = t;
    const a = Br(), l = Nr.useInject(), s = s9(), u = a9(), c = _i(), d = E(() => {
      var T;
      return (T = g.value) !== null && T !== void 0 ? T : c.value;
    }), f = le(), {
      prefixCls: p,
      direction: v,
      disabled: g
    } = Nt("radio", e), m = E(() => u?.optionType.value === "button" || s === "button" ? `${p.value}-button` : p.value), x = _i(), [S, C] = T_(p);
    o({
      focus: () => {
        f.value.focus();
      },
      blur: () => {
        f.value.blur();
      }
    });
    const I = (T) => {
      const M = T.target.checked;
      n("update:checked", M), n("update:value", M), n("change", T), a.onFieldChange();
    }, w = (T) => {
      n("change", T), u && u.onChange && u.onChange(T);
    };
    return () => {
      var T;
      const M = u, {
        prefixCls: R,
        id: N = a.id.value
      } = e, H = p9(e, ["prefixCls", "id"]), L = O(O({
        prefixCls: m.value,
        id: N
      }, Fn(H, ["onUpdate:checked", "onUpdate:value"])), {
        disabled: (T = g.value) !== null && T !== void 0 ? T : x.value
      });
      M ? (L.name = M.name.value, L.onChange = w, L.checked = e.value === M.value.value, L.disabled = d.value || M.disabled.value) : L.onChange = I;
      const F = Me({
        [`${m.value}-wrapper`]: !0,
        [`${m.value}-wrapper-checked`]: L.checked,
        [`${m.value}-wrapper-disabled`]: L.disabled,
        [`${m.value}-wrapper-rtl`]: v.value === "rtl",
        [`${m.value}-wrapper-in-form-item`]: l.isFormItemInput
      }, i.class, C.value);
      return S(h("label", Q(Q({}, i), {}, {
        class: F
      }), [h(O_, Q(Q({}, L), {}, {
        type: "radio",
        ref: f
      }), null), r.default && h("span", null, [r.default()])]));
    };
  }
}), h9 = () => ({
  prefixCls: String,
  value: pe.any,
  size: rn(),
  options: jn(),
  disabled: ct(),
  name: String,
  buttonStyle: rn("outline"),
  id: String,
  optionType: rn("default"),
  onChange: et(),
  "onUpdate:value": et()
}), M_ = be({
  compatConfig: {
    MODE: 3
  },
  name: "ARadioGroup",
  inheritAttrs: !1,
  props: h9(),
  // emits: ['update:value', 'change'],
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      attrs: r
    } = t;
    const i = Br(), {
      prefixCls: a,
      direction: l,
      size: s
    } = Nt("radio", e), [u, c] = T_(a), d = le(e.value), f = le(!1);
    return Ie(() => e.value, (v) => {
      d.value = v, f.value = !1;
    }), i9({
      onChange: (v) => {
        const g = d.value, {
          value: m
        } = v.target;
        "value" in e || (d.value = m), !f.value && m !== g && (f.value = !0, o("update:value", m), o("change", v), i.onFieldChange()), Yt(() => {
          f.value = !1;
        });
      },
      value: d,
      disabled: E(() => e.disabled),
      name: E(() => e.name),
      optionType: E(() => e.optionType)
    }), () => {
      var v;
      const {
        options: g,
        buttonStyle: m,
        id: x = i.id.value
      } = e, S = `${a.value}-group`, C = Me(S, `${S}-${m}`, {
        [`${S}-${s.value}`]: s.value,
        [`${S}-rtl`]: l.value === "rtl"
      }, r.class, c.value);
      let P = null;
      return g && g.length > 0 ? P = g.map(($) => {
        if (typeof $ == "string" || typeof $ == "number")
          return h(To, {
            key: $,
            prefixCls: a.value,
            disabled: e.disabled,
            value: $,
            checked: d.value === $
          }, {
            default: () => [$]
          });
        const {
          value: I,
          disabled: w,
          label: T
        } = $;
        return h(To, {
          key: `radio-group-value-options-${I}`,
          prefixCls: a.value,
          disabled: w || e.disabled,
          value: I,
          checked: d.value === I
        }, {
          default: () => [T]
        });
      }) : P = (v = n.default) === null || v === void 0 ? void 0 : v.call(n), u(h("div", Q(Q({}, r), {}, {
        class: C,
        id: x
      }), [P]));
    };
  }
}), g9 = be({
  compatConfig: {
    MODE: 3
  },
  name: "ARadioButton",
  inheritAttrs: !1,
  props: __(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: r
    } = Nt("radio", e);
    return l9("button"), () => {
      var i;
      return h(To, Q(Q(Q({}, o), e), {}, {
        prefixCls: r.value
      }), {
        default: () => [(i = n.default) === null || i === void 0 ? void 0 : i.call(n)]
      });
    };
  }
});
To.Group = M_;
To.Button = g9;
To.install = function(e) {
  return e.component(To.name, To), e.component(To.Group.name, To.Group), e.component(To.Button.name, To.Button), e;
};
const E_ = (e) => ({
  // Firefox
  "&::-moz-placeholder": {
    opacity: 1
  },
  "&::placeholder": {
    color: e,
    userSelect: "none"
    // https://github.com/ant-design/ant-design/pull/32639
  },
  "&:placeholder-shown": {
    textOverflow: "ellipsis"
  }
}), pc = (e) => ({
  borderColor: e.inputBorderHoverColor,
  borderInlineEndWidth: e.lineWidth
}), Ds = (e) => ({
  borderColor: e.inputBorderHoverColor,
  boxShadow: `0 0 0 ${e.controlOutlineWidth}px ${e.controlOutline}`,
  borderInlineEndWidth: e.lineWidth,
  outline: 0
}), D_ = (e) => ({
  color: e.colorTextDisabled,
  backgroundColor: e.colorBgContainerDisabled,
  borderColor: e.colorBorder,
  boxShadow: "none",
  cursor: "not-allowed",
  opacity: 1,
  "&:hover": O({}, pc(Qt(e, {
    inputBorderHoverColor: e.colorBorder
  })))
}), A_ = (e) => {
  const {
    inputPaddingVerticalLG: t,
    fontSizeLG: n,
    lineHeightLG: o,
    borderRadiusLG: r,
    inputPaddingHorizontalLG: i
  } = e;
  return {
    padding: `${t}px ${i}px`,
    fontSize: n,
    lineHeight: o,
    borderRadius: r
  };
}, Z0 = (e) => ({
  padding: `${e.inputPaddingVerticalSM}px ${e.controlPaddingHorizontalSM - 1}px`,
  borderRadius: e.borderRadiusSM
}), Xh = (e, t) => {
  const {
    componentCls: n,
    colorError: o,
    colorWarning: r,
    colorErrorOutline: i,
    colorWarningOutline: a,
    colorErrorBorderHover: l,
    colorWarningBorderHover: s
  } = e;
  return {
    [`&-status-error:not(${t}-disabled):not(${t}-borderless)${t}`]: {
      borderColor: o,
      "&:hover": {
        borderColor: l
      },
      "&:focus, &-focused": O({}, Ds(Qt(e, {
        inputBorderActiveColor: o,
        inputBorderHoverColor: o,
        controlOutline: i
      }))),
      [`${n}-prefix`]: {
        color: o
      }
    },
    [`&-status-warning:not(${t}-disabled):not(${t}-borderless)${t}`]: {
      borderColor: r,
      "&:hover": {
        borderColor: s
      },
      "&:focus, &-focused": O({}, Ds(Qt(e, {
        inputBorderActiveColor: r,
        inputBorderHoverColor: r,
        controlOutline: a
      }))),
      [`${n}-prefix`]: {
        color: r
      }
    }
  };
}, hc = (e) => O(O({
  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}`
}, E_(e.colorTextPlaceholder)), {
  "&:hover": O({}, pc(e)),
  "&:focus, &-focused": O({}, Ds(e)),
  "&-disabled, &[disabled]": O({}, D_(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": O({}, A_(e)),
  "&-sm": O({}, Z0(e)),
  // RTL
  "&-rtl": {
    direction: "rtl"
  },
  "&-textarea-rtl": {
    direction: "rtl"
  }
}), N_ = (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`]: O({}, A_(e)),
    [`&-sm ${t}, &-sm > ${t}-group-addon`]: O({}, Z0(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`]: O(O({
      display: "block"
    }, ja()), {
      [`${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`
      }
    }
  };
}, v9 = (e) => {
  const {
    componentCls: t,
    controlHeightSM: n,
    lineWidth: o
  } = e, i = (n - o * 2 - 16) / 2;
  return {
    [t]: O(O(O(O({}, fn(e)), hc(e)), Xh(e, t)), {
      '&[type="color"]': {
        height: e.controlHeight,
        [`&${t}-lg`]: {
          height: e.controlHeightLG
        },
        [`&${t}-sm`]: {
          height: n,
          paddingTop: i,
          paddingBottom: i
        }
      }
    })
  };
}, m9 = (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
      }
    }
  };
}, b9 = (e) => {
  const {
    componentCls: t,
    inputAffixPadding: n,
    colorTextDescription: o,
    motionDurationSlow: r,
    colorIcon: i,
    colorIconHover: a,
    iconCls: l
  } = e;
  return {
    [`${t}-affix-wrapper`]: O(O(O(O(O({}, hc(e)), {
      display: "inline-flex",
      [`&:not(${t}-affix-wrapper-disabled):hover`]: O(O({}, pc(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
        }
      }
    }), m9(e)), {
      // password
      [`${l}${t}-password-icon`]: {
        color: i,
        cursor: "pointer",
        transition: `all ${r}`,
        "&:hover": {
          color: a
        }
      }
    }), Xh(e, `${t}-affix-wrapper`))
  };
}, y9 = (e) => {
  const {
    componentCls: t,
    colorError: n,
    colorSuccess: o,
    borderRadiusLG: r,
    borderRadiusSM: i
  } = e;
  return {
    [`${t}-group`]: O(O(O({}, fn(e)), N_(e)), {
      "&-rtl": {
        direction: "rtl"
      },
      "&-wrapper": {
        display: "inline-block",
        width: "100%",
        textAlign: "start",
        verticalAlign: "top",
        "&-rtl": {
          direction: "rtl"
        },
        // Size
        "&-lg": {
          [`${t}-group-addon`]: {
            borderRadius: r
          }
        },
        "&-sm": {
          [`${t}-group-addon`]: {
            borderRadius: i
          }
        },
        // Status
        "&-status-error": {
          [`${t}-group-addon`]: {
            color: n,
            borderColor: n
          }
        },
        "&-status-warning": {
          [`${t}-group-addon:last-child`]: {
            color: o,
            borderColor: o
          }
        }
      }
    })
  };
}, x9 = (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 Qh(e) {
  return Qt(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 w9 = (e) => {
  const {
    componentCls: t,
    inputPaddingHorizontal: n,
    paddingLG: o
  } = e, r = `${t}-textarea`;
  return {
    [r]: {
      position: "relative",
      [`${r}-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": {
        [`&${r}-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"
        }
      }
    }
  };
}, J0 = On("Input", (e) => {
  const t = Qh(e);
  return [
    v9(t),
    w9(t),
    b9(t),
    y9(t),
    x9(t),
    // =====================================================
    // ==             Space Compact                       ==
    // =====================================================
    Bd(t)
  ];
}), pv = (e, t, n, o) => {
  const {
    lineHeight: r
  } = e, i = Math.floor(n * r) + 2, a = Math.max((t - i) / 2, 0), l = Math.max(t - i - a, 0);
  return {
    padding: `${a}px ${o}px ${l}px`
  };
}, S9 = (e) => {
  const {
    componentCls: t,
    pickerCellCls: n,
    pickerCellInnerCls: o,
    pickerPanelCellHeight: r,
    motionDurationSlow: i,
    borderRadiusSM: a,
    motionDurationMid: l,
    controlItemBgHover: s,
    lineWidth: u,
    lineType: c,
    colorPrimary: d,
    controlItemBgActive: f,
    colorTextLightSolid: p,
    controlHeightSM: v,
    pickerDateHoverRangeBorderColor: g,
    pickerCellBorderGap: m,
    pickerBasicCellHoverWithRangeColor: x,
    pickerPanelCellWidth: S,
    colorTextDisabled: C,
    colorBgContainerDisabled: P
  } = e;
  return {
    "&::before": {
      position: "absolute",
      top: "50%",
      insetInlineStart: 0,
      insetInlineEnd: 0,
      zIndex: 1,
      height: r,
      transform: "translateY(-50%)",
      transition: `all ${i}`,
      content: '""'
    },
    // >>> Default
    [o]: {
      position: "relative",
      zIndex: 2,
      display: "inline-block",
      minWidth: r,
      height: r,
      lineHeight: `${r}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: v,
        borderTop: `${u}px dashed ${g}`,
        borderBottom: `${u}px dashed ${g}`,
        transform: "translateY(-50%)",
        transition: `all ${i}`,
        content: '""'
      }
    },
    // Add space for stash
    "&-range-hover-start::after,\n      &-range-hover-end::after,\n      &-range-hover::after": {
      insetInlineEnd: 0,
      insetInlineStart: m
    },
    // 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: x
    },
    // 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: (S - r) / 2,
      borderInlineStart: `${u}px dashed ${g}`,
      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: (S - r) / 2,
      borderInlineEnd: `${u}px dashed ${g}`,
      borderStartEndRadius: u,
      borderEndEndRadius: u
    },
    // >>> Disabled
    "&-disabled": {
      color: C,
      pointerEvents: "none",
      [o]: {
        background: "transparent"
      },
      "&::before": {
        background: P
      }
    },
    [`&-disabled${n}-today ${o}::before`]: {
      borderColor: C
    }
  };
}, C9 = (e) => {
  const {
    componentCls: t,
    pickerCellInnerCls: n,
    pickerYearMonthCellWidth: o,
    pickerControlIconSize: r,
    pickerPanelCellWidth: i,
    paddingSM: a,
    paddingXS: l,
    paddingXXS: s,
    colorBgContainer: u,
    lineWidth: c,
    lineType: d,
    borderRadiusLG: f,
    colorPrimary: p,
    colorTextHeading: v,
    colorSplit: g,
    pickerControlIconBorderWidth: m,
    colorIcon: x,
    pickerTextHeight: S,
    motionDurationMid: C,
    colorIconHover: P,
    fontWeightStrong: $,
    pickerPanelCellHeight: I,
    pickerCellPaddingVertical: w,
    colorTextDisabled: T,
    colorText: M,
    fontSize: R,
    pickerBasicCellHoverWithRangeColor: N,
    motionDurationSlow: H,
    pickerPanelWithoutTimeCellHeight: L,
    pickerQuarterPanelContentHeight: F,
    colorLink: A,
    colorLinkActive: G,
    colorLinkHover: j,
    pickerDateHoverRangeBorderColor: Z,
    borderRadiusSM: W,
    colorTextLightSolid: K,
    borderRadius: q,
    controlItemBgHover: U,
    pickerTimePanelColumnHeight: ae,
    pickerTimePanelColumnWidth: se,
    pickerTimePanelCellHeight: ie,
    controlItemBgActive: re,
    marginXXS: te
  } = e, ve = i * 7 + a * 2 + 4, ce = (ve - l * 2) / 3 - o - a;
  return {
    [t]: {
      "&-panel": {
        display: "inline-flex",
        flexDirection: "column",
        textAlign: "center",
        background: u,
        border: `${c}px ${d} ${g}`,
        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: ve
      },
      // ======================= Header =======================
      "&-header": {
        display: "flex",
        padding: `0 ${l}px`,
        color: v,
        borderBottom: `${c}px ${d} ${g}`,
        "> *": {
          flex: "none"
        },
        button: {
          padding: 0,
          color: x,
          lineHeight: `${S}px`,
          background: "transparent",
          border: 0,
          cursor: "pointer",
          transition: `color ${C}`
        },
        "> button": {
          minWidth: "1.6em",
          fontSize: R,
          "&:hover": {
            color: P
          }
        },
        "&-view": {
          flex: "auto",
          fontWeight: $,
          lineHeight: `${S}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: r,
        height: r,
        "&::before": {
          position: "absolute",
          top: 0,
          insetInlineStart: 0,
          display: "inline-block",
          width: r,
          height: r,
          border: "0 solid currentcolor",
          borderBlockStartWidth: m,
          borderBlockEndWidth: 0,
          borderInlineStartWidth: m,
          borderInlineEndWidth: 0,
          content: '""'
        }
      },
      "&-super-prev-icon,\n        &-super-next-icon": {
        "&::after": {
          position: "absolute",
          top: Math.ceil(r / 2),
          insetInlineStart: Math.ceil(r / 2),
          display: "inline-block",
          width: r,
          height: r,
          border: "0 solid currentcolor",
          borderBlockStartWidth: m,
          borderBlockEndWidth: 0,
          borderInlineStartWidth: m,
          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: I,
          fontWeight: "normal"
        },
        th: {
          height: I + w * 2,
          color: M,
          verticalAlign: "middle"
        }
      },
      "&-cell": O({
        padding: `${w}px 0`,
        color: T,
        cursor: "pointer",
        // In view
        "&-in-view": {
          color: M
        }
      }, S9(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: N,
          transition: `all ${H}`,
          content: '""'
        }
      },
      [`&-date-panel
        ${t}-cell-in-view${t}-cell-in-range${t}-cell-range-hover-start
        ${n}::after`]: {
        insetInlineEnd: -(i - I) / 2,
        insetInlineStart: 0
      },
      [`&-date-panel ${t}-cell-in-view${t}-cell-in-range${t}-cell-range-hover-end ${n}::after`]: {
        insetInlineEnd: 0,
        insetInlineStart: -(i - I) / 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: L * 4
        },
        [n]: {
          padding: `0 ${l}px`
        }
      },
      "&-quarter-panel": {
        [`${t}-content`]: {
          height: F
        }
      },
      // ======================== Footer ========================
      [`&-panel ${t}-footer`]: {
        borderTop: `${c}px ${d} ${g}`
      },
      "&-footer": {
        width: "min-content",
        minWidth: "100%",
        lineHeight: `${S - 2 * c}px`,
        textAlign: "center",
        "&-extra": {
          padding: `0 ${a}`,
          lineHeight: `${S - 2 * c}px`,
          textAlign: "start",
          "&:not(:last-child)": {
            borderBottom: `${c}px ${d} ${g}`
          }
        }
      },
      "&-now": {
        textAlign: "start"
      },
      "&-today-btn": {
        color: A,
        "&:hover": {
          color: j
        },
        "&:active": {
          color: G
        },
        [`&${t}-today-btn-disabled`]: {
          color: T,
          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: ce,
          borderInlineStart: `${c}px dashed ${Z}`,
          borderStartStartRadius: W,
          borderBottomStartRadius: W,
          borderStartEndRadius: 0,
          borderBottomEndRadius: 0,
          [`${t}-panel-rtl &`]: {
            insetInlineEnd: ce,
            borderInlineEnd: `${c}px dashed ${Z}`,
            borderStartStartRadius: 0,
            borderBottomStartRadius: 0,
            borderStartEndRadius: W,
            borderBottomEndRadius: W
          }
        },
        [`${t}-cell-range-hover-end::after`]: {
          insetInlineEnd: ce,
          borderInlineEnd: `${c}px dashed ${Z}`,
          borderStartStartRadius: 0,
          borderEndStartRadius: 0,
          borderStartEndRadius: q,
          borderEndEndRadius: q,
          [`${t}-panel-rtl &`]: {
            insetInlineStart: ce,
            borderInlineStart: `${c}px dashed ${Z}`,
            borderStartStartRadius: q,
            borderEndStartRadius: q,
            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 ${C}`,
            "&:first-child": {
              borderStartStartRadius: W,
              borderEndStartRadius: W
            },
            "&:last-child": {
              borderStartEndRadius: W,
              borderEndEndRadius: W
            }
          },
          "&:hover td": {
            background: U
          },
          "&-selected td,\n            &-selected:hover td": {
            background: p,
            [`&${t}-cell-week`]: {
              color: new In(K).setAlpha(0.5).toHexString()
            },
            [`&${t}-cell-today ${n}::before`]: {
              borderColor: K
            },
            [n]: {
              color: K
            }
          }
        }
      },
      // ====================== Date Panel ======================
      "&-date-panel": {
        [`${t}-body`]: {
          padding: `${l}px ${a}px`
        },
        [`${t}-content`]: {
          width: i * 7,
          th: {
            width: i
          }
        }
      },
      // ==================== Datetime Panel ====================
      "&-datetime-panel": {
        display: "flex",
        [`${t}-time-panel`]: {
          borderInlineStart: `${c}px ${d} ${g}`
        },
        [`${t}-date-panel,
          ${t}-time-panel`]: {
          transition: `opacity ${H}`
        },
        // 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: ae
        },
        "&-column": {
          flex: "1 0 auto",
          width: se,
          margin: `${s}px 0`,
          padding: 0,
          overflowY: "hidden",
          textAlign: "start",
          listStyle: "none",
          transition: `background ${C}`,
          overflowX: "hidden",
          "&::after": {
            display: "block",
            height: ae - ie,
            content: '""'
          },
          "&:not(:first-child)": {
            borderInlineStart: `${c}px ${d} ${g}`
          },
          "&-active": {
            background: new In(re).setAlpha(0.2).toHexString()
          },
          "&:hover": {
            overflowY: "auto"
          },
          "> li": {
            margin: 0,
            padding: 0,
            [`&${t}-time-panel-cell`]: {
              marginInline: te,
              [`${t}-time-panel-cell-inner`]: {
                display: "block",
                width: se - 2 * te,
                height: ie,
                margin: 0,
                paddingBlock: 0,
                paddingInlineEnd: 0,
                paddingInlineStart: (se - ie) / 2,
                color: M,
                lineHeight: `${ie}px`,
                borderRadius: W,
                cursor: "pointer",
                transition: `background ${C}`,
                "&:hover": {
                  background: U
                }
              },
              "&-selected": {
                [`${t}-time-panel-cell-inner`]: {
                  background: re
                }
              },
              "&-disabled": {
                [`${t}-time-panel-cell-inner`]: {
                  color: T,
                  background: "transparent",
                  cursor: "not-allowed"
                }
              }
            }
          }
        }
      },
      // https://github.com/ant-design/ant-design/issues/39227
      [`&-datetime-panel ${t}-time-panel-column:after`]: {
        height: ae - ie + s * 2
      }
    }
  };
}, $9 = (e) => {
  const {
    componentCls: t,
    colorBgContainer: n,
    colorError: o,
    colorErrorOutline: r,
    colorWarning: i,
    colorWarningOutline: a
  } = e;
  return {
    [t]: {
      [`&-status-error${t}`]: {
        "&, &:not([disabled]):hover": {
          backgroundColor: n,
          borderColor: o
        },
        "&-focused, &:focus": O({}, Ds(Qt(e, {
          inputBorderActiveColor: o,
          inputBorderHoverColor: o,
          controlOutline: r
        }))),
        [`${t}-active-bar`]: {
          background: o
        }
      },
      [`&-status-warning${t}`]: {
        "&, &:not([disabled]):hover": {
          backgroundColor: n,
          borderColor: i
        },
        "&-focused, &:focus": O({}, Ds(Qt(e, {
          inputBorderActiveColor: i,
          inputBorderHoverColor: i,
          controlOutline: a
        }))),
        [`${t}-active-bar`]: {
          background: i
        }
      }
    }
  };
}, P9 = (e) => {
  const {
    componentCls: t,
    antCls: n,
    boxShadowPopoverArrow: o,
    controlHeight: r,
    fontSize: i,
    inputPaddingHorizontal: a,
    colorBgContainer: l,
    lineWidth: s,
    lineType: u,
    colorBorder: c,
    borderRadius: d,
    motionDurationMid: f,
    colorBgContainerDisabled: p,
    colorTextDisabled: v,
    colorTextPlaceholder: g,
    controlHeightLG: m,
    fontSizeLG: x,
    controlHeightSM: S,
    inputPaddingHorizontalSM: C,
    paddingXS: P,
    marginXS: $,
    colorTextDescription: I,
    lineWidthBold: w,
    lineHeight: T,
    colorPrimary: M,
    motionDurationSlow: R,
    zIndexPopup: N,
    paddingXXS: H,
    paddingSM: L,
    pickerTextHeight: F,
    controlItemBgActive: A,
    colorPrimaryBorder: G,
    sizePopupArrow: j,
    borderRadiusXS: Z,
    borderRadiusOuter: W,
    colorBgElevated: K,
    borderRadiusLG: q,
    boxShadowSecondary: U,
    borderRadiusSM: ae,
    colorSplit: se,
    controlItemBgHover: ie,
    presetsWidth: re,
    presetsMaxWidth: te
  } = e;
  return [
    {
      [t]: O(O(O({}, fn(e)), pv(e, r, i, 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": O({}, pc(e)),
        "&-focused": O({}, Ds(e)),
        [`&${t}-disabled`]: {
          background: p,
          borderColor: c,
          cursor: "not-allowed",
          [`${t}-suffix`]: {
            color: v
          }
        },
        [`&${t}-borderless`]: {
          backgroundColor: "transparent !important",
          borderColor: "transparent !important",
          boxShadow: "none !important"
        },
        // ======================== Input =========================
        [`${t}-input`]: {
          position: "relative",
          display: "inline-flex",
          alignItems: "center",
          width: "100%",
          "> input": O(O({}, hc(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: g
            }
          }
        },
        // Size
        "&-large": O(O({}, pv(e, m, x, a)), {
          [`${t}-input > input`]: {
            fontSize: x
          }
        }),
        "&-small": O({}, pv(e, S, i, C)),
        [`${t}-suffix`]: {
          display: "flex",
          flex: "none",
          alignSelf: "center",
          marginInlineStart: P / 2,
          color: v,
          lineHeight: 1,
          pointerEvents: "none",
          "> *": {
            verticalAlign: "top",
            "&:not(:last-child)": {
              marginInlineEnd: $
            }
          }
        },
        [`${t}-clear`]: {
          position: "absolute",
          top: "50%",
          insetInlineEnd: 0,
          color: v,
          lineHeight: 1,
          background: l,
          transform: "translateY(-50%)",
          cursor: "pointer",
          opacity: 0,
          transition: `opacity ${f}, color ${f}`,
          "> *": {
            verticalAlign: "top"
          },
          "&:hover": {
            color: I
          }
        },
        [`${t}-separator`]: {
          position: "relative",
          display: "inline-block",
          width: "1em",
          height: x,
          color: v,
          fontSize: x,
          verticalAlign: "top",
          cursor: "default",
          [`${t}-focused &`]: {
            color: I
          },
          [`${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: w,
            marginInlineStart: a,
            background: M,
            opacity: 0,
            transition: `all ${R} ease-out`,
            pointerEvents: "none"
          },
          [`&${t}-focused`]: {
            [`${t}-active-bar`]: {
              opacity: 1
            }
          },
          [`${t}-range-separator`]: {
            alignItems: "center",
            padding: `0 ${P}px`,
            lineHeight: 1
          },
          [`&${t}-small`]: {
            [`${t}-clear`]: {
              insetInlineEnd: C
            },
            [`${t}-active-bar`]: {
              marginInlineStart: C
            }
          }
        },
        // ======================= Dropdown =======================
        "&-dropdown": O(O(O({}, fn(e)), C9(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: N,
          [`&${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: Vh
          },
          [`&${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: Lh
          },
          [`&${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: jh
          },
          [`&${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: Hh
          },
          // Time picker with additional style
          [`${t}-panel > ${t}-time-panel`]: {
            paddingTop: H
          },
          // ======================== Ranges ========================
          [`${t}-ranges`]: {
            marginBottom: 0,
            padding: `${H}px ${L}px`,
            overflow: "hidden",
            lineHeight: `${F - 2 * s - P / 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: M,
              background: A,
              borderColor: G,
              cursor: "pointer"
            },
            [`${t}-ok`]: {
              marginInlineStart: "auto"
            }
          },
          [`${t}-range-wrapper`]: {
            display: "flex",
            position: "relative"
          },
          [`${t}-range-arrow`]: O({
            position: "absolute",
            zIndex: 1,
            display: "none",
            marginInlineStart: a * 1.5,
            transition: `left ${R} ease-out`
          }, Gy(j, Z, W, K, o)),
          [`${t}-panel-container`]: {
            overflow: "hidden",
            verticalAlign: "top",
            background: K,
            borderRadius: q,
            boxShadow: U,
            transition: `margin ${R}`,
            // ======================== Layout ========================
            [`${t}-panel-layout`]: {
              display: "flex",
              flexWrap: "nowrap",
              alignItems: "stretch"
            },
            // ======================== Preset ========================
            [`${t}-presets`]: {
              display: "flex",
              flexDirection: "column",
              minWidth: re,
              maxWidth: te,
              ul: {
                height: 0,
                flex: "auto",
                listStyle: "none",
                overflow: "auto",
                margin: 0,
                padding: P,
                borderInlineEnd: `${s}px ${u} ${se}`,
                li: O(O({}, Va), {
                  borderRadius: ae,
                  paddingInline: P,
                  paddingBlock: (S - Math.round(i * T)) / 2,
                  cursor: "pointer",
                  transition: `all ${R}`,
                  "+ li": {
                    marginTop: $
                  },
                  "&:hover": {
                    background: ie
                  }
                })
              }
            },
            // ======================== 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
    oa(e, "slide-up"),
    oa(e, "slide-down"),
    Xu(e, "move-up"),
    Xu(e, "move-down")
  ];
}, O9 = (e) => {
  const {
    componentCls: n,
    controlHeightLG: o,
    controlHeightSM: r,
    colorPrimary: i,
    paddingXXS: a
  } = e;
  return {
    pickerCellCls: `${n}-cell`,
    pickerCellInnerCls: `${n}-cell-inner`,
    pickerTextHeight: o,
    pickerPanelCellWidth: r * 1.5,
    pickerPanelCellHeight: r,
    pickerDateHoverRangeBorderColor: new In(i).lighten(20).toHexString(),
    pickerBasicCellHoverWithRangeColor: new In(i).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
  };
}, R_ = On("DatePicker", (e) => {
  const t = Qt(Qh(e), O9(e));
  return [
    P9(t),
    $9(t),
    // =====================================================
    // ==             Space Compact                       ==
    // =====================================================
    Bd(e, {
      focusElCls: `${e.componentCls}-focused`
    })
  ];
}, (e) => ({
  presetsWidth: 120,
  presetsMaxWidth: 200,
  zIndexPopup: e.zIndexPopupBase + 50
}));
function k9(e) {
  const t = $e(), n = $e(!1);
  function o() {
    for (var r = arguments.length, i = new Array(r), a = 0; a < r; a++)
      i[a] = arguments[a];
    n.value || (Vt.cancel(t.value), t.value = Vt(() => {
      e(...i);
    }));
  }
  return qt(() => {
    n.value = !0, Vt.cancel(t.value);
  }), o;
}
function I9(e) {
  const t = $e([]), n = $e(typeof e == "function" ? e() : e), o = k9(() => {
    let i = n.value;
    t.value.forEach((a) => {
      i = a(i);
    }), t.value = [], n.value = i;
  });
  function r(i) {
    t.value.push(i), o();
  }
  return [n, r];
}
const T9 = be({
  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 r = le();
    function i(s) {
      var u;
      !((u = e.tab) === null || u === void 0) && u.disabled || e.onClick(s);
    }
    n({
      domRef: r
    });
    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 = E(() => {
      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: v,
          closeIcon: g
        },
        renderWrapper: m,
        removeAriaLabel: x,
        editable: S,
        onFocus: C
      } = e, P = `${u}-tab`, $ = h("div", {
        key: f,
        ref: r,
        class: Me(P, {
          [`${P}-with-remove`]: l.value,
          [`${P}-active`]: d,
          [`${P}-disabled`]: v
        }),
        style: o.style,
        onClick: i
      }, [h("div", {
        role: "tab",
        "aria-selected": d,
        id: c && `${c}-tab-${f}`,
        class: `${P}-btn`,
        "aria-controls": c && `${c}-panel-${f}`,
        "aria-disabled": v,
        tabindex: v ? null : 0,
        onClick: (I) => {
          I.stopPropagation(), i(I);
        },
        onKeydown: (I) => {
          [it.SPACE, it.ENTER].includes(I.which) && (I.preventDefault(), i(I));
        },
        onFocus: C
      }, [typeof p == "function" ? p() : p]), l.value && h("button", {
        type: "button",
        "aria-label": x || "remove",
        tabindex: 0,
        class: `${P}-remove`,
        onClick: (I) => {
          I.stopPropagation(), a(I);
        }
      }, [g?.() || ((s = S.removeIcon) === null || s === void 0 ? void 0 : s.call(S)) || "×"])]);
      return m ? m($) : $;
    };
  }
}), ZS = {
  width: 0,
  height: 0,
  left: 0,
  top: 0
};
function _9(e, t) {
  const n = le(/* @__PURE__ */ new Map());
  return It(() => {
    var o, r;
    const i = /* @__PURE__ */ new Map(), a = e.value, l = t.value.get((o = a[0]) === null || o === void 0 ? void 0 : o.key) || ZS, 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((r = a[u - 1]) === null || r === void 0 ? void 0 : r.key) || ZS);
      const f = i.get(c) || O({}, d);
      f.right = s - f.left - f.width, i.set(c, f);
    }
    n.value = new Map(i);
  }), n;
}
const z_ = be({
  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 r = le();
    return n({
      domRef: r
    }), () => {
      const {
        prefixCls: i,
        editable: a,
        locale: l
      } = e;
      return !a || a.showAdd === !1 ? null : h("button", {
        ref: r,
        type: "button",
        class: `${i}-nav-add`,
        style: o.style,
        "aria-label": l?.addAriaLabel || "Add tab",
        onClick: (s) => {
          a.onEdit("add", {
            event: s
          });
        }
      }, [a.addIcon ? a.addIcon() : "+"]);
    };
  }
}), M9 = {
  prefixCls: {
    type: String
  },
  id: {
    type: String
  },
  tabs: {
    type: Object
  },
  rtl: {
    type: Boolean
  },
  tabBarGutter: {
    type: Number
  },
  activeKey: {
    type: [String, Number]
  },
  mobile: {
    type: Boolean
  },
  moreIcon: pe.any,
  moreTransitionName: {
    type: String
  },
  editable: {
    type: Object
  },
  locale: {
    type: Object,
    default: void 0
  },
  removeAriaLabel: String,
  onTabClick: {
    type: Function
  },
  popupClassName: String,
  getPopupContainer: et()
}, E9 = be({
  compatConfig: {
    MODE: 3
  },
  name: "OperationNode",
  inheritAttrs: !1,
  props: M9,
  emits: ["tabClick"],
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const [r, i] = Cn(!1), [a, l] = Cn(null), s = (p) => {
      const v = e.tabs.filter((x) => !x.disabled);
      let g = v.findIndex((x) => x.key === a.value) || 0;
      const m = v.length;
      for (let x = 0; x < m; x += 1) {
        g = (g + p + m) % m;
        const S = v[g];
        if (!S.disabled) {
          l(S.key);
          return;
        }
      }
    }, u = (p) => {
      const {
        which: v
      } = p;
      if (!r.value) {
        [it.DOWN, it.SPACE, it.ENTER].includes(v) && (i(!0), p.preventDefault());
        return;
      }
      switch (v) {
        case it.UP:
          s(-1), p.preventDefault();
          break;
        case it.DOWN:
          s(1), p.preventDefault();
          break;
        case it.ESC:
          i(!1);
          break;
        case it.SPACE:
        case it.ENTER:
          a.value !== null && e.onTabClick(a.value, p);
          break;
      }
    }, c = E(() => `${e.id}-more-popup`), d = E(() => a.value !== null ? `${c.value}-${a.value}` : null), f = (p, v) => {
      p.preventDefault(), p.stopPropagation(), e.editable.onEdit("remove", {
        key: v,
        event: p
      });
    };
    return At(() => {
      Ie(a, () => {
        const p = document.getElementById(d.value);
        p && p.scrollIntoView && p.scrollIntoView(!1);
      }, {
        flush: "post",
        immediate: !0
      });
    }), Ie(r, () => {
      r.value || l(null);
    }), YT({}), () => {
      var p;
      const {
        prefixCls: v,
        id: g,
        tabs: m,
        locale: x,
        mobile: S,
        moreIcon: C = ((p = o.moreIcon) === null || p === void 0 ? void 0 : p.call(o)) || h(Ld, null, null),
        moreTransitionName: P,
        editable: $,
        tabBarGutter: I,
        rtl: w,
        onTabClick: T,
        popupClassName: M
      } = e;
      if (!m.length) return null;
      const R = `${v}-dropdown`, N = x?.dropdownAriaLabel, H = {
        [w ? "marginRight" : "marginLeft"]: I
      };
      m.length || (H.visibility = "hidden", H.order = 1);
      const L = Me({
        [`${R}-rtl`]: w,
        [`${M}`]: !0
      }), F = S ? null : h(zT, {
        prefixCls: R,
        trigger: ["hover"],
        visible: r.value,
        transitionName: P,
        onVisibleChange: i,
        overlayClassName: L,
        mouseEnterDelay: 0.1,
        mouseLeaveDelay: 0.1,
        getPopupContainer: e.getPopupContainer
      }, {
        overlay: () => h(fo, {
          onClick: (A) => {
            let {
              key: G,
              domEvent: j
            } = A;
            T(G, j), i(!1);
          },
          id: c.value,
          tabindex: -1,
          role: "listbox",
          "aria-activedescendant": d.value,
          selectedKeys: [a.value],
          "aria-label": N !== void 0 ? N : "expanded dropdown"
        }, {
          default: () => [m.map((A) => {
            var G, j;
            const Z = $ && A.closable !== !1 && !A.disabled;
            return h(Qu, {
              key: A.key,
              id: `${c.value}-${A.key}`,
              role: "option",
              "aria-controls": g && `${g}-panel-${A.key}`,
              disabled: A.disabled
            }, {
              default: () => [h("span", null, [typeof A.tab == "function" ? A.tab() : A.tab]), Z && h("button", {
                type: "button",
                "aria-label": e.removeAriaLabel || "remove",
                tabindex: 0,
                class: `${R}-menu-item-remove`,
                onClick: (W) => {
                  W.stopPropagation(), f(W, A.key);
                }
              }, [((G = A.closeIcon) === null || G === void 0 ? void 0 : G.call(A)) || ((j = $.removeIcon) === null || j === void 0 ? void 0 : j.call($)) || "×"])]
            });
          })]
        }),
        default: () => h("button", {
          type: "button",
          class: `${v}-nav-more`,
          style: H,
          tabindex: -1,
          "aria-hidden": "true",
          "aria-haspopup": "listbox",
          "aria-controls": c.value,
          id: `${g}-more`,
          "aria-expanded": r.value,
          onKeydown: u
        }, [C])
      });
      return h("div", {
        class: Me(`${v}-nav-operations`, n.class),
        style: n.style
      }, [F, h(z_, {
        prefixCls: v,
        locale: x,
        editable: $
      }, null)]);
    };
  }
}), F_ = Symbol("tabsContextKey"), B_ = (e) => {
  Bt(F_, e);
}, L_ = () => zt(F_, {
  tabs: le([]),
  prefixCls: le()
});
be({
  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 B_(ys(e)), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
});
const D9 = 0.1, JS = 0.01, lp = 20, eC = Math.pow(0.995, lp);
function A9(e, t) {
  const [n, o] = Cn(), [r, i] = Cn(0), [a, l] = Cn(0), [s, u] = Cn(), c = le();
  function d($) {
    const {
      screenX: I,
      screenY: w
    } = $.touches[0];
    o({
      x: I,
      y: w
    }), clearInterval(c.value);
  }
  function f($) {
    if (!n.value) return;
    $.preventDefault();
    const {
      screenX: I,
      screenY: w
    } = $.touches[0], T = I - n.value.x, M = w - n.value.y;
    t(T, M), o({
      x: I,
      y: w
    });
    const R = Date.now();
    l(R - r.value), i(R), u({
      x: T,
      y: M
    });
  }
  function p() {
    if (!n.value) return;
    const $ = s.value;
    if (o(null), u(null), $) {
      const I = $.x / a.value, w = $.y / a.value, T = Math.abs(I), M = Math.abs(w);
      if (Math.max(T, M) < D9) return;
      let R = I, N = w;
      c.value = setInterval(() => {
        if (Math.abs(R) < JS && Math.abs(N) < JS) {
          clearInterval(c.value);
          return;
        }
        R *= eC, N *= eC, t(R * lp, N * lp);
      }, lp);
    }
  }
  const v = le();
  function g($) {
    const {
      deltaX: I,
      deltaY: w
    } = $;
    let T = 0;
    const M = Math.abs(I), R = Math.abs(w);
    M === R ? T = v.value === "x" ? I : w : M > R ? (T = I, v.value = "x") : (T = w, v.value = "y"), t(-T, -T) && $.preventDefault();
  }
  const m = le({
    onTouchStart: d,
    onTouchMove: f,
    onTouchEnd: p,
    onWheel: g
  });
  function x($) {
    m.value.onTouchStart($);
  }
  function S($) {
    m.value.onTouchMove($);
  }
  function C($) {
    m.value.onTouchEnd($);
  }
  function P($) {
    m.value.onWheel($);
  }
  At(() => {
    var $, I;
    document.addEventListener("touchmove", S, {
      passive: !1
    }), document.addEventListener("touchend", C, {
      passive: !1
    }), ($ = e.value) === null || $ === void 0 || $.addEventListener("touchstart", x, {
      passive: !1
    }), (I = e.value) === null || I === void 0 || I.addEventListener("wheel", P, {
      passive: !1
    });
  }), qt(() => {
    document.removeEventListener("touchmove", S), document.removeEventListener("touchend", C);
  });
}
function tC(e, t) {
  const n = le(e);
  function o(r) {
    const i = typeof r == "function" ? r(n.value) : r;
    i !== n.value && t(i, n.value), n.value = i;
  }
  return [n, o];
}
const N9 = () => {
  const e = le(/* @__PURE__ */ new Map()), t = (n) => (o) => {
    e.value.set(n, o);
  };
  return Jb(() => {
    e.value = /* @__PURE__ */ new Map();
  }), [t, e];
}, nC = {
  width: 0,
  height: 0,
  left: 0,
  top: 0,
  right: 0
}, R9 = () => ({
  id: {
    type: String
  },
  tabPosition: {
    type: String
  },
  activeKey: {
    type: [String, Number]
  },
  rtl: {
    type: Boolean
  },
  animated: Mt(),
  editable: Mt(),
  moreIcon: pe.any,
  moreTransitionName: {
    type: String
  },
  mobile: {
    type: Boolean
  },
  tabBarGutter: {
    type: Number
  },
  renderTabBar: {
    type: Function
  },
  locale: Mt(),
  popupClassName: String,
  getPopupContainer: et(),
  onTabClick: {
    type: Function
  },
  onTabScroll: {
    type: Function
  }
}), z9 = (e, t) => {
  const {
    offsetWidth: n,
    offsetHeight: o,
    offsetTop: r,
    offsetLeft: i
  } = 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, i, r];
}, oC = be({
  compatConfig: {
    MODE: 3
  },
  name: "TabNavList",
  inheritAttrs: !1,
  props: R9(),
  slots: Object,
  emits: ["tabClick", "tabScroll"],
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const {
      tabs: r,
      prefixCls: i
    } = L_(), a = $e(), l = $e(), s = $e(), u = $e(), [c, d] = N9(), f = E(() => e.tabPosition === "top" || e.tabPosition === "bottom"), [p, v] = tC(0, (De, Fe) => {
      f.value && e.onTabScroll && e.onTabScroll({
        direction: De > Fe ? "left" : "right"
      });
    }), [g, m] = tC(0, (De, Fe) => {
      !f.value && e.onTabScroll && e.onTabScroll({
        direction: De > Fe ? "top" : "bottom"
      });
    }), [x, S] = Cn(0), [C, P] = Cn(0), [$, I] = Cn(null), [w, T] = Cn(null), [M, R] = Cn(0), [N, H] = Cn(0), [L, F] = I9(/* @__PURE__ */ new Map()), A = _9(r, L), G = E(() => `${i.value}-nav-operations-hidden`), j = $e(0), Z = $e(0);
    It(() => {
      f.value ? e.rtl ? (j.value = 0, Z.value = Math.max(0, x.value - $.value)) : (j.value = Math.min(0, $.value - x.value), Z.value = 0) : (j.value = Math.min(0, w.value - C.value), Z.value = 0);
    });
    const W = (De) => De < j.value ? j.value : De > Z.value ? Z.value : De, K = $e(), [q, U] = Cn(), ae = () => {
      U(Date.now());
    }, se = () => {
      clearTimeout(K.value);
    }, ie = (De, Fe) => {
      De((Ve) => W(Ve + Fe));
    };
    A9(a, (De, Fe) => {
      if (f.value) {
        if ($.value >= x.value)
          return !1;
        ie(v, De);
      } else {
        if (w.value >= C.value)
          return !1;
        ie(m, Fe);
      }
      return se(), ae(), !0;
    }), Ie(q, () => {
      se(), q.value && (K.value = setTimeout(() => {
        U(0);
      }, 100));
    });
    const re = function() {
      let De = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : e.activeKey;
      const Fe = A.value.get(De) || {
        width: 0,
        height: 0,
        left: 0,
        right: 0,
        top: 0
      };
      if (f.value) {
        let Ve = p.value;
        e.rtl ? Fe.right < p.value ? Ve = Fe.right : Fe.right + Fe.width > p.value + $.value && (Ve = Fe.right + Fe.width - $.value) : Fe.left < -p.value ? Ve = -Fe.left : Fe.left + Fe.width > -p.value + $.value && (Ve = -(Fe.left + Fe.width - $.value)), m(0), v(W(Ve));
      } else {
        let Ve = g.value;
        Fe.top < -g.value ? Ve = -Fe.top : Fe.top + Fe.height > -g.value + w.value && (Ve = -(Fe.top + Fe.height - w.value)), v(0), m(W(Ve));
      }
    }, te = $e(0), ve = $e(0);
    It(() => {
      let De, Fe, Ve, ot, je, Pe;
      const Ge = A.value;
      ["top", "bottom"].includes(e.tabPosition) ? (De = "width", ot = $.value, je = x.value, Pe = M.value, Fe = e.rtl ? "right" : "left", Ve = Math.abs(p.value)) : (De = "height", ot = w.value, je = x.value, Pe = N.value, Fe = "top", Ve = -g.value);
      let Se = ot;
      je + Pe > ot && je < ot && (Se = ot - Pe);
      const Ce = r.value;
      if (!Ce.length)
        return [te.value, ve.value] = [0, 0];
      const Ae = Ce.length;
      let qe = Ae;
      for (let tt = 0; tt < Ae; tt += 1) {
        const Ee = Ge.get(Ce[tt].key) || nC;
        if (Ee[Fe] + Ee[De] > Ve + Se) {
          qe = tt - 1;
          break;
        }
      }
      let We = 0;
      for (let tt = Ae - 1; tt >= 0; tt -= 1)
        if ((Ge.get(Ce[tt].key) || nC)[Fe] < Ve) {
          We = tt + 1;
          break;
        }
      return [te.value, ve.value] = [We, qe];
    });
    const ce = () => {
      F(() => {
        var De;
        const Fe = /* @__PURE__ */ new Map(), Ve = (De = l.value) === null || De === void 0 ? void 0 : De.getBoundingClientRect();
        return r.value.forEach((ot) => {
          let {
            key: je
          } = ot;
          const Pe = d.value.get(je), Ge = Pe?.$el || Pe;
          if (Ge) {
            const [Se, Ce, Ae, qe] = z9(Ge, Ve);
            Fe.set(je, {
              width: Se,
              height: Ce,
              left: Ae,
              top: qe
            });
          }
        }), Fe;
      });
    };
    Ie(() => r.value.map((De) => De.key).join("%%"), () => {
      ce();
    }, {
      flush: "post"
    });
    const fe = () => {
      var De, Fe, Ve, ot, je;
      const Pe = ((De = a.value) === null || De === void 0 ? void 0 : De.offsetWidth) || 0, Ge = ((Fe = a.value) === null || Fe === void 0 ? void 0 : Fe.offsetHeight) || 0, Se = ((Ve = u.value) === null || Ve === void 0 ? void 0 : Ve.$el) || {}, Ce = Se.offsetWidth || 0, Ae = Se.offsetHeight || 0;
      I(Pe), T(Ge), R(Ce), H(Ae);
      const qe = (((ot = l.value) === null || ot === void 0 ? void 0 : ot.offsetWidth) || 0) - Ce, We = (((je = l.value) === null || je === void 0 ? void 0 : je.offsetHeight) || 0) - Ae;
      S(qe), P(We), ce();
    }, ge = E(() => [...r.value.slice(0, te.value), ...r.value.slice(ve.value + 1)]), [Te, ze] = Cn(), Ke = E(() => A.value.get(e.activeKey)), He = $e(), Ne = () => {
      Vt.cancel(He.value);
    };
    Ie([Ke, f, () => e.rtl], () => {
      const De = {};
      Ke.value && (f.value ? (e.rtl ? De.right = cs(Ke.value.right) : De.left = cs(Ke.value.left), De.width = cs(Ke.value.width)) : (De.top = cs(Ke.value.top), De.height = cs(Ke.value.height))), Ne(), He.value = Vt(() => {
        ze(De);
      });
    }), Ie([() => e.activeKey, Ke, A, f], () => {
      re();
    }, {
      flush: "post"
    }), Ie([() => e.rtl, () => e.tabBarGutter, () => e.activeKey, () => r.value], () => {
      fe();
    }, {
      flush: "post"
    });
    const Xe = (De) => {
      let {
        position: Fe,
        prefixCls: Ve,
        extra: ot
      } = De;
      if (!ot) return null;
      const je = ot?.({
        position: Fe
      });
      return je ? h("div", {
        class: `${Ve}-extra-content`
      }, [je]) : null;
    };
    return qt(() => {
      se(), Ne();
    }), () => {
      const {
        id: De,
        animated: Fe,
        activeKey: Ve,
        rtl: ot,
        editable: je,
        locale: Pe,
        tabPosition: Ge,
        tabBarGutter: Se,
        onTabClick: Ce
      } = e, {
        class: Ae,
        style: qe
      } = n, We = i.value, tt = !!ge.value.length, Ee = `${We}-nav-wrap`;
      let Re, Be, rt, pt;
      f.value ? ot ? (Be = p.value > 0, Re = p.value + $.value < x.value) : (Re = p.value < 0, Be = -p.value + $.value < x.value) : (rt = g.value < 0, pt = -g.value + w.value < C.value);
      const at = {};
      Ge === "top" || Ge === "bottom" ? at[ot ? "marginRight" : "marginLeft"] = typeof Se == "number" ? `${Se}px` : Se : at.marginTop = typeof Se == "number" ? `${Se}px` : Se;
      const ft = r.value.map((wt, Ct) => {
        const {
          key: St
        } = wt;
        return h(T9, {
          id: De,
          prefixCls: We,
          key: St,
          tab: wt,
          style: Ct === 0 ? void 0 : at,
          closable: wt.closable,
          editable: je,
          active: St === Ve,
          removeAriaLabel: Pe?.removeAriaLabel,
          ref: c(St),
          onClick: (yt) => {
            Ce(St, yt);
          },
          onFocus: () => {
            re(St), ae(), a.value && (ot || (a.value.scrollLeft = 0), a.value.scrollTop = 0);
          }
        }, o);
      });
      return h("div", {
        role: "tablist",
        class: Me(`${We}-nav`, Ae),
        style: qe,
        onKeydown: () => {
          ae();
        }
      }, [h(Xe, {
        position: "left",
        prefixCls: We,
        extra: o.leftExtra
      }, null), h(Al, {
        onResize: fe
      }, {
        default: () => [h("div", {
          class: Me(Ee, {
            [`${Ee}-ping-left`]: Re,
            [`${Ee}-ping-right`]: Be,
            [`${Ee}-ping-top`]: rt,
            [`${Ee}-ping-bottom`]: pt
          }),
          ref: a
        }, [h(Al, {
          onResize: fe
        }, {
          default: () => [h("div", {
            ref: l,
            class: `${We}-nav-list`,
            style: {
              transform: `translate(${p.value}px, ${g.value}px)`,
              transition: q.value ? "none" : void 0
            }
          }, [ft, h(z_, {
            ref: u,
            prefixCls: We,
            locale: Pe,
            editable: je,
            style: O(O({}, ft.length === 0 ? void 0 : at), {
              visibility: tt ? "hidden" : null
            })
          }, null), h("div", {
            class: Me(`${We}-ink-bar`, {
              [`${We}-ink-bar-animated`]: Fe.inkBar
            }),
            style: Te.value
          }, null)])]
        })])]
      }), h(E9, Q(Q({}, e), {}, {
        removeAriaLabel: Pe?.removeAriaLabel,
        ref: s,
        prefixCls: We,
        tabs: ge.value,
        class: !tt && G.value
      }), HP(o, ["moreIcon"])), h(Xe, {
        position: "right",
        prefixCls: We,
        extra: o.rightExtra
      }, null), h(Xe, {
        position: "right",
        prefixCls: We,
        extra: o.tabBarExtraContent
      }, null)]);
    };
  }
}), F9 = be({
  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
    } = L_();
    return () => {
      const {
        id: o,
        activeKey: r,
        animated: i,
        tabPosition: a,
        rtl: l,
        destroyInactiveTabPane: s
      } = e, u = i.tabPane, c = n.value, d = t.value.findIndex((f) => f.key === r);
      return h("div", {
        class: `${c}-content-holder`
      }, [h("div", {
        class: [`${c}-content`, `${c}-content-${a}`, {
          [`${c}-content-animated`]: u
        }],
        style: d && u ? {
          [l ? "marginRight" : "marginLeft"]: `-${d}00%`
        } : null
      }, [t.value.map((f) => Xn(f.node, {
        key: f.key,
        prefixCls: c,
        tabKey: f.key,
        id: o,
        animated: u,
        active: f.key === r,
        destroyInactiveTabPane: s
      }))])]);
    };
  }
});
var B9 = { 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 rC(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      L9(e, r, n[r]);
    });
  }
  return e;
}
function L9(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var ex = function(t, n) {
  var o = rC({}, t, n.attrs);
  return h(an, rC({}, o, {
    icon: B9
  }), null);
};
ex.displayName = "PlusOutlined";
ex.inheritAttrs = !1;
const H9 = (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
    [oa(e, "slide-up"), oa(e, "slide-down")]
  ];
}, V9 = (e) => {
  const {
    componentCls: t,
    tabsCardHorizontalPadding: n,
    tabsCardHeadBackground: o,
    tabsCardGutter: r,
    colorSplit: i
  } = e;
  return {
    [`${t}-card`]: {
      [`> ${t}-nav, > div > ${t}-nav`]: {
        [`${t}-tab`]: {
          margin: 0,
          padding: n,
          background: o,
          border: `${e.lineWidth}px ${e.lineType} ${i}`,
          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: `${r}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: `${r}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
            }
          }
        }
      }
    }
  };
}, j9 = (e) => {
  const {
    componentCls: t,
    tabsHoverColor: n,
    dropdownEdgeChildVerticalPadding: o
  } = e;
  return {
    [`${t}-dropdown`]: O(O({}, fn(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": O(O({}, Va), {
          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"
            }
          }
        })
      }
    })
  };
}, W9 = (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
          }
        }
      }
    }
  };
}, K9 = (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`
          }
        }
      }
    }
  };
}, q9 = (e) => {
  const {
    componentCls: t,
    tabsActiveColor: n,
    tabsHoverColor: o,
    iconCls: r,
    tabsHorizontalGutter: i
  } = 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": O({
        "&:focus:not(:focus-visible), &:active": {
          color: n
        }
      }, Nl(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 ${r}`]: {
        margin: 0
      },
      [r]: {
        marginRight: {
          _skip_check_: !0,
          value: e.marginSM
        }
      }
    },
    [`${a} + ${a}`]: {
      margin: {
        _skip_check_: !0,
        value: `0 0 0 ${i}px`
      }
    }
  };
}, Y9 = (e) => {
  const {
    componentCls: t,
    tabsHorizontalGutter: n,
    iconCls: o,
    tabsCardGutter: r
  } = 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: `${r}px`
            },
            marginLeft: {
              _skip_check_: !0,
              value: 0
            }
          }
        }
      }
    },
    [`${t}-dropdown-rtl`]: {
      direction: "rtl"
    },
    [`${t}-menu-item`]: {
      [`${t}-dropdown-rtl`]: {
        textAlign: {
          _skip_check_: !0,
          value: "right"
        }
      }
    }
  };
}, G9 = (e) => {
  const {
    componentCls: t,
    tabsCardHorizontalPadding: n,
    tabsCardHeight: o,
    tabsCardGutter: r,
    tabsHoverColor: i,
    tabsActiveColor: a,
    colorSplit: l
  } = e;
  return {
    [t]: O(O(O(O({}, fn(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`]: O({
          minWidth: `${o}px`,
          marginLeft: {
            _skip_check_: !0,
            value: `${r}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: i
          },
          "&:active, &:focus:not(:focus-visible)": {
            color: a
          }
        }, Nl(e))
      },
      [`${t}-extra-content`]: {
        flex: "none"
      },
      // ============================ InkBar ============================
      [`${t}-ink-bar`]: {
        position: "absolute",
        background: e.colorPrimary,
        pointerEvents: "none"
      }
    }), q9(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"
          }
        }
      }
    }
  };
}, U9 = On("Tabs", (e) => {
  const t = e.controlHeightLG, n = Qt(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 [K9(n), Y9(n), W9(n), j9(n), V9(n), G9(n), H9(n)];
}, (e) => ({
  zIndexPopup: e.zIndexPopupBase + 50
}));
let iC = 0;
const H_ = () => ({
  prefixCls: {
    type: String
  },
  id: {
    type: String
  },
  popupClassName: String,
  getPopupContainer: et(),
  activeKey: {
    type: [String, Number]
  },
  defaultActiveKey: {
    type: [String, Number]
  },
  direction: rn(),
  animated: en([Boolean, Object]),
  renderTabBar: et(),
  tabBarGutter: {
    type: Number
  },
  tabBarStyle: Mt(),
  tabPosition: rn(),
  destroyInactiveTabPane: ct(),
  hideAdd: Boolean,
  type: rn(),
  size: rn(),
  centered: Boolean,
  onEdit: et(),
  onChange: et(),
  onTabClick: et(),
  onTabScroll: et(),
  "onUpdate:activeKey": et(),
  // Accessibility
  locale: Mt(),
  onPrevClick: et(),
  onNextClick: et(),
  tabBarExtraContent: pe.any
});
function X9(e) {
  return e.map((t) => {
    if (Ao(t)) {
      const n = O({}, t.props || {});
      for (const [f, p] of Object.entries(n))
        delete n[f], n[Md(f)] = p;
      const o = t.children || {}, r = t.key !== void 0 ? t.key : void 0, {
        tab: i = o.tab,
        disabled: a,
        forceRender: l,
        closable: s,
        animated: u,
        active: c,
        destroyInactiveTabPane: d
      } = n;
      return O(O({
        key: r
      }, n), {
        node: t,
        closeIcon: o.closeIcon,
        tab: i,
        disabled: a === "" || a,
        forceRender: l === "" || l,
        closable: s === "" || s,
        animated: u === "" || u,
        active: c === "" || c,
        destroyInactiveTabPane: d === "" || d
      });
    }
    return null;
  }).filter((t) => t);
}
const Q9 = be({
  compatConfig: {
    MODE: 3
  },
  name: "InternalTabs",
  inheritAttrs: !1,
  props: O(O({}, Mn(H_(), {
    tabPosition: "top",
    animated: {
      inkBar: !0,
      tabPane: !1
    }
  })), {
    tabs: jn()
  }),
  slots: Object,
  // emits: ['tabClick', 'tabScroll', 'change', 'update:activeKey'],
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    dn(e.onPrevClick === void 0 && e.onNextClick === void 0, "Tabs", "`onPrevClick / @prevClick` and `onNextClick / @nextClick` has been removed. Please use `onTabScroll / @tabScroll` instead."), dn(e.tabBarExtraContent === void 0, "Tabs", "`tabBarExtraContent` prop has been removed. Please use `rightExtra` slot instead."), dn(o.tabBarExtraContent === void 0, "Tabs", "`tabBarExtraContent` slot is deprecated. Please use `rightExtra` slot instead.");
    const {
      prefixCls: r,
      direction: i,
      size: a,
      rootPrefixCls: l,
      getPopupContainer: s
    } = Nt("tabs", e), [u, c] = U9(r), d = E(() => i.value === "rtl"), f = E(() => {
      const {
        animated: w,
        tabPosition: T
      } = e;
      return w === !1 || ["left", "right"].includes(T) ? {
        inkBar: !1,
        tabPane: !1
      } : w === !0 ? {
        inkBar: !0,
        tabPane: !0
      } : O({
        inkBar: !0,
        tabPane: !1
      }, typeof w == "object" ? w : {});
    }), [p, v] = Cn(!1);
    At(() => {
      v(f0());
    });
    const [g, m] = sr(() => {
      var w;
      return (w = e.tabs[0]) === null || w === void 0 ? void 0 : w.key;
    }, {
      value: E(() => e.activeKey),
      defaultValue: e.defaultActiveKey
    }), [x, S] = Cn(() => e.tabs.findIndex((w) => w.key === g.value));
    It(() => {
      var w;
      let T = e.tabs.findIndex((M) => M.key === g.value);
      T === -1 && (T = Math.max(0, Math.min(x.value, e.tabs.length - 1)), m((w = e.tabs[T]) === null || w === void 0 ? void 0 : w.key)), S(T);
    });
    const [C, P] = sr(null, {
      value: E(() => e.id)
    }), $ = E(() => p.value && !["left", "right"].includes(e.tabPosition) ? "top" : e.tabPosition);
    At(() => {
      e.id || (P(`rc-tabs-${process.env.NODE_ENV === "test" ? "test" : iC}`), iC += 1);
    });
    const I = (w, T) => {
      var M, R;
      (M = e.onTabClick) === null || M === void 0 || M.call(e, w, T);
      const N = w !== g.value;
      m(w), N && ((R = e.onChange) === null || R === void 0 || R.call(e, w));
    };
    return B_({
      tabs: E(() => e.tabs),
      prefixCls: r
    }), () => {
      const {
        id: w,
        type: T,
        tabBarGutter: M,
        tabBarStyle: R,
        locale: N,
        destroyInactiveTabPane: H,
        renderTabBar: L = o.renderTabBar,
        onTabScroll: F,
        hideAdd: A,
        centered: G
      } = e, j = {
        id: C.value,
        activeKey: g.value,
        animated: f.value,
        tabPosition: $.value,
        rtl: d.value,
        mobile: p.value
      };
      let Z;
      T === "editable-card" && (Z = {
        onEdit: (U, ae) => {
          let {
            key: se,
            event: ie
          } = ae;
          var re;
          (re = e.onEdit) === null || re === void 0 || re.call(e, U === "add" ? ie : se, U);
        },
        removeIcon: () => h(la, null, null),
        addIcon: o.addIcon ? o.addIcon : () => h(ex, null, null),
        showAdd: A !== !0
      });
      let W;
      const K = O(O({}, j), {
        moreTransitionName: `${l.value}-slide-up`,
        editable: Z,
        locale: N,
        tabBarGutter: M,
        onTabClick: I,
        onTabScroll: F,
        style: R,
        getPopupContainer: s.value,
        popupClassName: Me(e.popupClassName, c.value)
      });
      L ? W = L(O(O({}, K), {
        DefaultTabBar: oC
      })) : W = h(oC, K, HP(o, ["moreIcon", "leftExtra", "rightExtra", "tabBarExtraContent"]));
      const q = r.value;
      return u(h("div", Q(Q({}, n), {}, {
        id: w,
        class: Me(q, `${q}-${$.value}`, {
          [c.value]: !0,
          [`${q}-${a.value}`]: a.value,
          [`${q}-card`]: ["card", "editable-card"].includes(T),
          [`${q}-editable-card`]: T === "editable-card",
          [`${q}-centered`]: G,
          [`${q}-mobile`]: p.value,
          [`${q}-editable`]: T === "editable-card",
          [`${q}-rtl`]: d.value
        }, n.class)
      }), [W, h(F9, Q(Q({
        destroyInactiveTabPane: H
      }, j), {}, {
        animated: f.value
      }), null)]));
    };
  }
}), Mu = be({
  compatConfig: {
    MODE: 3
  },
  name: "ATabs",
  inheritAttrs: !1,
  props: Mn(H_(), {
    tabPosition: "top",
    animated: {
      inkBar: !0,
      tabPane: !1
    }
  }),
  slots: Object,
  // emits: ['tabClick', 'tabScroll', 'change', 'update:activeKey'],
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      emit: r
    } = t;
    const i = (a) => {
      r("update:activeKey", a), r("change", a);
    };
    return () => {
      var a;
      const l = X9(go((a = o.default) === null || a === void 0 ? void 0 : a.call(o)));
      return h(Q9, Q(Q(Q({}, Fn(e, ["onUpdate:activeKey"])), n), {}, {
        onChange: i,
        tabs: l
      }), o);
    };
  }
}), Z9 = () => ({
  tab: pe.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,
}), ub = be({
  compatConfig: {
    MODE: 3
  },
  name: "ATabPane",
  inheritAttrs: !1,
  __ANT_TAB_PANE: !0,
  props: Z9(),
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const r = le(e.forceRender);
    Ie([() => e.active, () => e.destroyInactiveTabPane], () => {
      e.active ? r.value = !0 : e.destroyInactiveTabPane && (r.value = !1);
    }, {
      immediate: !0
    });
    const i = E(() => 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 h("div", {
        id: u && `${u}-panel-${d}`,
        role: "tabpanel",
        tabindex: c ? 0 : -1,
        "aria-labelledby": u && `${u}-tab-${d}`,
        "aria-hidden": !c,
        style: [i.value, n.style],
        class: [`${l}-tabpane`, c && `${l}-tabpane-active`, n.class]
      }, [(c || r.value || s) && ((a = o.default) === null || a === void 0 ? void 0 : a.call(o))]);
    };
  }
});
Mu.TabPane = ub;
Mu.install = function(e) {
  return e.component(Mu.name, Mu), e.component(ub.name, ub), e;
};
const J9 = (e) => {
  const {
    antCls: t,
    componentCls: n,
    cardHeadHeight: o,
    cardPaddingBase: r,
    cardHeadTabsMarginBottom: i
  } = e;
  return O(O({
    display: "flex",
    justifyContent: "center",
    flexDirection: "column",
    minHeight: o,
    marginBottom: -1,
    padding: `0 ${r}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`
  }, ja()), {
    "&-wrapper": {
      width: "100%",
      display: "flex",
      alignItems: "center"
    },
    "&-title": O(O({
      display: "inline-block",
      flex: 1
    }, Va), {
      [`
          > ${n}-typography,
          > ${n}-typography-edit-content
        `]: {
        insetInlineStart: 0,
        marginTop: 0,
        marginBottom: 0
      }
    }),
    [`${t}-tabs-top`]: {
      clear: "both",
      marginBottom: i,
      color: e.colorText,
      fontWeight: "normal",
      fontSize: e.fontSize,
      "&-bar": {
        borderBottom: `${e.lineWidth}px ${e.lineType} ${e.colorBorderSecondary}`
      }
    }
  });
}, eK = (e) => {
  const {
    cardPaddingBase: t,
    colorBorderSecondary: n,
    cardShadow: o,
    lineWidth: r
  } = e;
  return {
    width: "33.33%",
    padding: t,
    border: 0,
    borderRadius: 0,
    boxShadow: `
      ${r}px 0 0 0 ${n},
      0 ${r}px 0 0 ${n},
      ${r}px ${r}px 0 0 ${n},
      ${r}px 0 0 0 ${n} inset,
      0 ${r}px 0 0 ${n} inset;
    `,
    transition: `all ${e.motionDurationMid}`,
    "&-hoverable:hover": {
      position: "relative",
      zIndex: 1,
      boxShadow: o
    }
  };
}, tK = (e) => {
  const {
    componentCls: t,
    iconCls: n,
    cardActionsLiMargin: o,
    cardActionsIconSize: r,
    colorBorderSecondary: i
  } = e;
  return O(O({
    margin: 0,
    padding: 0,
    listStyle: "none",
    background: e.colorBgContainer,
    borderTop: `${e.lineWidth}px ${e.lineType} ${i}`,
    display: "flex",
    borderRadius: `0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px `
  }, ja()), {
    "& > 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: r,
          lineHeight: `${r * e.lineHeight}px`
        }
      },
      "&:not(:last-child)": {
        borderInlineEnd: `${e.lineWidth}px ${e.lineType} ${i}`
      }
    }
  });
}, nK = (e) => O(O({
  margin: `-${e.marginXXS}px 0`,
  display: "flex"
}, ja()), {
  "&-avatar": {
    paddingInlineEnd: e.padding
  },
  "&-detail": {
    overflow: "hidden",
    flex: 1,
    "> div:not(:last-child)": {
      marginBottom: e.marginXS
    }
  },
  "&-title": O({
    color: e.colorTextHeading,
    fontWeight: e.fontWeightStrong,
    fontSize: e.fontSizeLG
  }, Va),
  "&-description": {
    color: e.colorTextDescription
  }
}), oK = (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`
    }
  };
}, rK = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    overflow: "hidden",
    [`${t}-body`]: {
      userSelect: "none"
    }
  };
}, iK = (e) => {
  const {
    componentCls: t,
    cardShadow: n,
    cardHeadPadding: o,
    colorBorderSecondary: r,
    boxShadow: i,
    cardPaddingBase: a
  } = e;
  return {
    [t]: O(O({}, fn(e)), {
      position: "relative",
      background: e.colorBgContainer,
      borderRadius: e.borderRadiusLG,
      [`&:not(${t}-bordered)`]: {
        boxShadow: i
      },
      [`${t}-head`]: J9(e),
      [`${t}-extra`]: {
        // https://stackoverflow.com/a/22429853/3040605
        marginInlineStart: "auto",
        color: "",
        fontWeight: "normal",
        fontSize: e.fontSize
      },
      [`${t}-body`]: O({
        padding: a,
        borderRadius: ` 0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`
      }, ja()),
      [`${t}-grid`]: eK(e),
      [`${t}-cover`]: {
        "> *": {
          display: "block",
          width: "100%"
        },
        img: {
          borderRadius: `${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`
        }
      },
      [`${t}-actions`]: tK(e),
      [`${t}-meta`]: nK(e)
    }),
    [`${t}-bordered`]: {
      border: `${e.lineWidth}px ${e.lineType} ${r}`,
      [`${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`]: oK(e),
    [`${t}-loading`]: rK(e),
    [`${t}-rtl`]: {
      direction: "rtl"
    }
  };
}, aK = (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"
        }
      }
    }
  };
}, lK = On("Card", (e) => {
  const t = Qt(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
    iK(t),
    // Size
    aK(t)
  ];
}), sK = () => ({
  prefixCls: String,
  width: {
    type: [Number, String]
  }
}), tx = be({
  compatConfig: {
    MODE: 3
  },
  name: "SkeletonTitle",
  props: sK(),
  setup(e) {
    return () => {
      const {
        prefixCls: t,
        width: n
      } = e, o = typeof n == "number" ? `${n}px` : n;
      return h("h3", {
        class: t,
        style: {
          width: o
        }
      }, null);
    };
  }
}), uK = () => ({
  prefixCls: String,
  width: {
    type: [Number, String, Array]
  },
  rows: Number
}), cK = be({
  compatConfig: {
    MODE: 3
  },
  name: "SkeletonParagraph",
  props: uK(),
  setup(e) {
    const t = (n) => {
      const {
        width: o,
        rows: r = 2
      } = e;
      if (Array.isArray(o))
        return o[n];
      if (r - 1 === n)
        return o;
    };
    return () => {
      const {
        prefixCls: n,
        rows: o
      } = e, r = [...Array(o)].map((i, a) => {
        const l = t(a);
        return h("li", {
          key: a,
          style: {
            width: typeof l == "number" ? `${l}px` : l
          }
        }, null);
      });
      return h("ul", {
        class: n
      }, [r]);
    };
  }
}), Zh = () => ({
  prefixCls: String,
  size: [String, Number],
  shape: String,
  active: {
    type: Boolean,
    default: void 0
  }
}), jd = (e) => {
  const {
    prefixCls: t,
    size: n,
    shape: o
  } = e, r = Me({
    [`${t}-lg`]: n === "large",
    [`${t}-sm`]: n === "small"
  }), i = Me({
    [`${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 h("span", {
    class: Me(t, r, i),
    style: a
  }, null);
};
jd.displayName = "SkeletonElement";
const dK = new tn("ant-skeleton-loading", {
  "0%": {
    transform: "translateX(-37.5%)"
  },
  "100%": {
    transform: "translateX(37.5%)"
  }
}), Jh = (e) => ({
  height: e,
  lineHeight: `${e}px`
}), Eu = (e) => O({
  width: e
}, Jh(e)), fK = (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: dK,
    animationDuration: e.skeletonLoadingMotionDuration,
    animationTimingFunction: "ease",
    animationIterationCount: "infinite",
    content: '""'
  }
}), hv = (e) => O({
  width: e * 5,
  minWidth: e * 5
}, Jh(e)), pK = (e) => {
  const {
    skeletonAvatarCls: t,
    color: n,
    controlHeight: o,
    controlHeightLG: r,
    controlHeightSM: i
  } = e;
  return {
    [`${t}`]: O({
      display: "inline-block",
      verticalAlign: "top",
      background: n
    }, Eu(o)),
    [`${t}${t}-circle`]: {
      borderRadius: "50%"
    },
    [`${t}${t}-lg`]: O({}, Eu(r)),
    [`${t}${t}-sm`]: O({}, Eu(i))
  };
}, hK = (e) => {
  const {
    controlHeight: t,
    borderRadiusSM: n,
    skeletonInputCls: o,
    controlHeightLG: r,
    controlHeightSM: i,
    color: a
  } = e;
  return {
    [`${o}`]: O({
      display: "inline-block",
      verticalAlign: "top",
      background: a,
      borderRadius: n
    }, hv(t)),
    [`${o}-lg`]: O({}, hv(r)),
    [`${o}-sm`]: O({}, hv(i))
  };
}, aC = (e) => O({
  width: e
}, Jh(e)), gK = (e) => {
  const {
    skeletonImageCls: t,
    imageSizeBase: n,
    color: o,
    borderRadiusSM: r
  } = e;
  return {
    [`${t}`]: O(O({
      display: "flex",
      alignItems: "center",
      justifyContent: "center",
      verticalAlign: "top",
      background: o,
      borderRadius: r
    }, aC(n * 2)), {
      [`${t}-path`]: {
        fill: "#bfbfbf"
      },
      [`${t}-svg`]: O(O({}, aC(n)), {
        maxWidth: n * 4,
        maxHeight: n * 4
      }),
      [`${t}-svg${t}-svg-circle`]: {
        borderRadius: "50%"
      }
    }),
    [`${t}${t}-circle`]: {
      borderRadius: "50%"
    }
  };
}, gv = (e, t, n) => {
  const {
    skeletonButtonCls: o
  } = e;
  return {
    [`${n}${o}-circle`]: {
      width: t,
      minWidth: t,
      borderRadius: "50%"
    },
    [`${n}${o}-round`]: {
      borderRadius: t
    }
  };
}, vv = (e) => O({
  width: e * 2,
  minWidth: e * 2
}, Jh(e)), vK = (e) => {
  const {
    borderRadiusSM: t,
    skeletonButtonCls: n,
    controlHeight: o,
    controlHeightLG: r,
    controlHeightSM: i,
    color: a
  } = e;
  return O(O(O(O(O({
    [`${n}`]: O({
      display: "inline-block",
      verticalAlign: "top",
      background: a,
      borderRadius: t,
      width: o * 2,
      minWidth: o * 2
    }, vv(o))
  }, gv(e, o, n)), {
    [`${n}-lg`]: O({}, vv(r))
  }), gv(e, r, `${n}-lg`)), {
    [`${n}-sm`]: O({}, vv(i))
  }), gv(e, i, `${n}-sm`));
}, mK = (e) => {
  const {
    componentCls: t,
    skeletonAvatarCls: n,
    skeletonTitleCls: o,
    skeletonParagraphCls: r,
    skeletonButtonCls: i,
    skeletonInputCls: a,
    skeletonImageCls: l,
    controlHeight: s,
    controlHeightLG: u,
    controlHeightSM: c,
    color: d,
    padding: f,
    marginSM: p,
    borderRadius: v,
    skeletonTitleHeight: g,
    skeletonBlockRadius: m,
    skeletonParagraphLineHeight: x,
    controlHeightXS: S,
    skeletonParagraphMarginTop: C
  } = e;
  return {
    [`${t}`]: {
      display: "table",
      width: "100%",
      [`${t}-header`]: {
        display: "table-cell",
        paddingInlineEnd: f,
        verticalAlign: "top",
        // Avatar
        [`${n}`]: O({
          display: "inline-block",
          verticalAlign: "top",
          background: d
        }, Eu(s)),
        [`${n}-circle`]: {
          borderRadius: "50%"
        },
        [`${n}-lg`]: O({}, Eu(u)),
        [`${n}-sm`]: O({}, Eu(c))
      },
      [`${t}-content`]: {
        display: "table-cell",
        width: "100%",
        verticalAlign: "top",
        // Title
        [`${o}`]: {
          width: "100%",
          height: g,
          background: d,
          borderRadius: m,
          [`+ ${r}`]: {
            marginBlockStart: c
          }
        },
        // paragraph
        [`${r}`]: {
          padding: 0,
          "> li": {
            width: "100%",
            height: x,
            listStyle: "none",
            background: d,
            borderRadius: m,
            "+ li": {
              marginBlockStart: S
            }
          }
        },
        [`${r}> li:last-child:not(:first-child):not(:nth-child(2))`]: {
          width: "61%"
        }
      },
      [`&-round ${t}-content`]: {
        [`${o}, ${r} > li`]: {
          borderRadius: v
        }
      }
    },
    [`${t}-with-avatar ${t}-content`]: {
      // Title
      [`${o}`]: {
        marginBlockStart: p,
        [`+ ${r}`]: {
          marginBlockStart: C
        }
      }
    },
    // Skeleton element
    [`${t}${t}-element`]: O(O(O(O({
      display: "inline-block",
      width: "auto"
    }, vK(e)), pK(e)), hK(e)), gK(e)),
    // Skeleton Block Button, Input
    [`${t}${t}-block`]: {
      width: "100%",
      [`${i}`]: {
        width: "100%"
      },
      [`${a}`]: {
        width: "100%"
      }
    },
    // With active animation
    [`${t}${t}-active`]: {
      [`
        ${o},
        ${r} > li,
        ${n},
        ${i},
        ${a},
        ${l}
      `]: O({}, fK(e))
    }
  };
}, Wd = On("Skeleton", (e) => {
  const {
    componentCls: t
  } = e, n = Qt(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 [mK(n)];
}, (e) => {
  const {
    colorFillContent: t,
    colorFill: n
  } = e;
  return {
    color: t,
    colorGradientEnd: n
  };
}), bK = () => ({
  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 mv(e) {
  return e && typeof e == "object" ? e : {};
}
function yK(e, t) {
  return e && !t ? {
    size: "large",
    shape: "square"
  } : {
    size: "large",
    shape: "circle"
  };
}
function xK(e, t) {
  return !e && t ? {
    width: "38%"
  } : e && t ? {
    width: "50%"
  } : {};
}
function wK(e, t) {
  const n = {};
  return (!e || !t) && (n.width = "61%"), !e && t ? n.rows = 3 : n.rows = 2, n;
}
const br = be({
  compatConfig: {
    MODE: 3
  },
  name: "ASkeleton",
  props: Mn(bK(), {
    avatar: !1,
    title: !0,
    paragraph: !0
  }),
  setup(e, t) {
    let {
      slots: n
    } = t;
    const {
      prefixCls: o,
      direction: r
    } = Nt("skeleton", e), [i, a] = Wd(o);
    return () => {
      var l;
      const {
        loading: s,
        avatar: u,
        title: c,
        paragraph: d,
        active: f,
        round: p
      } = e, v = o.value;
      if (s || e.loading === void 0) {
        const g = !!u || u === "", m = !!c || c === "", x = !!d || d === "";
        let S;
        if (g) {
          const $ = O(O({
            prefixCls: `${v}-avatar`
          }, yK(m, x)), mv(u));
          S = h("div", {
            class: `${v}-header`
          }, [h(jd, $, null)]);
        }
        let C;
        if (m || x) {
          let $;
          if (m) {
            const w = O(O({
              prefixCls: `${v}-title`
            }, xK(g, x)), mv(c));
            $ = h(tx, w, null);
          }
          let I;
          if (x) {
            const w = O(O({
              prefixCls: `${v}-paragraph`
            }, wK(g, m)), mv(d));
            I = h(cK, w, null);
          }
          C = h("div", {
            class: `${v}-content`
          }, [$, I]);
        }
        const P = Me(v, {
          [`${v}-with-avatar`]: g,
          [`${v}-active`]: f,
          [`${v}-rtl`]: r.value === "rtl",
          [`${v}-round`]: p,
          [a.value]: !0
        });
        return i(h("div", {
          class: P
        }, [S, C]));
      }
      return (l = n.default) === null || l === void 0 ? void 0 : l.call(n);
    };
  }
}), SK = () => O(O({}, Zh()), {
  size: String,
  block: Boolean
}), V_ = be({
  compatConfig: {
    MODE: 3
  },
  name: "ASkeletonButton",
  props: Mn(SK(), {
    size: "default"
  }),
  setup(e) {
    const {
      prefixCls: t
    } = Nt("skeleton", e), [n, o] = Wd(t), r = E(() => Me(t.value, `${t.value}-element`, {
      [`${t.value}-active`]: e.active,
      [`${t.value}-block`]: e.block
    }, o.value));
    return () => n(h("div", {
      class: r.value
    }, [h(jd, Q(Q({}, e), {}, {
      prefixCls: `${t.value}-button`
    }), null)]));
  }
}), j_ = be({
  compatConfig: {
    MODE: 3
  },
  name: "ASkeletonInput",
  props: O(O({}, Fn(Zh(), ["shape"])), {
    size: String,
    block: Boolean
  }),
  setup(e) {
    const {
      prefixCls: t
    } = Nt("skeleton", e), [n, o] = Wd(t), r = E(() => Me(t.value, `${t.value}-element`, {
      [`${t.value}-active`]: e.active,
      [`${t.value}-block`]: e.block
    }, o.value));
    return () => n(h("div", {
      class: r.value
    }, [h(jd, Q(Q({}, e), {}, {
      prefixCls: `${t.value}-input`
    }), null)]));
  }
}), CK = "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", W_ = be({
  compatConfig: {
    MODE: 3
  },
  name: "ASkeletonImage",
  props: Fn(Zh(), ["size", "shape", "active"]),
  setup(e) {
    const {
      prefixCls: t
    } = Nt("skeleton", e), [n, o] = Wd(t), r = E(() => Me(t.value, `${t.value}-element`, o.value));
    return () => n(h("div", {
      class: r.value
    }, [h("div", {
      class: `${t.value}-image`
    }, [h("svg", {
      viewBox: "0 0 1098 1024",
      xmlns: "http://www.w3.org/2000/svg",
      class: `${t.value}-image-svg`
    }, [h("path", {
      d: CK,
      class: `${t.value}-image-path`
    }, null)])])]));
  }
}), $K = () => O(O({}, Zh()), {
  shape: String
}), K_ = be({
  compatConfig: {
    MODE: 3
  },
  name: "ASkeletonAvatar",
  props: Mn($K(), {
    size: "default",
    shape: "circle"
  }),
  setup(e) {
    const {
      prefixCls: t
    } = Nt("skeleton", e), [n, o] = Wd(t), r = E(() => Me(t.value, `${t.value}-element`, {
      [`${t.value}-active`]: e.active
    }, o.value));
    return () => n(h("div", {
      class: r.value
    }, [h(jd, Q(Q({}, e), {}, {
      prefixCls: `${t.value}-avatar`
    }), null)]));
  }
});
br.Button = V_;
br.Avatar = K_;
br.Input = j_;
br.Image = W_;
br.Title = tx;
br.install = function(e) {
  return e.component(br.name, br), e.component(br.Button.name, V_), e.component(br.Avatar.name, K_), e.component(br.Input.name, j_), e.component(br.Image.name, W_), e.component(br.Title.name, tx), e;
};
const {
  TabPane: PK
} = Mu, OK = () => ({
  prefixCls: String,
  title: pe.any,
  extra: pe.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: pe.any,
  tabList: {
    type: Array
  },
  tabBarExtraContent: pe.any,
  activeTabKey: String,
  defaultActiveTabKey: String,
  cover: pe.any,
  onTabChange: {
    type: Function
  }
}), Du = be({
  compatConfig: {
    MODE: 3
  },
  name: "ACard",
  inheritAttrs: !1,
  props: OK(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: r,
      direction: i,
      size: a
    } = Nt("card", e), [l, s] = lK(r), u = (f) => f.map((v, g) => dr(v) && !Oh(v) || !dr(v) ? h("li", {
      style: {
        width: `${100 / f.length}%`
      },
      key: `action-${g}`
    }, [h("span", null, [v])]) : 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((v) => {
        v && BP(v.type) && v.type.__ANT_CARD_GRID && (p = !0);
      }), p;
    };
    return () => {
      var f, p, v, g, m, x;
      const {
        headStyle: S = {},
        bodyStyle: C = {},
        loading: P,
        bordered: $ = !0,
        type: I,
        tabList: w,
        hoverable: T,
        activeTabKey: M,
        defaultActiveTabKey: R,
        tabBarExtraContent: N = Ic((f = n.tabBarExtraContent) === null || f === void 0 ? void 0 : f.call(n)),
        title: H = Ic((p = n.title) === null || p === void 0 ? void 0 : p.call(n)),
        extra: L = Ic((v = n.extra) === null || v === void 0 ? void 0 : v.call(n)),
        actions: F = Ic((g = n.actions) === null || g === void 0 ? void 0 : g.call(n)),
        cover: A = Ic((m = n.cover) === null || m === void 0 ? void 0 : m.call(n))
      } = e, G = go((x = n.default) === null || x === void 0 ? void 0 : x.call(n)), j = r.value, Z = {
        [`${j}`]: !0,
        [s.value]: !0,
        [`${j}-loading`]: P,
        [`${j}-bordered`]: $,
        [`${j}-hoverable`]: !!T,
        [`${j}-contain-grid`]: d(G),
        [`${j}-contain-tabs`]: w && w.length,
        [`${j}-${a.value}`]: a.value,
        [`${j}-type-${I}`]: !!I,
        [`${j}-rtl`]: i.value === "rtl"
      }, W = h(br, {
        loading: !0,
        active: !0,
        paragraph: {
          rows: 4
        },
        title: !1
      }, {
        default: () => [G]
      }), K = M !== void 0, q = {
        size: "large",
        [K ? "activeKey" : "defaultActiveKey"]: K ? M : R,
        onChange: c,
        class: `${j}-head-tabs`
      };
      let U;
      const ae = w && w.length ? h(Mu, q, {
        default: () => [w.map((te) => {
          const {
            tab: ve,
            slots: ce
          } = te, fe = ce?.tab;
          dn(!ce, "Card", "tabList slots is deprecated, Please use `customTab` instead.");
          let ge = ve !== void 0 ? ve : n[fe] ? n[fe](te) : null;
          return ge = Nh(n, "customTab", te, () => [ge]), h(PK, {
            tab: ge,
            key: te.key,
            disabled: te.disabled
          }, null);
        })],
        rightExtra: N ? () => N : null
      }) : null;
      (H || L || ae) && (U = h("div", {
        class: `${j}-head`,
        style: S
      }, [h("div", {
        class: `${j}-head-wrapper`
      }, [H && h("div", {
        class: `${j}-head-title`
      }, [H]), L && h("div", {
        class: `${j}-extra`
      }, [L])]), ae]));
      const se = A ? h("div", {
        class: `${j}-cover`
      }, [A]) : null, ie = h("div", {
        class: `${j}-body`,
        style: C
      }, [P ? W : G]), re = F && F.length ? h("ul", {
        class: `${j}-actions`
      }, [u(F)]) : null;
      return l(h("div", Q(Q({
        ref: "cardContainerRef"
      }, o), {}, {
        class: [Z, o.class]
      }), [U, se, G && G.length ? ie : null, re]));
    };
  }
}), kK = () => ({
  prefixCls: String,
  title: Hg(),
  description: Hg(),
  avatar: Hg()
}), cb = be({
  compatConfig: {
    MODE: 3
  },
  name: "ACardMeta",
  props: kK(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n
    } = t;
    const {
      prefixCls: o
    } = Nt("card", e);
    return () => {
      const r = {
        [`${o.value}-meta`]: !0
      }, i = ei(n, e, "avatar"), a = ei(n, e, "title"), l = ei(n, e, "description"), s = i ? h("div", {
        class: `${o.value}-meta-avatar`
      }, [i]) : null, u = a ? h("div", {
        class: `${o.value}-meta-title`
      }, [a]) : null, c = l ? h("div", {
        class: `${o.value}-meta-description`
      }, [l]) : null, d = u || c ? h("div", {
        class: `${o.value}-meta-detail`
      }, [u, c]) : null;
      return h("div", {
        class: r
      }, [s, d]);
    };
  }
}), IK = () => ({
  prefixCls: String,
  hoverable: {
    type: Boolean,
    default: !0
  }
}), db = be({
  compatConfig: {
    MODE: 3
  },
  name: "ACardGrid",
  __ANT_CARD_GRID: !0,
  props: IK(),
  setup(e, t) {
    let {
      slots: n
    } = t;
    const {
      prefixCls: o
    } = Nt("card", e), r = E(() => ({
      [`${o.value}-grid`]: !0,
      [`${o.value}-grid-hoverable`]: e.hoverable
    }));
    return () => {
      var i;
      return h("div", {
        class: r.value
      }, [(i = n.default) === null || i === void 0 ? void 0 : i.call(n)]);
    };
  }
});
Du.Meta = cb;
Du.Grid = db;
Du.install = function(e) {
  return e.component(Du.name, Du), e.component(cb.name, cb), e.component(db.name, db), e;
};
const TK = () => ({
  prefixCls: String,
  activeKey: en([Array, Number, String]),
  defaultActiveKey: en([Array, Number, String]),
  accordion: ct(),
  destroyInactivePanel: ct(),
  bordered: ct(),
  expandIcon: et(),
  openAnimation: pe.object,
  expandIconPosition: rn(),
  collapsible: rn(),
  ghost: ct(),
  onChange: et(),
  "onUpdate:activeKey": et()
}), q_ = () => ({
  openAnimation: pe.object,
  prefixCls: String,
  header: pe.any,
  headerClass: String,
  showArrow: ct(),
  isActive: ct(),
  destroyInactivePanel: ct(),
  /** @deprecated Use `collapsible="disabled"` instead */
  disabled: ct(),
  accordion: ct(),
  forceRender: ct(),
  expandIcon: et(),
  extra: pe.any,
  panelKey: en(),
  collapsible: rn(),
  role: String,
  onItemClick: et()
}), _K = (e) => {
  const {
    componentCls: t,
    collapseContentBg: n,
    padding: o,
    collapseContentPaddingHorizontal: r,
    collapseHeaderBg: i,
    collapseHeaderPadding: a,
    collapsePanelBorderRadius: l,
    lineWidth: s,
    lineType: u,
    colorBorder: c,
    colorText: d,
    colorTextHeading: f,
    colorTextDisabled: p,
    fontSize: v,
    lineHeight: g,
    marginSM: m,
    paddingSM: x,
    motionDurationSlow: S,
    fontSizeIcon: C
  } = e, P = `${s}px ${u} ${c}`;
  return {
    [t]: O(O({}, fn(e)), {
      backgroundColor: i,
      border: P,
      borderBottom: 0,
      borderRadius: `${l}px`,
      "&-rtl": {
        direction: "rtl"
      },
      [`& > ${t}-item`]: {
        borderBottom: P,
        "&: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: g,
          cursor: "pointer",
          transition: `all ${S}, visibility 0s`,
          [`> ${t}-header-text`]: {
            flex: "auto"
          },
          "&:focus": {
            outline: "none"
          },
          // >>>>> Arrow
          [`${t}-expand-icon`]: {
            height: v * g,
            display: "flex",
            alignItems: "center",
            paddingInlineEnd: m
          },
          [`${t}-arrow`]: O(O({}, uc()), {
            fontSize: C,
            svg: {
              transition: `transform ${S}`
            }
          }),
          // >>>>> 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: x
          }
        }
      },
      [`${t}-content`]: {
        color: d,
        backgroundColor: n,
        borderTop: P,
        [`& > ${t}-content-box`]: {
          padding: `${o}px ${r}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: m
            }
          }
        }
      }
    })
  };
}, MK = (e) => {
  const {
    componentCls: t
  } = e, n = `> ${t}-item > ${t}-header ${t}-arrow svg`;
  return {
    [`${t}-rtl`]: {
      [n]: {
        transform: "rotate(180deg)"
      }
    }
  };
}, EK = (e) => {
  const {
    componentCls: t,
    collapseHeaderBg: n,
    paddingXXS: o,
    colorBorder: r
  } = e;
  return {
    [`${t}-borderless`]: {
      backgroundColor: n,
      border: 0,
      [`> ${t}-item`]: {
        borderBottom: `1px solid ${r}`
      },
      [`
        > ${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
      }
    }
  };
}, DK = (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
          }
        }
      }
    }
  };
}, AK = On("Collapse", (e) => {
  const t = Qt(e, {
    collapseContentBg: e.colorBgContainer,
    collapseHeaderBg: e.colorFillAlter,
    collapseHeaderPadding: `${e.paddingSM}px ${e.padding}px`,
    collapsePanelBorderRadius: e.borderRadiusLG,
    collapseContentPaddingHorizontal: 16
    // Fixed value
  });
  return [_K(t), EK(t), DK(t), MK(t), Wh(t)];
});
function lC(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 Tl = be({
  compatConfig: {
    MODE: 3
  },
  name: "ACollapse",
  inheritAttrs: !1,
  props: Mn(TK(), {
    accordion: !1,
    destroyInactivePanel: !1,
    bordered: !0,
    expandIconPosition: "start"
  }),
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      emit: r
    } = t;
    const i = le(lC(Lp([e.activeKey, e.defaultActiveKey])));
    Ie(() => e.activeKey, () => {
      i.value = lC(e.activeKey);
    }, {
      deep: !0
    });
    const {
      prefixCls: a,
      direction: l,
      rootPrefixCls: s
    } = Nt("collapse", e), [u, c] = AK(a), d = E(() => {
      const {
        expandIconPosition: x
      } = e;
      return x !== void 0 ? x : l.value === "rtl" ? "end" : "start";
    }), f = (x) => {
      const {
        expandIcon: S = o.expandIcon
      } = e, C = S ? S(x) : h(Es, {
        rotate: x.isActive ? 90 : void 0
      }, null);
      return h("div", {
        class: [`${a.value}-expand-icon`, c.value],
        onClick: () => ["header", "icon"].includes(e.collapsible) && v(x.panelKey)
      }, [Ao(Array.isArray(S) ? C[0] : C) ? Xn(C, {
        class: `${a.value}-arrow`
      }, !1) : C]);
    }, p = (x) => {
      e.activeKey === void 0 && (i.value = x);
      const S = e.accordion ? x[0] : x;
      r("update:activeKey", S), r("change", S);
    }, v = (x) => {
      let S = i.value;
      if (e.accordion)
        S = S[0] === x ? [] : [x];
      else {
        S = [...S];
        const C = S.indexOf(x);
        C > -1 ? S.splice(C, 1) : S.push(x);
      }
      p(S);
    }, g = (x, S) => {
      var C, P, $;
      if (Oh(x)) return;
      const I = i.value, {
        accordion: w,
        destroyInactivePanel: T,
        collapsible: M,
        openAnimation: R
      } = e, N = R || Kh(`${s.value}-motion-collapse`), H = String((C = x.key) !== null && C !== void 0 ? C : S), {
        header: L = ($ = (P = x.children) === null || P === void 0 ? void 0 : P.header) === null || $ === void 0 ? void 0 : $.call(P),
        headerClass: F,
        collapsible: A,
        disabled: G
      } = x.props || {};
      let j = !1;
      w ? j = I[0] === H : j = I.indexOf(H) > -1;
      let Z = A ?? M;
      (G || G === "") && (Z = "disabled");
      const W = {
        key: H,
        panelKey: H,
        header: L,
        headerClass: F,
        isActive: j,
        prefixCls: a.value,
        destroyInactivePanel: T,
        openAnimation: N,
        accordion: w,
        onItemClick: Z === "disabled" ? null : v,
        expandIcon: f,
        collapsible: Z
      };
      return Xn(x, W);
    }, m = () => {
      var x;
      return go((x = o.default) === null || x === void 0 ? void 0 : x.call(o)).map(g);
    };
    return () => {
      const {
        accordion: x,
        bordered: S,
        ghost: C
      } = e, P = Me(a.value, {
        [`${a.value}-borderless`]: !S,
        [`${a.value}-icon-position-${d.value}`]: !0,
        [`${a.value}-rtl`]: l.value === "rtl",
        [`${a.value}-ghost`]: !!C,
        [n.class]: !!n.class
      }, c.value);
      return u(h("div", Q(Q({
        class: P
      }, HB(n)), {}, {
        style: n.style,
        role: x ? "tablist" : null
      }), [m()]));
    };
  }
}), NK = be({
  compatConfig: {
    MODE: 3
  },
  name: "PanelContent",
  props: q_(),
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = $e(!1);
    return It(() => {
      (e.isActive || e.forceRender) && (o.value = !0);
    }), () => {
      var r;
      if (!o.value) return null;
      const {
        prefixCls: i,
        isActive: a,
        role: l
      } = e;
      return h("div", {
        class: Me(`${i}-content`, {
          [`${i}-content-active`]: a,
          [`${i}-content-inactive`]: !a
        }),
        role: l
      }, [h("div", {
        class: `${i}-content-box`
      }, [(r = n.default) === null || r === void 0 ? void 0 : r.call(n)])]);
    };
  }
}), fb = be({
  compatConfig: {
    MODE: 3
  },
  name: "ACollapsePanel",
  inheritAttrs: !1,
  props: Mn(q_(), {
    showArrow: !0,
    isActive: !1,
    onItemClick() {
    },
    headerClass: "",
    forceRender: !1
  }),
  slots: Object,
  // emits: ['itemClick'],
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      attrs: r
    } = t;
    dn(e.disabled === void 0, "Collapse.Panel", '`disabled` is deprecated. Please use `collapsible="disabled"` instead.');
    const {
      prefixCls: i
    } = Nt("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: v,
        accordion: g,
        forceRender: m,
        openAnimation: x,
        expandIcon: S = n.expandIcon,
        extra: C = (u = n.extra) === null || u === void 0 ? void 0 : u.call(n),
        collapsible: P
      } = e, $ = P === "disabled", I = i.value, w = Me(`${I}-header`, {
        [d]: d,
        [`${I}-header-collapsible-only`]: P === "header",
        [`${I}-icon-collapsible-only`]: P === "icon"
      }), T = Me({
        [`${I}-item`]: !0,
        [`${I}-item-active`]: f,
        [`${I}-item-disabled`]: $,
        [`${I}-no-arrow`]: !p,
        [`${r.class}`]: !!r.class
      });
      let M = h("i", {
        class: "arrow"
      }, null);
      p && typeof S == "function" && (M = S(e));
      const R = ti(h(NK, {
        prefixCls: I,
        isActive: f,
        forceRender: m,
        role: g ? "tabpanel" : null
      }, {
        default: n.default
      }), [[Oi, f]]), N = O({
        appear: !1,
        css: !1
      }, x);
      return h("div", Q(Q({}, r), {}, {
        class: T
      }), [h("div", {
        class: w,
        onClick: () => !["header", "icon"].includes(P) && a(),
        role: g ? "tab" : "button",
        tabindex: $ ? -1 : 0,
        "aria-expanded": f,
        onKeypress: l
      }, [p && M, h("span", {
        onClick: () => P === "header" && a(),
        class: `${I}-header-text`
      }, [c]), C && h("div", {
        class: `${I}-extra`
      }, [C])]), h(Dr, N, {
        default: () => [!v || f ? R : null]
      })]);
    };
  }
});
Tl.Panel = fb;
Tl.install = function(e) {
  return e.component(Tl.name, Tl), e.component(fb.name, fb), e;
};
const Y_ = Symbol("TreeContextKey"), RK = be({
  compatConfig: {
    MODE: 3
  },
  name: "TreeContext",
  props: {
    value: {
      type: Object
    }
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    return Bt(Y_, E(() => e.value)), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
}), nx = () => zt(Y_, E(() => ({}))), G_ = Symbol("KeysStateKey"), zK = (e) => {
  Bt(G_, e);
}, U_ = () => zt(G_, {
  expandedKeys: $e([]),
  selectedKeys: $e([]),
  loadedKeys: $e([]),
  loadingKeys: $e([]),
  checkedKeys: $e([]),
  halfCheckedKeys: $e([]),
  expandedKeysSet: E(() => /* @__PURE__ */ new Set()),
  selectedKeysSet: E(() => /* @__PURE__ */ new Set()),
  loadedKeysSet: E(() => /* @__PURE__ */ new Set()),
  loadingKeysSet: E(() => /* @__PURE__ */ new Set()),
  checkedKeysSet: E(() => /* @__PURE__ */ new Set()),
  halfCheckedKeysSet: E(() => /* @__PURE__ */ new Set()),
  flattenNodes: $e([])
}), FK = (e) => {
  let {
    prefixCls: t,
    level: n,
    isStart: o,
    isEnd: r
  } = e;
  const i = `${t}-indent-unit`, a = [];
  for (let l = 0; l < n; l += 1)
    a.push(h("span", {
      key: l,
      class: {
        [i]: !0,
        [`${i}-start`]: o[l],
        [`${i}-end`]: r[l]
      }
    }, null));
  return h("span", {
    "aria-hidden": "true",
    class: `${t}-indent`
  }, [a]);
}, X_ = {
  eventKey: [String, Number],
  prefixCls: String,
  // By parent
  // expanded: { type: Boolean, default: undefined },
  // selected: { type: Boolean, default: undefined },
  // checked: { type: Boolean, default: undefined },
  // loaded: { type: Boolean, default: undefined },
  // loading: { type: Boolean, default: undefined },
  // halfChecked: { type: Boolean, default: undefined },
  // dragOver: { type: Boolean, default: undefined },
  // dragOverGapTop: { type: Boolean, default: undefined },
  // dragOverGapBottom: { type: Boolean, default: undefined },
  // pos: String,
  title: pe.any,
  /** New added in Tree for easy data access */
  data: {
    type: Object,
    default: void 0
  },
  parent: {
    type: Object,
    default: void 0
  },
  isStart: {
    type: Array
  },
  isEnd: {
    type: Array
  },
  active: {
    type: Boolean,
    default: void 0
  },
  onMousemove: {
    type: Function
  },
  // By user
  isLeaf: {
    type: Boolean,
    default: void 0
  },
  checkable: {
    type: Boolean,
    default: void 0
  },
  selectable: {
    type: Boolean,
    default: void 0
  },
  disabled: {
    type: Boolean,
    default: void 0
  },
  disableCheckbox: {
    type: Boolean,
    default: void 0
  },
  icon: pe.any,
  switcherIcon: pe.any,
  domRef: {
    type: Function
  }
}, BK = {
  prefixCls: {
    type: String
  },
  // data: { type: Array as PropType<FlattenNode[]> },
  motion: {
    type: Object
  },
  focusable: {
    type: Boolean
  },
  activeItem: {
    type: Object
  },
  focused: {
    type: Boolean
  },
  tabindex: {
    type: Number
  },
  checkable: {
    type: Boolean
  },
  selectable: {
    type: Boolean
  },
  disabled: {
    type: Boolean
  },
  // expandedKeys: { type: Array as PropType<Key[]> },
  // selectedKeys: { type: Array as PropType<Key[]> },
  // checkedKeys: { type: Array as PropType<Key[]> },
  // loadedKeys: { type: Array as PropType<Key[]> },
  // loadingKeys: { type: Array as PropType<Key[]> },
  // halfCheckedKeys: { type: Array as PropType<Key[]> },
  // keyEntities: { type: Object as PropType<Record<Key, DataEntity<DataNode>>> },
  // dragging: { type: Boolean as PropType<boolean> },
  // dragOverNodeKey: { type: [String, Number] as PropType<Key> },
  // dropPosition: { type: Number as PropType<number> },
  // Virtual list
  height: {
    type: Number
  },
  itemHeight: {
    type: Number
  },
  virtual: {
    type: Boolean
  },
  onScroll: {
    type: Function
  },
  onKeydown: {
    type: Function
  },
  onFocus: {
    type: Function
  },
  onBlur: {
    type: Function
  },
  onActiveChange: {
    type: Function
  },
  onContextmenu: {
    type: Function
  },
  onListChangeStart: {
    type: Function
  },
  onListChangeEnd: {
    type: Function
  }
}, Q_ = () => ({
  prefixCls: String,
  focusable: {
    type: Boolean,
    default: void 0
  },
  activeKey: [Number, String],
  tabindex: Number,
  children: pe.any,
  treeData: {
    type: Array
  },
  fieldNames: {
    type: Object
  },
  showLine: {
    type: [Boolean, Object],
    default: void 0
  },
  showIcon: {
    type: Boolean,
    default: void 0
  },
  icon: pe.any,
  selectable: {
    type: Boolean,
    default: void 0
  },
  expandAction: [String, Boolean],
  disabled: {
    type: Boolean,
    default: void 0
  },
  multiple: {
    type: Boolean,
    default: void 0
  },
  checkable: {
    type: Boolean,
    default: void 0
  },
  checkStrictly: {
    type: Boolean,
    default: void 0
  },
  draggable: {
    type: [Function, Boolean]
  },
  defaultExpandParent: {
    type: Boolean,
    default: void 0
  },
  autoExpandParent: {
    type: Boolean,
    default: void 0
  },
  defaultExpandAll: {
    type: Boolean,
    default: void 0
  },
  defaultExpandedKeys: {
    type: Array
  },
  expandedKeys: {
    type: Array
  },
  defaultCheckedKeys: {
    type: Array
  },
  checkedKeys: {
    type: [Object, Array]
  },
  defaultSelectedKeys: {
    type: Array
  },
  selectedKeys: {
    type: Array
  },
  allowDrop: {
    type: Function
  },
  dropIndicatorRender: {
    type: Function
  },
  onFocus: {
    type: Function
  },
  onBlur: {
    type: Function
  },
  onKeydown: {
    type: Function
  },
  onContextmenu: {
    type: Function
  },
  onClick: {
    type: Function
  },
  onDblclick: {
    type: Function
  },
  onScroll: {
    type: Function
  },
  onExpand: {
    type: Function
  },
  onCheck: {
    type: Function
  },
  onSelect: {
    type: Function
  },
  onLoad: {
    type: Function
  },
  loadData: {
    type: Function
  },
  loadedKeys: {
    type: Array
  },
  onMouseenter: {
    type: Function
  },
  onMouseleave: {
    type: Function
  },
  onRightClick: {
    type: Function
  },
  onDragstart: {
    type: Function
  },
  onDragenter: {
    type: Function
  },
  onDragover: {
    type: Function
  },
  onDragleave: {
    type: Function
  },
  onDragend: {
    type: Function
  },
  onDrop: {
    type: Function
  },
  /**
   * Used for `rc-tree-select` only.
   * Do not use in your production code directly since this will be refactor.
   */
  onActiveChange: {
    type: Function
  },
  filterTreeNode: {
    type: Function
  },
  motion: pe.any,
  switcherIcon: pe.any,
  // Virtual List
  height: Number,
  itemHeight: Number,
  virtual: {
    type: Boolean,
    default: void 0
  },
  // direction for drag logic
  direction: {
    type: String
  },
  rootClassName: String,
  rootStyle: Object
});
var LK = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const sC = "open", uC = "close", HK = "---", pb = be({
  compatConfig: {
    MODE: 3
  },
  name: "ATreeNode",
  inheritAttrs: !1,
  props: X_,
  isTreeNode: 1,
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      expose: r
    } = t;
    wn(!("slots" in e.data), `treeData slots is deprecated, please use ${Object.keys(e.data.slots || {}).map((Se) => "`v-slot:" + Se + "` ")}instead`);
    const i = $e(!1), a = nx(), {
      expandedKeysSet: l,
      selectedKeysSet: s,
      loadedKeysSet: u,
      loadingKeysSet: c,
      checkedKeysSet: d,
      halfCheckedKeysSet: f
    } = U_(), {
      dragOverNodeKey: p,
      dropPosition: v,
      keyEntities: g
    } = a.value, m = E(() => sp(e.eventKey, {
      expandedKeysSet: l.value,
      selectedKeysSet: s.value,
      loadedKeysSet: u.value,
      loadingKeysSet: c.value,
      checkedKeysSet: d.value,
      halfCheckedKeysSet: f.value,
      dragOverNodeKey: p,
      dropPosition: v,
      keyEntities: g
    })), x = gi(() => m.value.expanded), S = gi(() => m.value.selected), C = gi(() => m.value.checked), P = gi(() => m.value.loaded), $ = gi(() => m.value.loading), I = gi(() => m.value.halfChecked), w = gi(() => m.value.dragOver), T = gi(() => m.value.dragOverGapTop), M = gi(() => m.value.dragOverGapBottom), R = gi(() => m.value.pos), N = $e(), H = E(() => {
      const {
        eventKey: Se
      } = e, {
        keyEntities: Ce
      } = a.value, {
        children: Ae
      } = Ce[Se] || {};
      return !!(Ae || []).length;
    }), L = E(() => {
      const {
        isLeaf: Se
      } = e, {
        loadData: Ce
      } = a.value, Ae = H.value;
      return Se === !1 ? !1 : Se || !Ce && !Ae || Ce && P.value && !Ae;
    }), F = E(() => L.value ? null : x.value ? sC : uC), A = E(() => {
      const {
        disabled: Se
      } = e, {
        disabled: Ce
      } = a.value;
      return !!(Ce || Se);
    }), G = E(() => {
      const {
        checkable: Se
      } = e, {
        checkable: Ce
      } = a.value;
      return !Ce || Se === !1 ? !1 : Ce;
    }), j = E(() => {
      const {
        selectable: Se
      } = e, {
        selectable: Ce
      } = a.value;
      return typeof Se == "boolean" ? Se : Ce;
    }), Z = E(() => {
      const {
        data: Se,
        active: Ce,
        checkable: Ae,
        disableCheckbox: qe,
        disabled: We,
        selectable: tt
      } = e;
      return O(O({
        active: Ce,
        checkable: Ae,
        disableCheckbox: qe,
        disabled: We,
        selectable: tt
      }, Se), {
        dataRef: Se,
        data: Se,
        isLeaf: L.value,
        checked: C.value,
        expanded: x.value,
        loading: $.value,
        selected: S.value,
        halfChecked: I.value
      });
    }), W = pr(), K = E(() => {
      const {
        eventKey: Se
      } = e, {
        keyEntities: Ce
      } = a.value, {
        parent: Ae
      } = Ce[Se] || {};
      return O(O({}, up(O({}, e, m.value))), {
        parent: Ae
      });
    }), q = $n({
      eventData: K,
      eventKey: E(() => e.eventKey),
      selectHandle: N,
      pos: R,
      key: W.vnode.key
    });
    r(q);
    const U = (Se) => {
      const {
        onNodeDoubleClick: Ce
      } = a.value;
      Ce(Se, K.value);
    }, ae = (Se) => {
      if (A.value) return;
      const {
        onNodeSelect: Ce
      } = a.value;
      Se.preventDefault(), Ce(Se, K.value);
    }, se = (Se) => {
      if (A.value) return;
      const {
        disableCheckbox: Ce
      } = e, {
        onNodeCheck: Ae
      } = a.value;
      if (!G.value || Ce) return;
      Se.preventDefault();
      const qe = !C.value;
      Ae(Se, K.value, qe);
    }, ie = (Se) => {
      const {
        onNodeClick: Ce
      } = a.value;
      Ce(Se, K.value), j.value ? ae(Se) : se(Se);
    }, re = (Se) => {
      const {
        onNodeMouseEnter: Ce
      } = a.value;
      Ce(Se, K.value);
    }, te = (Se) => {
      const {
        onNodeMouseLeave: Ce
      } = a.value;
      Ce(Se, K.value);
    }, ve = (Se) => {
      const {
        onNodeContextMenu: Ce
      } = a.value;
      Ce(Se, K.value);
    }, ce = (Se) => {
      const {
        onNodeDragStart: Ce
      } = a.value;
      Se.stopPropagation(), i.value = !0, Ce(Se, q);
      try {
        Se.dataTransfer.setData("text/plain", "");
      } catch {
      }
    }, fe = (Se) => {
      const {
        onNodeDragEnter: Ce
      } = a.value;
      Se.preventDefault(), Se.stopPropagation(), Ce(Se, q);
    }, ge = (Se) => {
      const {
        onNodeDragOver: Ce
      } = a.value;
      Se.preventDefault(), Se.stopPropagation(), Ce(Se, q);
    }, Te = (Se) => {
      const {
        onNodeDragLeave: Ce
      } = a.value;
      Se.stopPropagation(), Ce(Se, q);
    }, ze = (Se) => {
      const {
        onNodeDragEnd: Ce
      } = a.value;
      Se.stopPropagation(), i.value = !1, Ce(Se, q);
    }, Ke = (Se) => {
      const {
        onNodeDrop: Ce
      } = a.value;
      Se.preventDefault(), Se.stopPropagation(), i.value = !1, Ce(Se, q);
    }, He = (Se) => {
      const {
        onNodeExpand: Ce
      } = a.value;
      $.value || Ce(Se, K.value);
    }, Ne = () => {
      const {
        data: Se
      } = e, {
        draggable: Ce
      } = a.value;
      return !!(Ce && (!Ce.nodeDraggable || Ce.nodeDraggable(Se)));
    }, Xe = () => {
      const {
        draggable: Se,
        prefixCls: Ce
      } = a.value;
      return Se && Se?.icon ? h("span", {
        class: `${Ce}-draggable-icon`
      }, [Se.icon]) : null;
    }, De = () => {
      var Se, Ce, Ae;
      const {
        switcherIcon: qe = o.switcherIcon || ((Se = a.value.slots) === null || Se === void 0 ? void 0 : Se[(Ae = (Ce = e.data) === null || Ce === void 0 ? void 0 : Ce.slots) === null || Ae === void 0 ? void 0 : Ae.switcherIcon])
      } = e, {
        switcherIcon: We
      } = a.value, tt = qe || We;
      return typeof tt == "function" ? tt(Z.value) : tt;
    }, Fe = () => {
      const {
        loadData: Se,
        onNodeLoad: Ce
      } = a.value;
      $.value || Se && x.value && !L.value && !H.value && !P.value && Ce(K.value);
    };
    At(() => {
      Fe();
    }), Ya(() => {
      Fe();
    });
    const Ve = () => {
      const {
        prefixCls: Se
      } = a.value, Ce = De();
      if (L.value)
        return Ce !== !1 ? h("span", {
          class: Me(`${Se}-switcher`, `${Se}-switcher-noop`)
        }, [Ce]) : null;
      const Ae = Me(`${Se}-switcher`, `${Se}-switcher_${x.value ? sC : uC}`);
      return Ce !== !1 ? h("span", {
        onClick: He,
        class: Ae
      }, [Ce]) : null;
    }, ot = () => {
      var Se, Ce;
      const {
        disableCheckbox: Ae
      } = e, {
        prefixCls: qe
      } = a.value, We = A.value;
      return G.value ? h("span", {
        class: Me(`${qe}-checkbox`, C.value && `${qe}-checkbox-checked`, !C.value && I.value && `${qe}-checkbox-indeterminate`, (We || Ae) && `${qe}-checkbox-disabled`),
        onClick: se
      }, [(Ce = (Se = a.value).customCheckable) === null || Ce === void 0 ? void 0 : Ce.call(Se)]) : null;
    }, je = () => {
      const {
        prefixCls: Se
      } = a.value;
      return h("span", {
        class: Me(`${Se}-iconEle`, `${Se}-icon__${F.value || "docu"}`, $.value && `${Se}-icon_loading`)
      }, null);
    }, Pe = () => {
      const {
        disabled: Se,
        eventKey: Ce
      } = e, {
        draggable: Ae,
        dropLevelOffset: qe,
        dropPosition: We,
        prefixCls: tt,
        indent: Ee,
        dropIndicatorRender: Re,
        dragOverNodeKey: Be,
        direction: rt
      } = a.value;
      return !Se && Ae !== !1 && Be === Ce ? Re({
        dropPosition: We,
        dropLevelOffset: qe,
        indent: Ee,
        prefixCls: tt,
        direction: rt
      }) : null;
    }, Ge = () => {
      var Se, Ce, Ae, qe, We, tt;
      const {
        // title = slots.title ||
        //   context.value.slots?.[props.data?.slots?.title] ||
        //   context.value.slots?.title,
        // selected,
        icon: Ee = o.icon,
        // loading,
        data: Re
      } = e, Be = o.title || ((Se = a.value.slots) === null || Se === void 0 ? void 0 : Se[(Ae = (Ce = e.data) === null || Ce === void 0 ? void 0 : Ce.slots) === null || Ae === void 0 ? void 0 : Ae.title]) || ((qe = a.value.slots) === null || qe === void 0 ? void 0 : qe.title) || e.title, {
        prefixCls: rt,
        showIcon: pt,
        icon: at,
        loadData: ft
        // slots: contextSlots,
      } = a.value, wt = A.value, Ct = `${rt}-node-content-wrapper`;
      let St;
      if (pt) {
        const Wt = Ee || ((We = a.value.slots) === null || We === void 0 ? void 0 : We[(tt = Re?.slots) === null || tt === void 0 ? void 0 : tt.icon]) || at;
        St = Wt ? h("span", {
          class: Me(`${rt}-iconEle`, `${rt}-icon__customize`)
        }, [typeof Wt == "function" ? Wt(Z.value) : Wt]) : je();
      } else ft && $.value && (St = je());
      let yt;
      typeof Be == "function" ? yt = Be(Z.value) : yt = Be, yt = yt === void 0 ? HK : yt;
      const Ot = h("span", {
        class: `${rt}-title`
      }, [yt]);
      return h("span", {
        ref: N,
        title: typeof Be == "string" ? Be : "",
        class: Me(`${Ct}`, `${Ct}-${F.value || "normal"}`, !wt && (S.value || i.value) && `${rt}-node-selected`),
        onMouseenter: re,
        onMouseleave: te,
        onContextmenu: ve,
        onClick: ie,
        onDblclick: U
      }, [St, Ot, Pe()]);
    };
    return () => {
      const Se = O(O({}, e), n), {
        eventKey: Ce,
        isLeaf: Ae,
        isStart: qe,
        isEnd: We,
        domRef: tt,
        active: Ee,
        data: Re,
        onMousemove: Be,
        selectable: rt
      } = Se, pt = LK(Se, ["eventKey", "isLeaf", "isStart", "isEnd", "domRef", "active", "data", "onMousemove", "selectable"]), {
        prefixCls: at,
        filterTreeNode: ft,
        keyEntities: wt,
        dropContainerKey: Ct,
        dropTargetKey: St,
        draggingNodeKey: yt
      } = a.value, Ot = A.value, Wt = Bs(pt, {
        aria: !0,
        data: !0
      }), {
        level: Xt
      } = wt[Ce] || {}, ln = We[We.length - 1], pn = Ne(), gt = !Ot && pn, En = yt === Ce, hn = rt !== void 0 ? {
        "aria-selected": !!rt
      } : void 0;
      return h("div", Q(Q({
        ref: tt,
        class: Me(n.class, `${at}-treenode`, {
          [`${at}-treenode-disabled`]: Ot,
          [`${at}-treenode-switcher-${x.value ? "open" : "close"}`]: !Ae,
          [`${at}-treenode-checkbox-checked`]: C.value,
          [`${at}-treenode-checkbox-indeterminate`]: I.value,
          [`${at}-treenode-selected`]: S.value,
          [`${at}-treenode-loading`]: $.value,
          [`${at}-treenode-active`]: Ee,
          [`${at}-treenode-leaf-last`]: ln,
          [`${at}-treenode-draggable`]: gt,
          dragging: En,
          "drop-target": St === Ce,
          "drop-container": Ct === Ce,
          "drag-over": !Ot && w.value,
          "drag-over-gap-top": !Ot && T.value,
          "drag-over-gap-bottom": !Ot && M.value,
          "filter-node": ft && ft(K.value)
        }),
        style: n.style,
        draggable: gt,
        "aria-grabbed": En,
        onDragstart: gt ? ce : void 0,
        onDragenter: pn ? fe : void 0,
        onDragover: pn ? ge : void 0,
        onDragleave: pn ? Te : void 0,
        onDrop: pn ? Ke : void 0,
        onDragend: pn ? ze : void 0,
        onMousemove: Be
      }, hn), Wt), [h(FK, {
        prefixCls: at,
        level: Xt,
        isStart: qe,
        isEnd: We
      }, null), Xe(), Ve(), ot(), Ge()]);
    };
  }
});
function Ki(e, t) {
  if (!e) return [];
  const n = e.slice(), o = n.indexOf(t);
  return o >= 0 && n.splice(o, 1), n;
}
function $a(e, t) {
  const n = (e || []).slice();
  return n.indexOf(t) === -1 && n.push(t), n;
}
function ox(e) {
  return e.split("-");
}
function Z_(e, t) {
  return `${e}-${t}`;
}
function VK(e) {
  return e && e.type && e.type.isTreeNode;
}
function jK(e, t) {
  const n = [], o = t[e];
  function r() {
    (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : []).forEach((a) => {
      let {
        key: l,
        children: s
      } = a;
      n.push(l), r(s);
    });
  }
  return r(o.children), n;
}
function WK(e) {
  if (e.parent) {
    const t = ox(e.pos);
    return Number(t[t.length - 1]) === e.parent.children.length - 1;
  }
  return !1;
}
function KK(e) {
  const t = ox(e.pos);
  return Number(t[t.length - 1]) === 0;
}
function cC(e, t, n, o, r, i, a, l, s, u) {
  var c;
  const {
    clientX: d,
    clientY: f
  } = e, {
    top: p,
    height: v
  } = e.target.getBoundingClientRect(), m = ((u === "rtl" ? -1 : 1) * ((r?.x || 0) - d) - 12) / o;
  let x = l[n.eventKey];
  if (f < p + v / 2) {
    const R = a.findIndex((L) => L.key === x.key), N = R <= 0 ? 0 : R - 1, H = a[N].key;
    x = l[H];
  }
  const S = x.key, C = x, P = x.key;
  let $ = 0, I = 0;
  if (!s.has(S))
    for (let R = 0; R < m && WK(x); R += 1)
      x = x.parent, I += 1;
  const w = t.eventData, T = x.node;
  let M = !0;
  return KK(x) && x.level === 0 && f < p + v / 2 && i({
    dragNode: w,
    dropNode: T,
    dropPosition: -1
  }) && x.key === n.eventKey ? $ = -1 : (C.children || []).length && s.has(P) ? i({
    dragNode: w,
    dropNode: T,
    dropPosition: 0
  }) ? $ = 0 : M = !1 : I === 0 ? m > -1.5 ? i({
    dragNode: w,
    dropNode: T,
    dropPosition: 1
  }) ? $ = 1 : M = !1 : i({
    dragNode: w,
    dropNode: T,
    dropPosition: 0
  }) ? $ = 0 : i({
    dragNode: w,
    dropNode: T,
    dropPosition: 1
  }) ? $ = 1 : M = !1 : i({
    dragNode: w,
    dropNode: T,
    dropPosition: 1
  }) ? $ = 1 : M = !1, {
    dropPosition: $,
    dropLevelOffset: I,
    dropTargetKey: x.key,
    dropTargetPos: x.pos,
    dragOverNodeKey: P,
    dropContainerKey: $ === 0 ? null : ((c = x.parent) === null || c === void 0 ? void 0 : c.key) || null,
    dropAllowed: M
  };
}
function dC(e, t) {
  if (!e) return;
  const {
    multiple: n
  } = t;
  return n ? e.slice() : e.length ? [e[0]] : e;
}
function bv(e) {
  if (!e)
    return null;
  let t;
  if (Array.isArray(e))
    t = {
      checkedKeys: e,
      halfCheckedKeys: void 0
    };
  else if (typeof e == "object")
    t = {
      checkedKeys: e.checked || void 0,
      halfCheckedKeys: e.halfChecked || void 0
    };
  else
    return wn(!1, "`checkedKeys` is not an array or an object"), null;
  return t;
}
function hb(e, t) {
  const n = /* @__PURE__ */ new Set();
  function o(r) {
    if (n.has(r)) return;
    const i = t[r];
    if (!i) return;
    n.add(r);
    const {
      parent: a,
      node: l
    } = i;
    l.disabled || a && o(a.key);
  }
  return (e || []).forEach((r) => {
    o(r);
  }), [...n];
}
var qK = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
function Kd(e, t) {
  return e ?? t;
}
function eg(e) {
  const {
    title: t,
    _title: n,
    key: o,
    children: r
  } = e || {}, i = t || "title";
  return {
    title: i,
    _title: n || [i],
    key: o || "key",
    children: r || "children"
  };
}
function gb(e) {
  function t() {
    let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
    return Do(n).map((r) => {
      var i, a, l, s;
      if (!VK(r))
        return wn(!r, "Tree/TreeNode can only accept TreeNode as children."), null;
      const u = r.children || {}, c = r.key, d = {};
      for (const [R, N] of Object.entries(r.props))
        d[Md(R)] = N;
      const {
        isLeaf: f,
        checkable: p,
        selectable: v,
        disabled: g,
        disableCheckbox: m
      } = d, x = {
        isLeaf: f || f === "" || void 0,
        checkable: p || p === "" || void 0,
        selectable: v || v === "" || void 0,
        disabled: g || g === "" || void 0,
        disableCheckbox: m || m === "" || void 0
      }, S = O(O({}, d), x), {
        title: C = (i = u.title) === null || i === void 0 ? void 0 : i.call(u, S),
        icon: P = (a = u.icon) === null || a === void 0 ? void 0 : a.call(u, S),
        switcherIcon: $ = (l = u.switcherIcon) === null || l === void 0 ? void 0 : l.call(u, S)
      } = d, I = qK(d, ["title", "icon", "switcherIcon"]), w = (s = u.default) === null || s === void 0 ? void 0 : s.call(u), T = O(O(O({}, I), {
        title: C,
        icon: P,
        switcherIcon: $,
        key: c,
        isLeaf: f
      }), x), M = t(w);
      return M.length && (T.children = M), T;
    });
  }
  return t(e);
}
function YK(e, t, n) {
  const {
    _title: o,
    key: r,
    children: i
  } = eg(n), a = new Set(t === !0 ? [] : t), l = [];
  function s(u) {
    let c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
    return u.map((d, f) => {
      const p = Z_(c ? c.pos : "0", f), v = Kd(d[r], p);
      let g;
      for (let x = 0; x < o.length; x += 1) {
        const S = o[x];
        if (d[S] !== void 0) {
          g = d[S];
          break;
        }
      }
      const m = O(O({}, Fn(d, [...o, r, i])), {
        title: g,
        key: v,
        parent: c,
        pos: p,
        children: null,
        data: d,
        isStart: [...c ? c.isStart : [], f === 0],
        isEnd: [...c ? c.isEnd : [], f === u.length - 1]
      });
      return l.push(m), t === !0 || a.has(v) ? m.children = s(d[i] || [], m) : m.children = [], m;
    });
  }
  return s(e), l;
}
function GK(e, t, n) {
  let o = {};
  typeof n == "object" ? o = n : o = {
    externalGetKey: n
  }, o = o || {};
  const {
    childrenPropName: r,
    externalGetKey: i,
    fieldNames: a
  } = o, {
    key: l,
    children: s
  } = eg(a), u = r || s;
  let c;
  i ? typeof i == "string" ? c = (f) => f[i] : typeof i == "function" && (c = (f) => i(f)) : c = (f, p) => Kd(f[l], p);
  function d(f, p, v, g) {
    const m = f ? f[u] : e, x = f ? Z_(v.pos, p) : "0", S = f ? [...g, f] : [];
    if (f) {
      const C = c(f, x), P = {
        node: f,
        index: p,
        pos: x,
        key: C,
        parentPos: v.node ? v.pos : null,
        level: v.level + 1,
        nodes: S
      };
      t(P);
    }
    m && m.forEach((C, P) => {
      d(C, P, {
        node: f,
        pos: x,
        level: v ? v.level + 1 : -1
      }, S);
    });
  }
  d(null);
}
function rx(e) {
  let {
    initWrapper: t,
    processEntity: n,
    onProcessFinished: o,
    externalGetKey: r,
    childrenPropName: i,
    fieldNames: a
  } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, l = arguments.length > 2 ? arguments[2] : void 0;
  const s = r || l, u = {}, c = {};
  let d = {
    posEntities: u,
    keyEntities: c
  };
  return t && (d = t(d) || d), GK(e, (f) => {
    const {
      node: p,
      index: v,
      pos: g,
      key: m,
      parentPos: x,
      level: S,
      nodes: C
    } = f, P = {
      node: p,
      nodes: C,
      index: v,
      key: m,
      pos: g,
      level: S
    }, $ = Kd(m, g);
    u[g] = P, c[$] = P, P.parent = u[x], P.parent && (P.parent.children = P.parent.children || [], P.parent.children.push(P)), n && n(P, d);
  }, {
    externalGetKey: s,
    childrenPropName: i,
    fieldNames: a
  }), o && o(d), d;
}
function sp(e, t) {
  let {
    expandedKeysSet: n,
    selectedKeysSet: o,
    loadedKeysSet: r,
    loadingKeysSet: i,
    checkedKeysSet: a,
    halfCheckedKeysSet: l,
    dragOverNodeKey: s,
    dropPosition: u,
    keyEntities: c
  } = t;
  const d = c[e];
  return {
    eventKey: e,
    expanded: n.has(e),
    selected: o.has(e),
    loaded: r.has(e),
    loading: i.has(e),
    checked: a.has(e),
    halfChecked: l.has(e),
    pos: String(d ? d.pos : ""),
    parent: d.parent,
    // [Legacy] Drag props
    // Since the interaction of drag is changed, the semantic of the props are
    // not accuracy, I think it should be finally removed
    dragOver: s === e && u === 0,
    dragOverGapTop: s === e && u === -1,
    dragOverGapBottom: s === e && u === 1
  };
}
function up(e) {
  const {
    data: t,
    expanded: n,
    selected: o,
    checked: r,
    loaded: i,
    loading: a,
    halfChecked: l,
    dragOver: s,
    dragOverGapTop: u,
    dragOverGapBottom: c,
    pos: d,
    active: f,
    eventKey: p
  } = e, v = O(O({
    dataRef: t
  }, t), {
    expanded: n,
    selected: o,
    checked: r,
    loaded: i,
    loading: a,
    halfChecked: l,
    dragOver: s,
    dragOverGapTop: u,
    dragOverGapBottom: c,
    pos: d,
    active: f,
    eventKey: p,
    key: p
  });
  return "props" in v || Object.defineProperty(v, "props", {
    get() {
      return wn(!1, "Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."), e;
    }
  }), v;
}
function J_(e, t) {
  const n = /* @__PURE__ */ new Set();
  return e.forEach((o) => {
    t.has(o) || n.add(o);
  }), n;
}
function UK(e) {
  const {
    disabled: t,
    disableCheckbox: n,
    checkable: o
  } = e || {};
  return !!(t || n) || o === !1;
}
function XK(e, t, n, o) {
  const r = new Set(e), i = /* @__PURE__ */ new Set();
  for (let l = 0; l <= n; l += 1)
    (t.get(l) || /* @__PURE__ */ new Set()).forEach((u) => {
      const {
        key: c,
        node: d,
        children: f = []
      } = u;
      r.has(c) && !o(d) && f.filter((p) => !o(p.node)).forEach((p) => {
        r.add(p.key);
      });
    });
  const a = /* @__PURE__ */ new Set();
  for (let l = n; l >= 0; l -= 1)
    (t.get(l) || /* @__PURE__ */ new Set()).forEach((u) => {
      const {
        parent: c,
        node: d
      } = u;
      if (o(d) || !u.parent || a.has(u.parent.key))
        return;
      if (o(u.parent.node)) {
        a.add(c.key);
        return;
      }
      let f = !0, p = !1;
      (c.children || []).filter((v) => !o(v.node)).forEach((v) => {
        let {
          key: g
        } = v;
        const m = r.has(g);
        f && !m && (f = !1), !p && (m || i.has(g)) && (p = !0);
      }), f && r.add(c.key), p && i.add(c.key), a.add(c.key);
    });
  return {
    checkedKeys: Array.from(r),
    halfCheckedKeys: Array.from(J_(i, r))
  };
}
function QK(e, t, n, o, r) {
  const i = new Set(e);
  let a = new Set(t);
  for (let s = 0; s <= o; s += 1)
    (n.get(s) || /* @__PURE__ */ new Set()).forEach((c) => {
      const {
        key: d,
        node: f,
        children: p = []
      } = c;
      !i.has(d) && !a.has(d) && !r(f) && p.filter((v) => !r(v.node)).forEach((v) => {
        i.delete(v.key);
      });
    });
  a = /* @__PURE__ */ new Set();
  const l = /* @__PURE__ */ new Set();
  for (let s = o; s >= 0; s -= 1)
    (n.get(s) || /* @__PURE__ */ new Set()).forEach((c) => {
      const {
        parent: d,
        node: f
      } = c;
      if (r(f) || !c.parent || l.has(c.parent.key))
        return;
      if (r(c.parent.node)) {
        l.add(d.key);
        return;
      }
      let p = !0, v = !1;
      (d.children || []).filter((g) => !r(g.node)).forEach((g) => {
        let {
          key: m
        } = g;
        const x = i.has(m);
        p && !x && (p = !1), !v && (x || a.has(m)) && (v = !0);
      }), p || i.delete(d.key), v && a.add(d.key), l.add(d.key);
    });
  return {
    checkedKeys: Array.from(i),
    halfCheckedKeys: Array.from(J_(a, i))
  };
}
function Au(e, t, n, o, r, i) {
  const a = [];
  let l;
  i ? l = i : l = UK;
  const s = new Set(e.filter((c) => {
    const d = !!n[c];
    return d || a.push(c), d;
  }));
  sI(!a.length, `Tree missing follow keys: ${a.slice(0, 100).map((c) => `'${c}'`).join(", ")}`);
  let u;
  return t === !0 ? u = XK(s, r, o, l) : u = QK(s, t.halfCheckedKeys, r, o, l), u;
}
function eM(e) {
  const t = le(0), n = $e();
  return It(() => {
    const o = /* @__PURE__ */ new Map();
    let r = 0;
    const i = e.value || {};
    for (const a in i)
      if (Object.prototype.hasOwnProperty.call(i, a)) {
        const l = i[a], {
          level: s
        } = l;
        let u = o.get(s);
        u || (u = /* @__PURE__ */ new Set(), o.set(s, u)), u.add(l), r = Math.max(r, s);
      }
    t.value = r, n.value = o;
  }), {
    maxLevel: t,
    levelEntities: n
  };
}
var ZK = { 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 fC(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      JK(e, r, n[r]);
    });
  }
  return e;
}
function JK(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Gp = function(t, n) {
  var o = fC({}, t, n.attrs);
  return h(an, fC({}, o, {
    icon: ZK
  }), null);
};
Gp.displayName = "LeftOutlined";
Gp.inheritAttrs = !1;
const tM = () => wr() && window.document.documentElement, nM = (e) => {
  if (wr() && window.document.documentElement) {
    const t = Array.isArray(e) ? e : [e], {
      documentElement: n
    } = window.document;
    return t.some((o) => o in n.style);
  }
  return !1;
}, eq = (e, t) => {
  if (!nM(e))
    return !1;
  const n = document.createElement("div"), o = n.style[e];
  return n.style[e] = t, n.style[e] !== o;
};
function tq(e, t) {
  return !Array.isArray(e) && t !== void 0 ? eq(e, t) : nM(e);
}
let Af;
const nq = () => {
  if (!tM())
    return !1;
  if (Af !== void 0)
    return Af;
  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), Af = e.scrollHeight === 1, document.body.removeChild(e), Af;
}, oM = (() => {
  const e = $e(!1);
  return At(() => {
    e.value = nq();
  }), e;
}), rM = Symbol("rowContextKey"), oq = (e) => {
  Bt(rM, e);
}, rq = () => zt(rM, {
  gutter: E(() => {
  }),
  wrap: E(() => {
  }),
  supportFlexGap: E(() => {
  })
}), iq = (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"
      }
    }
  };
}, aq = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    // Grid system
    [t]: {
      position: "relative",
      maxWidth: "100%",
      // Prevent columns from collapsing when empty
      minHeight: 1
    }
  };
}, lq = (e, t) => {
  const {
    componentCls: n,
    gridColumns: o
  } = e, r = {};
  for (let i = o; i >= 0; i--)
    i === 0 ? (r[`${n}${t}-${i}`] = {
      display: "none"
    }, r[`${n}-push-${i}`] = {
      insetInlineStart: "auto"
    }, r[`${n}-pull-${i}`] = {
      insetInlineEnd: "auto"
    }, r[`${n}${t}-push-${i}`] = {
      insetInlineStart: "auto"
    }, r[`${n}${t}-pull-${i}`] = {
      insetInlineEnd: "auto"
    }, r[`${n}${t}-offset-${i}`] = {
      marginInlineEnd: 0
    }, r[`${n}${t}-order-${i}`] = {
      order: 0
    }) : (r[`${n}${t}-${i}`] = {
      display: "block",
      flex: `0 0 ${i / o * 100}%`,
      maxWidth: `${i / o * 100}%`
    }, r[`${n}${t}-push-${i}`] = {
      insetInlineStart: `${i / o * 100}%`
    }, r[`${n}${t}-pull-${i}`] = {
      insetInlineEnd: `${i / o * 100}%`
    }, r[`${n}${t}-offset-${i}`] = {
      marginInlineStart: `${i / o * 100}%`
    }, r[`${n}${t}-order-${i}`] = {
      order: i
    });
  return r;
}, vb = (e, t) => lq(e, t), sq = (e, t, n) => ({
  [`@media (min-width: ${t}px)`]: O({}, vb(e, n))
}), uq = On("Grid", (e) => [iq(e)]), cq = On("Grid", (e) => {
  const t = Qt(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 [aq(t), vb(t, ""), vb(t, "-xs"), Object.keys(n).map((o) => sq(t, n[o], o)).reduce((o, r) => O(O({}, o), r), {})];
}), dq = () => ({
  align: en([String, Object]),
  justify: en([String, Object]),
  prefixCls: String,
  gutter: en([Number, Array, Object], 0),
  wrap: {
    type: Boolean,
    default: void 0
  }
}), iM = be({
  compatConfig: {
    MODE: 3
  },
  name: "ARow",
  inheritAttrs: !1,
  props: dq(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: r,
      direction: i
    } = Nt("row", e), [a, l] = uq(r);
    let s;
    const u = kT(), 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 = (C) => E(() => {
      if (typeof e[C] == "string")
        return e[C];
      if (typeof e[C] != "object")
        return "";
      for (let P = 0; P < Pf.length; P++) {
        const $ = Pf[P];
        if (!d.value[$]) continue;
        const I = e[C][$];
        if (I !== void 0)
          return I;
      }
      return "";
    }), p = f("align"), v = f("justify"), g = oM();
    At(() => {
      s = u.value.subscribe((C) => {
        d.value = C;
        const P = e.gutter || 0;
        (!Array.isArray(P) && typeof P == "object" || Array.isArray(P) && (typeof P[0] == "object" || typeof P[1] == "object")) && (c.value = C);
      });
    }), qt(() => {
      u.value.unsubscribe(s);
    });
    const m = E(() => {
      const C = [void 0, void 0], {
        gutter: P = 0
      } = e;
      return (Array.isArray(P) ? P : [P, void 0]).forEach((I, w) => {
        if (typeof I == "object")
          for (let T = 0; T < Pf.length; T++) {
            const M = Pf[T];
            if (c.value[M] && I[M] !== void 0) {
              C[w] = I[M];
              break;
            }
          }
        else
          C[w] = I;
      }), C;
    });
    oq({
      gutter: m,
      supportFlexGap: g,
      wrap: E(() => e.wrap)
    });
    const x = E(() => Me(r.value, {
      [`${r.value}-no-wrap`]: e.wrap === !1,
      [`${r.value}-${v.value}`]: v.value,
      [`${r.value}-${p.value}`]: p.value,
      [`${r.value}-rtl`]: i.value === "rtl"
    }, o.class, l.value)), S = E(() => {
      const C = m.value, P = {}, $ = C[0] != null && C[0] > 0 ? `${C[0] / -2}px` : void 0, I = C[1] != null && C[1] > 0 ? `${C[1] / -2}px` : void 0;
      return $ && (P.marginLeft = $, P.marginRight = $), g.value ? P.rowGap = `${C[1]}px` : I && (P.marginTop = I, P.marginBottom = I), P;
    });
    return () => {
      var C;
      return a(h("div", Q(Q({}, o), {}, {
        class: x.value,
        style: O(O({}, S.value), o.style)
      }), [(C = n.default) === null || C === void 0 ? void 0 : C.call(n)]));
    };
  }
});
function ms() {
  return ms = 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;
  }, ms.apply(this, arguments);
}
function fq(e, t) {
  e.prototype = Object.create(t.prototype), e.prototype.constructor = e, Sd(e, t);
}
function mb(e) {
  return mb = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(n) {
    return n.__proto__ || Object.getPrototypeOf(n);
  }, mb(e);
}
function Sd(e, t) {
  return Sd = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(o, r) {
    return o.__proto__ = r, o;
  }, Sd(e, t);
}
function pq() {
  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 cp(e, t, n) {
  return pq() ? cp = Reflect.construct.bind() : cp = function(r, i, a) {
    var l = [null];
    l.push.apply(l, i);
    var s = Function.bind.apply(r, l), u = new s();
    return a && Sd(u, a.prototype), u;
  }, cp.apply(null, arguments);
}
function hq(e) {
  return Function.toString.call(e).indexOf("[native code]") !== -1;
}
function bb(e) {
  var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
  return bb = function(o) {
    if (o === null || !hq(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, r);
    }
    function r() {
      return cp(o, arguments, mb(this).constructor);
    }
    return r.prototype = Object.create(o.prototype, {
      constructor: {
        value: r,
        enumerable: !1,
        writable: !0,
        configurable: !0
      }
    }), Sd(r, o);
  }, bb(e);
}
var gq = /%[sdj%]/g, aM = function() {
};
typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (aM = 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 yb(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 _r(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 r = 0, i = n.length;
  if (typeof e == "function")
    return e.apply(null, n);
  if (typeof e == "string") {
    var a = e.replace(gq, function(l) {
      if (l === "%%")
        return "%";
      if (r >= i)
        return l;
      switch (l) {
        case "%s":
          return String(n[r++]);
        case "%d":
          return Number(n[r++]);
        case "%j":
          try {
            return JSON.stringify(n[r++]);
          } catch {
            return "[Circular]";
          }
          break;
        default:
          return l;
      }
    });
    return a;
  }
  return e;
}
function vq(e) {
  return e === "string" || e === "url" || e === "hex" || e === "email" || e === "date" || e === "pattern";
}
function No(e, t) {
  return !!(e == null || t === "array" && Array.isArray(e) && !e.length || vq(t) && typeof e == "string" && !e);
}
function mq(e, t, n) {
  var o = [], r = 0, i = e.length;
  function a(l) {
    o.push.apply(o, l || []), r++, r === i && n(o);
  }
  e.forEach(function(l) {
    t(l, a);
  });
}
function pC(e, t, n) {
  var o = 0, r = e.length;
  function i(a) {
    if (a && a.length) {
      n(a);
      return;
    }
    var l = o;
    o = o + 1, l < r ? t(e[l], i) : n([]);
  }
  i([]);
}
function bq(e) {
  var t = [];
  return Object.keys(e).forEach(function(n) {
    t.push.apply(t, e[n] || []);
  }), t;
}
var hC = /* @__PURE__ */ (function(e) {
  fq(t, e);
  function t(n, o) {
    var r;
    return r = e.call(this, "Async Validation Error") || this, r.errors = n, r.fields = o, r;
  }
  return t;
})(/* @__PURE__ */ bb(Error));
function yq(e, t, n, o, r) {
  if (t.first) {
    var i = new Promise(function(f, p) {
      var v = function(x) {
        return o(x), x.length ? p(new hC(x, yb(x))) : f(r);
      }, g = bq(e);
      pC(g, n, v);
    });
    return i.catch(function(f) {
      return f;
    }), i;
  }
  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 v = function(m) {
      if (c.push.apply(c, m), u++, u === s)
        return o(c), c.length ? p(new hC(c, yb(c))) : f(r);
    };
    l.length || (o(c), f(r)), l.forEach(function(g) {
      var m = e[g];
      a.indexOf(g) !== -1 ? pC(m, n, v) : mq(m, n, v);
    });
  });
  return d.catch(function(f) {
    return f;
  }), d;
}
function xq(e) {
  return !!(e && e.message !== void 0);
}
function wq(e, t) {
  for (var n = e, o = 0; o < t.length; o++) {
    if (n == null)
      return n;
    n = n[t[o]];
  }
  return n;
}
function gC(e, t) {
  return function(n) {
    var o;
    return e.fullFields ? o = wq(t, e.fullFields) : o = t[n.field || e.fullField], xq(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 vC(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] = ms({}, e[n], o) : e[n] = o;
      }
  }
  return e;
}
var lM = function(t, n, o, r, i, a) {
  t.required && (!o.hasOwnProperty(t.field) || No(n, a || t.type)) && r.push(_r(i.messages.required, t.fullField));
}, Sq = function(t, n, o, r, i) {
  (/^\s+$/.test(n) || n === "") && r.push(_r(i.messages.whitespace, t.fullField));
}, Nf, Cq = (function() {
  if (Nf)
    return Nf;
  var e = "[a-fA-F\\d:]", t = function(P) {
    return P && P.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}", r = (`
(?:
(?:` + 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(), i = new RegExp("(?:^" + n + "$)|(?:^" + r + "$)"), a = new RegExp("^" + n + "$"), l = new RegExp("^" + r + "$"), s = function(P) {
    return P && P.exact ? i : new RegExp("(?:" + t(P) + n + t(P) + ")|(?:" + t(P) + r + t(P) + ")", "g");
  };
  s.v4 = function(C) {
    return C && C.exact ? a : new RegExp("" + t(C) + n + t(C), "g");
  }, s.v6 = function(C) {
    return C && C.exact ? l : new RegExp("" + t(C) + r + t(C), "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]+)", v = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", g = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", m = "(?::\\d{2,5})?", x = '(?:[/?#][^\\s"]*)?', S = "(?:" + u + "|www\\.)" + c + "(?:localhost|" + d + "|" + f + "|" + p + v + g + ")" + m + x;
  return Nf = new RegExp("(?:^" + S + "$)", "i"), Nf;
}), mC = {
  // 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
}, Vc = {
  integer: function(t) {
    return Vc.number(t) && parseInt(t, 10) === t;
  },
  float: function(t) {
    return Vc.number(t) && !Vc.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" && !Vc.array(t);
  },
  method: function(t) {
    return typeof t == "function";
  },
  email: function(t) {
    return typeof t == "string" && t.length <= 320 && !!t.match(mC.email);
  },
  url: function(t) {
    return typeof t == "string" && t.length <= 2048 && !!t.match(Cq());
  },
  hex: function(t) {
    return typeof t == "string" && !!t.match(mC.hex);
  }
}, $q = function(t, n, o, r, i) {
  if (t.required && n === void 0) {
    lM(t, n, o, r, i);
    return;
  }
  var a = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], l = t.type;
  a.indexOf(l) > -1 ? Vc[l](n) || r.push(_r(i.messages.types[l], t.fullField, t.type)) : l && typeof n !== t.type && r.push(_r(i.messages.types[l], t.fullField, t.type));
}, Pq = function(t, n, o, r, i) {
  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", v = Array.isArray(n);
  if (f ? d = "number" : p ? d = "string" : v && (d = "array"), !d)
    return !1;
  v && (c = n.length), p && (c = n.replace(u, "_").length), a ? c !== t.len && r.push(_r(i.messages[d].len, t.fullField, t.len)) : l && !s && c < t.min ? r.push(_r(i.messages[d].min, t.fullField, t.min)) : s && !l && c > t.max ? r.push(_r(i.messages[d].max, t.fullField, t.max)) : l && s && (c < t.min || c > t.max) && r.push(_r(i.messages[d].range, t.fullField, t.min, t.max));
}, su = "enum", Oq = function(t, n, o, r, i) {
  t[su] = Array.isArray(t[su]) ? t[su] : [], t[su].indexOf(n) === -1 && r.push(_r(i.messages[su], t.fullField, t[su].join(", ")));
}, kq = function(t, n, o, r, i) {
  if (t.pattern) {
    if (t.pattern instanceof RegExp)
      t.pattern.lastIndex = 0, t.pattern.test(n) || r.push(_r(i.messages.pattern.mismatch, t.fullField, n, t.pattern));
    else if (typeof t.pattern == "string") {
      var a = new RegExp(t.pattern);
      a.test(n) || r.push(_r(i.messages.pattern.mismatch, t.fullField, n, t.pattern));
    }
  }
}, bn = {
  required: lM,
  whitespace: Sq,
  type: $q,
  range: Pq,
  enum: Oq,
  pattern: kq
}, Iq = function(t, n, o, r, i) {
  var a = [], l = t.required || !t.required && r.hasOwnProperty(t.field);
  if (l) {
    if (No(n, "string") && !t.required)
      return o();
    bn.required(t, n, r, a, i, "string"), No(n, "string") || (bn.type(t, n, r, a, i), bn.range(t, n, r, a, i), bn.pattern(t, n, r, a, i), t.whitespace === !0 && bn.whitespace(t, n, r, a, i));
  }
  o(a);
}, Tq = function(t, n, o, r, i) {
  var a = [], l = t.required || !t.required && r.hasOwnProperty(t.field);
  if (l) {
    if (No(n) && !t.required)
      return o();
    bn.required(t, n, r, a, i), n !== void 0 && bn.type(t, n, r, a, i);
  }
  o(a);
}, _q = function(t, n, o, r, i) {
  var a = [], l = t.required || !t.required && r.hasOwnProperty(t.field);
  if (l) {
    if (n === "" && (n = void 0), No(n) && !t.required)
      return o();
    bn.required(t, n, r, a, i), n !== void 0 && (bn.type(t, n, r, a, i), bn.range(t, n, r, a, i));
  }
  o(a);
}, Mq = function(t, n, o, r, i) {
  var a = [], l = t.required || !t.required && r.hasOwnProperty(t.field);
  if (l) {
    if (No(n) && !t.required)
      return o();
    bn.required(t, n, r, a, i), n !== void 0 && bn.type(t, n, r, a, i);
  }
  o(a);
}, Eq = function(t, n, o, r, i) {
  var a = [], l = t.required || !t.required && r.hasOwnProperty(t.field);
  if (l) {
    if (No(n) && !t.required)
      return o();
    bn.required(t, n, r, a, i), No(n) || bn.type(t, n, r, a, i);
  }
  o(a);
}, Dq = function(t, n, o, r, i) {
  var a = [], l = t.required || !t.required && r.hasOwnProperty(t.field);
  if (l) {
    if (No(n) && !t.required)
      return o();
    bn.required(t, n, r, a, i), n !== void 0 && (bn.type(t, n, r, a, i), bn.range(t, n, r, a, i));
  }
  o(a);
}, Aq = function(t, n, o, r, i) {
  var a = [], l = t.required || !t.required && r.hasOwnProperty(t.field);
  if (l) {
    if (No(n) && !t.required)
      return o();
    bn.required(t, n, r, a, i), n !== void 0 && (bn.type(t, n, r, a, i), bn.range(t, n, r, a, i));
  }
  o(a);
}, Nq = function(t, n, o, r, i) {
  var a = [], l = t.required || !t.required && r.hasOwnProperty(t.field);
  if (l) {
    if (n == null && !t.required)
      return o();
    bn.required(t, n, r, a, i, "array"), n != null && (bn.type(t, n, r, a, i), bn.range(t, n, r, a, i));
  }
  o(a);
}, Rq = function(t, n, o, r, i) {
  var a = [], l = t.required || !t.required && r.hasOwnProperty(t.field);
  if (l) {
    if (No(n) && !t.required)
      return o();
    bn.required(t, n, r, a, i), n !== void 0 && bn.type(t, n, r, a, i);
  }
  o(a);
}, zq = "enum", Fq = function(t, n, o, r, i) {
  var a = [], l = t.required || !t.required && r.hasOwnProperty(t.field);
  if (l) {
    if (No(n) && !t.required)
      return o();
    bn.required(t, n, r, a, i), n !== void 0 && bn[zq](t, n, r, a, i);
  }
  o(a);
}, Bq = function(t, n, o, r, i) {
  var a = [], l = t.required || !t.required && r.hasOwnProperty(t.field);
  if (l) {
    if (No(n, "string") && !t.required)
      return o();
    bn.required(t, n, r, a, i), No(n, "string") || bn.pattern(t, n, r, a, i);
  }
  o(a);
}, Lq = function(t, n, o, r, i) {
  var a = [], l = t.required || !t.required && r.hasOwnProperty(t.field);
  if (l) {
    if (No(n, "date") && !t.required)
      return o();
    if (bn.required(t, n, r, a, i), !No(n, "date")) {
      var s;
      n instanceof Date ? s = n : s = new Date(n), bn.type(t, s, r, a, i), s && bn.range(t, s.getTime(), r, a, i);
    }
  }
  o(a);
}, Hq = function(t, n, o, r, i) {
  var a = [], l = Array.isArray(n) ? "array" : typeof n;
  bn.required(t, n, r, a, i, l), o(a);
}, yv = function(t, n, o, r, i) {
  var a = t.type, l = [], s = t.required || !t.required && r.hasOwnProperty(t.field);
  if (s) {
    if (No(n, a) && !t.required)
      return o();
    bn.required(t, n, r, l, i, a), No(n, a) || bn.type(t, n, r, l, i);
  }
  o(l);
}, Vq = function(t, n, o, r, i) {
  var a = [], l = t.required || !t.required && r.hasOwnProperty(t.field);
  if (l) {
    if (No(n) && !t.required)
      return o();
    bn.required(t, n, r, a, i);
  }
  o(a);
}, Jc = {
  string: Iq,
  method: Tq,
  number: _q,
  boolean: Mq,
  regexp: Eq,
  integer: Dq,
  float: Aq,
  array: Nq,
  object: Rq,
  enum: Fq,
  pattern: Bq,
  date: Lq,
  url: yv,
  hex: yv,
  email: yv,
  required: Hq,
  any: Vq
};
function xb() {
  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 wb = xb(), qd = /* @__PURE__ */ (function() {
  function e(n) {
    this.rules = null, this._messages = wb, this.define(n);
  }
  var t = e.prototype;
  return t.define = function(o) {
    var r = 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(i) {
      var a = o[i];
      r.rules[i] = Array.isArray(a) ? a : [a];
    });
  }, t.messages = function(o) {
    return o && (this._messages = vC(xb(), o)), this._messages;
  }, t.validate = function(o, r, i) {
    var a = this;
    r === void 0 && (r = {}), i === void 0 && (i = function() {
    });
    var l = o, s = r, u = i;
    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(g) {
      var m = [], x = {};
      function S(P) {
        if (Array.isArray(P)) {
          var $;
          m = ($ = m).concat.apply($, P);
        } else
          m.push(P);
      }
      for (var C = 0; C < g.length; C++)
        S(g[C]);
      m.length ? (x = yb(m), u(m, x)) : u(null, l);
    }
    if (s.messages) {
      var d = this.messages();
      d === wb && (d = xb()), vC(d, s.messages), s.messages = d;
    } else
      s.messages = this.messages();
    var f = {}, p = s.keys || Object.keys(this.rules);
    p.forEach(function(g) {
      var m = a.rules[g], x = l[g];
      m.forEach(function(S) {
        var C = S;
        typeof C.transform == "function" && (l === o && (l = ms({}, l)), x = l[g] = C.transform(x)), typeof C == "function" ? C = {
          validator: C
        } : C = ms({}, C), C.validator = a.getValidationMethod(C), C.validator && (C.field = g, C.fullField = C.fullField || g, C.type = a.getType(C), f[g] = f[g] || [], f[g].push({
          rule: C,
          value: x,
          source: l,
          field: g
        }));
      });
    });
    var v = {};
    return yq(f, s, function(g, m) {
      var x = g.rule, S = (x.type === "object" || x.type === "array") && (typeof x.fields == "object" || typeof x.defaultField == "object");
      S = S && (x.required || !x.required && g.value), x.field = g.field;
      function C(I, w) {
        return ms({}, w, {
          fullField: x.fullField + "." + I,
          fullFields: x.fullFields ? [].concat(x.fullFields, [I]) : [I]
        });
      }
      function P(I) {
        I === void 0 && (I = []);
        var w = Array.isArray(I) ? I : [I];
        !s.suppressWarning && w.length && e.warning("async-validator:", w), w.length && x.message !== void 0 && (w = [].concat(x.message));
        var T = w.map(gC(x, l));
        if (s.first && T.length)
          return v[x.field] = 1, m(T);
        if (!S)
          m(T);
        else {
          if (x.required && !g.value)
            return x.message !== void 0 ? T = [].concat(x.message).map(gC(x, l)) : s.error && (T = [s.error(x, _r(s.messages.required, x.field))]), m(T);
          var M = {};
          x.defaultField && Object.keys(g.value).map(function(H) {
            M[H] = x.defaultField;
          }), M = ms({}, M, g.rule.fields);
          var R = {};
          Object.keys(M).forEach(function(H) {
            var L = M[H], F = Array.isArray(L) ? L : [L];
            R[H] = F.map(C.bind(null, H));
          });
          var N = new e(R);
          N.messages(s.messages), g.rule.options && (g.rule.options.messages = s.messages, g.rule.options.error = s.error), N.validate(g.value, g.rule.options || s, function(H) {
            var L = [];
            T && T.length && L.push.apply(L, T), H && H.length && L.push.apply(L, H), m(L.length ? L : null);
          });
        }
      }
      var $;
      if (x.asyncValidator)
        $ = x.asyncValidator(x, g.value, P, g.source, s);
      else if (x.validator) {
        try {
          $ = x.validator(x, g.value, P, g.source, s);
        } catch (I) {
          console.error?.(I), s.suppressValidatorError || setTimeout(function() {
            throw I;
          }, 0), P(I.message);
        }
        $ === !0 ? P() : $ === !1 ? P(typeof x.message == "function" ? x.message(x.fullField || x.field) : x.message || (x.fullField || x.field) + " fails") : $ instanceof Array ? P($) : $ instanceof Error && P($.message);
      }
      $ && $.then && $.then(function() {
        return P();
      }, function(I) {
        return P(I);
      });
    }, function(g) {
      c(g);
    }, l);
  }, t.getType = function(o) {
    if (o.type === void 0 && o.pattern instanceof RegExp && (o.type = "pattern"), typeof o.validator != "function" && o.type && !Jc.hasOwnProperty(o.type))
      throw new Error(_r("Unknown rule type %s", o.type));
    return o.type || "string";
  }, t.getValidationMethod = function(o) {
    if (typeof o.validator == "function")
      return o.validator;
    var r = Object.keys(o), i = r.indexOf("message");
    return i !== -1 && r.splice(i, 1), r.length === 1 && r[0] === "required" ? Jc.required : Jc[this.getType(o)] || void 0;
  }, e;
})();
qd.register = function(t, n) {
  if (typeof n != "function")
    throw new Error("Cannot register a validator by type, validator is not a function");
  Jc[t] = n;
};
qd.warning = aM;
qd.messages = wb;
qd.validators = Jc;
function _l(e) {
  return e == null ? [] : Array.isArray(e) ? e : [e];
}
function sM(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 uM(e, t, n, o) {
  if (!t.length)
    return n;
  const [r, ...i] = t;
  let a;
  return !e && typeof r == "number" ? a = [] : Array.isArray(e) ? a = [...e] : a = O({}, e), o && n === void 0 && i.length === 1 ? delete a[r][i[0]] : a[r] = uM(a[r], i, n, o), a;
}
function jq(e, t, n) {
  let o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
  return t.length && o && n === void 0 && !sM(e, t.slice(0, -1)) ? e : uM(e, t, n, o);
}
function Sb(e) {
  return _l(e);
}
function Wq(e, t) {
  return sM(e, t);
}
function Kq(e, t, n) {
  let o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
  return jq(e, t, n, o);
}
function qq(e, t) {
  return e && e.some((n) => Gq(n, t));
}
function bC(e) {
  return typeof e == "object" && e !== null && Object.getPrototypeOf(e) === Object.prototype;
}
function cM(e, t) {
  const n = Array.isArray(e) ? [...e] : O({}, e);
  return t && Object.keys(t).forEach((o) => {
    const r = n[o], i = t[o], a = bC(r) && bC(i);
    n[o] = a ? cM(r, i || {}) : i;
  }), n;
}
function Yq(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((r, i) => cM(r, i), e);
}
function yC(e, t) {
  let n = {};
  return t.forEach((o) => {
    const r = Wq(e, o);
    n = Kq(n, o, r);
  }), n;
}
function Gq(e, t) {
  return !e || !t || e.length !== t.length ? !1 : e.every((n, o) => t[o] === n);
}
const $r = "'${name}' is not a valid ${type}", tg = {
  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: $r,
    method: $r,
    array: $r,
    object: $r,
    number: $r,
    date: $r,
    boolean: $r,
    integer: $r,
    float: $r,
    regexp: $r,
    email: $r,
    url: $r,
    hex: $r
  },
  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 ng = function(e, t, n, o) {
  function r(i) {
    return i instanceof n ? i : new n(function(a) {
      a(i);
    });
  }
  return new (n || (n = Promise))(function(i, 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 ? i(c.value) : r(c.value).then(l, s);
    }
    u((o = o.apply(e, t || [])).next());
  });
};
const Uq = qd;
function Xq(e, t) {
  return e.replace(/\$\{\w+\}/g, (n) => {
    const o = n.slice(2, -1);
    return t[o];
  });
}
function Cb(e, t, n, o, r) {
  return ng(this, void 0, void 0, function* () {
    const i = O({}, n);
    delete i.ruleIndex, delete i.trigger;
    let a = null;
    i && i.type === "array" && i.defaultField && (a = i.defaultField, delete i.defaultField);
    const l = new Uq({
      [e]: [i]
    }), s = Yq({}, tg, o.validateMessages);
    l.messages(s);
    let u = [];
    try {
      yield Promise.resolve(l.validate({
        [e]: t
      }, O({}, o)));
    } catch (f) {
      f.errors ? u = f.errors.map((p, v) => {
        let {
          message: g
        } = p;
        return (
          // Wrap VueNode with `key`
          Ao(g) ? Ml(g, {
            key: `error_${v}`
          }) : g
        );
      }) : (console.error(f), u = [s.default()]);
    }
    if (!u.length && a)
      return (yield Promise.all(t.map((p, v) => Cb(`${e}.${v}`, p, a, o, r)))).reduce((p, v) => [...p, ...v], []);
    const c = O(O(O({}, n), {
      name: e,
      enum: (n.enum || []).join(", ")
    }), r);
    return u.map((f) => typeof f == "string" ? Xq(f, c) : f);
  });
}
function dM(e, t, n, o, r, i) {
  const a = e.join("."), l = n.map((u, c) => {
    const d = u.validator, f = O(O({}, u), {
      ruleIndex: c
    });
    return d && (f.validator = (p, v, g) => {
      let m = !1;
      const S = d(p, v, function() {
        for (var C = arguments.length, P = new Array(C), $ = 0; $ < C; $++)
          P[$] = arguments[$];
        Promise.resolve().then(() => {
          wn(!m, "Your validator function has already return a promise. `callback` will be ignored."), m || g(...P);
        });
      });
      m = S && typeof S.then == "function" && typeof S.catch == "function", wn(m, "`callback` is deprecated. Please return a promise instead."), m && S.then(() => {
        g();
      }).catch((C) => {
        g(C || " ");
      });
    }), f;
  }).sort((u, c) => {
    let {
      warningOnly: d,
      ruleIndex: f
    } = u, {
      warningOnly: p,
      ruleIndex: v
    } = c;
    return !!d == !!p ? f - v : d ? 1 : -1;
  });
  let s;
  if (r === !0)
    s = new Promise((u, c) => ng(this, void 0, void 0, function* () {
      for (let d = 0; d < l.length; d += 1) {
        const f = l[d], p = yield Cb(a, t, f, o, i);
        if (p.length) {
          c([{
            errors: p,
            rule: f
          }]);
          return;
        }
      }
      u([]);
    }));
  else {
    const u = l.map((c) => Cb(a, t, c, o, i).then((d) => ({
      errors: d,
      rule: c
    })));
    s = (r ? Zq(u) : Qq(u)).then((c) => Promise.reject(c));
  }
  return s.catch((u) => u), s;
}
function Qq(e) {
  return ng(this, void 0, void 0, function* () {
    return Promise.all(e).then((t) => [].concat(...t));
  });
}
function Zq(e) {
  return ng(this, void 0, void 0, function* () {
    let t = 0;
    return new Promise((n) => {
      e.forEach((o) => {
        o.then((r) => {
          r.errors.length && n([r]), t += 1, t === e.length && n([]);
        });
      });
    });
  });
}
const fM = Symbol("formContextKey"), pM = (e) => {
  Bt(fM, e);
}, ix = () => zt(fM, {
  name: E(() => {
  }),
  labelAlign: E(() => "right"),
  vertical: E(() => !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: E(() => {
  }),
  rules: E(() => {
  }),
  colon: E(() => {
  }),
  labelWrap: E(() => {
  }),
  labelCol: E(() => {
  }),
  requiredMark: E(() => !1),
  validateTrigger: E(() => {
  }),
  onValidate: () => {
  },
  validateMessages: E(() => tg)
}), hM = Symbol("formItemPrefixContextKey"), Jq = (e) => {
  Bt(hM, e);
}, eY = () => zt(hM, {
  prefixCls: E(() => "")
});
function tY(e) {
  return typeof e == "number" ? `${e} ${e} auto` : /^\d+(\.\d+)?(px|em|rem|%)$/.test(e) ? `0 0 ${e}` : e;
}
const nY = () => ({
  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]
}), oY = ["xs", "sm", "md", "lg", "xl", "xxl"], ax = be({
  compatConfig: {
    MODE: 3
  },
  name: "ACol",
  inheritAttrs: !1,
  props: nY(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      gutter: r,
      supportFlexGap: i,
      wrap: a
    } = rq(), {
      prefixCls: l,
      direction: s
    } = Nt("col", e), [u, c] = cq(l), d = E(() => {
      const {
        span: p,
        order: v,
        offset: g,
        push: m,
        pull: x
      } = e, S = l.value;
      let C = {};
      return oY.forEach((P) => {
        let $ = {};
        const I = e[P];
        typeof I == "number" ? $.span = I : typeof I == "object" && ($ = I || {}), C = O(O({}, C), {
          [`${S}-${P}-${$.span}`]: $.span !== void 0,
          [`${S}-${P}-order-${$.order}`]: $.order || $.order === 0,
          [`${S}-${P}-offset-${$.offset}`]: $.offset || $.offset === 0,
          [`${S}-${P}-push-${$.push}`]: $.push || $.push === 0,
          [`${S}-${P}-pull-${$.pull}`]: $.pull || $.pull === 0,
          [`${S}-rtl`]: s.value === "rtl"
        });
      }), Me(S, {
        [`${S}-${p}`]: p !== void 0,
        [`${S}-order-${v}`]: v,
        [`${S}-offset-${g}`]: g,
        [`${S}-push-${m}`]: m,
        [`${S}-pull-${x}`]: x
      }, C, o.class, c.value);
    }), f = E(() => {
      const {
        flex: p
      } = e, v = r.value, g = {};
      if (v && v[0] > 0) {
        const m = `${v[0] / 2}px`;
        g.paddingLeft = m, g.paddingRight = m;
      }
      if (v && v[1] > 0 && !i.value) {
        const m = `${v[1] / 2}px`;
        g.paddingTop = m, g.paddingBottom = m;
      }
      return p && (g.flex = tY(p), a.value === !1 && !g.minWidth && (g.minWidth = 0)), g;
    });
    return () => {
      var p;
      return u(h("div", Q(Q({}, o), {}, {
        class: d.value,
        style: [f.value, o.style]
      }), [(p = n.default) === null || p === void 0 ? void 0 : p.call(n)]));
    };
  }
});
var rY = { 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 xC(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      iY(e, r, n[r]);
    });
  }
  return e;
}
function iY(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var lx = function(t, n) {
  var o = xC({}, t, n.attrs);
  return h(an, xC({}, o, {
    icon: rY
  }), null);
};
lx.displayName = "QuestionCircleOutlined";
lx.inheritAttrs = !1;
const sx = (e, t) => {
  let {
    slots: n,
    emit: o,
    attrs: r
  } = t;
  var i, a, l, s, u;
  const {
    prefixCls: c,
    htmlFor: d,
    labelCol: f,
    labelAlign: p,
    colon: v,
    required: g,
    requiredMark: m
  } = O(O({}, e), r), [x] = Rl("Form"), S = (i = e.label) !== null && i !== void 0 ? i : (a = n.label) === null || a === void 0 ? void 0 : a.call(n);
  if (!S) return null;
  const {
    vertical: C,
    labelAlign: P,
    labelCol: $,
    labelWrap: I,
    colon: w
  } = ix(), T = f || $?.value || {}, M = p || P?.value, R = `${c}-item-label`, N = Me(R, M === "left" && `${R}-left`, T.class, {
    [`${R}-wrap`]: !!I.value
  });
  let H = S;
  const L = v === !0 || w?.value !== !1 && v !== !1;
  if (L && !C.value && typeof S == "string" && S.trim() !== "" && (H = S.replace(/[:|：]\s*$/, "")), e.tooltip || n.tooltip) {
    const G = h("span", {
      class: `${c}-item-tooltip`
    }, [h(Lo, {
      title: e.tooltip
    }, {
      default: () => [h(lx, null, null)]
    })]);
    H = h(Je, null, [H, n.tooltip ? (l = n.tooltip) === null || l === void 0 ? void 0 : l.call(n, {
      class: `${c}-item-tooltip`
    }) : G]);
  }
  m === "optional" && !g && (H = h(Je, null, [H, h("span", {
    class: `${c}-item-optional`
  }, [((s = x.value) === null || s === void 0 ? void 0 : s.optional) || ((u = La.Form) === null || u === void 0 ? void 0 : u.optional)])]));
  const A = Me({
    [`${c}-item-required`]: g,
    [`${c}-item-required-mark-optional`]: m === "optional",
    [`${c}-item-no-colon`]: !L
  });
  return h(ax, Q(Q({}, T), {}, {
    class: N
  }), {
    default: () => [h("label", {
      for: d,
      class: A,
      title: typeof S == "string" ? S : "",
      onClick: (G) => o("click", G)
    }, [H])]
  });
};
sx.displayName = "FormItemLabel";
sx.inheritAttrs = !1;
const aY = (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)"
        }
      }
    }
  };
}, lY = (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
  }
}), wC = (e, t) => {
  const {
    formItemCls: n
  } = e;
  return {
    [n]: {
      [`${n}-label > label`]: {
        height: t
      },
      [`${n}-control-input`]: {
        minHeight: t
      }
    }
  };
}, sY = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [e.componentCls]: O(O(O({}, fn(e)), lY(e)), {
      [`${t}-text`]: {
        display: "inline-block",
        paddingInlineEnd: e.paddingSM
      },
      // ================================================================
      // =                             Size                             =
      // ================================================================
      "&-small": O({}, wC(e, e.controlHeightSM)),
      "&-large": O({}, wC(e, e.controlHeightLG))
    })
  };
}, uY = (e) => {
  const {
    formItemCls: t,
    iconCls: n,
    componentCls: o,
    rootPrefixCls: r
  } = e;
  return {
    [t]: O(O({}, fn(e)), {
      marginBottom: e.marginLG,
      verticalAlign: "top",
      "&-with-help": {
        transition: "none"
      },
      [`&-hidden,
        &-hidden.${r}-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^="'${r}-col-'"]):not([class*="' ${r}-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: S0,
        animationDuration: e.motionDurationMid,
        animationTimingFunction: e.motionEaseOutBack,
        pointerEvents: "none",
        "&-success": {
          color: e.colorSuccess
        },
        "&-error": {
          color: e.colorError
        },
        "&-warning": {
          color: e.colorWarning
        },
        "&-validating": {
          color: e.colorPrimary
        }
      }
    })
  };
}, cY = (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"
      }
    }
  };
}, dY = (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"
        }
      }
    }
  };
}, mu = (e) => ({
  margin: 0,
  padding: `0 0 ${e.paddingXS}px`,
  whiteSpace: "initial",
  textAlign: "start",
  "> label": {
    margin: 0,
    "&::after": {
      display: "none"
    }
  }
}), fY = (e) => {
  const {
    componentCls: t,
    formItemCls: n
  } = e;
  return {
    [`${n} ${n}-label`]: mu(e),
    [t]: {
      [n]: {
        flexWrap: "wrap",
        [`${n}-label,
          ${n}-control`]: {
          flex: "0 0 100%",
          maxWidth: "100%"
        }
      }
    }
  };
}, pY = (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`]: mu(e),
    [`@media (max-width: ${e.screenXSMax}px)`]: [fY(e), {
      [t]: {
        [`.${o}-col-xs-24${n}-label`]: mu(e)
      }
    }],
    [`@media (max-width: ${e.screenSMMax}px)`]: {
      [t]: {
        [`.${o}-col-sm-24${n}-label`]: mu(e)
      }
    },
    [`@media (max-width: ${e.screenMDMax}px)`]: {
      [t]: {
        [`.${o}-col-md-24${n}-label`]: mu(e)
      }
    },
    [`@media (max-width: ${e.screenLGMax}px)`]: {
      [t]: {
        [`.${o}-col-lg-24${n}-label`]: mu(e)
      }
    }
  };
}, ux = On("Form", (e, t) => {
  let {
    rootPrefixCls: n
  } = t;
  const o = Qt(e, {
    formItemCls: `${e.componentCls}-item`,
    rootPrefixCls: n
  });
  return [sY(o), uY(o), aY(o), cY(o), dY(o), pY(o), Wh(o), S0];
}), hY = be({
  compatConfig: {
    MODE: 3
  },
  name: "ErrorList",
  inheritAttrs: !1,
  props: ["errors", "help", "onErrorVisibleChanged", "helpStatus", "warnings"],
  setup(e, t) {
    let {
      attrs: n
    } = t;
    const {
      prefixCls: o,
      status: r
    } = eY(), i = E(() => `${o.value}-item-explain`), a = E(() => !!(e.errors && e.errors.length)), l = le(r.value), [, s] = ux(o);
    return Ie([a, r], () => {
      a.value && (l.value = r.value);
    }), () => {
      var u, c;
      const d = Kh(`${o.value}-show-help-item`), f = l0(`${o.value}-show-help-item`, d);
      return f.role = "alert", f.class = [s.value, i.value, n.class, `${o.value}-show-help`], h(Dr, Q(Q({}, _s(`${o.value}-show-help`)), {}, {
        onAfterEnter: () => e.onErrorVisibleChanged(!0),
        onAfterLeave: () => e.onErrorVisibleChanged(!1)
      }), {
        default: () => [ti(h(ey, Q(Q({}, f), {}, {
          tag: "div"
        }), {
          default: () => [(c = e.errors) === null || c === void 0 ? void 0 : c.map((p, v) => h("div", {
            key: v,
            class: l.value ? `${i.value}-${l.value}` : ""
          }, [p]))]
        }), [[Oi, !!(!((u = e.errors) === null || u === void 0) && u.length)]])]
      });
    };
  }
}), gY = be({
  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 = ix(), {
      wrapperCol: r
    } = o, i = O({}, o);
    return delete i.labelCol, delete i.wrapperCol, pM(i), Jq({
      prefixCls: E(() => e.prefixCls),
      status: E(() => 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: v = Do((l = n.errors) === null || l === void 0 ? void 0 : l.call(n)),
        // hasFeedback,
        // status,
        extra: g = (s = n.extra) === null || s === void 0 ? void 0 : s.call(n)
      } = e, m = `${u}-item`, x = c || r?.value || {}, S = Me(`${m}-control`, x.class);
      return h(ax, Q(Q({}, x), {}, {
        class: S
      }), {
        default: () => {
          var C;
          return h(Je, null, [h("div", {
            class: `${m}-control-input`
          }, [h("div", {
            class: `${m}-control-input-content`
          }, [(C = n.default) === null || C === void 0 ? void 0 : C.call(n)])]), d !== null || v.length ? h("div", {
            style: {
              display: "flex",
              flexWrap: "nowrap"
            }
          }, [h(hY, {
            errors: v,
            help: p,
            class: `${m}-explain-connected`,
            onErrorVisibleChanged: f
          }, null), !!d && h("div", {
            style: {
              width: 0,
              height: `${d}px`
            }
          }, null)]) : null, g ? h("div", {
            class: `${m}-extra`
          }, [g]) : null]);
        }
      });
    };
  }
});
function vY(e) {
  const t = $e(e.value.slice());
  let n = null;
  return It(() => {
    clearTimeout(n), n = setTimeout(() => {
      t.value = e.value;
    }, e.value.length ? 0 : 10);
  }), t;
}
Ti("success", "warning", "error", "validating", "");
const mY = {
  success: Fl,
  warning: Bl,
  error: Fr,
  validating: Mi
};
function xv(e, t, n) {
  let o = e;
  const r = t;
  let i = 0;
  try {
    for (let a = r.length; i < a - 1 && !(!o && !n); ++i) {
      const l = r[i];
      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: r[i],
    v: o ? o[r[i]] : void 0
  };
}
const bY = () => ({
  htmlFor: String,
  prefixCls: String,
  label: pe.any,
  help: pe.any,
  extra: pe.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: pe.oneOf(Ti("", "success", "warning", "error", "validating")),
  validateTrigger: {
    type: [String, Array]
  },
  messageVariables: {
    type: Object
  },
  hidden: Boolean,
  noStyle: Boolean,
  tooltip: String
});
let yY = 0;
const xY = "form_item", wY = be({
  compatConfig: {
    MODE: 3
  },
  name: "AFormItem",
  inheritAttrs: !1,
  __ANT_NEW_FORM_ITEM: !0,
  props: bY(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      expose: r
    } = t;
    wn(e.prop === void 0, "`prop` is deprecated. Please use `name` instead.");
    const i = `form-item-${++yY}`, {
      prefixCls: a
    } = Nt("form", e), [l, s] = ux(a), u = $e(), c = ix(), d = E(() => e.name || e.prop), f = $e([]), p = $e(!1), v = $e(), g = E(() => {
      const ie = d.value;
      return Sb(ie);
    }), m = E(() => {
      if (g.value.length) {
        const ie = c.name.value, re = g.value.join("_");
        return ie ? `${ie}_${re}` : `${xY}_${re}`;
      } else
        return;
    }), x = () => {
      const ie = c.model.value;
      if (!(!ie || !d.value))
        return xv(ie, g.value, !0).v;
    }, S = E(() => x()), C = $e(Kf(S.value)), P = E(() => {
      let ie = e.validateTrigger !== void 0 ? e.validateTrigger : c.validateTrigger.value;
      return ie = ie === void 0 ? "change" : ie, _l(ie);
    }), $ = E(() => {
      let ie = c.rules.value;
      const re = e.rules, te = e.required !== void 0 ? {
        required: !!e.required,
        trigger: P.value
      } : [], ve = xv(ie, g.value);
      ie = ie ? ve.o[ve.k] || ve.v : [];
      const ce = [].concat(re || ie || []);
      return qE(ce, (fe) => fe.required) ? ce : ce.concat(te);
    }), I = E(() => {
      const ie = $.value;
      let re = !1;
      return ie && ie.length && ie.every((te) => te.required ? (re = !0, !1) : !0), re || e.required;
    }), w = $e();
    It(() => {
      w.value = e.validateStatus;
    });
    const T = E(() => {
      let ie = {};
      return typeof e.label == "string" ? ie.label = e.label : e.name && (ie.label = String(e.name)), e.messageVariables && (ie = O(O({}, ie), e.messageVariables)), ie;
    }), M = (ie) => {
      if (g.value.length === 0)
        return;
      const {
        validateFirst: re = !1
      } = e, {
        triggerName: te
      } = ie || {};
      let ve = $.value;
      if (te && (ve = ve.filter((fe) => {
        const {
          trigger: ge
        } = fe;
        return !ge && !P.value.length ? !0 : _l(ge || P.value).includes(te);
      })), !ve.length)
        return Promise.resolve();
      const ce = dM(g.value, S.value, ve, O({
        validateMessages: c.validateMessages.value
      }, ie), re, T.value);
      return w.value = "validating", f.value = [], ce.catch((fe) => fe).then(function() {
        let fe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
        if (w.value === "validating") {
          const ge = fe.filter((Te) => Te && Te.errors.length);
          w.value = ge.length ? "error" : "success", f.value = ge.map((Te) => Te.errors), c.onValidate(d.value, !f.value.length, f.value.length ? fr(f.value[0]) : null);
        }
      }), ce;
    }, R = () => {
      M({
        triggerName: "blur"
      });
    }, N = () => {
      if (p.value) {
        p.value = !1;
        return;
      }
      M({
        triggerName: "change"
      });
    }, H = () => {
      w.value = e.validateStatus, p.value = !1, f.value = [];
    }, L = () => {
      var ie;
      w.value = e.validateStatus, p.value = !0, f.value = [];
      const re = c.model.value || {}, te = S.value, ve = xv(re, g.value, !0);
      Array.isArray(te) ? ve.o[ve.k] = [].concat((ie = C.value) !== null && ie !== void 0 ? ie : []) : ve.o[ve.k] = C.value, Yt(() => {
        p.value = !1;
      });
    }, F = E(() => e.htmlFor === void 0 ? m.value : e.htmlFor), A = () => {
      const ie = F.value;
      if (!ie || !v.value)
        return;
      const re = v.value.$el.querySelector(`[id="${ie}"]`);
      re && re.focus && re.focus();
    };
    r({
      onFieldBlur: R,
      onFieldChange: N,
      clearValidate: H,
      resetField: L
    }), EV({
      id: m,
      onFieldBlur: () => {
        e.autoLink && R();
      },
      onFieldChange: () => {
        e.autoLink && N();
      },
      clearValidate: H
    }, E(() => !!(e.autoLink && c.model.value && d.value)));
    let G = !1;
    Ie(d, (ie) => {
      ie ? G || (G = !0, c.addField(i, {
        fieldValue: S,
        fieldId: m,
        fieldName: d,
        resetField: L,
        clearValidate: H,
        namePath: g,
        validateRules: M,
        rules: $
      })) : (G = !1, c.removeField(i));
    }, {
      immediate: !0
    }), qt(() => {
      c.removeField(i);
    });
    const j = vY(f), Z = E(() => e.validateStatus !== void 0 ? e.validateStatus : j.value.length ? "error" : w.value), W = E(() => ({
      [`${a.value}-item`]: !0,
      [s.value]: !0,
      // Status
      [`${a.value}-item-has-feedback`]: Z.value && e.hasFeedback,
      [`${a.value}-item-has-success`]: Z.value === "success",
      [`${a.value}-item-has-warning`]: Z.value === "warning",
      [`${a.value}-item-has-error`]: Z.value === "error",
      [`${a.value}-item-is-validating`]: Z.value === "validating",
      [`${a.value}-item-hidden`]: e.hidden
    })), K = $n({});
    Nr.useProvide(K), It(() => {
      let ie;
      if (e.hasFeedback) {
        const re = Z.value && mY[Z.value];
        ie = re ? h("span", {
          class: Me(`${a.value}-item-feedback-icon`, `${a.value}-item-feedback-icon-${Z.value}`)
        }, [h(re, null, null)]) : null;
      }
      O(K, {
        status: Z.value,
        hasFeedback: e.hasFeedback,
        feedbackIcon: ie,
        isFormItemInput: !0
      });
    });
    const q = $e(null), U = $e(!1), ae = () => {
      if (u.value) {
        const ie = getComputedStyle(u.value);
        q.value = parseInt(ie.marginBottom, 10);
      }
    };
    At(() => {
      Ie(U, () => {
        U.value && ae();
      }, {
        flush: "post",
        immediate: !0
      });
    });
    const se = (ie) => {
      ie || (q.value = null);
    };
    return () => {
      var ie, re;
      if (e.noStyle) return (ie = n.default) === null || ie === void 0 ? void 0 : ie.call(n);
      const te = (re = e.help) !== null && re !== void 0 ? re : n.help ? Do(n.help()) : null, ve = !!(te != null && Array.isArray(te) && te.length || j.value.length);
      return U.value = ve, l(h("div", {
        class: [W.value, ve ? `${a.value}-item-with-help` : "", o.class],
        ref: u
      }, [h(iM, Q(Q({}, o), {}, {
        class: `${a.value}-item-row`,
        key: "row"
      }), {
        default: () => {
          var ce, fe;
          return h(Je, null, [h(sx, Q(Q({}, e), {}, {
            htmlFor: F.value,
            required: I.value,
            requiredMark: c.requiredMark.value,
            prefixCls: a.value,
            onClick: A,
            label: e.label
          }), {
            label: n.label,
            tooltip: n.tooltip
          }), h(gY, Q(Q({}, e), {}, {
            errors: te != null ? _l(te) : j.value,
            marginBottom: q.value,
            prefixCls: a.value,
            status: Z.value,
            ref: v,
            help: te,
            extra: (ce = e.extra) !== null && ce !== void 0 ? ce : (fe = n.extra) === null || fe === void 0 ? void 0 : fe.call(n),
            onErrorVisibleChanged: se
          }), {
            default: n.default
          })]);
        }
      }), !!q.value && h("div", {
        class: `${a.value}-margin-offset`,
        style: {
          marginBottom: `-${q.value}px`
        }
      }, null)]));
    };
  }
});
function gM(e) {
  let t = !1, n = e.length;
  const o = [];
  return e.length ? new Promise((r, i) => {
    e.forEach((a, l) => {
      a.catch((s) => (t = !0, s)).then((s) => {
        n -= 1, o[l] = s, !(n > 0) && (t && i(o), r(o));
      });
    });
  }) : Promise.resolve([]);
}
function SC(e) {
  let t = !1;
  return e && e.length && e.every((n) => n.required ? (t = !0, !1) : !0), t;
}
function CC(e) {
  return e == null ? [] : Array.isArray(e) ? e : [e];
}
function wv(e, t, n) {
  let o = e;
  t = t.replace(/\[(\w+)\]/g, ".$1"), t = t.replace(/^\./, "");
  const r = t.split(".");
  let i = 0;
  for (let a = r.length; i < a - 1 && !(!o && !n); ++i) {
    const l = r[i];
    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: r[i],
    v: o ? o[r[i]] : null,
    isValid: o && r[i] in o
  };
}
function SY(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : le({}), n = arguments.length > 2 ? arguments[2] : void 0;
  const o = Kf(_(e)), r = $n({}), i = $e([]), a = (C) => {
    O(_(e), O(O({}, Kf(o)), C)), Yt(() => {
      Object.keys(r).forEach((P) => {
        r[P] = {
          autoLink: !1,
          required: SC(_(t)[P])
        };
      });
    });
  }, l = function() {
    let C = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], P = arguments.length > 1 ? arguments[1] : void 0;
    return P.length ? C.filter(($) => {
      const I = CC($.trigger || "change");
      return YE(I, P).length;
    }) : C;
  };
  let s = null;
  const u = function(C) {
    let P = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, $ = arguments.length > 2 ? arguments[2] : void 0;
    const I = [], w = {};
    for (let R = 0; R < C.length; R++) {
      const N = C[R], H = wv(_(e), N, $);
      if (!H.isValid) continue;
      w[N] = H.v;
      const L = l(_(t)[N], CC(P && P.trigger));
      L.length && I.push(c(N, H.v, L, P || {}).then(() => ({
        name: N,
        errors: [],
        warnings: []
      })).catch((F) => {
        const A = [], G = [];
        return F.forEach((j) => {
          let {
            rule: {
              warningOnly: Z
            },
            errors: W
          } = j;
          Z ? G.push(...W) : A.push(...W);
        }), A.length ? Promise.reject({
          name: N,
          errors: A,
          warnings: G
        }) : {
          name: N,
          errors: A,
          warnings: G
        };
      }));
    }
    const T = gM(I);
    s = T;
    const M = T.then(() => s === T ? Promise.resolve(w) : Promise.reject([])).catch((R) => {
      const N = R.filter((H) => H && H.errors.length);
      return N.length ? Promise.reject({
        values: w,
        errorFields: N,
        outOfDate: s !== T
      }) : Promise.resolve(w);
    });
    return M.catch((R) => R), M;
  }, c = function(C, P, $) {
    let I = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
    const w = dM([C], P, $, O({
      validateMessages: tg
    }, I), !!I.validateFirst);
    return r[C] ? (r[C].validateStatus = "validating", w.catch((T) => T).then(function() {
      let T = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
      var M;
      if (r[C].validateStatus === "validating") {
        const R = T.filter((N) => N && N.errors.length);
        r[C].validateStatus = R.length ? "error" : "success", r[C].help = R.length ? R.map((N) => N.errors) : null, (M = n?.onValidate) === null || M === void 0 || M.call(n, C, !R.length, R.length ? fr(r[C].help[0]) : null);
      }
    }), w) : w.catch((T) => T);
  }, d = (C, P) => {
    let $ = [], I = !0;
    C ? Array.isArray(C) ? $ = C : $ = [C] : (I = !1, $ = i.value);
    const w = u($, P || {}, I);
    return w.catch((T) => T), w;
  }, f = (C) => {
    let P = [];
    C ? Array.isArray(C) ? P = C : P = [C] : P = i.value, P.forEach(($) => {
      r[$] && O(r[$], {
        validateStatus: "",
        help: null
      });
    });
  }, p = (C) => {
    const P = {
      autoLink: !1
    }, $ = [], I = Array.isArray(C) ? C : [C];
    for (let w = 0; w < I.length; w++) {
      const T = I[w];
      T?.validateStatus === "error" && (P.validateStatus = "error", T.help && $.push(T.help)), P.required = P.required || T?.required;
    }
    return P.help = $, P;
  };
  let v = o, g = !0;
  const m = (C) => {
    const P = [];
    i.value.forEach(($) => {
      const I = wv(C, $, !1), w = wv(v, $, !1);
      (g && n?.immediate && I.isValid || !ny(I.v, w.v)) && P.push($);
    }), d(P, {
      trigger: "change"
    }), g = !1, v = Kf(fr(C));
  }, x = n?.debounce;
  let S = !0;
  return Ie(t, () => {
    i.value = t ? Object.keys(_(t)) : [], !S && n && n.validateOnRuleChange && d(), S = !1;
  }, {
    deep: !0,
    immediate: !0
  }), Ie(i, () => {
    const C = {};
    i.value.forEach((P) => {
      C[P] = O({}, r[P], {
        autoLink: !1,
        required: SC(_(t)[P])
      }), delete r[P];
    });
    for (const P in r)
      Object.prototype.hasOwnProperty.call(r, P) && delete r[P];
    O(r, C);
  }, {
    immediate: !0
  }), Ie(e, x && x.wait ? LP(m, x.wait, GE(x, ["wait"])) : m, {
    immediate: n && !!n.immediate,
    deep: !0
  }), {
    modelRef: e,
    rulesRef: t,
    initialModel: o,
    validateInfos: r,
    resetFields: a,
    validate: d,
    validateField: c,
    mergeValidateInfo: p,
    clearValidate: f
  };
}
const CY = () => ({
  layout: pe.oneOf(Ti("horizontal", "inline", "vertical")),
  labelCol: Mt(),
  wrapperCol: Mt(),
  colon: ct(),
  labelAlign: rn(),
  labelWrap: ct(),
  prefixCls: String,
  requiredMark: en([String, Boolean]),
  /** @deprecated Will warning in future branch. Pls use `requiredMark` instead. */
  hideRequiredMark: ct(),
  model: pe.object,
  rules: Mt(),
  validateMessages: Mt(),
  validateOnRuleChange: ct(),
  // 提交失败自动滚动到第一个错误字段
  scrollToFirstError: Tr(),
  onSubmit: et(),
  name: String,
  validateTrigger: en([String, Array]),
  size: rn(),
  disabled: ct(),
  onValuesChange: et(),
  onFieldsChange: et(),
  onFinish: et(),
  onFinishFailed: et(),
  onValidate: et()
});
function $Y(e, t) {
  return ny(_l(e), _l(t));
}
const yl = be({
  compatConfig: {
    MODE: 3
  },
  name: "AForm",
  inheritAttrs: !1,
  props: Mn(CY(), {
    layout: "horizontal",
    hideRequiredMark: !1,
    colon: !0
  }),
  Item: wY,
  useForm: SY,
  // emits: ['finishFailed', 'submit', 'finish', 'validate'],
  setup(e, t) {
    let {
      emit: n,
      slots: o,
      expose: r,
      attrs: i
    } = t;
    const {
      prefixCls: a,
      direction: l,
      form: s,
      size: u,
      disabled: c
    } = Nt("form", e), d = E(() => e.requiredMark === "" || e.requiredMark), f = E(() => {
      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;
    });
    EI(u), Xk(c);
    const p = E(() => {
      var j, Z;
      return (j = e.colon) !== null && j !== void 0 ? j : (Z = s.value) === null || Z === void 0 ? void 0 : Z.colon;
    }), {
      validateMessages: v
    } = dL(), g = E(() => O(O(O({}, tg), v.value), e.validateMessages)), [m, x] = ux(a), S = E(() => Me(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
    }, x.value)), C = le(), P = {}, $ = (j, Z) => {
      P[j] = Z;
    }, I = (j) => {
      delete P[j];
    }, w = (j) => {
      const Z = !!j, W = Z ? _l(j).map(Sb) : [];
      return Z ? Object.values(P).filter((K) => W.findIndex((q) => $Y(q, K.fieldName.value)) > -1) : Object.values(P);
    }, T = (j) => {
      if (!e.model) {
        wo(!1, "Form", "model is required for resetFields to work.");
        return;
      }
      w(j).forEach((Z) => {
        Z.resetField();
      });
    }, M = (j) => {
      w(j).forEach((Z) => {
        Z.clearValidate();
      });
    }, R = (j) => {
      const {
        scrollToFirstError: Z
      } = e;
      if (n("finishFailed", j), Z && j.errorFields.length) {
        let W = {};
        typeof Z == "object" && (W = Z), H(j.errorFields[0].name, W);
      }
    }, N = function() {
      return A(...arguments);
    }, H = function(j) {
      let Z = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      const W = w(j ? [j] : void 0);
      if (W.length) {
        const K = W[0].fieldId.value, q = K ? document.getElementById(K) : null;
        q && o6(q, O({
          scrollMode: "if-needed",
          block: "nearest"
        }, Z));
      }
    }, L = function() {
      let j = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
      if (j === !0) {
        const Z = [];
        return Object.values(P).forEach((W) => {
          let {
            namePath: K
          } = W;
          Z.push(K.value);
        }), yC(e.model, Z);
      } else
        return yC(e.model, j);
    }, F = (j, Z) => {
      if (wo(!(j instanceof Function), "Form", "validateFields/validateField/validate not support callback, please use promise instead"), !e.model)
        return wo(!1, "Form", "model is required for validateFields to work."), Promise.reject("Form `model` is required for validateFields to work.");
      const W = !!j, K = W ? _l(j).map(Sb) : [], q = [];
      Object.values(P).forEach((se) => {
        var ie;
        if (W || K.push(se.namePath.value), !(!((ie = se.rules) === null || ie === void 0) && ie.value.length))
          return;
        const re = se.namePath.value;
        if (!W || qq(K, re)) {
          const te = se.validateRules(O({
            validateMessages: g.value
          }, Z));
          q.push(te.then(() => ({
            name: re,
            errors: [],
            warnings: []
          })).catch((ve) => {
            const ce = [], fe = [];
            return ve.forEach((ge) => {
              let {
                rule: {
                  warningOnly: Te
                },
                errors: ze
              } = ge;
              Te ? fe.push(...ze) : ce.push(...ze);
            }), ce.length ? Promise.reject({
              name: re,
              errors: ce,
              warnings: fe
            }) : {
              name: re,
              errors: ce,
              warnings: fe
            };
          }));
        }
      });
      const U = gM(q);
      C.value = U;
      const ae = U.then(() => C.value === U ? Promise.resolve(L(K)) : Promise.reject([])).catch((se) => {
        const ie = se.filter((re) => re && re.errors.length);
        return Promise.reject({
          values: L(K),
          errorFields: ie,
          outOfDate: C.value !== U
        });
      });
      return ae.catch((se) => se), ae;
    }, A = function() {
      return F(...arguments);
    }, G = (j) => {
      j.preventDefault(), j.stopPropagation(), n("submit", j), e.model && F().then((W) => {
        n("finish", W);
      }).catch((W) => {
        R(W);
      });
    };
    return r({
      resetFields: T,
      clearValidate: M,
      validateFields: F,
      getFieldsValue: L,
      validate: N,
      scrollToField: H
    }), pM({
      model: E(() => e.model),
      name: E(() => e.name),
      labelAlign: E(() => e.labelAlign),
      labelCol: E(() => e.labelCol),
      labelWrap: E(() => e.labelWrap),
      wrapperCol: E(() => e.wrapperCol),
      vertical: E(() => e.layout === "vertical"),
      colon: p,
      requiredMark: f,
      validateTrigger: E(() => e.validateTrigger),
      rules: E(() => e.rules),
      addField: $,
      removeField: I,
      onValidate: (j, Z, W) => {
        n("validate", j, Z, W);
      },
      validateMessages: g
    }), Ie(() => e.rules, () => {
      e.validateOnRuleChange && F();
    }), () => {
      var j;
      return m(h("form", Q(Q({}, i), {}, {
        onSubmit: G,
        class: [S.value, i.class]
      }), [(j = o.default) === null || j === void 0 ? void 0 : j.call(o)]));
    };
  }
});
yl.useInjectFormItemContext = Br;
yl.ItemRest = Gm;
yl.install = function(e) {
  return e.component(yl.name, yl), e.component(yl.Item.name, yl.Item), e.component(Gm.name, Gm), e;
};
const PY = new tn("antCheckboxEffect", {
  "0%": {
    transform: "scale(1)",
    opacity: 0.5
  },
  "100%": {
    transform: "scale(1.6)",
    opacity: 0
  }
}), OY = (e) => {
  const {
    checkboxCls: t
  } = e, n = `${t}-wrapper`;
  return [
    // ===================== Basic =====================
    {
      // Group
      [`${t}-group`]: O(O({}, fn(e)), {
        display: "inline-flex",
        flexWrap: "wrap",
        columnGap: e.marginXS,
        // Group > Grid
        [`> ${e.antCls}-row`]: {
          flex: 1
        }
      }),
      // Wrapper
      [n]: O(O({}, fn(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]: O(O({}, fn(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`]: O({}, Wa(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: PY,
          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 vM(e, t) {
  const n = Qt(t, {
    checkboxCls: `.${e}`,
    checkboxSize: t.controlInteractiveSize
  });
  return [OY(n)];
}
const mM = On("Checkbox", (e, t) => {
  let {
    prefixCls: n
  } = t;
  return [vM(n, e)];
}), kY = () => ({
  name: String,
  prefixCls: String,
  options: jn([]),
  disabled: Boolean,
  id: String
}), IY = () => O(O({}, kY()), {
  defaultValue: jn(),
  value: jn(),
  onChange: et(),
  "onUpdate:value": et()
}), TY = () => ({
  prefixCls: String,
  defaultChecked: ct(),
  checked: ct(),
  disabled: ct(),
  isGroup: ct(),
  value: pe.any,
  name: String,
  id: String,
  indeterminate: ct(),
  type: rn("checkbox"),
  autofocus: ct(),
  onChange: et(),
  "onUpdate:checked": et(),
  onClick: et(),
  skipGroup: ct(!1)
}), _Y = () => O(O({}, TY()), {
  indeterminate: ct(!1)
}), bM = Symbol("CheckboxGroupContext");
var $C = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const Eo = be({
  compatConfig: {
    MODE: 3
  },
  name: "ACheckbox",
  inheritAttrs: !1,
  __ANT_CHECKBOX: !0,
  props: _Y(),
  // emits: ['change', 'update:checked'],
  setup(e, t) {
    let {
      emit: n,
      attrs: o,
      slots: r,
      expose: i
    } = t;
    const a = Br(), l = Nr.useInject(), {
      prefixCls: s,
      direction: u,
      disabled: c
    } = Nt("checkbox", e), d = _i(), [f, p] = mM(s), v = zt(bM, void 0), g = Symbol("checkboxUniId"), m = E(() => v?.disabled.value || c.value);
    It(() => {
      !e.skipGroup && v && v.registerValue(g, e.value);
    }), qt(() => {
      v && v.cancelValue(g);
    }), At(() => {
      wo(!!(e.checked !== void 0 || v || e.value === void 0), "Checkbox", "`value` is not validate prop, do you mean `checked`?");
    });
    const x = ($) => {
      const I = $.target.checked;
      n("update:checked", I), n("change", $), a.onFieldChange();
    }, S = le();
    return i({
      focus: () => {
        var $;
        ($ = S.value) === null || $ === void 0 || $.focus();
      },
      blur: () => {
        var $;
        ($ = S.value) === null || $ === void 0 || $.blur();
      }
    }), () => {
      var $;
      const I = go(($ = r.default) === null || $ === void 0 ? void 0 : $.call(r)), {
        indeterminate: w,
        skipGroup: T,
        id: M = a.id.value
      } = e, R = $C(e, ["indeterminate", "skipGroup", "id"]), {
        onMouseenter: N,
        onMouseleave: H,
        onInput: L,
        class: F,
        style: A
      } = o, G = $C(o, ["onMouseenter", "onMouseleave", "onInput", "class", "style"]), j = O(O(O(O({}, R), {
        id: M,
        prefixCls: s.value
      }), G), {
        disabled: m.value
      });
      v && !T ? (j.onChange = function() {
        for (var q = arguments.length, U = new Array(q), ae = 0; ae < q; ae++)
          U[ae] = arguments[ae];
        n("change", ...U), v.toggleOption({
          label: I,
          value: e.value
        });
      }, j.name = v.name.value, j.checked = v.mergedValue.value.includes(e.value), j.disabled = m.value || d.value, j.indeterminate = w) : j.onChange = x;
      const Z = Me({
        [`${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
      }, F, p.value), W = Me({
        [`${s.value}-indeterminate`]: w
      }, p.value);
      return f(h("label", {
        class: Z,
        style: A,
        onMouseenter: N,
        onMouseleave: H
      }, [h(O_, Q(Q({
        "aria-checked": w ? "mixed" : void 0
      }, j), {}, {
        class: W,
        ref: S
      }), null), I.length ? h("span", null, [I]) : null]));
    };
  }
}), $b = be({
  compatConfig: {
    MODE: 3
  },
  name: "ACheckboxGroup",
  inheritAttrs: !1,
  props: IY(),
  // emits: ['change', 'update:value'],
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      emit: r,
      expose: i
    } = t;
    const a = Br(), {
      prefixCls: l,
      direction: s
    } = Nt("checkbox", e), u = E(() => `${l.value}-group`), [c, d] = mM(u), f = le((e.value === void 0 ? e.defaultValue : e.value) || []);
    Ie(() => e.value, () => {
      f.value = e.value || [];
    });
    const p = E(() => e.options.map((P) => typeof P == "string" || typeof P == "number" ? {
      label: P,
      value: P
    } : P)), v = le(Symbol()), g = le(/* @__PURE__ */ new Map()), m = (P) => {
      g.value.delete(P), v.value = Symbol();
    }, x = (P, $) => {
      g.value.set(P, $), v.value = Symbol();
    }, S = le(/* @__PURE__ */ new Map());
    return Ie(v, () => {
      const P = /* @__PURE__ */ new Map();
      for (const $ of g.value.values())
        P.set($, !0);
      S.value = P;
    }), Bt(bM, {
      cancelValue: m,
      registerValue: x,
      toggleOption: (P) => {
        const $ = f.value.indexOf(P.value), I = [...f.value];
        $ === -1 ? I.push(P.value) : I.splice($, 1), e.value === void 0 && (f.value = I);
        const w = I.filter((T) => S.value.has(T)).sort((T, M) => {
          const R = p.value.findIndex((H) => H.value === T), N = p.value.findIndex((H) => H.value === M);
          return R - N;
        });
        r("update:value", w), r("change", w), a.onFieldChange();
      },
      mergedValue: f,
      name: E(() => e.name),
      disabled: E(() => e.disabled)
    }), i({
      mergedValue: f
    }), () => {
      var P;
      const {
        id: $ = a.id.value
      } = e;
      let I = null;
      return p.value && p.value.length > 0 && (I = p.value.map((w) => {
        var T;
        return h(Eo, {
          prefixCls: l.value,
          key: w.value.toString(),
          disabled: "disabled" in w ? w.disabled : e.disabled,
          indeterminate: w.indeterminate,
          value: w.value,
          checked: f.value.indexOf(w.value) !== -1,
          onChange: w.onChange,
          class: `${u.value}-item`
        }, {
          default: () => [n.label !== void 0 ? (T = n.label) === null || T === void 0 ? void 0 : T.call(n, w) : w.label]
        });
      })), c(h("div", Q(Q({}, o), {}, {
        class: [u.value, {
          [`${u.value}-rtl`]: s.value === "rtl"
        }, o.class, d.value],
        id: $
      }), [I || ((P = n.default) === null || P === void 0 ? void 0 : P.call(n))]));
    };
  }
});
Eo.Group = $b;
Eo.install = function(e) {
  return e.component(Eo.name, Eo), e.component($b.name, $b), e;
};
const MY = ii(ax);
let dp = O({}, La.Modal);
function EY(e) {
  e ? dp = O(O({}, dp), e) : dp = O({}, La.Modal);
}
function DY() {
  return dp;
}
const Pb = "internalMark", fp = be({
  compatConfig: {
    MODE: 3
  },
  name: "ALocaleProvider",
  props: {
    locale: {
      type: Object
    },
    ANT_MARK__: String
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    wo(e.ANT_MARK__ === Pb, "LocaleProvider", "`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead");
    const o = $n({
      antLocale: O(O({}, e.locale), {
        exist: !0
      }),
      ANT_MARK__: Pb
    });
    return Bt("localeData", o), Ie(() => e.locale, (r) => {
      EY(r && r.Modal), o.antLocale = O(O({}, r), {
        exist: !0
      });
    }, {
      immediate: !0
    }), () => {
      var r;
      return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
    };
  }
});
fp.install = function(e) {
  return e.component(fp.name, fp), e;
};
const AY = ii(fp), og = be({
  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, r, i = !1;
    const a = E(() => e.duration === void 0 ? 4.5 : e.duration), l = () => {
      a.value && !i && (r = setTimeout(() => {
        u();
      }, a.value * 1e3));
    }, s = () => {
      r && (clearTimeout(r), r = null);
    }, u = (d) => {
      d && d.stopPropagation(), s();
      const {
        onClose: f,
        noticeKey: p
      } = e;
      f && f(p);
    }, c = () => {
      s(), l();
    };
    return At(() => {
      l();
    }), Vo(() => {
      i = !0, s();
    }), Ie([a, () => e.updateMark, () => e.visible], (d, f) => {
      let [p, v, g] = d, [m, x, S] = f;
      (p !== m || v !== x || g !== S && S) && c();
    }, {
      flush: "post"
    }), () => {
      var d, f;
      const {
        prefixCls: p,
        closable: v,
        closeIcon: g = (d = o.closeIcon) === null || d === void 0 ? void 0 : d.call(o),
        onClick: m,
        holder: x
      } = e, {
        class: S,
        style: C
      } = n, P = `${p}-notice`, $ = Object.keys(n).reduce((w, T) => ((T.startsWith("data-") || T.startsWith("aria-") || T === "role") && (w[T] = n[T]), w), {}), I = h("div", Q({
        class: Me(P, S, {
          [`${P}-closable`]: v
        }),
        style: C,
        onMouseenter: s,
        onMouseleave: l,
        onClick: m
      }, $), [h("div", {
        class: `${P}-content`
      }, [(f = o.default) === null || f === void 0 ? void 0 : f.call(o)]), v ? h("a", {
        tabindex: 0,
        onClick: u,
        class: `${P}-close`
      }, [g || h("span", {
        class: `${P}-close-x`
      }, null)]) : null]);
      return x ? h(oh, {
        to: x
      }, {
        default: () => I
      }) : I;
    };
  }
});
var NY = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
let PC = 0;
const RY = Date.now();
function OC() {
  const e = PC;
  return PC += 1, `rcNotification_${RY}_${e}`;
}
const Up = be({
  name: "Notification",
  inheritAttrs: !1,
  props: ["prefixCls", "transitionName", "animation", "maxCount", "closeIcon", "hashId"],
  setup(e, t) {
    let {
      attrs: n,
      expose: o,
      slots: r
    } = t;
    const i = /* @__PURE__ */ new Map(), a = le([]), l = E(() => {
      const {
        prefixCls: c,
        animation: d = "fade"
      } = e;
      let f = e.transitionName;
      return !f && d && (f = `${c}-${d}`), l0(f);
    }), s = (c, d) => {
      const f = c.key || OC(), p = O(O({}, c), {
        key: f
      }), {
        maxCount: v
      } = e, g = a.value.map((x) => x.notice.key).indexOf(f), m = a.value.concat();
      g !== -1 ? m.splice(g, 1, {
        notice: p,
        holderCallback: d
      }) : (v && a.value.length >= v && (p.key = m[0].notice.key, p.updateMark = OC(), p.userPassKey = f, m.shift()), m.push({
        notice: p,
        holderCallback: d
      })), a.value = m;
    }, u = (c) => {
      a.value = fr(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 = r.closeIcon) === null || c === void 0 ? void 0 : c.call(r, {
          prefixCls: d
        })
      } = e, p = a.value.map((g, m) => {
        let {
          notice: x,
          holderCallback: S
        } = g;
        const C = m === a.value.length - 1 ? x.updateMark : void 0, {
          key: P,
          userPassKey: $
        } = x, {
          content: I
        } = x, w = O(O(O({
          prefixCls: d,
          closeIcon: typeof f == "function" ? f({
            prefixCls: d
          }) : f
        }, x), x.props), {
          key: P,
          noticeKey: $ || P,
          updateMark: C,
          onClose: (T) => {
            var M;
            u(T), (M = x.onClose) === null || M === void 0 || M.call(x);
          },
          onClick: x.onClick
        });
        return S ? h("div", {
          key: P,
          class: `${d}-hook-holder`,
          ref: (T) => {
            typeof P > "u" || (T ? (i.set(P, T), S(T, w)) : i.delete(P));
          }
        }, null) : h(og, Q(Q({}, w), {}, {
          class: Me(w.class, e.hashId)
        }), {
          default: () => [typeof I == "function" ? I({
            prefixCls: d
          }) : I]
        });
      }), v = {
        [d]: 1,
        [n.class]: !!n.class,
        [e.hashId]: !0
      };
      return h("div", {
        class: v,
        style: n.style || {
          top: "65px",
          left: "50%"
        }
      }, [h(ey, Q({
        tag: "div"
      }, l.value), {
        default: () => [p]
      })]);
    };
  }
});
Up.newInstance = function(t, n) {
  const o = t || {}, {
    name: r = "notification",
    getContainer: i,
    appContext: a,
    prefixCls: l,
    rootPrefixCls: s,
    transitionName: u,
    hasTransitionName: c,
    useStyle: d
  } = o, f = NY(o, ["name", "getContainer", "appContext", "prefixCls", "rootPrefixCls", "transitionName", "hasTransitionName", "useStyle"]), p = document.createElement("div");
  i ? i().appendChild(p) : document.body.appendChild(p);
  const v = be({
    compatConfig: {
      MODE: 3
    },
    name: "NotificationWrapper",
    setup(m, x) {
      let {
        attrs: S
      } = x;
      const C = $e(), P = E(() => Ko.getPrefixCls(r, l)), [, $] = d(P);
      return At(() => {
        n({
          notice(I) {
            var w;
            (w = C.value) === null || w === void 0 || w.add(I);
          },
          removeNotice(I) {
            var w;
            (w = C.value) === null || w === void 0 || w.remove(I);
          },
          destroy() {
            El(null, p), p.parentNode && p.parentNode.removeChild(p);
          },
          component: C
        });
      }), () => {
        const I = Ko, w = I.getRootPrefixCls(s, P.value), T = c ? u : `${P.value}-${u}`;
        return h(Fa, Q(Q({}, I), {}, {
          prefixCls: w
        }), {
          default: () => [h(Up, Q(Q({
            ref: C
          }, S), {}, {
            prefixCls: P.value,
            transitionName: T,
            hashId: $.value
          }), null)]
        });
      };
    }
  }), g = h(v, f);
  g.appContext = a || g.appContext, El(g, p);
};
let kC = 0;
const zY = Date.now();
function IC() {
  const e = kC;
  return kC += 1, `rcNotification_${zY}_${e}`;
}
const FY = be({
  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 r = /* @__PURE__ */ new Map(), i = E(() => e.notices), a = E(() => {
      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 l0(c);
    }), l = (c) => e.remove(c), s = le({});
    Ie(i, () => {
      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 = E(() => 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((v) => {
        var g, m;
        const x = s.value[v], S = (g = e.getClassName) === null || g === void 0 ? void 0 : g.call(e, v), C = (m = e.getStyles) === null || m === void 0 ? void 0 : m.call(e, v), P = x.map((w, T) => {
          let {
            notice: M,
            holderCallback: R
          } = w;
          const N = T === i.value.length - 1 ? M.updateMark : void 0, {
            key: H,
            userPassKey: L
          } = M, {
            content: F
          } = M, A = O(O(O({
            prefixCls: d,
            closeIcon: typeof f == "function" ? f({
              prefixCls: d
            }) : f
          }, M), M.props), {
            key: H,
            noticeKey: L || H,
            updateMark: N,
            onClose: (G) => {
              var j;
              l(G), (j = M.onClose) === null || j === void 0 || j.call(M);
            },
            onClick: M.onClick
          });
          return R ? h("div", {
            key: H,
            class: `${d}-hook-holder`,
            ref: (G) => {
              typeof H > "u" || (G ? (r.set(H, G), R(G, A)) : r.delete(H));
            }
          }, null) : h(og, Q(Q({}, A), {}, {
            class: Me(A.class, e.hashId)
          }), {
            default: () => [typeof F == "function" ? F({
              prefixCls: d
            }) : F]
          });
        }), $ = {
          [d]: 1,
          [`${d}-${v}`]: 1,
          [n.class]: !!n.class,
          [e.hashId]: !0,
          [S]: !!S
        };
        function I() {
          var w;
          x.length > 0 || (Reflect.deleteProperty(s.value, v), (w = e.onAllRemoved) === null || w === void 0 || w.call(e));
        }
        return h("div", {
          key: v,
          class: $,
          style: n.style || C || {
            top: "65px",
            left: "50%"
          }
        }, [h(ey, Q(Q({
          tag: "div"
        }, a.value), {}, {
          onAfterLeave: I
        }), {
          default: () => [P]
        })]);
      });
      return h(nT, {
        getContainer: e.getContainer
      }, {
        default: () => [p]
      });
    };
  }
});
var BY = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const LY = () => document.body;
let TC = 0;
function HY() {
  const e = {};
  for (var t = arguments.length, n = new Array(t), o = 0; o < t; o++)
    n[o] = arguments[o];
  return n.forEach((r) => {
    r && Object.keys(r).forEach((i) => {
      const a = r[i];
      a !== void 0 && (e[i] = a);
    });
  }), e;
}
function yM() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
  const {
    getContainer: t = LY,
    motion: n,
    prefixCls: o,
    maxCount: r,
    getClassName: i,
    getStyles: a,
    onAllRemoved: l
  } = e, s = BY(e, ["getContainer", "motion", "prefixCls", "maxCount", "getClassName", "getStyles", "onAllRemoved"]), u = $e([]), c = $e(), d = (x, S) => {
    const C = x.key || IC(), P = O(O({}, x), {
      key: C
    }), $ = u.value.map((w) => w.notice.key).indexOf(C), I = u.value.concat();
    $ !== -1 ? I.splice($, 1, {
      notice: P,
      holderCallback: S
    }) : (r && u.value.length >= r && (P.key = I[0].notice.key, P.updateMark = IC(), P.userPassKey = C, I.shift()), I.push({
      notice: P,
      holderCallback: S
    })), u.value = I;
  }, f = (x) => {
    u.value = u.value.filter((S) => {
      let {
        notice: {
          key: C,
          userPassKey: P
        }
      } = S;
      return (P || C) !== x;
    });
  }, p = () => {
    u.value = [];
  }, v = () => h(FY, {
    ref: c,
    prefixCls: o,
    maxCount: r,
    notices: u.value,
    remove: f,
    getClassName: i,
    getStyles: a,
    animation: n,
    hashId: e.hashId,
    onAllRemoved: l,
    getContainer: t
  }, null), g = $e([]), m = {
    open: (x) => {
      const S = HY(s, x);
      (S.key === null || S.key === void 0) && (S.key = `vc-notification-${TC}`, TC += 1), g.value = [...g.value, {
        type: "open",
        config: S
      }];
    },
    close: (x) => {
      g.value = [...g.value, {
        type: "close",
        key: x
      }];
    },
    destroy: () => {
      g.value = [...g.value, {
        type: "destroy"
      }];
    }
  };
  return Ie(g, () => {
    g.value.length && (g.value.forEach((x) => {
      switch (x.type) {
        case "open":
          d(x.config);
          break;
        case "close":
          f(x.key);
          break;
        case "destroy":
          p();
          break;
      }
    }), g.value = []);
  }), [m, v];
}
const VY = (e) => {
  const {
    componentCls: t,
    iconCls: n,
    boxShadowSecondary: o,
    colorBgElevated: r,
    colorSuccess: i,
    colorError: a,
    colorWarning: l,
    colorInfo: s,
    fontSizeLG: u,
    motionEaseInOutCirc: c,
    motionDurationSlow: d,
    marginXS: f,
    paddingXS: p,
    borderRadiusLG: v,
    zIndexPopup: g,
    // Custom token
    messageNoticeContentPadding: m
  } = e, x = new tn("MessageMoveIn", {
    "0%": {
      padding: 0,
      transform: "translateY(-100%)",
      opacity: 0
    },
    "100%": {
      padding: p,
      transform: "translateY(0)",
      opacity: 1
    }
  }), S = new tn("MessageMoveOut", {
    "0%": {
      maxHeight: e.height,
      padding: p,
      opacity: 1
    },
    "100%": {
      maxHeight: 0,
      padding: 0,
      opacity: 0
    }
  });
  return [
    // ============================ Holder ============================
    {
      [t]: O(O({}, fn(e)), {
        position: "fixed",
        top: f,
        left: "50%",
        transform: "translateX(-50%)",
        width: "100%",
        pointerEvents: "none",
        zIndex: g,
        [`${t}-move-up`]: {
          animationFillMode: "forwards"
        },
        [`
        ${t}-move-up-appear,
        ${t}-move-up-enter
      `]: {
          animationName: x,
          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: S,
          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: m,
          background: r,
          borderRadius: v,
          boxShadow: o,
          pointerEvents: "all"
        },
        [`${t}-success ${n}`]: {
          color: i
        },
        [`${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"
      }
    }
  ];
}, cx = On("Message", (e) => {
  const t = Qt(e, {
    messageNoticeContentPadding: `${(e.controlHeightLG - e.fontSize * e.lineHeight) / 2}px ${e.paddingSM}px`
  });
  return [VY(t)];
}, (e) => ({
  height: 150,
  zIndexPopup: e.zIndexPopupBase + 10
})), jY = {
  info: h(Hs, null, null),
  success: h(Fl, null, null),
  error: h(Fr, null, null),
  warning: h(Bl, null, null),
  loading: h(Mi, null, null)
}, xM = be({
  name: "PureContent",
  inheritAttrs: !1,
  props: ["prefixCls", "type", "icon"],
  setup(e, t) {
    let {
      slots: n
    } = t;
    return () => {
      var o;
      return h("div", {
        class: Me(`${e.prefixCls}-custom-content`, `${e.prefixCls}-${e.type}`)
      }, [e.icon || jY[e.type], h("span", null, [(o = n.default) === null || o === void 0 ? void 0 : o.call(n)])]);
    };
  }
});
be({
  name: "PurePanel",
  inheritAttrs: !1,
  props: ["prefixCls", "class", "type", "icon", "content"],
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    var r;
    const {
      getPrefixCls: i
    } = kh(), a = E(() => e.prefixCls || i("message")), [, l] = cx(a);
    return h(og, Q(Q({}, o), {}, {
      prefixCls: a.value,
      class: Me(l.value, `${a.value}-notice-pure-panel`),
      noticeKey: "pure",
      duration: null
    }), {
      default: () => [h(xM, {
        prefixCls: a.value,
        type: e.type,
        icon: e.icon
      }, {
        default: () => [(r = n.default) === null || r === void 0 ? void 0 : r.call(n)]
      })]
    });
  }
});
var WY = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const KY = 8, qY = 3, YY = be({
  name: "Holder",
  inheritAttrs: !1,
  props: ["top", "prefixCls", "getContainer", "maxCount", "duration", "rtl", "transitionName", "onAllRemoved", "animation", "staticGetContainer"],
  setup(e, t) {
    let {
      expose: n
    } = t;
    var o, r;
    const {
      getPrefixCls: i,
      getPopupContainer: a
    } = Nt("message", e), l = E(() => i("message", e.prefixCls)), [, s] = cx(l), u = () => {
      var g;
      const m = (g = e.top) !== null && g !== void 0 ? g : KY;
      return {
        left: "50%",
        transform: "translateX(-50%)",
        top: typeof m == "number" ? `${m}px` : m
      };
    }, c = () => Me(s.value, e.rtl ? `${l.value}-rtl` : ""), d = () => {
      var g;
      return t0({
        prefixCls: l.value,
        animation: (g = e.animation) !== null && g !== void 0 ? g : "move-up",
        transitionName: e.transitionName
      });
    }, f = h("span", {
      class: `${l.value}-close-x`
    }, [h(la, {
      class: `${l.value}-close-icon`
    }, null)]), [p, v] = yM({
      //@ts-ignore
      getStyles: u,
      prefixCls: l.value,
      getClassName: c,
      motion: d,
      closable: !1,
      closeIcon: f,
      duration: (o = e.duration) !== null && o !== void 0 ? o : qY,
      getContainer: (r = e.staticGetContainer) !== null && r !== void 0 ? r : a.value,
      maxCount: e.maxCount,
      onAllRemoved: e.onAllRemoved
    });
    return n(O(O({}, p), {
      prefixCls: l,
      hashId: s
    })), v;
  }
});
let _C = 0;
function GY(e) {
  const t = $e(null), n = Symbol("messageHolderKey"), o = (s) => {
    var u;
    (u = t.value) === null || u === void 0 || u.close(s);
  }, r = (s) => {
    if (!t.value) {
      const $ = () => {
      };
      return $.then = () => {
      }, $;
    }
    const {
      open: u,
      prefixCls: c,
      hashId: d
    } = t.value, f = `${c}-notice`, {
      content: p,
      icon: v,
      type: g,
      key: m,
      class: x,
      onClose: S
    } = s, C = WY(s, ["content", "icon", "type", "key", "class", "onClose"]);
    let P = m;
    return P == null && (_C += 1, P = `antd-message-${_C}`), VB(($) => (u(O(O({}, C), {
      key: P,
      content: () => h(xM, {
        prefixCls: c,
        type: g,
        icon: typeof v == "function" ? v() : v
      }, {
        default: () => [typeof p == "function" ? p() : p]
      }),
      placement: "top",
      // @ts-ignore
      class: Me(g && `${f}-${g}`, d, x),
      onClose: () => {
        S?.(), $();
      }
    })), () => {
      o(P);
    }));
  }, a = {
    open: r,
    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 v, g;
      typeof d == "function" ? g = d : (v = d, g = f);
      const m = O(O({
        onClose: g,
        duration: v
      }, p), {
        type: s
      });
      return r(m);
    };
    a[s] = u;
  }), [a, () => h(YY, Q(Q({
    key: n
  }, e), {}, {
    ref: t
  }), null)];
}
function wM(e) {
  return GY(e);
}
let SM = 3, CM, ur, UY = 1, $M = "", PM = "move-up", OM = !1, kM = () => document.body, IM, TM = !1;
function XY() {
  return UY++;
}
function QY(e) {
  e.top !== void 0 && (CM = e.top, ur = null), e.duration !== void 0 && (SM = e.duration), e.prefixCls !== void 0 && ($M = e.prefixCls), e.getContainer !== void 0 && (kM = e.getContainer, ur = null), e.transitionName !== void 0 && (PM = e.transitionName, ur = null, OM = !0), e.maxCount !== void 0 && (IM = e.maxCount, ur = null), e.rtl !== void 0 && (TM = e.rtl);
}
function ZY(e, t) {
  if (ur) {
    t(ur);
    return;
  }
  Up.newInstance({
    appContext: e.appContext,
    prefixCls: e.prefixCls || $M,
    rootPrefixCls: e.rootPrefixCls,
    transitionName: PM,
    hasTransitionName: OM,
    style: {
      top: CM
    },
    getContainer: kM || e.getPopupContainer,
    maxCount: IM,
    name: "message",
    useStyle: cx
  }, (n) => {
    if (ur) {
      t(ur);
      return;
    }
    ur = n, t(n);
  });
}
const _M = {
  info: Hs,
  success: Fl,
  error: Fr,
  warning: Bl,
  loading: Mi
}, JY = Object.keys(_M);
function eG(e) {
  const t = e.duration !== void 0 ? e.duration : SM, n = e.key || XY(), o = new Promise((i) => {
    const a = () => (typeof e.onClose == "function" && e.onClose(), i(!0));
    ZY(e, (l) => {
      l.notice({
        key: n,
        duration: t,
        style: e.style || {},
        class: e.class,
        content: (s) => {
          let {
            prefixCls: u
          } = s;
          const c = _M[e.type], d = c ? h(c, null, null) : "", f = Me(`${u}-custom-content`, {
            [`${u}-${e.type}`]: e.type,
            [`${u}-rtl`]: TM === !0
          });
          return h("div", {
            class: f
          }, [typeof e.icon == "function" ? e.icon() : e.icon || d, h("span", null, [typeof e.content == "function" ? e.content() : e.content])]);
        },
        onClose: a,
        onClick: e.onClick
      });
    });
  }), r = () => {
    ur && ur.removeNotice(n);
  };
  return r.then = (i, a) => o.then(i, a), r.promise = o, r;
}
function tG(e) {
  return Object.prototype.toString.call(e) === "[object Object]" && !!e.content;
}
const Cd = {
  open: eG,
  config: QY,
  destroy(e) {
    if (ur)
      if (e) {
        const {
          removeNotice: t
        } = ur;
        t(e);
      } else {
        const {
          destroy: t
        } = ur;
        t(), ur = null;
      }
  }
};
function nG(e, t) {
  e[t] = (n, o, r) => tG(n) ? e.open(O(O({}, n), {
    type: t
  })) : (typeof o == "function" && (r = o, o = void 0), e.open({
    content: n,
    duration: o,
    type: t,
    onClose: r
  }));
}
JY.forEach((e) => nG(Cd, e));
Cd.warn = Cd.warning;
Cd.useMessage = wM;
const oG = (e) => {
  const {
    componentCls: t,
    width: n,
    notificationMarginEdge: o
  } = e, r = new tn("antNotificationTopFadeIn", {
    "0%": {
      marginTop: "-100%",
      opacity: 0
    },
    "100%": {
      marginTop: 0,
      opacity: 1
    }
  }), i = new tn("antNotificationBottomFadeIn", {
    "0%": {
      marginBottom: "-100%",
      opacity: 0
    },
    "100%": {
      marginBottom: 0,
      opacity: 1
    }
  }), a = new tn("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: r
      }
    },
    [`&${t}-bottom`]: {
      [`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]: {
        animationName: i
      }
    },
    [`&${t}-topLeft, &${t}-bottomLeft`]: {
      marginInlineEnd: 0,
      marginInlineStart: o,
      [`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]: {
        animationName: a
      }
    }
  };
}, rG = (e) => {
  const {
    iconCls: t,
    componentCls: n,
    // .ant-notification
    boxShadowSecondary: o,
    fontSizeLG: r,
    notificationMarginBottom: i,
    borderRadiusLG: a,
    colorSuccess: l,
    colorInfo: s,
    colorWarning: u,
    colorError: c,
    colorTextHeading: d,
    notificationBg: f,
    notificationPadding: p,
    notificationMarginEdge: v,
    motionDurationMid: g,
    motionEaseInOut: m,
    fontSize: x,
    lineHeight: S,
    width: C,
    notificationIconSize: P
  } = e, $ = `${n}-notice`, I = new tn("antNotificationFadeIn", {
    "0%": {
      left: {
        _skip_check_: !0,
        value: C
      },
      opacity: 0
    },
    "100%": {
      left: {
        _skip_check_: !0,
        value: 0
      },
      opacity: 1
    }
  }), w = new tn("antNotificationFadeOut", {
    "0%": {
      maxHeight: e.animationMaxHeight,
      marginBottom: i,
      opacity: 1
    },
    "100%": {
      maxHeight: 0,
      marginBottom: 0,
      paddingTop: 0,
      paddingBottom: 0,
      opacity: 0
    }
  });
  return [
    // ============================ Holder ============================
    {
      [n]: O(O(O(O({}, fn(e)), {
        position: "fixed",
        zIndex: e.zIndexPopup,
        marginInlineEnd: v,
        [`${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: m,
          animationFillMode: "both",
          opacity: 0,
          animationPlayState: "paused"
        },
        [`${n}-fade-leave`]: {
          animationTimingFunction: m,
          animationFillMode: "both",
          animationDuration: g,
          animationPlayState: "paused"
        },
        [`${n}-fade-enter${n}-fade-enter-active, ${n}-fade-appear${n}-fade-appear-active`]: {
          animationName: I,
          animationPlayState: "running"
        },
        [`${n}-fade-leave${n}-fade-leave-active`]: {
          animationName: w,
          animationPlayState: "running"
        }
      }), oG(e)), {
        // RTL
        "&-rtl": {
          direction: "rtl",
          [`${n}-notice-btn`]: {
            float: "left"
          }
        }
      })
    },
    // ============================ Notice ============================
    {
      [$]: {
        position: "relative",
        width: C,
        maxWidth: `calc(100vw - ${v * 2}px)`,
        marginBottom: i,
        marginInlineStart: "auto",
        padding: p,
        overflow: "hidden",
        lineHeight: S,
        wordWrap: "break-word",
        background: f,
        borderRadius: a,
        boxShadow: o,
        [`${n}-close-icon`]: {
          fontSize: x,
          cursor: "pointer"
        },
        [`${$}-message`]: {
          marginBottom: e.marginXS,
          color: d,
          fontSize: r,
          lineHeight: e.lineHeightLG
        },
        [`${$}-description`]: {
          fontSize: x
        },
        [`&${$}-closable ${$}-message`]: {
          paddingInlineEnd: e.paddingLG
        },
        [`${$}-with-icon ${$}-message`]: {
          marginBottom: e.marginXS,
          marginInlineStart: e.marginSM + P,
          fontSize: r
        },
        [`${$}-with-icon ${$}-description`]: {
          marginInlineStart: e.marginSM + P,
          fontSize: x
        },
        // 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
        [`${$}-icon`]: {
          position: "absolute",
          fontSize: P,
          lineHeight: 0,
          // icon-font
          [`&-success${t}`]: {
            color: l
          },
          [`&-info${t}`]: {
            color: s
          },
          [`&-warning${t}`]: {
            color: u
          },
          [`&-error${t}`]: {
            color: c
          }
        },
        [`${$}-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
          }
        },
        [`${$}-btn`]: {
          float: "right",
          marginTop: e.marginSM
        }
      }
    },
    // ============================= Pure =============================
    {
      [`${$}-pure-panel`]: {
        margin: 0
      }
    }
  ];
}, dx = On("Notification", (e) => {
  const t = e.paddingMD, n = e.paddingLG, o = Qt(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 [rG(o)];
}, (e) => ({
  zIndexPopup: e.zIndexPopupBase + 50,
  width: 384
}));
function MM(e, t) {
  return t || h("span", {
    class: `${e}-close-x`
  }, [h(la, {
    class: `${e}-close-icon`
  }, null)]);
}
h(Hs, null, null), h(Fl, null, null), h(Fr, null, null), h(Bl, null, null), h(Mi, null, null);
const iG = {
  success: Fl,
  info: Hs,
  error: Fr,
  warning: Bl
};
function EM(e) {
  let {
    prefixCls: t,
    icon: n,
    type: o,
    message: r,
    description: i,
    btn: a
  } = e, l = null;
  if (n)
    l = h("span", {
      class: `${t}-icon`
    }, [wu(n)]);
  else if (o) {
    const s = iG[o];
    l = h(s, {
      class: `${t}-icon ${t}-icon-${o}`
    }, null);
  }
  return h("div", {
    class: Me({
      [`${t}-with-icon`]: l
    }),
    role: "alert"
  }, [l, h("div", {
    class: `${t}-message`
  }, [r]), h("div", {
    class: `${t}-description`
  }, [i]), a && h("div", {
    class: `${t}-btn`
  }, [a])]);
}
be({
  name: "PurePanel",
  inheritAttrs: !1,
  props: ["prefixCls", "icon", "type", "message", "description", "btn", "closeIcon"],
  setup(e) {
    const {
      getPrefixCls: t
    } = Nt("notification", e), n = E(() => e.prefixCls || t("notification")), o = E(() => `${n.value}-notice`), [, r] = dx(n);
    return () => h(og, Q(Q({}, e), {}, {
      prefixCls: n.value,
      class: Me(r.value, `${o.value}-pure-panel`),
      noticeKey: "pure",
      duration: null,
      closable: e.closable,
      closeIcon: MM(n.value, e.closeIcon)
    }), {
      default: () => [h(EM, {
        prefixCls: o.value,
        icon: e.icon,
        type: e.type,
        message: e.message,
        description: e.description,
        btn: e.btn
      }, null)]
    });
  }
});
function DM(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 aG(e) {
  return {
    name: `${e}-fade`
  };
}
var lG = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const MC = 24, sG = 4.5, uG = be({
  name: "Holder",
  inheritAttrs: !1,
  props: ["prefixCls", "class", "type", "icon", "content", "onAllRemoved"],
  setup(e, t) {
    let {
      expose: n
    } = t;
    const {
      getPrefixCls: o,
      getPopupContainer: r
    } = Nt("notification", e), i = E(() => e.prefixCls || o("notification")), a = (f) => {
      var p, v;
      return DM(f, (p = e.top) !== null && p !== void 0 ? p : MC, (v = e.bottom) !== null && v !== void 0 ? v : MC);
    }, [, l] = dx(i), s = () => Me(l.value, {
      [`${i.value}-rtl`]: e.rtl
    }), u = () => aG(i.value), [c, d] = yM({
      prefixCls: i.value,
      getStyles: a,
      getClassName: s,
      motion: u,
      closable: !0,
      closeIcon: MM(i.value),
      duration: sG,
      getContainer: () => {
        var f, p;
        return ((f = e.getPopupContainer) === null || f === void 0 ? void 0 : f.call(e)) || ((p = r.value) === null || p === void 0 ? void 0 : p.call(r)) || document.body;
      },
      maxCount: e.maxCount,
      hashId: l.value,
      onAllRemoved: e.onAllRemoved
    });
    return n(O(O({}, c), {
      prefixCls: i.value,
      hashId: l
    })), d;
  }
});
function cG(e) {
  const t = $e(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: v,
      type: g,
      btn: m,
      class: x
    } = l, S = lG(l, ["message", "description", "icon", "type", "btn", "class"]);
    return s(O(O({
      placement: "topRight"
    }, S), {
      content: () => h(EM, {
        prefixCls: d,
        icon: typeof v == "function" ? v() : v,
        type: g,
        message: typeof f == "function" ? f() : f,
        description: typeof p == "function" ? p() : p,
        btn: typeof m == "function" ? m() : m
      }, null),
      // @ts-ignore
      class: Me(g && `${d}-${g}`, c, x)
    }));
  }, i = {
    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) => {
    i[l] = (s) => o(O(O({}, s), {
      type: l
    }));
  }), [i, () => h(uG, Q(Q({
    key: n
  }, e), {}, {
    ref: t
  }), null)];
}
function AM(e) {
  return cG(e);
}
const ps = {};
let NM = 4.5, RM = "24px", zM = "24px", Ob = "", FM = "topRight", BM = () => document.body, LM = null, kb = !1, HM;
function dG(e) {
  const {
    duration: t,
    placement: n,
    bottom: o,
    top: r,
    getContainer: i,
    closeIcon: a,
    prefixCls: l
  } = e;
  l !== void 0 && (Ob = l), t !== void 0 && (NM = t), n !== void 0 && (FM = n), o !== void 0 && (zM = typeof o == "number" ? `${o}px` : o), r !== void 0 && (RM = typeof r == "number" ? `${r}px` : r), i !== void 0 && (BM = i), a !== void 0 && (LM = a), e.rtl !== void 0 && (kb = e.rtl), e.maxCount !== void 0 && (HM = e.maxCount);
}
function fG(e, t) {
  let {
    prefixCls: n,
    placement: o = FM,
    getContainer: r = BM,
    top: i,
    bottom: a,
    closeIcon: l = LM,
    appContext: s
  } = e;
  const {
    getPrefixCls: u
  } = $G(), c = u("notification", n || Ob), d = `${c}-${o}-${kb}`, f = ps[d];
  if (f) {
    Promise.resolve(f).then((v) => {
      t(v);
    });
    return;
  }
  const p = Me(`${c}-${o}`, {
    [`${c}-rtl`]: kb === !0
  });
  Up.newInstance({
    name: "notification",
    prefixCls: n || Ob,
    useStyle: dx,
    class: p,
    style: DM(o, i ?? RM, a ?? zM),
    appContext: s,
    getContainer: r,
    closeIcon: (v) => {
      let {
        prefixCls: g
      } = v;
      return h("span", {
        class: `${g}-close-x`
      }, [wu(l, {}, h(la, {
        class: `${g}-close-icon`
      }, null))]);
    },
    maxCount: HM,
    hasTransitionName: !0
  }, (v) => {
    ps[d] = v, t(v);
  });
}
const pG = {
  success: $0,
  info: O0,
  error: k0,
  warning: P0
};
function hG(e) {
  const {
    icon: t,
    type: n,
    description: o,
    message: r,
    btn: i
  } = e, a = e.duration === void 0 ? NM : e.duration;
  fG(e, (l) => {
    l.notice({
      content: (s) => {
        let {
          prefixCls: u
        } = s;
        const c = `${u}-notice`;
        let d = null;
        if (t)
          d = () => h("span", {
            class: `${c}-icon`
          }, [wu(t)]);
        else if (n) {
          const f = pG[n];
          d = () => h(f, {
            class: `${c}-icon ${c}-icon-${n}`
          }, null);
        }
        return h("div", {
          class: d ? `${c}-with-icon` : ""
        }, [d && d(), h("div", {
          class: `${c}-message`
        }, [!o && d ? h("span", {
          class: `${c}-message-single-line-auto-margin`
        }, null) : null, wu(r)]), h("div", {
          class: `${c}-description`
        }, [wu(o)]), i ? h("span", {
          class: `${c}-btn`
        }, [wu(i)]) : null]);
      },
      duration: a,
      closable: !0,
      onClose: e.onClose,
      onClick: e.onClick,
      key: e.key,
      style: e.style || {},
      class: e.class
    });
  });
}
const Ju = {
  open: hG,
  close(e) {
    Object.keys(ps).forEach((t) => Promise.resolve(ps[t]).then((n) => {
      n.removeNotice(e);
    }));
  },
  config: dG,
  destroy() {
    Object.keys(ps).forEach((e) => {
      Promise.resolve(ps[e]).then((t) => {
        t.destroy();
      }), delete ps[e];
    });
  }
}, gG = ["success", "info", "warning", "error"];
gG.forEach((e) => {
  Ju[e] = (t) => Ju.open(O(O({}, t), {
    type: e
  }));
});
Ju.warn = Ju.warning;
Ju.useNotification = AM;
const vG = `-ant-${Date.now()}-${Math.random()}`;
function mG(e, t) {
  const n = {}, o = (a, l) => {
    let s = a.clone();
    return s = l?.(s) || s, s.toRgbString();
  }, r = (a, l) => {
    const s = new In(a), u = Ha(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) {
    r(t.primaryColor, "primary");
    const a = new In(t.primaryColor), l = Ha(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 && r(t.successColor, "success"), t.warningColor && r(t.warningColor, "warning"), t.errorColor && r(t.errorColor, "error"), t.infoColor && r(t.infoColor, "info"), `
  :root {
    ${Object.keys(n).map((a) => `--${e}-${a}: ${n[a]};`).join(`
`)}
  }
  `.trim();
}
function bG(e, t) {
  const n = mG(e, t);
  wr() ? gd(n, `${vG}-dynamic-theme`) : wo(!1, "ConfigProvider", "SSR do not support dynamic theme with css variables.");
}
const yG = (e) => {
  const [t, n] = cc();
  return Mm(E(() => ({
    theme: t.value,
    token: n.value,
    hashId: "",
    path: ["ant-design-icons", e.value]
  })), () => [{
    [`.${e.value}`]: O(O({}, uc()), {
      [`.${e.value} .${e.value}-icon`]: {
        display: "block"
      }
    })
  }]);
};
function xG(e, t) {
  const n = E(() => e?.value || {}), o = E(() => n.value.inherit === !1 || !t?.value ? Uy : t.value);
  return E(() => {
    if (!e?.value)
      return t?.value;
    const i = O({}, o.value.components);
    return Object.keys(e.value.components || {}).forEach((a) => {
      i[a] = O(O({}, i[a]), e.value.components[a]);
    }), O(O(O({}, o.value), n.value), {
      token: O(O({}, o.value.token), n.value.token),
      components: i
    });
  });
}
var wG = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const SG = "ant";
function Nu() {
  return Ko.prefixCls || SG;
}
function VM() {
  return Ko.iconPrefixCls || Vy;
}
const fx = $n({}), Ko = $n({});
It(() => {
  O(Ko, fx), Ko.prefixCls = Nu(), Ko.iconPrefixCls = VM(), Ko.getPrefixCls = (e, t) => t || (e ? `${Ko.prefixCls}-${e}` : Ko.prefixCls), Ko.getRootPrefixCls = () => Ko.prefixCls ? Ko.prefixCls : Nu();
});
let Sv;
const CG = (e) => {
  Sv && Sv(), Sv = It(() => {
    O(fx, $n(e)), O(Ko, $n(e));
  }), e.theme && bG(Nu(), e.theme);
}, $G = () => ({
  getPrefixCls: (e, t) => t || (e ? `${Nu()}-${e}` : Nu()),
  getIconPrefixCls: VM,
  getRootPrefixCls: () => Ko.prefixCls ? Ko.prefixCls : Nu()
}), Fa = be({
  compatConfig: {
    MODE: 3
  },
  name: "AConfigProvider",
  inheritAttrs: !1,
  props: fL(),
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = kh(), r = (A, G) => {
      const {
        prefixCls: j = "ant"
      } = e;
      if (G) return G;
      const Z = j || o.getPrefixCls("");
      return A ? `${Z}-${A}` : Z;
    }, i = E(() => e.iconPrefixCls || o.iconPrefixCls.value || Vy), a = E(() => i.value !== o.iconPrefixCls.value), l = E(() => {
      var A;
      return e.csp || ((A = o.csp) === null || A === void 0 ? void 0 : A.value);
    }), s = yG(i), u = xG(E(() => e.theme), E(() => {
      var A;
      return (A = o.theme) === null || A === void 0 ? void 0 : A.value;
    })), c = (A) => (e.renderEmpty || n.renderEmpty || o.renderEmpty || e6)(A), d = E(() => {
      var A, G;
      return (A = e.autoInsertSpaceInButton) !== null && A !== void 0 ? A : (G = o.autoInsertSpaceInButton) === null || G === void 0 ? void 0 : G.value;
    }), f = E(() => {
      var A;
      return e.locale || ((A = o.locale) === null || A === void 0 ? void 0 : A.value);
    });
    Ie(f, () => {
      fx.locale = f.value;
    }, {
      immediate: !0
    });
    const p = E(() => {
      var A;
      return e.direction || ((A = o.direction) === null || A === void 0 ? void 0 : A.value);
    }), v = E(() => {
      var A, G;
      return (A = e.space) !== null && A !== void 0 ? A : (G = o.space) === null || G === void 0 ? void 0 : G.value;
    }), g = E(() => {
      var A, G;
      return (A = e.virtual) !== null && A !== void 0 ? A : (G = o.virtual) === null || G === void 0 ? void 0 : G.value;
    }), m = E(() => {
      var A, G;
      return (A = e.dropdownMatchSelectWidth) !== null && A !== void 0 ? A : (G = o.dropdownMatchSelectWidth) === null || G === void 0 ? void 0 : G.value;
    }), x = E(() => {
      var A;
      return e.getTargetContainer !== void 0 ? e.getTargetContainer : (A = o.getTargetContainer) === null || A === void 0 ? void 0 : A.value;
    }), S = E(() => {
      var A;
      return e.getPopupContainer !== void 0 ? e.getPopupContainer : (A = o.getPopupContainer) === null || A === void 0 ? void 0 : A.value;
    }), C = E(() => {
      var A;
      return e.pageHeader !== void 0 ? e.pageHeader : (A = o.pageHeader) === null || A === void 0 ? void 0 : A.value;
    }), P = E(() => {
      var A;
      return e.input !== void 0 ? e.input : (A = o.input) === null || A === void 0 ? void 0 : A.value;
    }), $ = E(() => {
      var A;
      return e.pagination !== void 0 ? e.pagination : (A = o.pagination) === null || A === void 0 ? void 0 : A.value;
    }), I = E(() => {
      var A;
      return e.form !== void 0 ? e.form : (A = o.form) === null || A === void 0 ? void 0 : A.value;
    }), w = E(() => {
      var A;
      return e.select !== void 0 ? e.select : (A = o.select) === null || A === void 0 ? void 0 : A.value;
    }), T = E(() => e.componentSize), M = E(() => e.componentDisabled), R = E(() => {
      var A, G;
      return (A = e.wave) !== null && A !== void 0 ? A : (G = o.wave) === null || G === void 0 ? void 0 : G.value;
    }), N = {
      csp: l,
      autoInsertSpaceInButton: d,
      locale: f,
      direction: p,
      space: v,
      virtual: g,
      dropdownMatchSelectWidth: m,
      getPrefixCls: r,
      iconPrefixCls: i,
      theme: E(() => {
        var A, G;
        return (A = u.value) !== null && A !== void 0 ? A : (G = o.theme) === null || G === void 0 ? void 0 : G.value;
      }),
      renderEmpty: c,
      getTargetContainer: x,
      getPopupContainer: S,
      pageHeader: C,
      input: P,
      pagination: $,
      form: I,
      select: w,
      componentSize: T,
      componentDisabled: M,
      transformCellText: E(() => e.transformCellText),
      wave: R
    }, H = E(() => {
      const A = u.value || {}, {
        algorithm: G,
        token: j
      } = A, Z = wG(A, ["algorithm", "token"]), W = G && (!Array.isArray(G) || G.length > 0) ? dI(G) : void 0;
      return O(O({}, Z), {
        theme: W,
        token: O(O({}, Eh), j)
      });
    }), L = E(() => {
      var A, G;
      let j = {};
      return f.value && (j = ((A = f.value.Form) === null || A === void 0 ? void 0 : A.defaultValidateMessages) || ((G = La.Form) === null || G === void 0 ? void 0 : G.defaultValidateMessages) || {}), e.form && e.form.validateMessages && (j = O(O({}, j), e.form.validateMessages)), j;
    });
    pL(N), cL({
      validateMessages: L
    }), EI(T), Xk(M);
    const F = (A) => {
      var G, j;
      let Z = a.value ? s((G = n.default) === null || G === void 0 ? void 0 : G.call(n)) : (j = n.default) === null || j === void 0 ? void 0 : j.call(n);
      if (e.theme) {
        const W = /* @__PURE__ */ (function() {
          return Z;
        })();
        Z = h(U8, {
          value: H.value
        }, {
          default: () => [W]
        });
      }
      return h(AY, {
        locale: f.value || A,
        ANT_MARK__: Pb
      }, {
        default: () => [Z]
      });
    };
    return It(() => {
      p.value && (Cd.config({
        rtl: p.value === "rtl"
      }), Ju.config({
        rtl: p.value === "rtl"
      }));
    }), () => h(Jk, {
      children: (A, G, j) => F(j)
    }, null);
  }
});
Fa.config = CG;
Fa.install = function(e) {
  e.component(Fa.name, Fa);
};
const PG = (e, t) => {
  let {
    attrs: n,
    slots: o
  } = t;
  return h(Ft, Q(Q({
    size: "small",
    type: "primary"
  }, e), n), o);
}, Rf = (e, t, n) => {
  const o = FB(n);
  return {
    [`${e.componentCls}-${t}`]: {
      color: e[`color${n}`],
      background: e[`color${o}Bg`],
      borderColor: e[`color${o}Border`],
      [`&${e.componentCls}-borderless`]: {
        borderColor: "transparent"
      }
    }
  };
}, OG = (e) => OI(e, (t, n) => {
  let {
    textColor: o,
    lightBorderColor: r,
    lightColor: i,
    darkColor: a
  } = n;
  return {
    [`${e.componentCls}-${t}`]: {
      color: o,
      background: i,
      borderColor: r,
      // Inverse color
      "&-inverse": {
        color: e.colorTextLightSolid,
        background: a,
        borderColor: a
      },
      [`&${e.componentCls}-borderless`]: {
        borderColor: "transparent"
      }
    }
  };
}), kG = (e) => {
  const {
    paddingXXS: t,
    lineWidth: n,
    tagPaddingHorizontal: o,
    componentCls: r
  } = e, i = o - n, a = t - n;
  return {
    // Result
    [r]: O(O({}, fn(e)), {
      display: "inline-block",
      height: "auto",
      marginInlineEnd: e.marginXS,
      paddingInline: i,
      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
      [`&${r}-rtl`]: {
        direction: "rtl"
      },
      "&, a, a:hover": {
        color: e.tagDefaultColor
      },
      [`${r}-close-icon`]: {
        marginInlineStart: a,
        color: e.colorTextDescription,
        fontSize: e.tagIconSize,
        cursor: "pointer",
        transition: `all ${e.motionDurationMid}`,
        "&:hover": {
          color: e.colorTextHeading
        }
      },
      [`&${r}-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(${r}-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: i
      }
    }),
    [`${r}-borderless`]: {
      borderColor: "transparent",
      background: e.tagBorderlessBg
    }
  };
}, jM = On("Tag", (e) => {
  const {
    fontSize: t,
    lineHeight: n,
    lineWidth: o,
    fontSizeIcon: r
  } = e, i = Math.round(t * n), a = e.fontSizeSM, l = i - o * 2, s = e.colorFillAlter, u = e.colorText, c = Qt(e, {
    tagFontSize: a,
    tagLineHeight: l,
    tagDefaultBg: s,
    tagDefaultColor: u,
    tagIconSize: r - 2 * o,
    tagPaddingHorizontal: 8,
    tagBorderlessBg: e.colorFillTertiary
  });
  return [kG(c), OG(c), Rf(c, "success", "Success"), Rf(c, "processing", "Info"), Rf(c, "error", "Error"), Rf(c, "warning", "Warning")];
}), IG = () => ({
  prefixCls: String,
  checked: {
    type: Boolean,
    default: void 0
  },
  onChange: {
    type: Function
  },
  onClick: {
    type: Function
  },
  "onUpdate:checked": Function
}), Ib = be({
  compatConfig: {
    MODE: 3
  },
  name: "ACheckableTag",
  inheritAttrs: !1,
  props: IG(),
  // emits: ['update:checked', 'change', 'click'],
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      attrs: r
    } = t;
    const {
      prefixCls: i
    } = Nt("tag", e), [a, l] = jM(i), s = (c) => {
      const {
        checked: d
      } = e;
      o("update:checked", !d), o("change", !d), o("click", c);
    }, u = E(() => Me(i.value, l.value, {
      [`${i.value}-checkable`]: !0,
      [`${i.value}-checkable-checked`]: e.checked
    }));
    return () => {
      var c;
      return a(h("span", Q(Q({}, r), {}, {
        class: [u.value, r.class],
        onClick: s
      }), [(c = n.default) === null || c === void 0 ? void 0 : c.call(n)]));
    };
  }
}), TG = () => ({
  prefixCls: String,
  color: {
    type: String
  },
  closable: {
    type: Boolean,
    default: !1
  },
  closeIcon: pe.any,
  /** @deprecated `visible` will be removed in next major version. */
  visible: {
    type: Boolean,
    default: void 0
  },
  onClose: {
    type: Function
  },
  onClick: Wu(),
  "onUpdate:visible": Function,
  icon: pe.any,
  bordered: {
    type: Boolean,
    default: !0
  }
}), Pi = be({
  compatConfig: {
    MODE: 3
  },
  name: "ATag",
  inheritAttrs: !1,
  props: TG(),
  // emits: ['update:visible', 'close'],
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      attrs: r
    } = t;
    const {
      prefixCls: i,
      direction: a
    } = Nt("tag", e), [l, s] = jM(i), u = $e(!0);
    process.env.NODE_ENV !== "production" && wo(e.visible === void 0, "Tag", '`visible` is deprecated, please use `<Tag v-show="visible" />` instead.'), It(() => {
      e.visible !== void 0 && (u.value = e.visible);
    });
    const c = (v) => {
      v.stopPropagation(), o("update:visible", !1), o("close", v), !v.defaultPrevented && e.visible === void 0 && (u.value = !1);
    }, d = E(() => ET(e.color) || Yj(e.color)), f = E(() => Me(i.value, s.value, {
      [`${i.value}-${e.color}`]: d.value,
      [`${i.value}-has-color`]: e.color && !d.value,
      [`${i.value}-hidden`]: !u.value,
      [`${i.value}-rtl`]: a.value === "rtl",
      [`${i.value}-borderless`]: !e.bordered
    })), p = (v) => {
      o("click", v);
    };
    return () => {
      var v, g, m;
      const {
        icon: x = (v = n.icon) === null || v === void 0 ? void 0 : v.call(n),
        color: S,
        closeIcon: C = (g = n.closeIcon) === null || g === void 0 ? void 0 : g.call(n),
        closable: P = !1
      } = e, $ = () => P ? C ? h("span", {
        class: `${i.value}-close-icon`,
        onClick: c
      }, [C]) : h(la, {
        class: `${i.value}-close-icon`,
        onClick: c
      }, null) : null, I = {
        backgroundColor: S && !d.value ? S : void 0
      }, w = x || null, T = (m = n.default) === null || m === void 0 ? void 0 : m.call(n), M = w ? h(Je, null, [w, h("span", null, [T])]) : T, R = e.onClick !== void 0, N = h("span", Q(Q({}, r), {}, {
        onClick: p,
        class: [f.value, r.class],
        style: [I, r.style]
      }), [M, $()]);
      return l(R ? h(I0, null, {
        default: () => [N]
      }) : N);
    };
  }
});
Pi.CheckableTag = Ib;
Pi.install = function(e) {
  return e.component(Pi.name, Pi), e.component(Ib.name, Ib), e;
};
function _G(e, t) {
  let {
    slots: n,
    attrs: o
  } = t;
  return h(Pi, Q(Q({
    color: "blue"
  }, e), o), n);
}
var MG = { 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 EC(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      EG(e, r, n[r]);
    });
  }
  return e;
}
function EG(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var rg = function(t, n) {
  var o = EC({}, t, n.attrs);
  return h(an, EC({}, o, {
    icon: MG
  }), null);
};
rg.displayName = "CalendarOutlined";
rg.inheritAttrs = !1;
var DG = { 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 DC(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      AG(e, r, n[r]);
    });
  }
  return e;
}
function AG(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var ig = function(t, n) {
  var o = DC({}, t, n.attrs);
  return h(an, DC({}, o, {
    icon: DG
  }), null);
};
ig.displayName = "ClockCircleOutlined";
ig.inheritAttrs = !1;
function NG(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 RG(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 WM(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 KM() {
  return {
    id: String,
    /**
     * @deprecated `dropdownClassName` is deprecated which will be removed in next major
     *   version.Please use `popupClassName` instead.
     */
    dropdownClassName: String,
    popupClassName: String,
    popupStyle: Mt(),
    transitionName: String,
    placeholder: String,
    allowClear: ct(),
    autofocus: ct(),
    disabled: ct(),
    tabindex: Number,
    open: ct(),
    defaultOpen: ct(),
    /** Make input readOnly to avoid popup keyboard in mobile */
    inputReadOnly: ct(),
    format: en([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: et(),
    panelRender: et(),
    // // Events
    onChange: et(),
    "onUpdate:value": et(),
    onOk: et(),
    onOpenChange: et(),
    "onUpdate:open": et(),
    onFocus: et(),
    onBlur: et(),
    onMousedown: et(),
    onMouseup: et(),
    onMouseenter: et(),
    onMouseleave: et(),
    onClick: et(),
    onContextmenu: et(),
    onKeydown: et(),
    // WAI-ARIA
    role: String,
    name: String,
    autocomplete: String,
    direction: rn(),
    showToday: ct(),
    showTime: en([Boolean, Object]),
    locale: Mt(),
    size: rn(),
    bordered: ct(),
    dateRender: et(),
    disabledDate: et(),
    mode: rn(),
    picker: rn(),
    valueFormat: String,
    placement: rn(),
    status: rn(),
    /** @deprecated Please use `disabledTime` instead. */
    disabledHours: et(),
    /** @deprecated Please use `disabledTime` instead. */
    disabledMinutes: et(),
    /** @deprecated Please use `disabledTime` instead. */
    disabledSeconds: et()
  };
}
function zG() {
  return {
    defaultPickerValue: en([Object, String]),
    defaultValue: en([Object, String]),
    value: en([Object, String]),
    presets: jn(),
    disabledTime: et(),
    renderExtraFooter: et(),
    showNow: ct(),
    monthCellRender: et(),
    // deprecated  Please use `monthCellRender"` instead.',
    monthCellContentRender: et()
  };
}
function FG() {
  return {
    allowEmpty: jn(),
    dateRender: et(),
    defaultPickerValue: jn(),
    defaultValue: jn(),
    value: jn(),
    presets: jn(),
    disabledTime: et(),
    disabled: en([Boolean, Array]),
    renderExtraFooter: et(),
    separator: {
      type: String
    },
    showTime: en([Boolean, Object]),
    ranges: Mt(),
    placeholder: jn(),
    mode: jn(),
    onChange: et(),
    "onUpdate:value": et(),
    onCalendarChange: et(),
    onPanelChange: et(),
    onOk: et()
  };
}
var BG = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
function LG(e, t) {
  function n(u, c) {
    const d = O(O(O({}, KM()), zG()), t);
    return be({
      compatConfig: {
        MODE: 3
      },
      name: c,
      inheritAttrs: !1,
      props: d,
      slots: Object,
      setup(f, p) {
        let {
          slots: v,
          expose: g,
          attrs: m,
          emit: x
        } = p;
        const S = f, C = Br(), P = Nr.useInject();
        process.env.NODE_ENV !== "production" && (dn(u !== "quarter", c || "DatePicker", `DatePicker.${c} is legacy usage. Please use DatePicker[picker='${u}'] directly.`), dn(!S.dropdownClassName, c || "DatePicker", "`dropdownClassName` is deprecated. Please use `popupClassName` instead."), dn(!(S.monthCellContentRender || v.monthCellContentRender), c || "DatePicker", '`monthCellContentRender` is deprecated. Please use `monthCellRender"` instead.'), dn(!m.getCalendarContainer, c || "DatePicker", '`getCalendarContainer` is deprecated. Please use `getPopupContainer"` instead.'));
        const {
          prefixCls: $,
          direction: I,
          getPopupContainer: w,
          size: T,
          rootPrefixCls: M,
          disabled: R
        } = Nt("picker", S), {
          compactSize: N,
          compactItemClassnames: H
        } = dc($, I), L = E(() => N.value || T.value), [F, A] = R_($), G = le();
        g({
          focus: () => {
            var ve;
            (ve = G.value) === null || ve === void 0 || ve.focus();
          },
          blur: () => {
            var ve;
            (ve = G.value) === null || ve === void 0 || ve.blur();
          }
        });
        const j = (ve) => S.valueFormat ? e.toString(ve, S.valueFormat) : ve, Z = (ve, ce) => {
          const fe = j(ve);
          x("update:value", fe), x("change", fe, ce), C.onFieldChange();
        }, W = (ve) => {
          x("update:open", ve), x("openChange", ve);
        }, K = (ve) => {
          x("focus", ve);
        }, q = (ve) => {
          x("blur", ve), C.onFieldBlur();
        }, U = (ve, ce) => {
          const fe = j(ve);
          x("panelChange", fe, ce);
        }, ae = (ve) => {
          const ce = j(ve);
          x("ok", ce);
        }, [se] = Rl("DatePicker", Mp), ie = E(() => S.value ? S.valueFormat ? e.toDate(S.value, S.valueFormat) : S.value : S.value === "" ? void 0 : S.value), re = E(() => S.defaultValue ? S.valueFormat ? e.toDate(S.defaultValue, S.valueFormat) : S.defaultValue : S.defaultValue === "" ? void 0 : S.defaultValue), te = E(() => S.defaultPickerValue ? S.valueFormat ? e.toDate(S.defaultPickerValue, S.valueFormat) : S.defaultPickerValue : S.defaultPickerValue === "" ? void 0 : S.defaultPickerValue);
        return () => {
          var ve, ce, fe, ge, Te, ze;
          const Ke = O(O({}, se.value), S.locale), He = O(O({}, S), m), {
            bordered: Ne = !0,
            placeholder: Xe,
            suffixIcon: De = (ve = v.suffixIcon) === null || ve === void 0 ? void 0 : ve.call(v),
            showToday: Fe = !0,
            transitionName: Ve,
            allowClear: ot = !0,
            dateRender: je = v.dateRender,
            renderExtraFooter: Pe = v.renderExtraFooter,
            monthCellRender: Ge = v.monthCellRender || S.monthCellContentRender || v.monthCellContentRender,
            clearIcon: Se = (ce = v.clearIcon) === null || ce === void 0 ? void 0 : ce.call(v),
            id: Ce = C.id.value
          } = He, Ae = BG(He, ["bordered", "placeholder", "suffixIcon", "showToday", "transitionName", "allowClear", "dateRender", "renderExtraFooter", "monthCellRender", "clearIcon", "id"]), qe = He.showTime === "" ? !0 : He.showTime, {
            format: We
          } = He;
          let tt = {};
          u && (tt.picker = u);
          const Ee = u || He.picker || "date";
          tt = O(O(O({}, tt), qe ? Xp(O({
            format: We,
            picker: Ee
          }, typeof qe == "object" ? qe : {})) : {}), Ee === "time" ? Xp(O(O({
            format: We
          }, Ae), {
            picker: Ee
          })) : {});
          const Re = $.value, Be = h(Je, null, [De || (u === "time" ? h(ig, null, null) : h(rg, null, null)), P.hasFeedback && P.feedbackIcon]);
          return F(h(j7, Q(Q(Q({
            monthCellRender: Ge,
            dateRender: je,
            renderExtraFooter: Pe,
            ref: G,
            placeholder: NG(Ke, Ee, Xe),
            suffixIcon: Be,
            dropdownAlign: WM(I.value, S.placement),
            clearIcon: Se || h(Fr, null, null),
            allowClear: ot,
            transitionName: Ve || `${M.value}-slide-up`
          }, Ae), tt), {}, {
            id: Ce,
            picker: Ee,
            value: ie.value,
            defaultValue: re.value,
            defaultPickerValue: te.value,
            showToday: Fe,
            locale: Ke.lang,
            class: Me({
              [`${Re}-${L.value}`]: L.value,
              [`${Re}-borderless`]: !Ne
            }, $i(Re, Ls(P.status, S.status), P.hasFeedback), m.class, A.value, H.value),
            disabled: R.value,
            prefixCls: Re,
            getPopupContainer: m.getCalendarContainer || w.value,
            generateConfig: e,
            prevIcon: ((fe = v.prevIcon) === null || fe === void 0 ? void 0 : fe.call(v)) || h("span", {
              class: `${Re}-prev-icon`
            }, null),
            nextIcon: ((ge = v.nextIcon) === null || ge === void 0 ? void 0 : ge.call(v)) || h("span", {
              class: `${Re}-next-icon`
            }, null),
            superPrevIcon: ((Te = v.superPrevIcon) === null || Te === void 0 ? void 0 : Te.call(v)) || h("span", {
              class: `${Re}-super-prev-icon`
            }, null),
            superNextIcon: ((ze = v.superNextIcon) === null || ze === void 0 ? void 0 : ze.call(v)) || h("span", {
              class: `${Re}-super-next-icon`
            }, null),
            components: qM,
            direction: I.value,
            dropdownClassName: Me(A.value, S.popupClassName, S.dropdownClassName),
            onChange: Z,
            onOpenChange: W,
            onFocus: K,
            onBlur: q,
            onPanelChange: U,
            onOk: ae
          }), null));
        };
      }
    });
  }
  const o = n(void 0, "ADatePicker"), r = n("week", "AWeekPicker"), i = n("month", "AMonthPicker"), a = n("year", "AYearPicker"), l = n("time", "TimePicker"), s = n("quarter", "AQuarterPicker");
  return {
    DatePicker: o,
    WeekPicker: r,
    MonthPicker: i,
    YearPicker: a,
    TimePicker: l,
    QuarterPicker: s
  };
}
var HG = { 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 AC(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      VG(e, r, n[r]);
    });
  }
  return e;
}
function VG(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var px = function(t, n) {
  var o = AC({}, t, n.attrs);
  return h(an, AC({}, o, {
    icon: HG
  }), null);
};
px.displayName = "SwapRightOutlined";
px.inheritAttrs = !1;
var jG = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
function WG(e, t) {
  return be({
    compatConfig: {
      MODE: 3
    },
    name: "ARangePicker",
    inheritAttrs: !1,
    props: O(O(O({}, KM()), FG()), t),
    slots: Object,
    setup(o, r) {
      let {
        expose: i,
        slots: a,
        attrs: l,
        emit: s
      } = r;
      const u = o, c = Br(), d = Nr.useInject();
      process.env.NODE_ENV !== "production" && (dn(!u.dropdownClassName, "RangePicker", "`dropdownClassName` is deprecated. Please use `popupClassName` instead."), dn(!l.getCalendarContainer, "DatePicker", '`getCalendarContainer` is deprecated. Please use `getPopupContainer"` instead.'));
      const {
        prefixCls: f,
        direction: p,
        getPopupContainer: v,
        size: g,
        rootPrefixCls: m,
        disabled: x
      } = Nt("picker", u), {
        compactSize: S,
        compactItemClassnames: C
      } = dc(f, p), P = E(() => S.value || g.value), [$, I] = R_(f), w = le();
      i({
        focus: () => {
          var K;
          (K = w.value) === null || K === void 0 || K.focus();
        },
        blur: () => {
          var K;
          (K = w.value) === null || K === void 0 || K.blur();
        }
      });
      const T = (K) => u.valueFormat ? e.toString(K, u.valueFormat) : K, M = (K, q) => {
        const U = T(K);
        s("update:value", U), s("change", U, q), c.onFieldChange();
      }, R = (K) => {
        s("update:open", K), s("openChange", K);
      }, N = (K) => {
        s("focus", K);
      }, H = (K) => {
        s("blur", K), c.onFieldBlur();
      }, L = (K, q) => {
        const U = T(K);
        s("panelChange", U, q);
      }, F = (K) => {
        const q = T(K);
        s("ok", q);
      }, A = (K, q, U) => {
        const ae = T(K);
        s("calendarChange", ae, q, U);
      }, [G] = Rl("DatePicker", Mp), j = E(() => u.value && u.valueFormat ? e.toDate(u.value, u.valueFormat) : u.value), Z = E(() => u.defaultValue && u.valueFormat ? e.toDate(u.defaultValue, u.valueFormat) : u.defaultValue), W = E(() => u.defaultPickerValue && u.valueFormat ? e.toDate(u.defaultPickerValue, u.valueFormat) : u.defaultPickerValue);
      return () => {
        var K, q, U, ae, se, ie, re;
        const te = O(O({}, G.value), u.locale), ve = O(O({}, u), l), {
          prefixCls: ce,
          bordered: fe = !0,
          placeholder: ge,
          suffixIcon: Te = (K = a.suffixIcon) === null || K === void 0 ? void 0 : K.call(a),
          picker: ze = "date",
          transitionName: Ke,
          allowClear: He = !0,
          dateRender: Ne = a.dateRender,
          renderExtraFooter: Xe = a.renderExtraFooter,
          separator: De = (q = a.separator) === null || q === void 0 ? void 0 : q.call(a),
          clearIcon: Fe = (U = a.clearIcon) === null || U === void 0 ? void 0 : U.call(a),
          id: Ve = c.id.value
        } = ve, ot = jG(ve, ["prefixCls", "bordered", "placeholder", "suffixIcon", "picker", "transitionName", "allowClear", "dateRender", "renderExtraFooter", "separator", "clearIcon", "id"]);
        delete ot["onUpdate:value"], delete ot["onUpdate:open"];
        const {
          format: je,
          showTime: Pe
        } = ve;
        let Ge = {};
        Ge = O(O(O({}, Ge), Pe ? Xp(O({
          format: je,
          picker: ze
        }, Pe)) : {}), ze === "time" ? Xp(O(O({
          format: je
        }, Fn(ot, ["disabledTime"])), {
          picker: ze
        })) : {});
        const Se = f.value, Ce = h(Je, null, [Te || (ze === "time" ? h(ig, null, null) : h(rg, null, null)), d.hasFeedback && d.feedbackIcon]);
        return $(h(n9, Q(Q(Q({
          dateRender: Ne,
          renderExtraFooter: Xe,
          separator: De || h("span", {
            "aria-label": "to",
            class: `${Se}-separator`
          }, [h(px, null, null)]),
          ref: w,
          dropdownAlign: WM(p.value, u.placement),
          placeholder: RG(te, ze, ge),
          suffixIcon: Ce,
          clearIcon: Fe || h(Fr, null, null),
          allowClear: He,
          transitionName: Ke || `${m.value}-slide-up`
        }, ot), Ge), {}, {
          disabled: x.value,
          id: Ve,
          value: j.value,
          defaultValue: Z.value,
          defaultPickerValue: W.value,
          picker: ze,
          class: Me({
            [`${Se}-${P.value}`]: P.value,
            [`${Se}-borderless`]: !fe
          }, $i(Se, Ls(d.status, u.status), d.hasFeedback), l.class, I.value, C.value),
          locale: te.lang,
          prefixCls: Se,
          getPopupContainer: l.getCalendarContainer || v.value,
          generateConfig: e,
          prevIcon: ((ae = a.prevIcon) === null || ae === void 0 ? void 0 : ae.call(a)) || h("span", {
            class: `${Se}-prev-icon`
          }, null),
          nextIcon: ((se = a.nextIcon) === null || se === void 0 ? void 0 : se.call(a)) || h("span", {
            class: `${Se}-next-icon`
          }, null),
          superPrevIcon: ((ie = a.superPrevIcon) === null || ie === void 0 ? void 0 : ie.call(a)) || h("span", {
            class: `${Se}-super-prev-icon`
          }, null),
          superNextIcon: ((re = a.superNextIcon) === null || re === void 0 ? void 0 : re.call(a)) || h("span", {
            class: `${Se}-super-next-icon`
          }, null),
          components: qM,
          direction: p.value,
          dropdownClassName: Me(I.value, u.popupClassName, u.dropdownClassName),
          onChange: M,
          onOpenChange: R,
          onFocus: N,
          onBlur: H,
          onPanelChange: L,
          onOk: F,
          onCalendarChange: A
        }), null));
      };
    }
  });
}
const qM = {
  button: PG,
  rangeItem: _G
};
function KG(e) {
  return e ? Array.isArray(e) ? e : [e] : [];
}
function Xp(e) {
  const {
    format: t,
    picker: n,
    showHour: o,
    showMinute: r,
    showSecond: i,
    use12Hours: a
  } = e, l = KG(t)[0], s = O({}, e);
  return l && typeof l == "string" && (!l.includes("s") && i === void 0 && (s.showSecond = !1), !l.includes("m") && r === 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 qG(e, t) {
  const {
    DatePicker: n,
    WeekPicker: o,
    MonthPicker: r,
    YearPicker: i,
    TimePicker: a,
    QuarterPicker: l
  } = LG(e, t), s = WG(e, t);
  return {
    DatePicker: n,
    WeekPicker: o,
    MonthPicker: r,
    YearPicker: i,
    TimePicker: a,
    QuarterPicker: l,
    RangePicker: s
  };
}
const {
  DatePicker: Cv,
  WeekPicker: $v,
  MonthPicker: Pv,
  YearPicker: YG,
  TimePicker: GG,
  QuarterPicker: Ov,
  RangePicker: kv
} = qG(v7), UG = O(Cv, {
  WeekPicker: $v,
  MonthPicker: Pv,
  YearPicker: YG,
  RangePicker: kv,
  TimePicker: GG,
  QuarterPicker: Ov,
  install: (e) => (e.component(Cv.name, Cv), e.component(kv.name, kv), e.component(Pv.name, Pv), e.component($v.name, $v), e.component(Ov.name, Ov), e)
}), XG = (e) => {
  const {
    componentCls: t,
    sizePaddingEdgeHorizontal: n,
    colorSplit: o,
    lineWidth: r
  } = e;
  return {
    [t]: O(O({}, fn(e)), {
      borderBlockStart: `${r}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: `${r}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: `${r}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: `${r}px 0 0`
      },
      [`&-horizontal${t}-with-text${t}-dashed`]: {
        "&::before, &::after": {
          borderStyle: "dashed none none"
        }
      },
      [`&-vertical${t}-dashed`]: {
        borderInlineStartWidth: r,
        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
        }
      }
    })
  };
}, QG = On("Divider", (e) => {
  const t = Qt(e, {
    dividerVerticalGutterMargin: e.marginXS,
    dividerHorizontalWithTextGutterMargin: e.margin,
    dividerHorizontalGutterMargin: e.marginLG
  });
  return [XG(t)];
}, {
  sizePaddingEdgeHorizontal: 0
}), ZG = () => ({
  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]
}), JG = be({
  name: "ADivider",
  inheritAttrs: !1,
  compatConfig: {
    MODE: 3
  },
  props: ZG(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: r,
      direction: i
    } = Nt("divider", e), [a, l] = QG(r), s = E(() => e.orientation === "left" && e.orientationMargin != null), u = E(() => e.orientation === "right" && e.orientationMargin != null), c = E(() => {
      const {
        type: p,
        dashed: v,
        plain: g
      } = e, m = r.value;
      return {
        [m]: !0,
        [l.value]: !!l.value,
        [`${m}-${p}`]: !0,
        [`${m}-dashed`]: !!v,
        [`${m}-plain`]: !!g,
        [`${m}-rtl`]: i.value === "rtl",
        [`${m}-no-default-orientation-margin-left`]: s.value,
        [`${m}-no-default-orientation-margin-right`]: u.value
      };
    }), d = E(() => {
      const p = typeof e.orientationMargin == "number" ? `${e.orientationMargin}px` : e.orientationMargin;
      return O(O({}, s.value && {
        marginLeft: p
      }), u.value && {
        marginRight: p
      });
    }), f = E(() => e.orientation.length > 0 ? "-" + e.orientation : e.orientation);
    return () => {
      var p;
      const v = go((p = n.default) === null || p === void 0 ? void 0 : p.call(n));
      return a(h("div", Q(Q({}, o), {}, {
        class: [c.value, v.length ? `${r.value}-with-text ${r.value}-with-text${f.value}` : "", o.class],
        role: "separator"
      }), [v.length ? h("span", {
        class: `${r.value}-inner-text`,
        style: d.value
      }, [v]) : null]));
    };
  }
}), eU = ii(JG);
Er.Button = jp;
Er.install = function(e) {
  return e.component(Er.name, Er), e.component(jp.name, jp), e;
};
const YM = () => ({
  prefixCls: String,
  width: pe.oneOfType([pe.string, pe.number]),
  height: pe.oneOfType([pe.string, pe.number]),
  style: {
    type: Object,
    default: void 0
  },
  class: String,
  rootClassName: String,
  rootStyle: Mt(),
  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: jn(),
  autofocus: {
    type: Boolean,
    default: void 0
  },
  open: {
    type: Boolean,
    default: void 0
  },
  // Motion
  motion: et(),
  maskMotion: Mt()
}), tU = () => O(O({}, YM()), {
  forceRender: {
    type: Boolean,
    default: void 0
  },
  getContainer: pe.oneOfType([pe.string, pe.func, pe.object, pe.looseBool])
}), nU = () => O(O({}, YM()), {
  getContainer: Function,
  getOpenCount: Function,
  scrollLocker: pe.any,
  inline: Boolean
});
function oU(e) {
  return Array.isArray(e) ? e : [e];
}
const rU = {
  transition: "transitionend",
  WebkitTransition: "webkitTransitionEnd",
  MozTransition: "transitionend",
  OTransition: "oTransitionEnd otransitionend"
};
Object.keys(rU).filter((e) => {
  if (typeof document > "u")
    return !1;
  const t = document.getElementsByTagName("html")[0];
  return e in (t ? t.style : {});
})[0];
const iU = !(typeof window < "u" && window.document && window.document.createElement);
var aU = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const NC = be({
  compatConfig: {
    MODE: 3
  },
  inheritAttrs: !1,
  props: nU(),
  emits: ["close", "handleClick", "change"],
  setup(e, t) {
    let {
      emit: n,
      slots: o
    } = t;
    const r = $e(), i = $e(), a = $e(), l = $e(), s = $e();
    let u = [];
    `${Number((Date.now() + Math.random()).toString().replace(".", Math.round(Math.random() * 9).toString())).toString(16)}`, At(() => {
      Yt(() => {
        var x;
        const {
          open: S,
          getContainer: C,
          showMask: P,
          autofocus: $
        } = e, I = C?.();
        v(e), S && (I && (I.parentNode, document.body), Yt(() => {
          $ && c();
        }), P && ((x = e.scrollLocker) === null || x === void 0 || x.lock()));
      });
    }), Ie(() => e.level, () => {
      v(e);
    }, {
      flush: "post"
    }), Ie(() => e.open, () => {
      const {
        open: x,
        getContainer: S,
        scrollLocker: C,
        showMask: P,
        autofocus: $
      } = e, I = S?.();
      I && (I.parentNode, document.body), x ? ($ && c(), P && C?.lock()) : C?.unLock();
    }, {
      flush: "post"
    }), Vo(() => {
      var x;
      const {
        open: S
      } = e;
      S && (document.body.style.touchAction = ""), (x = e.scrollLocker) === null || x === void 0 || x.unLock();
    }), Ie(() => e.placement, (x) => {
      x && (s.value = null);
    });
    const c = () => {
      var x, S;
      (S = (x = i.value) === null || x === void 0 ? void 0 : x.focus) === null || S === void 0 || S.call(x);
    }, d = (x) => {
      n("close", x);
    }, f = (x) => {
      x.keyCode === it.ESC && (x.stopPropagation(), d(x));
    }, p = () => {
      const {
        open: x,
        afterVisibleChange: S
      } = e;
      S && S(!!x);
    }, v = (x) => {
      let {
        level: S,
        getContainer: C
      } = x;
      if (iU)
        return;
      const P = C?.(), $ = P ? P.parentNode : null;
      u = [], S === "all" ? ($ ? Array.prototype.slice.call($.children) : []).forEach((w) => {
        w.nodeName !== "SCRIPT" && w.nodeName !== "STYLE" && w.nodeName !== "LINK" && w !== P && u.push(w);
      }) : S && oU(S).forEach((I) => {
        document.querySelectorAll(I).forEach((w) => {
          u.push(w);
        });
      });
    }, g = (x) => {
      n("handleClick", x);
    }, m = $e(!1);
    return Ie(i, () => {
      Yt(() => {
        m.value = !0;
      });
    }), () => {
      var x, S;
      const {
        width: C,
        height: P,
        open: $,
        prefixCls: I,
        placement: w,
        level: T,
        levelMove: M,
        ease: R,
        duration: N,
        getContainer: H,
        onChange: L,
        afterVisibleChange: F,
        showMask: A,
        maskClosable: G,
        maskStyle: j,
        keyboard: Z,
        getOpenCount: W,
        scrollLocker: K,
        contentWrapperStyle: q,
        style: U,
        class: ae,
        rootClassName: se,
        rootStyle: ie,
        maskMotion: re,
        motion: te,
        inline: ve
      } = e, ce = aU(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"]), fe = $ && m.value, ge = Me(I, {
        [`${I}-${w}`]: !0,
        [`${I}-open`]: fe,
        [`${I}-inline`]: ve,
        "no-mask": !A,
        [se]: !0
      }), Te = typeof te == "function" ? te(w) : te;
      return h("div", Q(Q({}, Fn(ce, ["autofocus"])), {}, {
        tabindex: -1,
        class: ge,
        style: ie,
        ref: i,
        onKeydown: fe && Z ? f : void 0
      }), [h(Dr, re, {
        default: () => [A && ti(h("div", {
          class: `${I}-mask`,
          onClick: G ? d : void 0,
          style: j,
          ref: a
        }, null), [[Oi, fe]])]
      }), h(Dr, Q(Q({}, Te), {}, {
        onAfterEnter: p,
        onAfterLeave: p
      }), {
        default: () => [ti(h("div", {
          class: `${I}-content-wrapper`,
          style: [q],
          ref: r
        }, [h("div", {
          class: [`${I}-content`, ae],
          style: U,
          ref: s
        }, [(x = o.default) === null || x === void 0 ? void 0 : x.call(o)]), o.handler ? h("div", {
          onClick: g,
          ref: l
        }, [(S = o.handler) === null || S === void 0 ? void 0 : S.call(o)]) : null]), [[Oi, fe]])]
      })]);
    };
  }
});
var RC = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const lU = be({
  compatConfig: {
    MODE: 3
  },
  inheritAttrs: !1,
  props: Mn(tU(), {
    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 r = le(null), i = (l) => {
      n("handleClick", l);
    }, a = (l) => {
      n("close", l);
    };
    return () => {
      const {
        getContainer: l,
        wrapperClassName: s,
        rootClassName: u,
        rootStyle: c,
        forceRender: d
      } = e, f = RC(e, ["getContainer", "wrapperClassName", "rootClassName", "rootStyle", "forceRender"]);
      let p = null;
      if (!l)
        return h(NC, Q(Q({}, f), {}, {
          rootClassName: u,
          rootStyle: c,
          open: e.open,
          onClose: a,
          onHandleClick: i,
          inline: !0
        }), o);
      const v = !!o.handler || d;
      return (v || e.open || r.value) && (p = h(u0, {
        autoLock: !0,
        visible: e.open,
        forceRender: v,
        getContainer: l,
        wrapperClassName: s
      }, {
        default: (g) => {
          var {
            visible: m,
            afterClose: x
          } = g, S = RC(g, ["visible", "afterClose"]);
          return h(NC, Q(Q(Q({
            ref: r
          }, f), S), {}, {
            rootClassName: u,
            rootStyle: c,
            open: m !== void 0 ? m : e.open,
            afterVisibleChange: x !== void 0 ? x : e.afterVisibleChange,
            onClose: a,
            onHandleClick: i
          }), o);
        }
      })), p;
    };
  }
}), sU = (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%)"
            }
          }
        }]
      }
    }
  };
}, uU = (e) => {
  const {
    componentCls: t,
    zIndexPopup: n,
    colorBgMask: o,
    colorBgElevated: r,
    motionDurationSlow: i,
    motionDurationMid: a,
    padding: l,
    paddingLG: s,
    fontSizeLG: u,
    lineHeightLG: c,
    lineWidth: d,
    lineType: f,
    colorSplit: p,
    marginSM: v,
    colorIcon: g,
    colorIconHover: m,
    colorText: x,
    fontWeightStrong: S,
    drawerFooterPaddingVertical: C,
    drawerFooterPaddingHorizontal: P
  } = e, $ = `${t}-content-wrapper`;
  return {
    [t]: {
      position: "fixed",
      inset: 0,
      zIndex: n,
      pointerEvents: "none",
      "&-pure": {
        position: "relative",
        background: r,
        [`&${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 =====================
      [$]: {
        position: "absolute",
        zIndex: n,
        transition: `all ${i}`,
        "&-hidden": {
          display: "none"
        }
      },
      // Placement
      [`&-left > ${$}`]: {
        top: 0,
        bottom: 0,
        left: {
          _skip_check_: !0,
          value: 0
        },
        boxShadow: e.boxShadowDrawerLeft
      },
      [`&-right > ${$}`]: {
        top: 0,
        right: {
          _skip_check_: !0,
          value: 0
        },
        bottom: 0,
        boxShadow: e.boxShadowDrawerRight
      },
      [`&-top > ${$}`]: {
        top: 0,
        insetInline: 0,
        boxShadow: e.boxShadowDrawerUp
      },
      [`&-bottom > ${$}`]: {
        bottom: 0,
        insetInline: 0,
        boxShadow: e.boxShadowDrawerDown
      },
      [`${t}-content`]: {
        width: "100%",
        height: "100%",
        overflow: "auto",
        background: r,
        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: v,
        color: g,
        fontWeight: S,
        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: m,
          textDecoration: "none"
        }
      },
      [`${t}-title`]: {
        flex: 1,
        margin: 0,
        color: x,
        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: `${C}px ${P}px`,
        borderTop: `${d}px ${f} ${p}`
      },
      // ====================== RTL =======================
      "&-rtl": {
        direction: "rtl"
      }
    }
  };
}, cU = On("Drawer", (e) => {
  const t = Qt(e, {
    drawerFooterPaddingVertical: e.paddingXS,
    drawerFooterPaddingHorizontal: e.padding
  });
  return [uU(t), sU(t)];
}, (e) => ({
  zIndexPopup: e.zIndexPopupBase
}));
var dU = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const fU = ["top", "right", "bottom", "left"], zC = {
  distance: 180
}, pU = () => ({
  autofocus: {
    type: Boolean,
    default: void 0
  },
  closable: {
    type: Boolean,
    default: void 0
  },
  closeIcon: pe.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: Mt(),
  rootClassName: String,
  rootStyle: Mt(),
  size: {
    type: String
  },
  drawerStyle: Mt(),
  headerStyle: Mt(),
  bodyStyle: Mt(),
  contentWrapperStyle: {
    type: Object,
    default: void 0
  },
  title: pe.any,
  /** @deprecated Please use `open` instead */
  visible: {
    type: Boolean,
    default: void 0
  },
  open: {
    type: Boolean,
    default: void 0
  },
  width: pe.oneOfType([pe.string, pe.number]),
  height: pe.oneOfType([pe.string, pe.number]),
  zIndex: Number,
  prefixCls: String,
  push: pe.oneOfType([pe.looseBool, {
    type: Object
  }]),
  placement: pe.oneOf(fU),
  keyboard: {
    type: Boolean,
    default: void 0
  },
  extra: pe.any,
  footer: pe.any,
  footerStyle: Mt(),
  level: pe.any,
  levelMove: {
    type: [Number, Array, Function]
  },
  handle: pe.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
}), hU = be({
  compatConfig: {
    MODE: 3
  },
  name: "ADrawer",
  inheritAttrs: !1,
  props: Mn(pU(), {
    closable: !0,
    placement: "right",
    maskClosable: !0,
    mask: !0,
    level: null,
    keyboard: !0,
    push: zC
  }),
  slots: Object,
  // emits: ['update:visible', 'close', 'afterVisibleChange'],
  setup(e, t) {
    let {
      emit: n,
      slots: o,
      attrs: r
    } = t;
    const i = $e(!1), a = $e(!1), l = $e(null), s = $e(!1), u = $e(!1), c = E(() => {
      var W;
      return (W = e.open) !== null && W !== void 0 ? W : 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 = zt("parentDrawerOpts", null), {
      prefixCls: f,
      getPopupContainer: p,
      direction: v
    } = Nt("drawer", e), [g, m] = cU(f), x = E(() => (
      // 有可能为 false，所以不能直接判断
      e.getContainer === void 0 && p?.value ? () => p.value(document.body) : e.getContainer
    ));
    dn(!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((W) => {
      let [K, q] = W;
      dn(!e[K], "Drawer", `\`${K}\` is deprecated, please use \`${q}\` instead.`);
    }), Bt("parentDrawerOpts", {
      setPush: () => {
        i.value = !0;
      },
      setPull: () => {
        i.value = !1, Yt(() => {
          P();
        });
      }
    }), At(() => {
      c.value && d && d.setPush();
    }), Vo(() => {
      d && d.setPull();
    }), Ie(u, () => {
      d && (u.value ? d.setPush() : d.setPull());
    }, {
      flush: "post"
    });
    const P = () => {
      var W, K;
      (K = (W = l.value) === null || W === void 0 ? void 0 : W.domFocus) === null || K === void 0 || K.call(W);
    }, $ = (W) => {
      n("update:visible", !1), n("update:open", !1), n("close", W);
    }, I = (W) => {
      var K;
      W || (a.value === !1 && (a.value = !0), e.destroyOnClose && (s.value = !1)), (K = e.afterVisibleChange) === null || K === void 0 || K.call(e, W), n("afterVisibleChange", W), n("afterOpenChange", W);
    }, w = E(() => {
      const {
        push: W,
        placement: K
      } = e;
      let q;
      return typeof W == "boolean" ? q = W ? zC.distance : 0 : q = W.distance, q = parseFloat(String(q || 0)), K === "left" || K === "right" ? `translateX(${K === "left" ? q : -q}px)` : K === "top" || K === "bottom" ? `translateY(${K === "top" ? q : -q}px)` : null;
    }), T = E(() => {
      var W;
      return (W = e.width) !== null && W !== void 0 ? W : e.size === "large" ? 736 : 378;
    }), M = E(() => {
      var W;
      return (W = e.height) !== null && W !== void 0 ? W : e.size === "large" ? 736 : 378;
    }), R = E(() => {
      const {
        mask: W,
        placement: K
      } = e;
      if (!u.value && !W)
        return {};
      const q = {};
      return K === "left" || K === "right" ? q.width = OS(T.value) ? `${T.value}px` : T.value : q.height = OS(M.value) ? `${M.value}px` : M.value, q;
    }), N = E(() => {
      const {
        zIndex: W,
        contentWrapperStyle: K
      } = e, q = R.value;
      return [{
        zIndex: W,
        transform: i.value ? w.value : void 0
      }, O({}, K), q];
    }), H = (W) => {
      const {
        closable: K,
        headerStyle: q
      } = e, U = ei(o, e, "extra"), ae = ei(o, e, "title");
      return !ae && !K ? null : h("div", {
        class: Me(`${W}-header`, {
          [`${W}-header-close-only`]: K && !ae && !U
        }),
        style: q
      }, [h("div", {
        class: `${W}-header-title`
      }, [L(W), ae && h("div", {
        class: `${W}-title`
      }, [ae])]), U && h("div", {
        class: `${W}-extra`
      }, [U])]);
    }, L = (W) => {
      var K;
      const {
        closable: q
      } = e, U = o.closeIcon ? (K = o.closeIcon) === null || K === void 0 ? void 0 : K.call(o) : e.closeIcon;
      return q && h("button", {
        key: "closer",
        onClick: $,
        "aria-label": "Close",
        class: `${W}-close`
      }, [U === void 0 ? h(la, null, null) : U]);
    }, F = (W) => {
      var K;
      if (a.value && !e.forceRender && !s.value)
        return null;
      const {
        bodyStyle: q,
        drawerStyle: U
      } = e;
      return h("div", {
        class: `${W}-wrapper-body`,
        style: U
      }, [H(W), h("div", {
        key: "body",
        class: `${W}-body`,
        style: q
      }, [(K = o.default) === null || K === void 0 ? void 0 : K.call(o)]), A(W)]);
    }, A = (W) => {
      const K = ei(o, e, "footer");
      if (!K)
        return null;
      const q = `${W}-footer`;
      return h("div", {
        class: q,
        style: e.footerStyle
      }, [K]);
    }, G = E(() => Me({
      "no-mask": !e.mask,
      [`${f.value}-rtl`]: v.value === "rtl"
    }, e.rootClassName, m.value)), j = E(() => _s(Ka(f.value, "mask-motion"))), Z = (W) => _s(Ka(f.value, `panel-motion-${W}`));
    return () => {
      const {
        width: W,
        height: K,
        placement: q,
        mask: U,
        forceRender: ae
      } = e, se = dU(e, ["width", "height", "placement", "mask", "forceRender"]), ie = O(O(O({}, r), Fn(se, ["size", "closeIcon", "closable", "destroyOnClose", "drawerStyle", "headerStyle", "bodyStyle", "title", "push", "onAfterVisibleChange", "onClose", "onUpdate:visible", "onUpdate:open", "visible"])), {
        forceRender: ae,
        onClose: $,
        afterVisibleChange: I,
        handler: !1,
        prefixCls: f.value,
        open: u.value,
        showMask: U,
        placement: q,
        ref: l
      });
      return g(h(wd, null, {
        default: () => [h(lU, Q(Q({}, ie), {}, {
          maskMotion: j.value,
          motion: Z,
          width: T.value,
          height: M.value,
          getContainer: x.value,
          rootClassName: G.value,
          rootStyle: e.rootStyle,
          contentWrapperStyle: N.value
        }), {
          handler: e.handle ? () => e.handle : o.handle,
          default: () => F(f.value)
        })]
      }));
    };
  }
}), gU = ii(hU), ed = (e) => e != null && (Array.isArray(e) ? Do(e).length : !0);
function hx(e) {
  return ed(e.prefix) || ed(e.suffix) || ed(e.allowClear);
}
function pp(e) {
  return ed(e.addonBefore) || ed(e.addonAfter);
}
function Tb(e) {
  return typeof e > "u" || e === null ? "" : String(e);
}
function td(e, t, n, o) {
  if (!n)
    return;
  const r = t;
  if (t.type === "click") {
    Object.defineProperty(r, "target", {
      writable: !0
    }), Object.defineProperty(r, "currentTarget", {
      writable: !0
    });
    const i = e.cloneNode(!0);
    r.target = i, r.currentTarget = i, i.value = "", n(r);
    return;
  }
  if (o !== void 0) {
    Object.defineProperty(r, "target", {
      writable: !0
    }), Object.defineProperty(r, "currentTarget", {
      writable: !0
    }), r.target = e, r.currentTarget = e, e.value = o, n(r);
    return;
  }
  n(r);
}
function GM(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 vU = () => ({
  addonBefore: pe.any,
  addonAfter: pe.any,
  prefix: pe.any,
  suffix: pe.any,
  clearIcon: pe.any,
  affixWrapperClassName: String,
  groupClassName: String,
  wrapperClassName: String,
  inputClassName: String,
  allowClear: {
    type: Boolean,
    default: void 0
  }
}), UM = () => O(O({}, vU()), {
  value: {
    type: [String, Number, Symbol],
    default: void 0
  },
  defaultValue: {
    type: [String, Number, Symbol],
    default: void 0
  },
  inputElement: pe.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
  }
}), XM = () => O(O({}, UM()), {
  id: String,
  placeholder: {
    type: [String, Number]
  },
  autocomplete: String,
  type: rn("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
}), mU = be({
  name: "BaseInput",
  inheritAttrs: !1,
  props: UM(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const r = le(), i = (l) => {
      var s;
      if (!((s = r.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: v
      } = e;
      if (!s)
        return null;
      const g = !c && !d && u, m = `${v}-clear-icon`, x = ((l = n.clearIcon) === null || l === void 0 ? void 0 : l.call(n)) || "*";
      return h("span", {
        onClick: f,
        onMousedown: (S) => S.preventDefault(),
        class: Me({
          [`${m}-hidden`]: !g,
          [`${m}-has-suffix`]: !!p
        }, m),
        role: "button",
        tabindex: -1
      }, [x]);
    };
    return () => {
      var l, s;
      const {
        focused: u,
        value: c,
        disabled: d,
        allowClear: f,
        readonly: p,
        hidden: v,
        prefixCls: g,
        prefix: m = (l = n.prefix) === null || l === void 0 ? void 0 : l.call(n),
        suffix: x = (s = n.suffix) === null || s === void 0 ? void 0 : s.call(n),
        addonAfter: S = n.addonAfter,
        addonBefore: C = n.addonBefore,
        inputElement: P,
        affixWrapperClassName: $,
        wrapperClassName: I,
        groupClassName: w
      } = e;
      let T = Xn(P, {
        value: c,
        hidden: v
      });
      if (hx({
        prefix: m,
        suffix: x,
        allowClear: f
      })) {
        const M = `${g}-affix-wrapper`, R = Me(M, {
          [`${M}-disabled`]: d,
          [`${M}-focused`]: u,
          [`${M}-readonly`]: p,
          [`${M}-input-with-clear-btn`]: x && f && c
        }, !pp({
          addonAfter: S,
          addonBefore: C
        }) && o.class, $), N = (x || f) && h("span", {
          class: `${g}-suffix`
        }, [a(), x]);
        T = h("span", {
          class: R,
          style: o.style,
          hidden: !pp({
            addonAfter: S,
            addonBefore: C
          }) && v,
          onMousedown: i,
          ref: r
        }, [m && h("span", {
          class: `${g}-prefix`
        }, [m]), Xn(P, {
          style: null,
          value: c,
          hidden: null
        }), N]);
      }
      if (pp({
        addonAfter: S,
        addonBefore: C
      })) {
        const M = `${g}-group`, R = `${M}-addon`, N = Me(`${g}-wrapper`, M, I), H = Me(`${g}-group-wrapper`, o.class, w);
        return h("span", {
          class: H,
          style: o.style,
          hidden: v
        }, [h("span", {
          class: N
        }, [C && h("span", {
          class: R
        }, [C]), Xn(T, {
          style: null,
          hidden: null
        }), S && h("span", {
          class: R
        }, [S])])]);
      }
      return T;
    };
  }
});
var bU = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const yU = be({
  name: "VCInput",
  inheritAttrs: !1,
  props: XM(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      expose: r,
      emit: i
    } = t;
    const a = $e(e.value === void 0 ? e.defaultValue : e.value), l = $e(!1), s = $e(), u = $e();
    Ie(() => e.value, () => {
      a.value = e.value;
    }), Ie(() => e.disabled, () => {
      e.disabled && (l.value = !1);
    });
    const c = (w) => {
      s.value && GM(s.value.input, w);
    }, d = () => {
      var w;
      (w = s.value.input) === null || w === void 0 || w.blur();
    }, f = (w, T, M) => {
      var R;
      (R = s.value.input) === null || R === void 0 || R.setSelectionRange(w, T, M);
    }, p = () => {
      var w;
      (w = s.value.input) === null || w === void 0 || w.select();
    };
    r({
      focus: c,
      blur: d,
      input: E(() => {
        var w;
        return (w = s.value.input) === null || w === void 0 ? void 0 : w.input;
      }),
      stateValue: a,
      setSelectionRange: f,
      select: p
    });
    const v = (w) => {
      i("change", w);
    }, g = (w, T) => {
      a.value !== w && (e.value === void 0 ? a.value = w : Yt(() => {
        var M;
        s.value.input.value !== a.value && ((M = u.value) === null || M === void 0 || M.$forceUpdate());
      }), Yt(() => {
        T && T();
      }));
    }, m = (w) => {
      const {
        value: T
      } = w.target;
      if (a.value === T) return;
      const M = w.target.value;
      td(s.value.input, w, v), g(M);
    }, x = (w) => {
      w.keyCode === 13 && i("pressEnter", w), i("keydown", w);
    }, S = (w) => {
      l.value = !0, i("focus", w);
    }, C = (w) => {
      l.value = !1, i("blur", w);
    }, P = (w) => {
      td(s.value.input, w, v), g("", () => {
        c();
      });
    }, $ = () => {
      var w, T;
      const {
        addonBefore: M = n.addonBefore,
        addonAfter: R = n.addonAfter,
        disabled: N,
        valueModifiers: H = {},
        htmlSize: L,
        autocomplete: F,
        prefixCls: A,
        inputClassName: G,
        prefix: j = (w = n.prefix) === null || w === void 0 ? void 0 : w.call(n),
        suffix: Z = (T = n.suffix) === null || T === void 0 ? void 0 : T.call(n),
        allowClear: W,
        type: K = "text"
      } = e, q = Fn(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"
      ]), U = O(O(O({}, q), o), {
        autocomplete: F,
        onChange: m,
        onInput: m,
        onFocus: S,
        onBlur: C,
        onKeydown: x,
        class: Me(A, {
          [`${A}-disabled`]: N
        }, G, !pp({
          addonAfter: R,
          addonBefore: M
        }) && !hx({
          prefix: j,
          suffix: Z,
          allowClear: W
        }) && o.class),
        ref: s,
        key: "ant-input",
        size: L,
        type: K,
        lazy: e.lazy
      });
      return H.lazy && delete U.onInput, U.autofocus || delete U.autofocus, h(Nd, Fn(U, ["size"]), null);
    }, I = () => {
      var w;
      const {
        maxlength: T,
        suffix: M = (w = n.suffix) === null || w === void 0 ? void 0 : w.call(n),
        showCount: R,
        prefixCls: N
      } = e, H = Number(T) > 0;
      if (M || R) {
        const L = [...Tb(a.value)].length, F = typeof R == "object" ? R.formatter({
          count: L,
          maxlength: T
        }) : `${L}${H ? ` / ${T}` : ""}`;
        return h(Je, null, [!!R && h("span", {
          class: Me(`${N}-show-count-suffix`, {
            [`${N}-show-count-has-suffix`]: !!M
          })
        }, [F]), M]);
      }
      return null;
    };
    return At(() => {
      process.env.NODE_ENV === "test" && e.autofocus && c();
    }), () => {
      const {
        prefixCls: w,
        disabled: T
      } = e, M = bU(e, ["prefixCls", "disabled"]);
      return h(mU, Q(Q(Q({}, M), o), {}, {
        ref: u,
        prefixCls: w,
        inputElement: $(),
        handleReset: P,
        value: Tb(a.value),
        focused: l.value,
        triggerFocus: c,
        suffix: I(),
        disabled: T
      }), n);
    };
  }
}), ag = () => Fn(XM(), ["wrapperClassName", "groupClassName", "inputClassName", "affixWrapperClassName"]), QM = () => O(O({}, Fn(ag(), ["prefix", "addonBefore", "addonAfter", "suffix"])), {
  rows: Number,
  autosize: {
    type: [Boolean, Object],
    default: void 0
  },
  autoSize: {
    type: [Boolean, Object],
    default: void 0
  },
  onResize: {
    type: Function
  },
  onCompositionstart: Wu(),
  onCompositionend: Wu(),
  valueModifiers: Object
});
var xU = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const kt = be({
  compatConfig: {
    MODE: 3
  },
  name: "AInput",
  inheritAttrs: !1,
  props: ag(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      expose: r,
      emit: i
    } = t;
    const a = le(), l = Br(), s = Nr.useInject(), u = E(() => Ls(s.status, e.status)), {
      direction: c,
      prefixCls: d,
      size: f,
      autocomplete: p
    } = Nt("input", e), {
      compactSize: v,
      compactItemClassnames: g
    } = dc(d, c), m = E(() => v.value || f.value), [x, S] = J0(d), C = _i();
    r({
      focus: (L) => {
        var F;
        (F = a.value) === null || F === void 0 || F.focus(L);
      },
      blur: () => {
        var L;
        (L = a.value) === null || L === void 0 || L.blur();
      },
      input: a,
      setSelectionRange: (L, F, A) => {
        var G;
        (G = a.value) === null || G === void 0 || G.setSelectionRange(L, F, A);
      },
      select: () => {
        var L;
        (L = a.value) === null || L === void 0 || L.select();
      }
    });
    const T = le([]), M = () => {
      T.value.push(setTimeout(() => {
        var L, F, A, G;
        !((L = a.value) === null || L === void 0) && L.input && ((F = a.value) === null || F === void 0 ? void 0 : F.input.getAttribute("type")) === "password" && (!((A = a.value) === null || A === void 0) && A.input.hasAttribute("value")) && ((G = a.value) === null || G === void 0 || G.input.removeAttribute("value"));
      }));
    };
    At(() => {
      M();
    }), Jb(() => {
      T.value.forEach((L) => clearTimeout(L));
    }), qt(() => {
      T.value.forEach((L) => clearTimeout(L));
    });
    const R = (L) => {
      M(), i("blur", L), l.onFieldBlur();
    }, N = (L) => {
      M(), i("focus", L);
    }, H = (L) => {
      i("update:value", L.target.value), i("change", L), i("input", L), l.onFieldChange();
    };
    return () => {
      var L, F, A, G, j, Z;
      const {
        hasFeedback: W,
        feedbackIcon: K
      } = s, {
        allowClear: q,
        bordered: U = !0,
        prefix: ae = (L = n.prefix) === null || L === void 0 ? void 0 : L.call(n),
        suffix: se = (F = n.suffix) === null || F === void 0 ? void 0 : F.call(n),
        addonAfter: ie = (A = n.addonAfter) === null || A === void 0 ? void 0 : A.call(n),
        addonBefore: re = (G = n.addonBefore) === null || G === void 0 ? void 0 : G.call(n),
        id: te = (j = l.id) === null || j === void 0 ? void 0 : j.value
      } = e, ve = xU(e, ["allowClear", "bordered", "prefix", "suffix", "addonAfter", "addonBefore", "id"]), ce = (W || se) && h(Je, null, [se, W && K]), fe = d.value, ge = hx({
        prefix: ae,
        suffix: se
      }) || !!W, Te = n.clearIcon || (() => h(Fr, null, null));
      return x(h(yU, Q(Q(Q({}, o), Fn(ve, ["onUpdate:value", "onChange", "onInput"])), {}, {
        onChange: H,
        id: te,
        disabled: (Z = e.disabled) !== null && Z !== void 0 ? Z : C.value,
        ref: a,
        prefixCls: fe,
        autocomplete: p.value,
        onBlur: R,
        onFocus: N,
        prefix: ae,
        suffix: ce,
        allowClear: q,
        addonAfter: ie && h(wd, null, {
          default: () => [h(Bp, null, {
            default: () => [ie]
          })]
        }),
        addonBefore: re && h(wd, null, {
          default: () => [h(Bp, null, {
            default: () => [re]
          })]
        }),
        class: [o.class, g.value],
        inputClassName: Me({
          [`${fe}-sm`]: m.value === "small",
          [`${fe}-lg`]: m.value === "large",
          [`${fe}-rtl`]: c.value === "rtl",
          [`${fe}-borderless`]: !U
        }, !ge && $i(fe, u.value), S.value),
        affixWrapperClassName: Me({
          [`${fe}-affix-wrapper-sm`]: m.value === "small",
          [`${fe}-affix-wrapper-lg`]: m.value === "large",
          [`${fe}-affix-wrapper-rtl`]: c.value === "rtl",
          [`${fe}-affix-wrapper-borderless`]: !U
        }, $i(`${fe}-affix-wrapper`, u.value, W), S.value),
        wrapperClassName: Me({
          [`${fe}-group-rtl`]: c.value === "rtl"
        }, S.value),
        groupClassName: Me({
          [`${fe}-group-wrapper-sm`]: m.value === "small",
          [`${fe}-group-wrapper-lg`]: m.value === "large",
          [`${fe}-group-wrapper-rtl`]: c.value === "rtl"
        }, $i(`${fe}-group-wrapper`, u.value, W), S.value)
      }), O(O({}, n), {
        clearIcon: Te
      })));
    };
  }
}), wU = be({
  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: r,
      direction: i,
      getPrefixCls: a
    } = Nt("input-group", e), l = Nr.useInject();
    Nr.useProvide(l, {
      isFormItemInput: !1
    });
    const s = E(() => a("input")), [u, c] = J0(s), d = E(() => {
      const f = r.value;
      return {
        [`${f}`]: !0,
        [c.value]: !0,
        [`${f}-lg`]: e.size === "large",
        [`${f}-sm`]: e.size === "small",
        [`${f}-compact`]: e.compact,
        [`${f}-rtl`]: i.value === "rtl"
      };
    });
    return () => {
      var f;
      return u(h("span", Q(Q({}, o), {}, {
        class: Me(d.value, o.class)
      }), [(f = n.default) === null || f === void 0 ? void 0 : f.call(n)]));
    };
  }
});
var SU = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const CU = be({
  compatConfig: {
    MODE: 3
  },
  name: "AInputSearch",
  inheritAttrs: !1,
  props: O(O({}, ag()), {
    inputPrefixCls: String,
    // 不能设置默认值 https://github.com/vueComponent/ant-design-vue/issues/1916
    enterButton: pe.any,
    onSearch: {
      type: Function
    }
  }),
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      expose: r,
      emit: i
    } = t;
    const a = $e(), l = $e(!1);
    r({
      focus: () => {
        var $;
        ($ = a.value) === null || $ === void 0 || $.focus();
      },
      blur: () => {
        var $;
        ($ = a.value) === null || $ === void 0 || $.blur();
      }
    });
    const c = ($) => {
      i("update:value", $.target.value), $ && $.target && $.type === "click" && i("search", $.target.value, $), i("change", $);
    }, d = ($) => {
      var I;
      document.activeElement === ((I = a.value) === null || I === void 0 ? void 0 : I.input) && $.preventDefault();
    }, f = ($) => {
      var I, w;
      i("search", (w = (I = a.value) === null || I === void 0 ? void 0 : I.input) === null || w === void 0 ? void 0 : w.stateValue, $);
    }, p = ($) => {
      l.value || e.loading || f($);
    }, v = ($) => {
      l.value = !0, i("compositionstart", $);
    }, g = ($) => {
      l.value = !1, i("compositionend", $);
    }, {
      prefixCls: m,
      getPrefixCls: x,
      direction: S,
      size: C
    } = Nt("input-search", e), P = E(() => x("input", e.inputPrefixCls));
    return () => {
      var $, I, w, T;
      const {
        disabled: M,
        loading: R,
        addonAfter: N = ($ = n.addonAfter) === null || $ === void 0 ? void 0 : $.call(n),
        suffix: H = (I = n.suffix) === null || I === void 0 ? void 0 : I.call(n)
      } = e, L = SU(e, ["disabled", "loading", "addonAfter", "suffix"]);
      let {
        enterButton: F = (T = (w = n.enterButton) === null || w === void 0 ? void 0 : w.call(n)) !== null && T !== void 0 ? T : !1
      } = e;
      F = F || F === "";
      const A = typeof F == "boolean" ? h(zd, null, null) : null, G = `${m.value}-button`, j = Array.isArray(F) ? F[0] : F;
      let Z;
      const W = j.type && BP(j.type) && j.type.__ANT_BUTTON;
      if (W || j.tagName === "button")
        Z = Xn(j, O({
          onMousedown: d,
          onClick: f,
          key: "enterButton"
        }, W ? {
          class: G,
          size: C.value
        } : {}), !1);
      else {
        const q = A && !F;
        Z = h(Ft, {
          class: G,
          type: F ? "primary" : void 0,
          size: C.value,
          disabled: M,
          key: "enterButton",
          onMousedown: d,
          onClick: f,
          loading: R,
          icon: q ? A : null
        }, {
          default: () => [q ? null : A || F]
        });
      }
      N && (Z = [Z, N]);
      const K = Me(m.value, {
        [`${m.value}-rtl`]: S.value === "rtl",
        [`${m.value}-${C.value}`]: !!C.value,
        [`${m.value}-with-button`]: !!F
      }, o.class);
      return h(kt, Q(Q(Q({
        ref: a
      }, Fn(L, ["onUpdate:value", "onSearch", "enterButton"])), o), {}, {
        onPressEnter: p,
        onCompositionstart: v,
        onCompositionend: g,
        size: C.value,
        prefixCls: P.value,
        addonAfter: Z,
        suffix: H,
        onChange: c,
        class: K,
        disabled: M
      }), n);
    };
  }
}), FC = (e) => e != null && (Array.isArray(e) ? Do(e).length : !0);
function $U(e) {
  return FC(e.addonBefore) || FC(e.addonAfter);
}
const PU = ["text", "input"], OU = be({
  compatConfig: {
    MODE: 3
  },
  name: "ClearableLabeledInput",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    inputType: pe.oneOf(Ti("text", "input")),
    value: Tr(),
    defaultValue: Tr(),
    allowClear: {
      type: Boolean,
      default: void 0
    },
    element: Tr(),
    handleReset: Function,
    disabled: {
      type: Boolean,
      default: void 0
    },
    direction: {
      type: String
    },
    size: {
      type: String
    },
    suffix: Tr(),
    prefix: Tr(),
    addonBefore: Tr(),
    addonAfter: Tr(),
    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 r = Nr.useInject(), i = (l) => {
      const {
        value: s,
        disabled: u,
        readonly: c,
        handleReset: d,
        suffix: f = n.suffix
      } = e, p = !u && !c && s, v = `${l}-clear-icon`;
      return h(Fr, {
        onClick: d,
        onMousedown: (g) => g.preventDefault(),
        class: Me({
          [`${v}-hidden`]: !p,
          [`${v}-has-suffix`]: !!f
        }, v),
        role: "button"
      }, null);
    }, a = (l, s) => {
      const {
        value: u,
        allowClear: c,
        direction: d,
        bordered: f,
        hidden: p,
        status: v,
        addonAfter: g = n.addonAfter,
        addonBefore: m = n.addonBefore,
        hashId: x
      } = e, {
        status: S,
        hasFeedback: C
      } = r;
      if (!c)
        return Xn(s, {
          value: u,
          disabled: e.disabled
        });
      const P = Me(`${l}-affix-wrapper`, `${l}-affix-wrapper-textarea-with-clear-btn`, $i(`${l}-affix-wrapper`, Ls(S, v), C), {
        [`${l}-affix-wrapper-rtl`]: d === "rtl",
        [`${l}-affix-wrapper-borderless`]: !f,
        // className will go to addon wrapper
        [`${o.class}`]: !$U({
          addonAfter: g,
          addonBefore: m
        }) && o.class
      }, x);
      return h("span", {
        class: P,
        style: o.style,
        hidden: p
      }, [Xn(s, {
        style: null,
        value: u,
        disabled: e.disabled
      }), i(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 === PU[0] ? a(s, c) : null;
    };
  }
}), kU = `
  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;
`, IU = ["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"], Iv = {};
let Kr;
function TU(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 && Iv[n])
    return Iv[n];
  const o = window.getComputedStyle(e), r = o.getPropertyValue("box-sizing") || o.getPropertyValue("-moz-box-sizing") || o.getPropertyValue("-webkit-box-sizing"), i = 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: IU.map((u) => `${u}:${o.getPropertyValue(u)}`).join(";"),
    paddingSize: i,
    borderSize: a,
    boxSizing: r
  };
  return t && n && (Iv[n] = s), s;
}
function _U(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;
  Kr || (Kr = document.createElement("textarea"), Kr.setAttribute("tab-index", "-1"), Kr.setAttribute("aria-hidden", "true"), document.body.appendChild(Kr)), e.getAttribute("wrap") ? Kr.setAttribute("wrap", e.getAttribute("wrap")) : Kr.removeAttribute("wrap");
  const {
    paddingSize: r,
    borderSize: i,
    boxSizing: a,
    sizingStyle: l
  } = TU(e, t);
  Kr.setAttribute("style", `${l};${kU}`), Kr.value = e.value || e.placeholder || "";
  let s, u, c, d = Kr.scrollHeight;
  if (a === "border-box" ? d += i : a === "content-box" && (d -= r), n !== null || o !== null) {
    Kr.value = " ";
    const p = Kr.scrollHeight - r;
    n !== null && (s = p * n, a === "border-box" && (s = s + r + i), d = Math.max(s, d)), o !== null && (u = p * o, a === "border-box" && (u = u + r + i), 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 Tv = 0, _v = 1, Mv = 2, MU = be({
  compatConfig: {
    MODE: 3
  },
  name: "ResizableTextArea",
  inheritAttrs: !1,
  props: QM(),
  setup(e, t) {
    let {
      attrs: n,
      emit: o,
      expose: r
    } = t, i, a;
    const l = le(), s = le({}), u = le(Mv);
    qt(() => {
      Vt.cancel(i), Vt.cancel(a);
    });
    const c = () => {
      try {
        if (l.value && document.activeElement === l.value.input) {
          const I = l.value.getSelectionStart(), w = l.value.getSelectionEnd(), T = l.value.getScrollTop();
          l.value.setSelectionRange(I, w), l.value.setScrollTop(T);
        }
      } catch {
      }
    }, d = le(), f = le();
    It(() => {
      const I = e.autoSize || e.autosize;
      I ? (d.value = I.minRows, f.value = I.maxRows) : (d.value = void 0, f.value = void 0);
    });
    const p = E(() => !!(e.autoSize || e.autosize)), v = () => {
      u.value = Tv;
    };
    Ie([() => e.value, d, f, p], () => {
      p.value && v();
    }, {
      immediate: !0
    });
    const g = le();
    Ie([u, l], () => {
      if (l.value)
        if (u.value === Tv)
          u.value = _v;
        else if (u.value === _v) {
          const I = _U(l.value.input, !1, d.value, f.value);
          u.value = Mv, g.value = I;
        } else
          c();
    }, {
      immediate: !0,
      flush: "post"
    });
    const m = pr(), x = le(), S = () => {
      Vt.cancel(x.value);
    }, C = (I) => {
      u.value === Mv && (o("resize", I), p.value && (S(), x.value = Vt(() => {
        v();
      })));
    };
    qt(() => {
      S();
    }), r({
      resizeTextarea: () => {
        v();
      },
      textArea: E(() => {
        var I;
        return (I = l.value) === null || I === void 0 ? void 0 : I.input;
      }),
      instance: m
    }), wo(e.autosize === void 0, "Input.TextArea", "autosize is deprecated, please use autoSize instead.");
    const $ = () => {
      const {
        prefixCls: I,
        disabled: w
      } = e, T = Fn(e, ["prefixCls", "onPressEnter", "autoSize", "autosize", "defaultValue", "allowClear", "type", "maxlength", "valueModifiers"]), M = Me(I, n.class, {
        [`${I}-disabled`]: w
      }), R = p.value ? g.value : null, N = [n.style, s.value, R], H = O(O(O({}, T), n), {
        style: N,
        class: M
      });
      return (u.value === Tv || u.value === _v) && N.push({
        overflowX: "hidden",
        overflowY: "hidden"
      }), H.autofocus || delete H.autofocus, H.rows === 0 && delete H.rows, h(Al, {
        onResize: C,
        disabled: !p.value
      }, {
        default: () => [h(Nd, Q(Q({}, H), {}, {
          ref: l,
          tag: "textarea"
        }), null)]
      });
    };
    return () => $();
  }
});
function ZM(e, t) {
  return [...e || ""].slice(0, t).join("");
}
function BC(e, t, n, o) {
  let r = n;
  return e ? r = ZM(n, o) : [...t || ""].length < n.length && [...n || ""].length > o && (r = t), r;
}
const EU = be({
  compatConfig: {
    MODE: 3
  },
  name: "ATextarea",
  inheritAttrs: !1,
  props: QM(),
  setup(e, t) {
    let {
      attrs: n,
      expose: o,
      emit: r
    } = t;
    var i;
    const a = Br(), l = Nr.useInject(), s = E(() => Ls(l.status, e.status)), u = $e((i = e.value) !== null && i !== void 0 ? i : e.defaultValue), c = $e(), d = $e(""), {
      prefixCls: f,
      size: p,
      direction: v
    } = Nt("input", e), [g, m] = J0(f), x = _i(), S = E(() => e.showCount === "" || e.showCount || !1), C = E(() => Number(e.maxlength) > 0), P = $e(!1), $ = $e(), I = $e(0), w = (W) => {
      P.value = !0, $.value = d.value, I.value = W.currentTarget.selectionStart, r("compositionstart", W);
    }, T = (W) => {
      var K;
      P.value = !1;
      let q = W.currentTarget.value;
      if (C.value) {
        const U = I.value >= e.maxlength + 1 || I.value === ((K = $.value) === null || K === void 0 ? void 0 : K.length);
        q = BC(U, $.value, q, e.maxlength);
      }
      q !== d.value && (H(q), td(W.currentTarget, W, A, q)), r("compositionend", W);
    }, M = pr();
    Ie(() => e.value, () => {
      var W;
      "value" in M.vnode.props, u.value = (W = e.value) !== null && W !== void 0 ? W : "";
    });
    const R = (W) => {
      var K;
      GM((K = c.value) === null || K === void 0 ? void 0 : K.textArea, W);
    }, N = () => {
      var W, K;
      (K = (W = c.value) === null || W === void 0 ? void 0 : W.textArea) === null || K === void 0 || K.blur();
    }, H = (W, K) => {
      u.value !== W && (e.value === void 0 ? u.value = W : Yt(() => {
        var q, U, ae;
        c.value.textArea.value !== d.value && ((ae = (q = c.value) === null || q === void 0 ? void 0 : (U = q.instance).update) === null || ae === void 0 || ae.call(U));
      }), Yt(() => {
        K && K();
      }));
    }, L = (W) => {
      W.keyCode === 13 && r("pressEnter", W), r("keydown", W);
    }, F = (W) => {
      const {
        onBlur: K
      } = e;
      K?.(W), a.onFieldBlur();
    }, A = (W) => {
      r("update:value", W.target.value), r("change", W), r("input", W), a.onFieldChange();
    }, G = (W) => {
      td(c.value.textArea, W, A), H("", () => {
        R();
      });
    }, j = (W) => {
      let K = W.target.value;
      if (u.value !== K) {
        if (C.value) {
          const q = W.target, U = q.selectionStart >= e.maxlength + 1 || q.selectionStart === K.length || !q.selectionStart;
          K = BC(U, d.value, K, e.maxlength);
        }
        td(W.currentTarget, W, A, K), H(K);
      }
    }, Z = () => {
      var W, K;
      const {
        class: q
      } = n, {
        bordered: U = !0
      } = e, ae = O(O(O({}, Fn(e, ["allowClear"])), n), {
        class: [{
          [`${f.value}-borderless`]: !U,
          [`${q}`]: q && !S.value,
          [`${f.value}-sm`]: p.value === "small",
          [`${f.value}-lg`]: p.value === "large"
        }, $i(f.value, s.value), m.value],
        disabled: x.value,
        showCount: null,
        prefixCls: f.value,
        onInput: j,
        onChange: j,
        onBlur: F,
        onKeydown: L,
        onCompositionstart: w,
        onCompositionend: T
      });
      return !((W = e.valueModifiers) === null || W === void 0) && W.lazy && delete ae.onInput, h(MU, Q(Q({}, ae), {}, {
        id: (K = ae?.id) !== null && K !== void 0 ? K : a.id.value,
        ref: c,
        maxlength: e.maxlength,
        lazy: e.lazy
      }), null);
    };
    return o({
      focus: R,
      blur: N,
      resizableTextArea: c
    }), It(() => {
      let W = Tb(u.value);
      !P.value && C.value && (e.value === null || e.value === void 0) && (W = ZM(W, e.maxlength)), d.value = W;
    }), () => {
      var W;
      const {
        maxlength: K,
        bordered: q = !0,
        hidden: U
      } = e, {
        style: ae,
        class: se
      } = n, ie = O(O(O({}, e), n), {
        prefixCls: f.value,
        inputType: "text",
        handleReset: G,
        direction: v.value,
        bordered: q,
        style: S.value ? void 0 : ae,
        hashId: m.value,
        disabled: (W = e.disabled) !== null && W !== void 0 ? W : x.value
      });
      let re = h(OU, Q(Q({}, ie), {}, {
        value: d.value,
        status: e.status
      }), {
        element: Z
      });
      if (S.value || l.hasFeedback) {
        const te = [...d.value].length;
        let ve = "";
        typeof S.value == "object" ? ve = S.value.formatter({
          value: d.value,
          count: te,
          maxlength: K
        }) : ve = `${te}${C.value ? ` / ${K}` : ""}`, re = h("div", {
          hidden: U,
          class: Me(`${f.value}-textarea`, {
            [`${f.value}-textarea-rtl`]: v.value === "rtl",
            [`${f.value}-textarea-show-count`]: S.value,
            [`${f.value}-textarea-in-form-item`]: l.isFormItemInput
          }, `${f.value}-textarea-show-count`, se, m.value),
          style: ae,
          "data-count": typeof ve != "object" ? ve : void 0
        }, [re, l.hasFeedback && h("span", {
          class: `${f.value}-textarea-suffix`
        }, [l.feedbackIcon])]);
      }
      return g(re);
    };
  }
});
var DU = { 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 LC(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      AU(e, r, n[r]);
    });
  }
  return e;
}
function AU(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var gx = function(t, n) {
  var o = LC({}, t, n.attrs);
  return h(an, LC({}, o, {
    icon: DU
  }), null);
};
gx.displayName = "EyeOutlined";
gx.inheritAttrs = !1;
var NU = { 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 HC(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      RU(e, r, n[r]);
    });
  }
  return e;
}
function RU(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var vx = function(t, n) {
  var o = HC({}, t, n.attrs);
  return h(an, HC({}, o, {
    icon: NU
  }), null);
};
vx.displayName = "EyeInvisibleOutlined";
vx.inheritAttrs = !1;
var zU = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const FU = {
  click: "onClick",
  hover: "onMouseover"
}, BU = (e) => e ? h(gx, null, null) : h(vx, null, null), LU = be({
  compatConfig: {
    MODE: 3
  },
  name: "AInputPassword",
  inheritAttrs: !1,
  props: O(O({}, ag()), {
    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: r,
      emit: i
    } = t;
    const a = $e(!1), l = () => {
      const {
        disabled: m
      } = e;
      m || (a.value = !a.value, i("update:visible", a.value));
    };
    It(() => {
      e.visible !== void 0 && (a.value = !!e.visible);
    });
    const s = $e();
    r({
      focus: () => {
        var m;
        (m = s.value) === null || m === void 0 || m.focus();
      },
      blur: () => {
        var m;
        (m = s.value) === null || m === void 0 || m.blur();
      }
    });
    const d = (m) => {
      const {
        action: x,
        iconRender: S = n.iconRender || BU
      } = e, C = FU[x] || "", P = S(a.value), $ = {
        [C]: l,
        class: `${m}-icon`,
        key: "passwordIcon",
        onMousedown: (I) => {
          I.preventDefault();
        },
        onMouseup: (I) => {
          I.preventDefault();
        }
      };
      return Xn(Ao(P) ? P : h("span", null, [P]), $);
    }, {
      prefixCls: f,
      getPrefixCls: p
    } = Nt("input-password", e), v = E(() => p("input", e.inputPrefixCls)), g = () => {
      const {
        size: m,
        visibilityToggle: x
      } = e, S = zU(e, ["size", "visibilityToggle"]), C = x && d(f.value), P = Me(f.value, o.class, {
        [`${f.value}-${m}`]: !!m
      }), $ = O(O(O({}, Fn(S, ["suffix", "iconRender", "action"])), o), {
        type: a.value ? "text" : "password",
        class: P,
        prefixCls: v.value,
        suffix: C
      });
      return m && ($.size = m), h(kt, Q({
        ref: s
      }, $), n);
    };
    return () => g();
  }
});
kt.Group = wU;
kt.Search = CU;
kt.TextArea = EU;
kt.Password = LU;
kt.install = function(e) {
  return e.component(kt.name, kt), e.component(kt.Group.name, kt.Group), e.component(kt.Search.name, kt.Search), e.component(kt.TextArea.name, kt.TextArea), e.component(kt.Password.name, kt.Password), e;
};
function mx() {
  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: pe.shape({
      x: Number,
      y: Number
    }).loose,
    title: pe.any,
    footer: pe.any,
    transitionName: String,
    maskTransitionName: String,
    animation: pe.any,
    maskAnimation: pe.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: pe.any,
    maskProps: pe.any,
    wrapProps: pe.any,
    getContainer: pe.any,
    dialogStyle: {
      type: Object,
      default: void 0
    },
    dialogClass: String,
    closeIcon: pe.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 VC(e, t, n) {
  let o = t;
  return !o && n && (o = `${e}-${n}`), o;
}
let jC = -1;
function HU() {
  return jC += 1, jC;
}
function WC(e, t) {
  let n = e[`page${t ? "Y" : "X"}Offset`];
  const o = `scroll${t ? "Top" : "Left"}`;
  if (typeof n != "number") {
    const r = e.document;
    n = r.documentElement[o], typeof n != "number" && (n = r.body[o]);
  }
  return n;
}
function VU(e) {
  const t = e.getBoundingClientRect(), n = {
    left: t.left,
    top: t.top
  }, o = e.ownerDocument, r = o.defaultView || o.parentWindow;
  return n.left += WC(r), n.top += WC(r, !0), n;
}
const jU = {
  width: 0,
  height: 0,
  overflow: "hidden",
  outline: "none"
}, WU = {
  outline: "none"
}, KU = be({
  compatConfig: {
    MODE: 3
  },
  name: "DialogContent",
  inheritAttrs: !1,
  props: O(O({}, mx()), {
    motionName: String,
    ariaId: String,
    onVisibleChanged: Function,
    onMousedown: Function,
    onMouseup: Function
  }),
  setup(e, t) {
    let {
      expose: n,
      slots: o,
      attrs: r
    } = t;
    const i = le(), a = le(), l = le();
    n({
      focus: () => {
        var f;
        (f = i.value) === null || f === void 0 || f.focus({
          preventScroll: !0
        });
      },
      changeActive: (f) => {
        const {
          activeElement: p
        } = document;
        f && p === a.value ? i.value.focus({
          preventScroll: !0
        }) : !f && p === i.value && a.value.focus({
          preventScroll: !0
        });
      }
    });
    const s = le(), u = E(() => {
      const {
        width: f,
        height: p
      } = e, v = {};
      return f !== void 0 && (v.width = typeof f == "number" ? `${f}px` : f), p !== void 0 && (v.height = typeof p == "number" ? `${p}px` : p), s.value && (v.transformOrigin = s.value), v;
    }), c = () => {
      Yt(() => {
        if (l.value) {
          const f = VU(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, v, g;
      const {
        prefixCls: m,
        footer: x = (f = o.footer) === null || f === void 0 ? void 0 : f.call(o),
        title: S = (p = o.title) === null || p === void 0 ? void 0 : p.call(o),
        ariaId: C,
        closable: P,
        closeIcon: $ = (v = o.closeIcon) === null || v === void 0 ? void 0 : v.call(o),
        onClose: I,
        bodyStyle: w,
        bodyProps: T,
        onMousedown: M,
        onMouseup: R,
        visible: N,
        modalRender: H = o.modalRender,
        destroyOnClose: L,
        motionName: F
      } = e;
      let A;
      x && (A = h("div", {
        class: `${m}-footer`
      }, [x]));
      let G;
      S && (G = h("div", {
        class: `${m}-header`
      }, [h("div", {
        class: `${m}-title`,
        id: C
      }, [S])]));
      let j;
      P && (j = h("button", {
        type: "button",
        onClick: I,
        "aria-label": "Close",
        class: `${m}-close`
      }, [$ || h("span", {
        class: `${m}-close-x`
      }, null)]));
      const Z = h("div", {
        class: `${m}-content`
      }, [j, G, h("div", Q({
        class: `${m}-body`,
        style: w
      }, T), [(g = o.default) === null || g === void 0 ? void 0 : g.call(o)]), A]), W = _s(F);
      return h(Dr, Q(Q({}, W), {}, {
        onBeforeEnter: c,
        onAfterEnter: () => d(!0),
        onAfterLeave: () => d(!1)
      }), {
        default: () => [N || !L ? ti(h("div", Q(Q({}, r), {}, {
          ref: l,
          key: "dialog-element",
          role: "document",
          style: [u.value, r.style],
          class: [m, r.class],
          onMousedown: M,
          onMouseup: R
        }), [h("div", {
          tabindex: 0,
          ref: i,
          style: WU
        }, [H ? H({
          originVNode: Z
        }) : Z]), h("div", {
          tabindex: 0,
          ref: a,
          style: jU
        }, null)]), [[Oi, N]]) : null]
      });
    };
  }
}), qU = be({
  compatConfig: {
    MODE: 3
  },
  name: "DialogMask",
  props: {
    prefixCls: String,
    visible: Boolean,
    motionName: String,
    maskProps: Object
  },
  setup(e, t) {
    return () => {
      const {
        prefixCls: n,
        visible: o,
        maskProps: r,
        motionName: i
      } = e, a = _s(i);
      return h(Dr, a, {
        default: () => [ti(h("div", Q({
          class: `${n}-mask`
        }, r), null), [[Oi, o]])]
      });
    };
  }
}), KC = be({
  compatConfig: {
    MODE: 3
  },
  name: "VcDialog",
  inheritAttrs: !1,
  props: Mn(O(O({}, mx()), {
    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 r = $e(), i = $e(), a = $e(), l = $e(e.visible), s = $e(`vcDialogTitle${HU()}`), u = (x) => {
      var S, C;
      if (x)
        bl(i.value, document.activeElement) || (r.value = document.activeElement, (S = a.value) === null || S === void 0 || S.focus());
      else {
        const P = l.value;
        if (l.value = !1, e.mask && r.value && e.focusTriggerAfterClose) {
          try {
            r.value.focus({
              preventScroll: !0
            });
          } catch {
          }
          r.value = null;
        }
        P && ((C = e.afterClose) === null || C === void 0 || C.call(e));
      }
    }, c = (x) => {
      var S;
      (S = e.onClose) === null || S === void 0 || S.call(e, x);
    }, d = $e(!1), f = $e(), p = () => {
      clearTimeout(f.value), d.value = !0;
    }, v = () => {
      f.value = setTimeout(() => {
        d.value = !1;
      });
    }, g = (x) => {
      if (!e.maskClosable) return null;
      d.value ? d.value = !1 : i.value === x.target && c(x);
    }, m = (x) => {
      if (e.keyboard && x.keyCode === it.ESC) {
        x.stopPropagation(), c(x);
        return;
      }
      e.visible && x.keyCode === it.TAB && a.value.changeActive(!x.shiftKey);
    };
    return Ie(() => e.visible, () => {
      e.visible && (l.value = !0);
    }, {
      flush: "post"
    }), qt(() => {
      var x;
      clearTimeout(f.value), (x = e.scrollLocker) === null || x === void 0 || x.unLock();
    }), It(() => {
      var x, S;
      (x = e.scrollLocker) === null || x === void 0 || x.unLock(), l.value && ((S = e.scrollLocker) === null || S === void 0 || S.lock());
    }), () => {
      const {
        prefixCls: x,
        mask: S,
        visible: C,
        maskTransitionName: P,
        maskAnimation: $,
        zIndex: I,
        wrapClassName: w,
        rootClassName: T,
        wrapStyle: M,
        closable: R,
        maskProps: N,
        maskStyle: H,
        transitionName: L,
        animation: F,
        wrapProps: A,
        title: G = o.title
      } = e, {
        style: j,
        class: Z
      } = n;
      return h("div", Q({
        class: [`${x}-root`, T]
      }, Bs(e, {
        data: !0
      })), [h(qU, {
        prefixCls: x,
        visible: S && C,
        motionName: VC(x, P, $),
        style: O({
          zIndex: I
        }, H),
        maskProps: N
      }, null), h("div", Q({
        tabIndex: -1,
        onKeydown: m,
        class: Me(`${x}-wrap`, w),
        ref: i,
        onClick: g,
        role: "dialog",
        "aria-labelledby": G ? s.value : null,
        style: O(O({
          zIndex: I
        }, M), {
          display: l.value ? null : "none"
        })
      }, A), [h(KU, Q(Q({}, Fn(e, ["scrollLocker"])), {}, {
        style: j,
        class: Z,
        onMousedown: p,
        onMouseup: v,
        ref: a,
        closable: R,
        ariaId: s.value,
        prefixCls: x,
        visible: C,
        onClose: c,
        onVisibleChanged: u,
        motionName: VC(x, L, F)
      }), o)])]);
    };
  }
}), YU = mx(), GU = be({
  compatConfig: {
    MODE: 3
  },
  name: "DialogWrap",
  inheritAttrs: !1,
  props: Mn(YU, {
    visible: !1
  }),
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const r = le(e.visible);
    return s0({}, {
      inTriggerContext: !1
    }), Ie(() => e.visible, () => {
      e.visible && (r.value = !0);
    }, {
      flush: "post"
    }), () => {
      const {
        visible: i,
        getContainer: a,
        forceRender: l,
        destroyOnClose: s = !1,
        afterClose: u
      } = e;
      let c = O(O(O({}, e), n), {
        ref: "_component",
        key: "dialog"
      });
      return a === !1 ? h(KC, Q(Q({}, c), {}, {
        getOpenCount: () => 2
      }), o) : !l && s && !r.value ? null : h(u0, {
        autoLock: !0,
        visible: i,
        forceRender: l,
        getContainer: a
      }, {
        default: (d) => (c = O(O(O({}, c), d), {
          afterClose: () => {
            u?.(), r.value = !1;
          }
        }), h(KC, c, o))
      });
    };
  }
});
function qC(e) {
  return {
    position: e,
    top: 0,
    insetInlineEnd: 0,
    bottom: 0,
    insetInlineStart: 0
  };
}
const UU = (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`]: O(O({}, qC("fixed")), {
        zIndex: e.zIndexPopupBase,
        height: "100%",
        backgroundColor: e.colorBgMask,
        [`${t}-hidden`]: {
          display: "none"
        }
      }),
      [`${t}-wrap`]: O(O({}, qC("fixed")), {
        overflow: "auto",
        outline: 0,
        WebkitOverflowScrolling: "touch"
      })
    }
  }, {
    [`${t}-root`]: VV(e)
  }];
}, XU = (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]: O(O({}, fn(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`]: O({
          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
          }
        }, Nl(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"
        }
      }
    }
  ];
}, QU = (e) => {
  const {
    componentCls: t
  } = e, n = `${t}-confirm`;
  return {
    [n]: {
      "&-rtl": {
        direction: "rtl"
      },
      [`${e.antCls}-modal-header`]: {
        display: "none"
      },
      [`${n}-body-wrapper`]: O({}, ja()),
      [`${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"
    }
  };
}, ZU = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-root`]: {
      [`${t}-wrap-rtl`]: {
        direction: "rtl",
        [`${t}-confirm-body`]: {
          direction: "rtl"
        }
      }
    }
  };
}, JU = (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
      }
    }
  };
}, eX = On("Modal", (e) => {
  const t = e.padding, n = e.fontSizeHeading5, o = e.lineHeightHeading5, r = Qt(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 [XU(r), QU(r), ZU(r), UU(r), e.wireframe && JU(r), Fd(r, "zoom")];
});
var tX = { 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 YC(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      nX(e, r, n[r]);
    });
  }
  return e;
}
function nX(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var bx = function(t, n) {
  var o = YC({}, t, n.attrs);
  return h(an, YC({}, o, {
    icon: tX
  }), null);
};
bx.displayName = "UpOutlined";
bx.inheritAttrs = !1;
function _b() {
  return typeof BigInt == "function";
}
function nd(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", r = o.split("."), i = r[0] || "0", a = r[1] || "0";
  i === "0" && a === "0" && (n = !1);
  const l = n ? "-" : "";
  return {
    negative: n,
    negativeStr: l,
    trimStr: o,
    integerStr: i,
    decimalStr: a,
    fullStr: `${l}${o}`
  };
}
function yx(e) {
  const t = String(e);
  return !Number.isNaN(Number(t)) && t.includes("e");
}
function $d(e) {
  const t = String(e);
  if (yx(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(".") && wx(t) ? t.length - t.indexOf(".") - 1 : 0;
}
function xx(e) {
  let t = String(e);
  if (yx(e)) {
    if (e > Number.MAX_SAFE_INTEGER)
      return String(_b() ? BigInt(e).toString() : Number.MAX_SAFE_INTEGER);
    if (e < Number.MIN_SAFE_INTEGER)
      return String(_b() ? BigInt(e).toString() : Number.MIN_SAFE_INTEGER);
    t = e.toFixed($d(t));
  }
  return nd(t).fullStr;
}
function wx(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 JM(e) {
  return !e && e !== 0 && !Number.isNaN(e) || !String(e).trim();
}
class hs {
  constructor(t) {
    if (this.origin = "", JM(t)) {
      this.empty = !0;
      return;
    }
    this.origin = String(t), this.number = Number(t);
  }
  negate() {
    return new hs(-this.toNumber());
  }
  add(t) {
    if (this.isInvalidate())
      return new hs(t);
    const n = Number(t);
    if (Number.isNaN(n))
      return this;
    const o = this.number + n;
    if (o > Number.MAX_SAFE_INTEGER)
      return new hs(Number.MAX_SAFE_INTEGER);
    if (o < Number.MIN_SAFE_INTEGER)
      return new hs(Number.MIN_SAFE_INTEGER);
    const r = Math.max($d(this.number), $d(n));
    return new hs(o.toFixed(r));
  }
  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() ? "" : xx(this.number) : this.origin;
  }
}
class Cu {
  constructor(t) {
    if (this.origin = "", JM(t)) {
      this.empty = !0;
      return;
    }
    if (this.origin = String(t), t === "-" || Number.isNaN(t)) {
      this.nan = !0;
      return;
    }
    let n = t;
    if (yx(n) && (n = Number(n)), n = typeof n == "string" ? n : xx(n), wx(n)) {
      const o = nd(n);
      this.negative = o.negative;
      const r = o.trimStr.split(".");
      this.integer = BigInt(r[0]);
      const i = r[1] || "0";
      this.decimal = BigInt(i), this.decimalLen = i.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 Cu(this.toString());
    return t.negative = !t.negative, t;
  }
  add(t) {
    if (this.isInvalidate())
      return new Cu(t);
    const n = new Cu(t);
    if (n.isInvalidate())
      return this;
    const o = Math.max(this.getDecimalStr().length, n.getDecimalStr().length), r = this.alignDecimal(o), i = n.alignDecimal(o), a = (r + i).toString(), {
      negativeStr: l,
      trimStr: s
    } = nd(a), u = `${l}${s.padStart(o + 1, "0")}`;
    return new Cu(`${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() ? "" : nd(`${this.getMark()}${this.getIntegerStr()}.${this.getDecimalStr()}`).fullStr : this.origin;
  }
}
function qi(e) {
  return _b() ? new Cu(e) : new hs(e);
}
function Mb(e, t, n) {
  let o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
  if (e === "")
    return "";
  const {
    negativeStr: r,
    integerStr: i,
    decimalStr: a
  } = nd(e), l = `${t}${a}`, s = `${r}${i}`;
  if (n >= 0) {
    const u = Number(a[n]);
    if (u >= 5 && !o) {
      const c = qi(e).add(`${r}0.${"0".repeat(n)}${10 - u}`);
      return Mb(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 oX = 200, rX = 600, iX = be({
  compatConfig: {
    MODE: 3
  },
  name: "StepHandler",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    upDisabled: Boolean,
    downDisabled: Boolean,
    onStep: et()
  },
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      emit: o
    } = t;
    const r = le(), i = (l, s) => {
      l.preventDefault(), o("step", s);
      function u() {
        o("step", s), r.value = setTimeout(u, oX);
      }
      r.value = setTimeout(u, rX);
    }, a = () => {
      clearTimeout(r.value);
    };
    return qt(() => {
      a();
    }), () => {
      if (f0())
        return null;
      const {
        prefixCls: l,
        upDisabled: s,
        downDisabled: u
      } = e, c = `${l}-handler`, d = Me(c, `${c}-up`, {
        [`${c}-up-disabled`]: s
      }), f = Me(c, `${c}-down`, {
        [`${c}-down-disabled`]: u
      }), p = {
        unselectable: "on",
        role: "button",
        onMouseup: a,
        onMouseleave: a
      }, {
        upNode: v,
        downNode: g
      } = n;
      return h("div", {
        class: `${c}-wrap`
      }, [h("span", Q(Q({}, p), {}, {
        onMousedown: (m) => {
          i(m, !0);
        },
        "aria-label": "Increase Value",
        "aria-disabled": s,
        class: d
      }), [v?.() || h("span", {
        unselectable: "on",
        class: `${l}-handler-up-inner`
      }, null)]), h("span", Q(Q({}, p), {}, {
        onMousedown: (m) => {
          i(m, !1);
        },
        "aria-label": "Decrease Value",
        "aria-disabled": u,
        class: f
      }), [g?.() || h("span", {
        unselectable: "on",
        class: `${l}-handler-down-inner`
      }, null)])]);
    };
  }
});
function aX(e, t) {
  const n = le(null);
  function o() {
    try {
      const {
        selectionStart: i,
        selectionEnd: a,
        value: l
      } = e.value, s = l.substring(0, i), u = l.substring(a);
      n.value = {
        start: i,
        end: a,
        value: l,
        beforeTxt: s,
        afterTxt: u
      };
    } catch {
    }
  }
  function r() {
    if (e.value && n.value && t.value)
      try {
        const {
          value: i
        } = e.value, {
          beforeTxt: a,
          afterTxt: l,
          start: s
        } = n.value;
        let u = i.length;
        if (i.endsWith(l))
          u = i.length - n.value.afterTxt.length;
        else if (i.startsWith(a))
          u = a.length;
        else {
          const c = a[s - 1], d = i.indexOf(c, s - 1);
          d !== -1 && (u = d + 1);
        }
        e.value.setSelectionRange(u, u);
      } catch (i) {
        wn(!1, `Something warning of cursor restore. Please fire issue about this: ${i.message}`);
      }
  }
  return [o, r];
}
const lX = (() => {
  const e = $e(0), t = () => {
    Vt.cancel(e.value);
  };
  return qt(() => {
    t();
  }), (n) => {
    t(), e.value = Vt(() => {
      n();
    });
  };
});
var sX = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const GC = (e, t) => e || t.isEmpty() ? t.toString() : t.toNumber(), UC = (e) => {
  const t = qi(e);
  return t.isInvalidate() ? null : t;
}, e2 = () => ({
  /** value will show as string */
  stringMode: ct(),
  defaultValue: en([String, Number]),
  value: en([String, Number]),
  prefixCls: rn(),
  min: en([String, Number]),
  max: en([String, Number]),
  step: en([String, Number], 1),
  tabindex: Number,
  controls: ct(!0),
  readonly: ct(),
  disabled: ct(),
  autofocus: ct(),
  keyboard: ct(!0),
  /** Parse display value to validate number */
  parser: et(),
  /** Transform `value` to display value show in input */
  formatter: et(),
  /** Syntactic sugar of `formatter`. Config precision of display. */
  precision: Number,
  /** Syntactic sugar of `formatter`. Config decimal separator of display. */
  decimalSeparator: String,
  onInput: et(),
  onChange: et(),
  onPressEnter: et(),
  onStep: et(),
  onBlur: et(),
  onFocus: et()
}), uX = be({
  compatConfig: {
    MODE: 3
  },
  name: "InnerInputNumber",
  inheritAttrs: !1,
  props: O(O({}, e2()), {
    lazy: Boolean
  }),
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      emit: r,
      expose: i
    } = t;
    const a = $e(), l = $e(!1), s = $e(!1), u = $e(!1), c = $e(qi(e.value));
    function d(U) {
      e.value === void 0 && (c.value = U);
    }
    const f = (U, ae) => {
      if (!ae)
        return e.precision >= 0 ? e.precision : Math.max($d(U), $d(e.step));
    }, p = (U) => {
      const ae = String(U);
      if (e.parser)
        return e.parser(ae);
      let se = ae;
      return e.decimalSeparator && (se = se.replace(e.decimalSeparator, ".")), se.replace(/[^\w.-]+/g, "");
    }, v = $e(""), g = (U, ae) => {
      if (e.formatter)
        return e.formatter(U, {
          userTyping: ae,
          input: String(v.value)
        });
      let se = typeof U == "number" ? xx(U) : U;
      if (!ae) {
        const ie = f(se, ae);
        if (wx(se) && (e.decimalSeparator || ie >= 0)) {
          const re = e.decimalSeparator || ".";
          se = Mb(se, re, ie);
        }
      }
      return se;
    }, m = (() => {
      const U = e.value;
      return c.value.isInvalidate() && ["string", "number"].includes(typeof U) ? Number.isNaN(U) ? "" : U : g(c.value.toString(), !1);
    })();
    v.value = m;
    function x(U, ae) {
      v.value = g(
        // 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.
        U.isInvalidate() ? U.toString(!1) : U.toString(!ae),
        ae
      );
    }
    const S = E(() => UC(e.max)), C = E(() => UC(e.min)), P = E(() => !S.value || !c.value || c.value.isInvalidate() ? !1 : S.value.lessEquals(c.value)), $ = E(() => !C.value || !c.value || c.value.isInvalidate() ? !1 : c.value.lessEquals(C.value)), [I, w] = aX(a, l), T = (U) => S.value && !U.lessEquals(S.value) ? S.value : C.value && !C.value.lessEquals(U) ? C.value : null, M = (U) => !T(U), R = (U, ae) => {
      var se;
      let ie = U, re = M(ie) || ie.isEmpty();
      if (!ie.isEmpty() && !ae && (ie = T(ie) || ie, re = !0), !e.readonly && !e.disabled && re) {
        const te = ie.toString(), ve = f(te, ae);
        return ve >= 0 && (ie = qi(Mb(te, ".", ve))), ie.equals(c.value) || (d(ie), (se = e.onChange) === null || se === void 0 || se.call(e, ie.isEmpty() ? null : GC(e.stringMode, ie)), e.value === void 0 && x(ie, ae)), ie;
      }
      return c.value;
    }, N = lX(), H = (U) => {
      var ae;
      if (I(), v.value = U, !u.value) {
        const se = p(U), ie = qi(se);
        ie.isNaN() || R(ie, !0);
      }
      (ae = e.onInput) === null || ae === void 0 || ae.call(e, U), N(() => {
        let se = U;
        e.parser || (se = U.replace(/。/g, ".")), se !== U && H(se);
      });
    }, L = () => {
      u.value = !0;
    }, F = () => {
      u.value = !1, H(a.value.value);
    }, A = (U) => {
      H(U.target.value);
    }, G = (U) => {
      var ae, se;
      if (U && P.value || !U && $.value)
        return;
      s.value = !1;
      let ie = qi(e.step);
      U || (ie = ie.negate());
      const re = (c.value || qi(0)).add(ie.toString()), te = R(re, !1);
      (ae = e.onStep) === null || ae === void 0 || ae.call(e, GC(e.stringMode, te), {
        offset: e.step,
        type: U ? "up" : "down"
      }), (se = a.value) === null || se === void 0 || se.focus();
    }, j = (U) => {
      const ae = qi(p(v.value));
      let se = ae;
      ae.isNaN() ? se = c.value : se = R(ae, U), e.value !== void 0 ? x(c.value, !1) : se.isNaN() || x(se, !1);
    }, Z = () => {
      s.value = !0;
    }, W = (U) => {
      var ae;
      const {
        which: se
      } = U;
      s.value = !0, se === it.ENTER && (u.value || (s.value = !1), j(!1), (ae = e.onPressEnter) === null || ae === void 0 || ae.call(e, U)), e.keyboard !== !1 && !u.value && [it.UP, it.DOWN].includes(se) && (G(it.UP === se), U.preventDefault());
    }, K = () => {
      s.value = !1;
    }, q = (U) => {
      j(!1), l.value = !1, s.value = !1, r("blur", U);
    };
    return Ie(() => e.precision, () => {
      c.value.isInvalidate() || x(c.value, !1);
    }, {
      flush: "post"
    }), Ie(() => e.value, () => {
      const U = qi(e.value);
      c.value = U;
      const ae = qi(p(v.value));
      (!U.equals(ae) || !s.value || e.formatter) && x(U, s.value);
    }, {
      flush: "post"
    }), Ie(v, () => {
      e.formatter && w();
    }, {
      flush: "post"
    }), Ie(() => e.disabled, (U) => {
      U && (l.value = !1);
    }), i({
      focus: () => {
        var U;
        (U = a.value) === null || U === void 0 || U.focus();
      },
      blur: () => {
        var U;
        (U = a.value) === null || U === void 0 || U.blur();
      }
    }), () => {
      const U = O(O({}, n), e), {
        prefixCls: ae = "rc-input-number",
        min: se,
        max: ie,
        step: re = 1,
        defaultValue: te,
        value: ve,
        disabled: ce,
        readonly: fe,
        keyboard: ge,
        controls: Te = !0,
        autofocus: ze,
        stringMode: Ke,
        parser: He,
        formatter: Ne,
        precision: Xe,
        decimalSeparator: De,
        onChange: Fe,
        onInput: Ve,
        onPressEnter: ot,
        onStep: je,
        lazy: Pe,
        class: Ge,
        style: Se
      } = U, Ce = sX(U, ["prefixCls", "min", "max", "step", "defaultValue", "value", "disabled", "readonly", "keyboard", "controls", "autofocus", "stringMode", "parser", "formatter", "precision", "decimalSeparator", "onChange", "onInput", "onPressEnter", "onStep", "lazy", "class", "style"]), {
        upHandler: Ae,
        downHandler: qe
      } = o, We = `${ae}-input`, tt = {};
      return Pe ? tt.onChange = A : tt.onInput = A, h("div", {
        class: Me(ae, Ge, {
          [`${ae}-focused`]: l.value,
          [`${ae}-disabled`]: ce,
          [`${ae}-readonly`]: fe,
          [`${ae}-not-a-number`]: c.value.isNaN(),
          [`${ae}-out-of-range`]: !c.value.isInvalidate() && !M(c.value)
        }),
        style: Se,
        onKeydown: W,
        onKeyup: K
      }, [Te && h(iX, {
        prefixCls: ae,
        upDisabled: P.value,
        downDisabled: $.value,
        onStep: G
      }, {
        upNode: Ae,
        downNode: qe
      }), h("div", {
        class: `${We}-wrap`
      }, [h("input", Q(Q(Q({
        autofocus: ze,
        autocomplete: "off",
        role: "spinbutton",
        "aria-valuemin": se,
        "aria-valuemax": ie,
        "aria-valuenow": c.value.isInvalidate() ? null : c.value.toString(),
        step: re
      }, Ce), {}, {
        ref: a,
        class: We,
        value: v.value,
        disabled: ce,
        readonly: fe,
        onFocus: (Ee) => {
          l.value = !0, r("focus", Ee);
        }
      }, tt), {}, {
        onBlur: q,
        onCompositionstart: L,
        onCompositionend: F,
        onBeforeinput: Z
      }), null)])]);
    };
  }
});
function Ev(e) {
  return e != null;
}
const cX = (e) => {
  const {
    componentCls: t,
    lineWidth: n,
    lineType: o,
    colorBorder: r,
    borderRadius: i,
    fontSizeLG: a,
    controlHeightLG: l,
    controlHeightSM: s,
    colorError: u,
    inputPaddingHorizontalSM: c,
    colorTextDescription: d,
    motionDurationMid: f,
    colorPrimary: p,
    controlHeight: v,
    inputPaddingHorizontal: g,
    colorBgContainer: m,
    colorTextDisabled: x,
    borderRadiusSM: S,
    borderRadiusLG: C,
    controlWidth: P,
    handleVisible: $
  } = e;
  return [
    {
      [t]: O(O(O(O({}, fn(e)), hc(e)), Xh(e, t)), {
        display: "inline-block",
        width: P,
        margin: 0,
        padding: 0,
        border: `${n}px ${o} ${r}`,
        borderRadius: i,
        "&-rtl": {
          direction: "rtl",
          [`${t}-input`]: {
            direction: "rtl"
          }
        },
        "&-lg": {
          padding: 0,
          fontSize: a,
          borderRadius: C,
          [`input${t}-input`]: {
            height: l - 2 * n
          }
        },
        "&-sm": {
          padding: 0,
          borderRadius: S,
          [`input${t}-input`]: {
            height: s - 2 * n,
            padding: `0 ${c}px`
          }
        },
        "&:hover": O({}, pc(e)),
        "&-focused": O({}, Ds(e)),
        "&-disabled": O(O({}, D_(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": O(O(O({}, fn(e)), N_(e)), {
          "&-wrapper": {
            display: "inline-block",
            textAlign: "start",
            verticalAlign: "top",
            [`${t}-affix-wrapper`]: {
              width: "100%"
            },
            // Size
            "&-lg": {
              [`${t}-group-addon`]: {
                borderRadius: C
              }
            },
            "&-sm": {
              [`${t}-group-addon`]: {
                borderRadius: S
              }
            }
          }
        }),
        [t]: {
          "&-input": O(O({
            width: "100%",
            height: v - 2 * n,
            padding: `0 ${g}px`,
            textAlign: "start",
            backgroundColor: "transparent",
            border: 0,
            borderRadius: i,
            outline: 0,
            transition: `all ${f} linear`,
            appearance: "textfield",
            color: e.colorText,
            fontSize: "inherit",
            verticalAlign: "top"
          }, E_(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: m,
          borderStartStartRadius: 0,
          borderStartEndRadius: i,
          borderEndEndRadius: i,
          borderEndStartRadius: 0,
          opacity: $ === !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} ${r}`,
          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": O(O({}, uc()), {
            color: d,
            transition: `all ${f} linear`,
            userSelect: "none"
          })
        },
        [`${t}-handler-up`]: {
          borderStartEndRadius: i
        },
        [`${t}-handler-down`]: {
          borderBlockStart: `${n}px ${o} ${r}`,
          borderEndEndRadius: i
        },
        // 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: x
        }
      }
    },
    // Border-less
    {
      [`${t}-borderless`]: {
        borderColor: "transparent",
        boxShadow: "none",
        [`${t}-handler-down`]: {
          borderBlockStartWidth: 0
        }
      }
    }
  ];
}, dX = (e) => {
  const {
    componentCls: t,
    inputPaddingHorizontal: n,
    inputAffixPadding: o,
    controlWidth: r,
    borderRadiusLG: i,
    borderRadiusSM: a
  } = e;
  return {
    [`${t}-affix-wrapper`]: O(O(O({}, hc(e)), Xh(e, `${t}-affix-wrapper`)), {
      // or number handler will cover form status
      position: "relative",
      display: "inline-flex",
      width: r,
      padding: 0,
      paddingInlineStart: n,
      "&-lg": {
        borderRadius: i
      },
      "&-sm": {
        borderRadius: a
      },
      [`&:not(${t}-affix-wrapper-disabled):hover`]: O(O({}, pc(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
        }
      }
    })
  };
}, fX = On("InputNumber", (e) => {
  const t = Qh(e);
  return [
    cX(t),
    dX(t),
    // =====================================================
    // ==             Space Compact                       ==
    // =====================================================
    Bd(t)
  ];
}, (e) => ({
  controlWidth: 90,
  handleWidth: e.controlHeightSM - e.lineWidth * 2,
  handleFontSize: e.fontSize / 2,
  handleVisible: "auto"
}));
var pX = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const XC = e2(), hX = () => O(O({}, XC), {
  size: rn(),
  bordered: ct(!0),
  placeholder: String,
  name: String,
  id: String,
  type: String,
  addonBefore: pe.any,
  addonAfter: pe.any,
  prefix: pe.any,
  "onUpdate:value": XC.onChange,
  valueModifiers: Object,
  status: rn()
}), Dv = be({
  compatConfig: {
    MODE: 3
  },
  name: "AInputNumber",
  inheritAttrs: !1,
  props: hX(),
  // emits: ['focus', 'blur', 'change', 'input', 'update:value'],
  slots: Object,
  setup(e, t) {
    let {
      emit: n,
      expose: o,
      attrs: r,
      slots: i
    } = t;
    var a;
    const l = Br(), s = Nr.useInject(), u = E(() => Ls(s.status, e.status)), {
      prefixCls: c,
      size: d,
      direction: f,
      disabled: p
    } = Nt("input-number", e), {
      compactSize: v,
      compactItemClassnames: g
    } = dc(c, f), m = _i(), x = E(() => {
      var L;
      return (L = p.value) !== null && L !== void 0 ? L : m.value;
    }), [S, C] = fX(c), P = E(() => v.value || d.value), $ = $e((a = e.value) !== null && a !== void 0 ? a : e.defaultValue), I = $e(!1);
    Ie(() => e.value, () => {
      $.value = e.value;
    });
    const w = $e(null), T = () => {
      var L;
      (L = w.value) === null || L === void 0 || L.focus();
    };
    o({
      focus: T,
      blur: () => {
        var L;
        (L = w.value) === null || L === void 0 || L.blur();
      }
    });
    const R = (L) => {
      e.value === void 0 && ($.value = L), n("update:value", L), n("change", L), l.onFieldChange();
    }, N = (L) => {
      I.value = !1, n("blur", L), l.onFieldBlur();
    }, H = (L) => {
      I.value = !0, n("focus", L);
    };
    return () => {
      var L, F, A, G;
      const {
        hasFeedback: j,
        isFormItemInput: Z,
        feedbackIcon: W
      } = s, K = (L = e.id) !== null && L !== void 0 ? L : l.id.value, q = O(O(O({}, r), e), {
        id: K,
        disabled: x.value
      }), {
        class: U,
        bordered: ae,
        readonly: se,
        style: ie,
        addonBefore: re = (F = i.addonBefore) === null || F === void 0 ? void 0 : F.call(i),
        addonAfter: te = (A = i.addonAfter) === null || A === void 0 ? void 0 : A.call(i),
        prefix: ve = (G = i.prefix) === null || G === void 0 ? void 0 : G.call(i),
        valueModifiers: ce = {}
      } = q, fe = pX(q, ["class", "bordered", "readonly", "style", "addonBefore", "addonAfter", "prefix", "valueModifiers"]), ge = c.value, Te = Me({
        [`${ge}-lg`]: P.value === "large",
        [`${ge}-sm`]: P.value === "small",
        [`${ge}-rtl`]: f.value === "rtl",
        [`${ge}-readonly`]: se,
        [`${ge}-borderless`]: !ae,
        [`${ge}-in-form-item`]: Z
      }, $i(ge, u.value), U, g.value, C.value);
      let ze = h(uX, Q(Q({}, Fn(fe, ["size", "defaultValue"])), {}, {
        ref: w,
        lazy: !!ce.lazy,
        value: $.value,
        class: Te,
        prefixCls: ge,
        readonly: se,
        onChange: R,
        onBlur: N,
        onFocus: H
      }), {
        upHandler: i.upIcon ? () => h("span", {
          class: `${ge}-handler-up-inner`
        }, [i.upIcon()]) : () => h(bx, {
          class: `${ge}-handler-up-inner`
        }, null),
        downHandler: i.downIcon ? () => h("span", {
          class: `${ge}-handler-down-inner`
        }, [i.downIcon()]) : () => h(Rd, {
          class: `${ge}-handler-down-inner`
        }, null)
      });
      const Ke = Ev(re) || Ev(te), He = Ev(ve);
      if (He || j) {
        const Ne = Me(`${ge}-affix-wrapper`, $i(`${ge}-affix-wrapper`, u.value, j), {
          [`${ge}-affix-wrapper-focused`]: I.value,
          [`${ge}-affix-wrapper-disabled`]: x.value,
          [`${ge}-affix-wrapper-sm`]: P.value === "small",
          [`${ge}-affix-wrapper-lg`]: P.value === "large",
          [`${ge}-affix-wrapper-rtl`]: f.value === "rtl",
          [`${ge}-affix-wrapper-readonly`]: se,
          [`${ge}-affix-wrapper-borderless`]: !ae,
          // className will go to addon wrapper
          [`${U}`]: !Ke && U
        }, C.value);
        ze = h("div", {
          class: Ne,
          style: ie,
          onClick: T
        }, [He && h("span", {
          class: `${ge}-prefix`
        }, [ve]), ze, j && h("span", {
          class: `${ge}-suffix`
        }, [W])]);
      }
      if (Ke) {
        const Ne = `${ge}-group`, Xe = `${Ne}-addon`, De = re ? h("div", {
          class: Xe
        }, [re]) : null, Fe = te ? h("div", {
          class: Xe
        }, [te]) : null, Ve = Me(`${ge}-wrapper`, Ne, {
          [`${Ne}-rtl`]: f.value === "rtl"
        }, C.value), ot = Me(`${ge}-group-wrapper`, {
          [`${ge}-group-wrapper-sm`]: P.value === "small",
          [`${ge}-group-wrapper-lg`]: P.value === "large",
          [`${ge}-group-wrapper-rtl`]: f.value === "rtl"
        }, $i(`${c}-group-wrapper`, u.value, j), U, C.value);
        ze = h("div", {
          class: ot,
          style: ie
        }, [h("div", {
          class: Ve
        }, [De && h(wd, null, {
          default: () => [h(Bp, null, {
            default: () => [De]
          })]
        }), ze, Fe && h(wd, null, {
          default: () => [h(Bp, null, {
            default: () => [Fe]
          })]
        })])]);
      }
      return S(Xn(ze, {
        style: ie
      }));
    };
  }
}), _o = O(Dv, {
  install: (e) => (e.component(Dv.name, Dv), e)
});
function gX(e, t, n) {
  var o = n || {}, r = o.noTrailing, i = r === void 0 ? !1 : r, 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 v(m) {
    var x = m || {}, S = x.upcomingOnly, C = S === void 0 ? !1 : S;
    p(), d = !C;
  }
  function g() {
    for (var m = arguments.length, x = new Array(m), S = 0; S < m; S++)
      x[S] = arguments[S];
    var C = this, P = Date.now() - f;
    if (d)
      return;
    function $() {
      f = Date.now(), t.apply(C, x);
    }
    function I() {
      c = void 0;
    }
    !l && u && !c && $(), p(), u === void 0 && P > e ? l ? (f = Date.now(), i || (c = setTimeout(u ? I : $, e))) : $() : i !== !0 && (c = setTimeout(u ? I : $, u === void 0 ? e - P : e));
  }
  return g.cancel = v, g;
}
function vX(e, t, n) {
  var o = {}, r = o.atBegin, i = r === void 0 ? !1 : r;
  return gX(e, t, {
    debounceMode: i !== !1
  });
}
const mX = new tn("antSpinMove", {
  to: {
    opacity: 1
  }
}), bX = new tn("antRotate", {
  to: {
    transform: "rotate(405deg)"
  }
}), yX = (e) => ({
  [`${e.componentCls}`]: O(O({}, fn(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: mX,
        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: bX,
        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"
    }
  })
}), xX = On("Spin", (e) => {
  const t = Qt(e, {
    spinDotDefault: e.colorTextDescription,
    spinDotSize: e.controlHeightLG / 2,
    spinDotSizeSM: e.controlHeightLG * 0.35,
    spinDotSizeLG: e.controlHeight
  });
  return [yX(t)];
}, {
  contentHeight: 400
});
var wX = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const SX = () => ({
  prefixCls: String,
  spinning: {
    type: Boolean,
    default: void 0
  },
  size: String,
  wrapperClassName: String,
  tip: pe.any,
  delay: Number,
  indicator: pe.any
});
let hp = null;
function CX(e, t) {
  return !!e && !!t && !isNaN(Number(t));
}
function $X(e) {
  const t = e.indicator;
  hp = typeof t == "function" ? t : () => h(t, null, null);
}
const Xo = be({
  compatConfig: {
    MODE: 3
  },
  name: "ASpin",
  inheritAttrs: !1,
  props: Mn(SX(), {
    size: "default",
    spinning: !0,
    wrapperClassName: ""
  }),
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const {
      prefixCls: r,
      size: i,
      direction: a
    } = Nt("spin", e), [l, s] = xX(r), u = $e(e.spinning && !CX(e.spinning, e.delay));
    let c;
    return Ie([() => e.spinning, () => e.delay], () => {
      c?.cancel(), c = vX(e.delay, () => {
        u.value = e.spinning;
      }), c?.();
    }, {
      immediate: !0,
      flush: "post"
    }), qt(() => {
      c?.cancel();
    }), () => {
      var d, f;
      const {
        class: p
      } = n, v = wX(n, ["class"]), {
        tip: g = (d = o.tip) === null || d === void 0 ? void 0 : d.call(o)
      } = e, m = (f = o.default) === null || f === void 0 ? void 0 : f.call(o), x = {
        [s.value]: !0,
        [r.value]: !0,
        [`${r.value}-sm`]: i.value === "small",
        [`${r.value}-lg`]: i.value === "large",
        [`${r.value}-spinning`]: u.value,
        [`${r.value}-show-text`]: !!g,
        [`${r.value}-rtl`]: a.value === "rtl",
        [p]: !!p
      };
      function S(P) {
        const $ = `${P}-dot`;
        let I = ei(o, e, "indicator");
        return I === null ? null : (Array.isArray(I) && (I = I.length === 1 ? I[0] : I), dr(I) ? Ml(I, {
          class: $
        }) : hp && dr(hp()) ? Ml(hp(), {
          class: $
        }) : h("span", {
          class: `${$} ${P}-dot-spin`
        }, [h("i", {
          class: `${P}-dot-item`
        }, null), h("i", {
          class: `${P}-dot-item`
        }, null), h("i", {
          class: `${P}-dot-item`
        }, null), h("i", {
          class: `${P}-dot-item`
        }, null)]));
      }
      const C = h("div", Q(Q({}, v), {}, {
        class: x,
        "aria-live": "polite",
        "aria-busy": u.value
      }), [S(r.value), g ? h("div", {
        class: `${r.value}-text`
      }, [g]) : null]);
      if (m && Do(m).length) {
        const P = {
          [`${r.value}-container`]: !0,
          [`${r.value}-blur`]: u.value
        };
        return l(h("div", {
          class: [`${r.value}-nested-loading`, e.wrapperClassName, s.value]
        }, [u.value && h("div", {
          key: "loading"
        }, [C]), h("div", {
          class: P,
          key: "container"
        }, [m])]));
      }
      return l(C);
    };
  }
});
Xo.setDefaultIndicator = $X;
Xo.install = function(e) {
  return e.component(Xo.name, Xo), e;
};
var PX = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z" } }] }, name: "double-left", theme: "outlined" };
function QC(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      OX(e, r, n[r]);
    });
  }
  return e;
}
function OX(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Qp = function(t, n) {
  var o = QC({}, t, n.attrs);
  return h(an, QC({}, o, {
    icon: PX
  }), null);
};
Qp.displayName = "DoubleLeftOutlined";
Qp.inheritAttrs = !1;
var kX = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z" } }] }, name: "double-right", theme: "outlined" };
function ZC(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      IX(e, r, n[r]);
    });
  }
  return e;
}
function IX(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Zp = function(t, n) {
  var o = ZC({}, t, n.attrs);
  return h(an, ZC({}, o, {
    icon: kX
  }), null);
};
Zp.displayName = "DoubleRightOutlined";
Zp.inheritAttrs = !1;
const TX = be({
  name: "MiniSelect",
  compatConfig: {
    MODE: 3
  },
  inheritAttrs: !1,
  props: C0(),
  Option: Et.Option,
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    return () => {
      const r = O(O(O({}, e), {
        size: "small"
      }), n);
      return h(Et, r, o);
    };
  }
}), _X = be({
  name: "MiddleSelect",
  inheritAttrs: !1,
  props: C0(),
  Option: Et.Option,
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    return () => {
      const r = O(O(O({}, e), {
        size: "middle"
      }), n);
      return h(Et, r, o);
    };
  }
}), ts = be({
  compatConfig: {
    MODE: 3
  },
  name: "Pager",
  inheritAttrs: !1,
  props: {
    rootPrefixCls: String,
    page: Number,
    active: {
      type: Boolean,
      default: void 0
    },
    last: {
      type: Boolean,
      default: void 0
    },
    locale: pe.object,
    showTitle: {
      type: Boolean,
      default: void 0
    },
    itemRender: {
      type: Function,
      default: () => {
      }
    },
    onClick: {
      type: Function
    },
    onKeypress: {
      type: Function
    }
  },
  eimt: ["click", "keypress"],
  setup(e, t) {
    let {
      emit: n,
      attrs: o
    } = t;
    const r = () => {
      n("click", e.page);
    }, i = (a) => {
      n("keypress", a, r, e.page);
    };
    return () => {
      const {
        showTitle: a,
        page: l,
        itemRender: s
      } = e, {
        class: u,
        style: c
      } = o, d = `${e.rootPrefixCls}-item`, f = Me(d, `${d}-${e.page}`, {
        [`${d}-active`]: e.active,
        [`${d}-disabled`]: !e.page
      }, u);
      return h("li", {
        onClick: r,
        onKeypress: i,
        title: a ? String(l) : null,
        tabindex: "0",
        class: f,
        style: c
      }, [s({
        page: l,
        type: "page",
        originalElement: h("a", {
          rel: "nofollow"
        }, [l])
      })]);
    };
  }
}), ls = {
  ENTER: 13,
  ARROW_UP: 38,
  ARROW_DOWN: 40
}, MX = be({
  compatConfig: {
    MODE: 3
  },
  props: {
    disabled: {
      type: Boolean,
      default: void 0
    },
    changeSize: Function,
    quickGo: Function,
    selectComponentClass: pe.any,
    current: Number,
    pageSizeOptions: pe.array.def(["10", "20", "50", "100"]),
    pageSize: Number,
    buildOptionText: Function,
    locale: pe.object,
    rootPrefixCls: String,
    selectPrefixCls: String,
    goButton: pe.any
  },
  setup(e) {
    const t = le(""), n = E(() => !t.value || isNaN(t.value) ? void 0 : Number(t.value)), o = (s) => `${s.value} ${e.locale.items_per_page}`, r = (s) => {
      const {
        value: u
      } = s.target;
      t.value !== u && (t.value = u);
    }, i = (s) => {
      const {
        goButton: u,
        quickGo: c,
        rootPrefixCls: d
      } = e;
      if (!(u || t.value === ""))
        if (s.relatedTarget && (s.relatedTarget.className.indexOf(`${d}-item-link`) >= 0 || s.relatedTarget.className.indexOf(`${d}-item`) >= 0)) {
          t.value = "";
          return;
        } else
          c(n.value), t.value = "";
    }, a = (s) => {
      t.value !== "" && (s.keyCode === ls.ENTER || s.type === "click") && (e.quickGo(n.value), t.value = "");
    }, l = E(() => {
      const {
        pageSize: s,
        pageSizeOptions: u
      } = e;
      return u.some((c) => c.toString() === s.toString()) ? u : u.concat([s.toString()]).sort((c, d) => {
        const f = isNaN(Number(c)) ? 0 : Number(c), p = isNaN(Number(d)) ? 0 : Number(d);
        return f - p;
      });
    });
    return () => {
      const {
        rootPrefixCls: s,
        locale: u,
        changeSize: c,
        quickGo: d,
        goButton: f,
        selectComponentClass: p,
        selectPrefixCls: v,
        pageSize: g,
        disabled: m
      } = e, x = `${s}-options`;
      let S = null, C = null, P = null;
      if (!c && !d)
        return null;
      if (c && p) {
        const $ = e.buildOptionText || o, I = l.value.map((w, T) => h(p.Option, {
          key: T,
          value: w
        }, {
          default: () => [$({
            value: w
          })]
        }));
        S = h(p, {
          disabled: m,
          prefixCls: v,
          showSearch: !1,
          class: `${x}-size-changer`,
          optionLabelProp: "children",
          value: (g || l.value[0]).toString(),
          onChange: (w) => c(Number(w)),
          getPopupContainer: (w) => w.parentNode
        }, {
          default: () => [I]
        });
      }
      return d && (f && (P = typeof f == "boolean" ? h("button", {
        type: "button",
        onClick: a,
        onKeyup: a,
        disabled: m,
        class: `${x}-quick-jumper-button`
      }, [u.jump_to_confirm]) : h("span", {
        onClick: a,
        onKeyup: a
      }, [f])), C = h("div", {
        class: `${x}-quick-jumper`
      }, [u.jump_to, h(Nd, {
        disabled: m,
        type: "text",
        value: t.value,
        onInput: r,
        onChange: r,
        onKeyup: a,
        onBlur: i
      }, null), u.page, P])), h("li", {
        class: `${x}`
      }, [S, C]);
    };
  }
}), EX = {
  // Options.jsx
  items_per_page: "条/页",
  jump_to: "跳至",
  jump_to_confirm: "确定",
  page: "页",
  // Pagination.jsx
  prev_page: "上一页",
  next_page: "下一页",
  prev_5: "向前 5 页",
  next_5: "向后 5 页",
  prev_3: "向前 3 页",
  next_3: "向后 3 页"
};
var DX = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
function AX(e) {
  return typeof e == "number" && isFinite(e) && Math.floor(e) === e;
}
function NX(e) {
  let {
    originalElement: t
  } = e;
  return t;
}
function Ca(e, t, n) {
  const o = typeof e > "u" ? t.statePageSize : e;
  return Math.floor((n.total - 1) / o) + 1;
}
const RX = be({
  compatConfig: {
    MODE: 3
  },
  name: "Pagination",
  mixins: [Dd],
  inheritAttrs: !1,
  props: {
    disabled: {
      type: Boolean,
      default: void 0
    },
    prefixCls: pe.string.def("rc-pagination"),
    selectPrefixCls: pe.string.def("rc-select"),
    current: Number,
    defaultCurrent: pe.number.def(1),
    total: pe.number.def(0),
    pageSize: Number,
    defaultPageSize: pe.number.def(10),
    hideOnSinglePage: {
      type: Boolean,
      default: !1
    },
    showSizeChanger: {
      type: Boolean,
      default: void 0
    },
    showLessItems: {
      type: Boolean,
      default: !1
    },
    // showSizeChange: PropTypes.func.def(noop),
    selectComponentClass: pe.any,
    showPrevNextJumpers: {
      type: Boolean,
      default: !0
    },
    showQuickJumper: pe.oneOfType([pe.looseBool, pe.object]).def(!1),
    showTitle: {
      type: Boolean,
      default: !0
    },
    pageSizeOptions: pe.arrayOf(pe.oneOfType([pe.number, pe.string])),
    buildOptionText: Function,
    showTotal: Function,
    simple: {
      type: Boolean,
      default: void 0
    },
    locale: pe.object.def(EX),
    itemRender: pe.func.def(NX),
    prevIcon: pe.any,
    nextIcon: pe.any,
    jumpPrevIcon: pe.any,
    jumpNextIcon: pe.any,
    totalBoundaryShowSizeChanger: pe.number.def(50)
  },
  data() {
    const e = this.$props;
    let t = Lp([this.current, this.defaultCurrent]);
    const n = Lp([this.pageSize, this.defaultPageSize]);
    return t = Math.min(t, Ca(n, void 0, e)), {
      stateCurrent: t,
      stateCurrentInputValue: t,
      statePageSize: n
    };
  },
  watch: {
    current(e) {
      this.setState({
        stateCurrent: e,
        stateCurrentInputValue: e
      });
    },
    pageSize(e) {
      const t = {};
      let n = this.stateCurrent;
      const o = Ca(e, this.$data, this.$props);
      n = n > o ? o : n, Ia(this, "current") || (t.stateCurrent = n, t.stateCurrentInputValue = n), t.statePageSize = e, this.setState(t);
    },
    stateCurrent(e, t) {
      this.$nextTick(() => {
        if (this.$refs.paginationNode) {
          const n = this.$refs.paginationNode.querySelector(`.${this.prefixCls}-item-${t}`);
          n && document.activeElement === n && n.blur();
        }
      });
    },
    total() {
      const e = {}, t = Ca(this.pageSize, this.$data, this.$props);
      if (Ia(this, "current")) {
        const n = Math.min(this.current, t);
        e.stateCurrent = n, e.stateCurrentInputValue = n;
      } else {
        let n = this.stateCurrent;
        n === 0 && t > 0 ? n = 1 : n = Math.min(this.stateCurrent, t), e.stateCurrent = n;
      }
      this.setState(e);
    }
  },
  methods: {
    getJumpPrevPage() {
      return Math.max(1, this.stateCurrent - (this.showLessItems ? 3 : 5));
    },
    getJumpNextPage() {
      return Math.min(Ca(void 0, this.$data, this.$props), this.stateCurrent + (this.showLessItems ? 3 : 5));
    },
    getItemIcon(e, t) {
      const {
        prefixCls: n
      } = this.$props;
      return jk(this, e, this.$props) || h("button", {
        type: "button",
        "aria-label": t,
        class: `${n}-item-link`
      }, null);
    },
    getValidValue(e) {
      const t = e.target.value, n = Ca(void 0, this.$data, this.$props), {
        stateCurrentInputValue: o
      } = this.$data;
      let r;
      return t === "" ? r = t : isNaN(Number(t)) ? r = o : t >= n ? r = n : r = Number(t), r;
    },
    isValid(e) {
      return AX(e) && e !== this.stateCurrent;
    },
    shouldDisplayQuickJumper() {
      const {
        showQuickJumper: e,
        pageSize: t,
        total: n
      } = this.$props;
      return n <= t ? !1 : e;
    },
    // calculatePage (p) {
    //   let pageSize = p
    //   if (typeof pageSize === 'undefined') {
    //     pageSize = this.statePageSize
    //   }
    //   return Math.floor((this.total - 1) / pageSize) + 1
    // },
    handleKeyDown(e) {
      (e.keyCode === ls.ARROW_UP || e.keyCode === ls.ARROW_DOWN) && e.preventDefault();
    },
    handleKeyUp(e) {
      const t = this.getValidValue(e), n = this.stateCurrentInputValue;
      t !== n && this.setState({
        stateCurrentInputValue: t
      }), e.keyCode === ls.ENTER ? this.handleChange(t) : e.keyCode === ls.ARROW_UP ? this.handleChange(t - 1) : e.keyCode === ls.ARROW_DOWN && this.handleChange(t + 1);
    },
    changePageSize(e) {
      let t = this.stateCurrent;
      const n = t, o = Ca(e, this.$data, this.$props);
      t = t > o ? o : t, o === 0 && (t = this.stateCurrent), typeof e == "number" && (Ia(this, "pageSize") || this.setState({
        statePageSize: e
      }), Ia(this, "current") || this.setState({
        stateCurrent: t,
        stateCurrentInputValue: t
      })), this.__emit("update:pageSize", e), t !== n && this.__emit("update:current", t), this.__emit("showSizeChange", t, e), this.__emit("change", t, e);
    },
    handleChange(e) {
      const {
        disabled: t
      } = this.$props;
      let n = e;
      if (this.isValid(n) && !t) {
        const o = Ca(void 0, this.$data, this.$props);
        return n > o ? n = o : n < 1 && (n = 1), Ia(this, "current") || this.setState({
          stateCurrent: n,
          stateCurrentInputValue: n
        }), this.__emit("update:current", n), this.__emit("change", n, this.statePageSize), n;
      }
      return this.stateCurrent;
    },
    prev() {
      this.hasPrev() && this.handleChange(this.stateCurrent - 1);
    },
    next() {
      this.hasNext() && this.handleChange(this.stateCurrent + 1);
    },
    jumpPrev() {
      this.handleChange(this.getJumpPrevPage());
    },
    jumpNext() {
      this.handleChange(this.getJumpNextPage());
    },
    hasPrev() {
      return this.stateCurrent > 1;
    },
    hasNext() {
      return this.stateCurrent < Ca(void 0, this.$data, this.$props);
    },
    getShowSizeChanger() {
      const {
        showSizeChanger: e,
        total: t,
        totalBoundaryShowSizeChanger: n
      } = this.$props;
      return typeof e < "u" ? e : t > n;
    },
    runIfEnter(e, t) {
      if (e.key === "Enter" || e.charCode === 13) {
        e.preventDefault();
        for (var n = arguments.length, o = new Array(n > 2 ? n - 2 : 0), r = 2; r < n; r++)
          o[r - 2] = arguments[r];
        t(...o);
      }
    },
    runIfEnterPrev(e) {
      this.runIfEnter(e, this.prev);
    },
    runIfEnterNext(e) {
      this.runIfEnter(e, this.next);
    },
    runIfEnterJumpPrev(e) {
      this.runIfEnter(e, this.jumpPrev);
    },
    runIfEnterJumpNext(e) {
      this.runIfEnter(e, this.jumpNext);
    },
    handleGoTO(e) {
      (e.keyCode === ls.ENTER || e.type === "click") && this.handleChange(this.stateCurrentInputValue);
    },
    renderPrev(e) {
      const {
        itemRender: t
      } = this.$props, n = t({
        page: e,
        type: "prev",
        originalElement: this.getItemIcon("prevIcon", "prev page")
      }), o = !this.hasPrev();
      return Ao(n) ? Xn(n, o ? {
        disabled: o
      } : {}) : n;
    },
    renderNext(e) {
      const {
        itemRender: t
      } = this.$props, n = t({
        page: e,
        type: "next",
        originalElement: this.getItemIcon("nextIcon", "next page")
      }), o = !this.hasNext();
      return Ao(n) ? Xn(n, o ? {
        disabled: o
      } : {}) : n;
    }
  },
  render() {
    const {
      prefixCls: e,
      disabled: t,
      hideOnSinglePage: n,
      total: o,
      locale: r,
      showQuickJumper: i,
      showLessItems: a,
      showTitle: l,
      showTotal: s,
      simple: u,
      itemRender: c,
      showPrevNextJumpers: d,
      jumpPrevIcon: f,
      jumpNextIcon: p,
      selectComponentClass: v,
      selectPrefixCls: g,
      pageSizeOptions: m
    } = this.$props, {
      stateCurrent: x,
      statePageSize: S
    } = this, C = Lk(this.$attrs).extraAttrs, {
      class: P
    } = C, $ = DX(C, ["class"]);
    if (n === !0 && this.total <= S)
      return null;
    const I = Ca(void 0, this.$data, this.$props), w = [];
    let T = null, M = null, R = null, N = null, H = null;
    const L = i && i.goButton, F = a ? 1 : 2, A = x - 1 > 0 ? x - 1 : 0, G = x + 1 < I ? x + 1 : I, j = this.hasPrev(), Z = this.hasNext();
    if (u)
      return L && (typeof L == "boolean" ? H = h("button", {
        type: "button",
        onClick: this.handleGoTO,
        onKeyup: this.handleGoTO
      }, [r.jump_to_confirm]) : H = h("span", {
        onClick: this.handleGoTO,
        onKeyup: this.handleGoTO
      }, [L]), H = h("li", {
        title: l ? `${r.jump_to}${x}/${I}` : null,
        class: `${e}-simple-pager`
      }, [H])), h("ul", Q({
        class: Me(`${e} ${e}-simple`, {
          [`${e}-disabled`]: t
        }, P)
      }, $), [h("li", {
        title: l ? r.prev_page : null,
        onClick: this.prev,
        tabindex: j ? 0 : null,
        onKeypress: this.runIfEnterPrev,
        class: Me(`${e}-prev`, {
          [`${e}-disabled`]: !j
        }),
        "aria-disabled": !j
      }, [this.renderPrev(A)]), h("li", {
        title: l ? `${x}/${I}` : null,
        class: `${e}-simple-pager`
      }, [h(Nd, {
        type: "text",
        value: this.stateCurrentInputValue,
        disabled: t,
        onKeydown: this.handleKeyDown,
        onKeyup: this.handleKeyUp,
        onInput: this.handleKeyUp,
        onChange: this.handleKeyUp,
        size: "3"
      }, null), h("span", {
        class: `${e}-slash`
      }, [Le("／")]), I]), h("li", {
        title: l ? r.next_page : null,
        onClick: this.next,
        tabindex: Z ? 0 : null,
        onKeypress: this.runIfEnterNext,
        class: Me(`${e}-next`, {
          [`${e}-disabled`]: !Z
        }),
        "aria-disabled": !Z
      }, [this.renderNext(G)]), H]);
    if (I <= 3 + F * 2) {
      const ae = {
        locale: r,
        rootPrefixCls: e,
        showTitle: l,
        itemRender: c,
        onClick: this.handleChange,
        onKeypress: this.runIfEnter
      };
      I || w.push(h(ts, Q(Q({}, ae), {}, {
        key: "noPager",
        page: 1,
        class: `${e}-item-disabled`
      }), null));
      for (let se = 1; se <= I; se += 1) {
        const ie = x === se;
        w.push(h(ts, Q(Q({}, ae), {}, {
          key: se,
          page: se,
          active: ie
        }), null));
      }
    } else {
      const ae = a ? r.prev_3 : r.prev_5, se = a ? r.next_3 : r.next_5;
      d && (T = h("li", {
        title: this.showTitle ? ae : null,
        key: "prev",
        onClick: this.jumpPrev,
        tabindex: "0",
        onKeypress: this.runIfEnterJumpPrev,
        class: Me(`${e}-jump-prev`, {
          [`${e}-jump-prev-custom-icon`]: !!f
        })
      }, [c({
        page: this.getJumpPrevPage(),
        type: "jump-prev",
        originalElement: this.getItemIcon("jumpPrevIcon", "prev page")
      })]), M = h("li", {
        title: this.showTitle ? se : null,
        key: "next",
        tabindex: "0",
        onClick: this.jumpNext,
        onKeypress: this.runIfEnterJumpNext,
        class: Me(`${e}-jump-next`, {
          [`${e}-jump-next-custom-icon`]: !!p
        })
      }, [c({
        page: this.getJumpNextPage(),
        type: "jump-next",
        originalElement: this.getItemIcon("jumpNextIcon", "next page")
      })])), N = h(ts, {
        locale: r,
        last: !0,
        rootPrefixCls: e,
        onClick: this.handleChange,
        onKeypress: this.runIfEnter,
        key: I,
        page: I,
        active: !1,
        showTitle: l,
        itemRender: c
      }, null), R = h(ts, {
        locale: r,
        rootPrefixCls: e,
        onClick: this.handleChange,
        onKeypress: this.runIfEnter,
        key: 1,
        page: 1,
        active: !1,
        showTitle: l,
        itemRender: c
      }, null);
      let ie = Math.max(1, x - F), re = Math.min(x + F, I);
      x - 1 <= F && (re = 1 + F * 2), I - x <= F && (ie = I - F * 2);
      for (let te = ie; te <= re; te += 1) {
        const ve = x === te;
        w.push(h(ts, {
          locale: r,
          rootPrefixCls: e,
          onClick: this.handleChange,
          onKeypress: this.runIfEnter,
          key: te,
          page: te,
          active: ve,
          showTitle: l,
          itemRender: c
        }, null));
      }
      x - 1 >= F * 2 && x !== 3 && (w[0] = h(ts, {
        locale: r,
        rootPrefixCls: e,
        onClick: this.handleChange,
        onKeypress: this.runIfEnter,
        key: ie,
        page: ie,
        class: `${e}-item-after-jump-prev`,
        active: !1,
        showTitle: this.showTitle,
        itemRender: c
      }, null), w.unshift(T)), I - x >= F * 2 && x !== I - 2 && (w[w.length - 1] = h(ts, {
        locale: r,
        rootPrefixCls: e,
        onClick: this.handleChange,
        onKeypress: this.runIfEnter,
        key: re,
        page: re,
        class: `${e}-item-before-jump-next`,
        active: !1,
        showTitle: this.showTitle,
        itemRender: c
      }, null), w.push(M)), ie !== 1 && w.unshift(R), re !== I && w.push(N);
    }
    let W = null;
    s && (W = h("li", {
      class: `${e}-total-text`
    }, [s(o, [o === 0 ? 0 : (x - 1) * S + 1, x * S > o ? o : x * S])]));
    const K = !j || !I, q = !Z || !I, U = this.buildOptionText || this.$slots.buildOptionText;
    return h("ul", Q(Q({
      unselectable: "on",
      ref: "paginationNode"
    }, $), {}, {
      class: Me({
        [`${e}`]: !0,
        [`${e}-disabled`]: t
      }, P)
    }), [W, h("li", {
      title: l ? r.prev_page : null,
      onClick: this.prev,
      tabindex: K ? null : 0,
      onKeypress: this.runIfEnterPrev,
      class: Me(`${e}-prev`, {
        [`${e}-disabled`]: K
      }),
      "aria-disabled": K
    }, [this.renderPrev(A)]), w, h("li", {
      title: l ? r.next_page : null,
      onClick: this.next,
      tabindex: q ? null : 0,
      onKeypress: this.runIfEnterNext,
      class: Me(`${e}-next`, {
        [`${e}-disabled`]: q
      }),
      "aria-disabled": q
    }, [this.renderNext(G)]), h(MX, {
      disabled: t,
      locale: r,
      rootPrefixCls: e,
      selectComponentClass: v,
      selectPrefixCls: g,
      changeSize: this.getShowSizeChanger() ? this.changePageSize : null,
      current: x,
      pageSize: S,
      pageSizeOptions: m,
      buildOptionText: U || null,
      quickGo: this.shouldDisplayQuickJumper() ? this.handleChange : null,
      goButton: L
    }, null)]);
  }
}), zX = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-disabled`]: {
      "&, &:hover": {
        cursor: "not-allowed",
        [`${t}-item-link`]: {
          color: e.colorTextDisabled,
          cursor: "not-allowed"
        }
      },
      "&:focus-visible": {
        cursor: "not-allowed",
        [`${t}-item-link`]: {
          color: e.colorTextDisabled,
          cursor: "not-allowed"
        }
      }
    },
    [`&${t}-disabled`]: {
      cursor: "not-allowed",
      [`&${t}-mini`]: {
        [`
          &:hover ${t}-item:not(${t}-item-active),
          &:active ${t}-item:not(${t}-item-active),
          &:hover ${t}-item-link,
          &:active ${t}-item-link
        `]: {
          backgroundColor: "transparent"
        }
      },
      [`${t}-item`]: {
        cursor: "not-allowed",
        "&:hover, &:active": {
          backgroundColor: "transparent"
        },
        a: {
          color: e.colorTextDisabled,
          backgroundColor: "transparent",
          border: "none",
          cursor: "not-allowed"
        },
        "&-active": {
          borderColor: e.colorBorder,
          backgroundColor: e.paginationItemDisabledBgActive,
          "&:hover, &:active": {
            backgroundColor: e.paginationItemDisabledBgActive
          },
          a: {
            color: e.paginationItemDisabledColorActive
          }
        }
      },
      [`${t}-item-link`]: {
        color: e.colorTextDisabled,
        cursor: "not-allowed",
        "&:hover, &:active": {
          backgroundColor: "transparent"
        },
        [`${t}-simple&`]: {
          backgroundColor: "transparent",
          "&:hover, &:active": {
            backgroundColor: "transparent"
          }
        }
      },
      [`${t}-simple-pager`]: {
        color: e.colorTextDisabled
      },
      [`${t}-jump-prev, ${t}-jump-next`]: {
        [`${t}-item-link-icon`]: {
          opacity: 0
        },
        [`${t}-item-ellipsis`]: {
          opacity: 1
        }
      }
    },
    [`&${t}-simple`]: {
      [`${t}-prev, ${t}-next`]: {
        [`&${t}-disabled ${t}-item-link`]: {
          "&:hover, &:active": {
            backgroundColor: "transparent"
          }
        }
      }
    }
  };
}, FX = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`&${t}-mini ${t}-total-text, &${t}-mini ${t}-simple-pager`]: {
      height: e.paginationItemSizeSM,
      lineHeight: `${e.paginationItemSizeSM}px`
    },
    [`&${t}-mini ${t}-item`]: {
      minWidth: e.paginationItemSizeSM,
      height: e.paginationItemSizeSM,
      margin: 0,
      lineHeight: `${e.paginationItemSizeSM - 2}px`
    },
    [`&${t}-mini ${t}-item:not(${t}-item-active)`]: {
      backgroundColor: "transparent",
      borderColor: "transparent",
      "&:hover": {
        backgroundColor: e.colorBgTextHover
      },
      "&:active": {
        backgroundColor: e.colorBgTextActive
      }
    },
    [`&${t}-mini ${t}-prev, &${t}-mini ${t}-next`]: {
      minWidth: e.paginationItemSizeSM,
      height: e.paginationItemSizeSM,
      margin: 0,
      lineHeight: `${e.paginationItemSizeSM}px`,
      [`&:hover ${t}-item-link`]: {
        backgroundColor: e.colorBgTextHover
      },
      [`&:active ${t}-item-link`]: {
        backgroundColor: e.colorBgTextActive
      },
      [`&${t}-disabled:hover ${t}-item-link`]: {
        backgroundColor: "transparent"
      }
    },
    [`
    &${t}-mini ${t}-prev ${t}-item-link,
    &${t}-mini ${t}-next ${t}-item-link
    `]: {
      backgroundColor: "transparent",
      borderColor: "transparent",
      "&::after": {
        height: e.paginationItemSizeSM,
        lineHeight: `${e.paginationItemSizeSM}px`
      }
    },
    [`&${t}-mini ${t}-jump-prev, &${t}-mini ${t}-jump-next`]: {
      height: e.paginationItemSizeSM,
      marginInlineEnd: 0,
      lineHeight: `${e.paginationItemSizeSM}px`
    },
    [`&${t}-mini ${t}-options`]: {
      marginInlineStart: e.paginationMiniOptionsMarginInlineStart,
      "&-size-changer": {
        top: e.paginationMiniOptionsSizeChangerTop
      },
      "&-quick-jumper": {
        height: e.paginationItemSizeSM,
        lineHeight: `${e.paginationItemSizeSM}px`,
        input: O(O({}, Z0(e)), {
          width: e.paginationMiniQuickJumperInputWidth,
          height: e.controlHeightSM
        })
      }
    }
  };
}, BX = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`
    &${t}-simple ${t}-prev,
    &${t}-simple ${t}-next
    `]: {
      height: e.paginationItemSizeSM,
      lineHeight: `${e.paginationItemSizeSM}px`,
      verticalAlign: "top",
      [`${t}-item-link`]: {
        height: e.paginationItemSizeSM,
        backgroundColor: "transparent",
        border: 0,
        "&:hover": {
          backgroundColor: e.colorBgTextHover
        },
        "&:active": {
          backgroundColor: e.colorBgTextActive
        },
        "&::after": {
          height: e.paginationItemSizeSM,
          lineHeight: `${e.paginationItemSizeSM}px`
        }
      }
    },
    [`&${t}-simple ${t}-simple-pager`]: {
      display: "inline-block",
      height: e.paginationItemSizeSM,
      marginInlineEnd: e.marginXS,
      input: {
        boxSizing: "border-box",
        height: "100%",
        marginInlineEnd: e.marginXS,
        padding: `0 ${e.paginationItemPaddingInline}px`,
        textAlign: "center",
        backgroundColor: e.paginationItemInputBg,
        border: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,
        borderRadius: e.borderRadius,
        outline: "none",
        transition: `border-color ${e.motionDurationMid}`,
        color: "inherit",
        "&:hover": {
          borderColor: e.colorPrimary
        },
        "&:focus": {
          borderColor: e.colorPrimaryHover,
          boxShadow: `${e.inputOutlineOffset}px 0 ${e.controlOutlineWidth}px ${e.controlOutline}`
        },
        "&[disabled]": {
          color: e.colorTextDisabled,
          backgroundColor: e.colorBgContainerDisabled,
          borderColor: e.colorBorder,
          cursor: "not-allowed"
        }
      }
    }
  };
}, LX = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-jump-prev, ${t}-jump-next`]: {
      outline: 0,
      [`${t}-item-container`]: {
        position: "relative",
        [`${t}-item-link-icon`]: {
          color: e.colorPrimary,
          fontSize: e.fontSizeSM,
          opacity: 0,
          transition: `all ${e.motionDurationMid}`,
          "&-svg": {
            top: 0,
            insetInlineEnd: 0,
            bottom: 0,
            insetInlineStart: 0,
            margin: "auto"
          }
        },
        [`${t}-item-ellipsis`]: {
          position: "absolute",
          top: 0,
          insetInlineEnd: 0,
          bottom: 0,
          insetInlineStart: 0,
          display: "block",
          margin: "auto",
          color: e.colorTextDisabled,
          fontFamily: "Arial, Helvetica, sans-serif",
          letterSpacing: e.paginationEllipsisLetterSpacing,
          textAlign: "center",
          textIndent: e.paginationEllipsisTextIndent,
          opacity: 1,
          transition: `all ${e.motionDurationMid}`
        }
      },
      "&:hover": {
        [`${t}-item-link-icon`]: {
          opacity: 1
        },
        [`${t}-item-ellipsis`]: {
          opacity: 0
        }
      },
      "&:focus-visible": O({
        [`${t}-item-link-icon`]: {
          opacity: 1
        },
        [`${t}-item-ellipsis`]: {
          opacity: 0
        }
      }, Wa(e))
    },
    [`
    ${t}-prev,
    ${t}-jump-prev,
    ${t}-jump-next
    `]: {
      marginInlineEnd: e.marginXS
    },
    [`
    ${t}-prev,
    ${t}-next,
    ${t}-jump-prev,
    ${t}-jump-next
    `]: {
      display: "inline-block",
      minWidth: e.paginationItemSize,
      height: e.paginationItemSize,
      color: e.colorText,
      fontFamily: e.paginationFontFamily,
      lineHeight: `${e.paginationItemSize}px`,
      textAlign: "center",
      verticalAlign: "middle",
      listStyle: "none",
      borderRadius: e.borderRadius,
      cursor: "pointer",
      transition: `all ${e.motionDurationMid}`
    },
    [`${t}-prev, ${t}-next`]: {
      fontFamily: "Arial, Helvetica, sans-serif",
      outline: 0,
      button: {
        color: e.colorText,
        cursor: "pointer",
        userSelect: "none"
      },
      [`${t}-item-link`]: {
        display: "block",
        width: "100%",
        height: "100%",
        padding: 0,
        fontSize: e.fontSizeSM,
        textAlign: "center",
        backgroundColor: "transparent",
        border: `${e.lineWidth}px ${e.lineType} transparent`,
        borderRadius: e.borderRadius,
        outline: "none",
        transition: `all ${e.motionDurationMid}`
      },
      [`&:focus-visible ${t}-item-link`]: O({}, Wa(e)),
      [`&:hover ${t}-item-link`]: {
        backgroundColor: e.colorBgTextHover
      },
      [`&:active ${t}-item-link`]: {
        backgroundColor: e.colorBgTextActive
      },
      [`&${t}-disabled:hover`]: {
        [`${t}-item-link`]: {
          backgroundColor: "transparent"
        }
      }
    },
    [`${t}-slash`]: {
      marginInlineEnd: e.paginationSlashMarginInlineEnd,
      marginInlineStart: e.paginationSlashMarginInlineStart
    },
    [`${t}-options`]: {
      display: "inline-block",
      marginInlineStart: e.margin,
      verticalAlign: "middle",
      "&-size-changer.-select": {
        display: "inline-block",
        width: "auto"
      },
      "&-quick-jumper": {
        display: "inline-block",
        height: e.controlHeight,
        marginInlineStart: e.marginXS,
        lineHeight: `${e.controlHeight}px`,
        verticalAlign: "top",
        input: O(O({}, hc(e)), {
          width: e.controlHeightLG * 1.25,
          height: e.controlHeight,
          boxSizing: "border-box",
          margin: 0,
          marginInlineStart: e.marginXS,
          marginInlineEnd: e.marginXS
        })
      }
    }
  };
}, HX = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-item`]: O(O({
      display: "inline-block",
      minWidth: e.paginationItemSize,
      height: e.paginationItemSize,
      marginInlineEnd: e.marginXS,
      fontFamily: e.paginationFontFamily,
      lineHeight: `${e.paginationItemSize - 2}px`,
      textAlign: "center",
      verticalAlign: "middle",
      listStyle: "none",
      backgroundColor: "transparent",
      border: `${e.lineWidth}px ${e.lineType} transparent`,
      borderRadius: e.borderRadius,
      outline: 0,
      cursor: "pointer",
      userSelect: "none",
      a: {
        display: "block",
        padding: `0 ${e.paginationItemPaddingInline}px`,
        color: e.colorText,
        transition: "none",
        "&:hover": {
          textDecoration: "none"
        }
      },
      [`&:not(${t}-item-active)`]: {
        "&:hover": {
          transition: `all ${e.motionDurationMid}`,
          backgroundColor: e.colorBgTextHover
        },
        "&:active": {
          backgroundColor: e.colorBgTextActive
        }
      }
    }, Nl(e)), {
      "&-active": {
        fontWeight: e.paginationFontWeightActive,
        backgroundColor: e.paginationItemBgActive,
        borderColor: e.colorPrimary,
        a: {
          color: e.colorPrimary
        },
        "&:hover": {
          borderColor: e.colorPrimaryHover
        },
        "&:hover a": {
          color: e.colorPrimaryHover
        }
      }
    })
  };
}, VX = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [t]: O(O(O(O(O(O(O(O({}, fn(e)), {
      "ul, ol": {
        margin: 0,
        padding: 0,
        listStyle: "none"
      },
      "&::after": {
        display: "block",
        clear: "both",
        height: 0,
        overflow: "hidden",
        visibility: "hidden",
        content: '""'
      },
      [`${t}-total-text`]: {
        display: "inline-block",
        height: e.paginationItemSize,
        marginInlineEnd: e.marginXS,
        lineHeight: `${e.paginationItemSize - 2}px`,
        verticalAlign: "middle"
      }
    }), HX(e)), LX(e)), BX(e)), FX(e)), zX(e)), {
      // media query style
      [`@media only screen and (max-width: ${e.screenLG}px)`]: {
        [`${t}-item`]: {
          "&-after-jump-prev, &-before-jump-next": {
            display: "none"
          }
        }
      },
      [`@media only screen and (max-width: ${e.screenSM}px)`]: {
        [`${t}-options`]: {
          display: "none"
        }
      }
    }),
    // rtl style
    [`&${e.componentCls}-rtl`]: {
      direction: "rtl"
    }
  };
}, jX = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}${t}-disabled`]: {
      "&, &:hover": {
        [`${t}-item-link`]: {
          borderColor: e.colorBorder
        }
      },
      "&:focus-visible": {
        [`${t}-item-link`]: {
          borderColor: e.colorBorder
        }
      },
      [`${t}-item, ${t}-item-link`]: {
        backgroundColor: e.colorBgContainerDisabled,
        borderColor: e.colorBorder,
        [`&:hover:not(${t}-item-active)`]: {
          backgroundColor: e.colorBgContainerDisabled,
          borderColor: e.colorBorder,
          a: {
            color: e.colorTextDisabled
          }
        },
        [`&${t}-item-active`]: {
          backgroundColor: e.paginationItemDisabledBgActive
        }
      },
      [`${t}-prev, ${t}-next`]: {
        "&:hover button": {
          backgroundColor: e.colorBgContainerDisabled,
          borderColor: e.colorBorder,
          color: e.colorTextDisabled
        },
        [`${t}-item-link`]: {
          backgroundColor: e.colorBgContainerDisabled,
          borderColor: e.colorBorder
        }
      }
    },
    [t]: {
      [`${t}-prev, ${t}-next`]: {
        "&:hover button": {
          borderColor: e.colorPrimaryHover,
          backgroundColor: e.paginationItemBg
        },
        [`${t}-item-link`]: {
          backgroundColor: e.paginationItemLinkBg,
          borderColor: e.colorBorder
        },
        [`&:hover ${t}-item-link`]: {
          borderColor: e.colorPrimary,
          backgroundColor: e.paginationItemBg,
          color: e.colorPrimary
        },
        [`&${t}-disabled`]: {
          [`${t}-item-link`]: {
            borderColor: e.colorBorder,
            color: e.colorTextDisabled
          }
        }
      },
      [`${t}-item`]: {
        backgroundColor: e.paginationItemBg,
        border: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,
        [`&:hover:not(${t}-item-active)`]: {
          borderColor: e.colorPrimary,
          backgroundColor: e.paginationItemBg,
          a: {
            color: e.colorPrimary
          }
        },
        "&-active": {
          borderColor: e.colorPrimary
        }
      }
    }
  };
}, WX = On("Pagination", (e) => {
  const t = Qt(e, {
    paginationItemSize: e.controlHeight,
    paginationFontFamily: e.fontFamily,
    paginationItemBg: e.colorBgContainer,
    paginationItemBgActive: e.colorBgContainer,
    paginationFontWeightActive: e.fontWeightStrong,
    paginationItemSizeSM: e.controlHeightSM,
    paginationItemInputBg: e.colorBgContainer,
    paginationMiniOptionsSizeChangerTop: 0,
    paginationItemDisabledBgActive: e.controlItemBgActiveDisabled,
    paginationItemDisabledColorActive: e.colorTextDisabled,
    paginationItemLinkBg: e.colorBgContainer,
    inputOutlineOffset: "0 0",
    paginationMiniOptionsMarginInlineStart: e.marginXXS / 2,
    paginationMiniQuickJumperInputWidth: e.controlHeightLG * 1.1,
    paginationItemPaddingInline: e.marginXXS * 1.5,
    paginationEllipsisLetterSpacing: e.marginXXS / 2,
    paginationSlashMarginInlineStart: e.marginXXS,
    paginationSlashMarginInlineEnd: e.marginSM,
    paginationEllipsisTextIndent: "0.13em"
    // magic for ui experience
  }, Qh(e));
  return [VX(t), e.wireframe && jX(t)];
});
var KX = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const qX = () => ({
  total: Number,
  defaultCurrent: Number,
  disabled: ct(),
  current: Number,
  defaultPageSize: Number,
  pageSize: Number,
  hideOnSinglePage: ct(),
  showSizeChanger: ct(),
  pageSizeOptions: jn(),
  buildOptionText: et(),
  showQuickJumper: en([Boolean, Object]),
  showTotal: et(),
  size: rn(),
  simple: ct(),
  locale: Object,
  prefixCls: String,
  selectPrefixCls: String,
  totalBoundaryShowSizeChanger: Number,
  selectComponentClass: String,
  itemRender: et(),
  role: String,
  responsive: Boolean,
  showLessItems: ct(),
  onChange: et(),
  onShowSizeChange: et(),
  "onUpdate:current": et(),
  "onUpdate:pageSize": et()
}), YX = be({
  compatConfig: {
    MODE: 3
  },
  name: "APagination",
  inheritAttrs: !1,
  props: qX(),
  // emits: ['change', 'showSizeChange', 'update:current', 'update:pageSize'],
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: r,
      configProvider: i,
      direction: a,
      size: l
    } = Nt("pagination", e), [s, u] = WX(r), c = E(() => i.getPrefixCls("select", e.selectPrefixCls)), d = IT(), [f] = Rl("Pagination", Qk, Kt(e, "locale")), p = (v) => {
      const g = h("span", {
        class: `${v}-item-ellipsis`
      }, [Le("•••")]), m = h("button", {
        class: `${v}-item-link`,
        type: "button",
        tabindex: -1
      }, [a.value === "rtl" ? h(Es, null, null) : h(Gp, null, null)]), x = h("button", {
        class: `${v}-item-link`,
        type: "button",
        tabindex: -1
      }, [a.value === "rtl" ? h(Gp, null, null) : h(Es, null, null)]), S = h("a", {
        rel: "nofollow",
        class: `${v}-item-link`
      }, [h("div", {
        class: `${v}-item-container`
      }, [a.value === "rtl" ? h(Zp, {
        class: `${v}-item-link-icon`
      }, null) : h(Qp, {
        class: `${v}-item-link-icon`
      }, null), g])]), C = h("a", {
        rel: "nofollow",
        class: `${v}-item-link`
      }, [h("div", {
        class: `${v}-item-container`
      }, [a.value === "rtl" ? h(Qp, {
        class: `${v}-item-link-icon`
      }, null) : h(Zp, {
        class: `${v}-item-link-icon`
      }, null), g])]);
      return {
        prevIcon: m,
        nextIcon: x,
        jumpPrevIcon: S,
        jumpNextIcon: C
      };
    };
    return () => {
      var v;
      const {
        itemRender: g = n.itemRender,
        buildOptionText: m = n.buildOptionText,
        selectComponentClass: x,
        responsive: S
      } = e, C = KX(e, ["itemRender", "buildOptionText", "selectComponentClass", "responsive"]), P = l.value === "small" || !!(!((v = d.value) === null || v === void 0) && v.xs && !l.value && S), $ = O(O(O(O(O({}, C), p(r.value)), {
        prefixCls: r.value,
        selectPrefixCls: c.value,
        selectComponentClass: x || (P ? TX : _X),
        locale: f.value,
        buildOptionText: m
      }), o), {
        class: Me({
          [`${r.value}-mini`]: P,
          [`${r.value}-rtl`]: a.value === "rtl"
        }, o.class, u.value),
        itemRender: g
      });
      return s(h(RX, $, null));
    };
  }
}), GX = ii(YX);
var UX = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
let Eb;
const XX = (e) => {
  Eb = {
    x: e.pageX,
    y: e.pageY
  }, setTimeout(() => Eb = null, 100);
};
tM() && Ho(document.documentElement, "click", XX, !0);
const QX = () => ({
  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: pe.any,
  closable: {
    type: Boolean,
    default: void 0
  },
  closeIcon: pe.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: pe.any,
  okText: pe.any,
  okType: String,
  cancelText: pe.any,
  icon: pe.any,
  maskClosable: {
    type: Boolean,
    default: void 0
  },
  forceRender: {
    type: Boolean,
    default: void 0
  },
  okButtonProps: Mt(),
  cancelButtonProps: Mt(),
  destroyOnClose: {
    type: Boolean,
    default: void 0
  },
  wrapClassName: String,
  maskTransitionName: String,
  transitionName: String,
  getContainer: {
    type: [String, Function, Boolean, Object],
    default: void 0
  },
  zIndex: Number,
  bodyStyle: Mt(),
  maskStyle: Mt(),
  mask: {
    type: Boolean,
    default: void 0
  },
  keyboard: {
    type: Boolean,
    default: void 0
  },
  wrapProps: Object,
  focusTriggerAfterClose: {
    type: Boolean,
    default: void 0
  },
  modalRender: Function,
  mousePosition: Mt()
}), Go = be({
  compatConfig: {
    MODE: 3
  },
  name: "AModal",
  inheritAttrs: !1,
  props: Mn(QX(), {
    width: 520,
    confirmLoading: !1,
    okType: "primary"
  }),
  setup(e, t) {
    let {
      emit: n,
      slots: o,
      attrs: r
    } = t;
    const [i] = Rl("Modal"), {
      prefixCls: a,
      rootPrefixCls: l,
      direction: s,
      getPopupContainer: u
    } = Nt("modal", e), [c, d] = eX(a);
    wo(e.visible === void 0, "Modal", "`visible` will be removed in next major version, please use `open` instead.");
    const f = (g) => {
      n("update:visible", !1), n("update:open", !1), n("cancel", g), n("change", !1);
    }, p = (g) => {
      n("ok", g);
    }, v = () => {
      var g, m;
      const {
        okText: x = (g = o.okText) === null || g === void 0 ? void 0 : g.call(o),
        okType: S,
        cancelText: C = (m = o.cancelText) === null || m === void 0 ? void 0 : m.call(o),
        confirmLoading: P
      } = e;
      return h(Je, null, [h(Ft, Q({
        onClick: f
      }, e.cancelButtonProps), {
        default: () => [C || i.value.cancelText]
      }), h(Ft, Q(Q({}, FT(S)), {}, {
        loading: P,
        onClick: p
      }, e.okButtonProps), {
        default: () => [x || i.value.okText]
      })]);
    };
    return () => {
      var g, m;
      const {
        prefixCls: x,
        visible: S,
        open: C,
        wrapClassName: P,
        centered: $,
        getContainer: I,
        closeIcon: w = (g = o.closeIcon) === null || g === void 0 ? void 0 : g.call(o),
        focusTriggerAfterClose: T = !0
      } = e, M = UX(e, ["prefixCls", "visible", "open", "wrapClassName", "centered", "getContainer", "closeIcon", "focusTriggerAfterClose"]), R = Me(P, {
        [`${a.value}-centered`]: !!$,
        [`${a.value}-wrap-rtl`]: s.value === "rtl"
      });
      return c(h(GU, Q(Q(Q({}, M), r), {}, {
        rootClassName: d.value,
        class: Me(d.value, r.class),
        getContainer: I || u?.value,
        prefixCls: a.value,
        wrapClassName: R,
        visible: C ?? S,
        onClose: f,
        focusTriggerAfterClose: T,
        transitionName: Ka(l.value, "zoom", e.transitionName),
        maskTransitionName: Ka(l.value, "fade", e.maskTransitionName),
        mousePosition: (m = M.mousePosition) !== null && m !== void 0 ? m : Eb
      }), O(O({}, o), {
        footer: o.footer || v,
        closeIcon: () => h("span", {
          class: `${a.value}-close-x`
        }, [w || h(la, {
          class: `${a.value}-close-icon`
        }, null)])
      })));
    };
  }
}), ZX = () => {
  const e = $e(!1);
  return qt(() => {
    e.value = !0;
  }), e;
}, JX = {
  type: {
    type: String
  },
  actionFn: Function,
  close: Function,
  autofocus: Boolean,
  prefixCls: String,
  buttonProps: Mt(),
  emitEvent: Boolean,
  quitOnNullishReturnValue: Boolean
};
function JC(e) {
  return !!(e && e.then);
}
const e$ = be({
  compatConfig: {
    MODE: 3
  },
  name: "ActionButton",
  props: JX,
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = $e(!1), r = $e(), i = $e(!1);
    let a;
    const l = ZX();
    At(() => {
      e.autofocus && (a = setTimeout(() => {
        var d, f;
        return (f = (d = Qi(r.value)) === null || d === void 0 ? void 0 : d.focus) === null || f === void 0 ? void 0 : f.call(d);
      }));
    }), qt(() => {
      clearTimeout(a);
    });
    const s = function() {
      for (var d, f = arguments.length, p = new Array(f), v = 0; v < f; v++)
        p[v] = arguments[v];
      (d = e.close) === null || d === void 0 || d.call(e, ...p);
    }, u = (d) => {
      JC(d) && (i.value = !0, d.then(function() {
        l.value || (i.value = !1), s(...arguments), o.value = !1;
      }, (f) => (l.value || (i.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 && !JC(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 h(Ft, Q(Q(Q({}, FT(d)), {}, {
        onClick: c,
        loading: i.value,
        prefixCls: f
      }, p), {}, {
        ref: r
      }), n);
    };
  }
});
function uu(e) {
  return typeof e == "function" ? e() : e;
}
const t2 = be({
  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] = Rl("Modal");
    return process.env.NODE_ENV !== "production" && wo(e.visible === void 0, "Modal", "`visible` is deprecated, please use `open` instead."), () => {
      const {
        icon: r,
        onCancel: i,
        onOk: a,
        close: l,
        okText: s,
        closable: u = !1,
        zIndex: c,
        afterClose: d,
        keyboard: f,
        centered: p,
        getContainer: v,
        maskStyle: g,
        okButtonProps: m,
        cancelButtonProps: x,
        okCancel: S,
        width: C = 416,
        mask: P = !0,
        maskClosable: $ = !1,
        type: I,
        open: w,
        title: T,
        content: M,
        direction: R,
        closeIcon: N,
        modalRender: H,
        focusTriggerAfterClose: L,
        rootPrefixCls: F,
        bodyStyle: A,
        wrapClassName: G,
        footer: j
      } = e;
      let Z = r;
      if (!r && r !== null)
        switch (I) {
          case "info":
            Z = h(Hs, null, null);
            break;
          case "success":
            Z = h(Fl, null, null);
            break;
          case "error":
            Z = h(Fr, null, null);
            break;
          default:
            Z = h(Bl, null, null);
        }
      const W = e.okType || "primary", K = e.prefixCls || "ant-modal", q = `${K}-confirm`, U = n.style || {}, ae = S ?? I === "confirm", se = e.autoFocusButton === null ? !1 : e.autoFocusButton || "ok", ie = `${K}-confirm`, re = Me(ie, `${ie}-${e.type}`, {
        [`${ie}-rtl`]: R === "rtl"
      }, n.class), te = o.value, ve = ae && h(e$, {
        actionFn: i,
        close: l,
        autofocus: se === "cancel",
        buttonProps: x,
        prefixCls: `${F}-btn`
      }, {
        default: () => [uu(e.cancelText) || te.cancelText]
      });
      return h(Go, {
        prefixCls: K,
        class: re,
        wrapClassName: Me({
          [`${ie}-centered`]: !!p
        }, G),
        onCancel: (ce) => l?.({
          triggerCancel: !0
        }, ce),
        open: w,
        title: "",
        footer: "",
        transitionName: Ka(F, "zoom", e.transitionName),
        maskTransitionName: Ka(F, "fade", e.maskTransitionName),
        mask: P,
        maskClosable: $,
        maskStyle: g,
        style: U,
        bodyStyle: A,
        width: C,
        zIndex: c,
        afterClose: d,
        keyboard: f,
        centered: p,
        getContainer: v,
        closable: u,
        closeIcon: N,
        modalRender: H,
        focusTriggerAfterClose: L
      }, {
        default: () => [h("div", {
          class: `${q}-body-wrapper`
        }, [h("div", {
          class: `${q}-body`
        }, [uu(Z), T === void 0 ? null : h("span", {
          class: `${q}-title`
        }, [uu(T)]), h("div", {
          class: `${q}-content`
        }, [uu(M)])]), j !== void 0 ? uu(j) : h("div", {
          class: `${q}-btns`
        }, [ve, h(e$, {
          type: W,
          actionFn: a,
          close: l,
          autofocus: se === "ok",
          buttonProps: m,
          prefixCls: `${F}-btn`
        }, {
          default: () => [uu(s) || (ae ? te.okText : te.justOkText)]
        })])])]
      });
    };
  }
}), bs = [], Yd = (e) => {
  const t = document.createDocumentFragment();
  let n = O(O({}, Fn(e, ["parentContext", "appContext"])), {
    close: i,
    open: !0
  }), o = null;
  function r() {
    o && (El(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 < bs.length; p++)
      if (bs[p] === i) {
        bs.splice(p, 1);
        break;
      }
  }
  function i() {
    for (var u = arguments.length, c = new Array(u), d = 0; d < u; d++)
      c[d] = arguments[d];
    n = O(O({}, n), {
      open: !1,
      afterClose: () => {
        typeof e.afterClose == "function" && e.afterClose(), r.apply(this, c);
      }
    }), n.visible && delete n.visible, a(n);
  }
  function a(u) {
    typeof u == "function" ? n = u(n) : n = O(O({}, n), u), o && f5(o, n, t);
  }
  const l = (u) => {
    const c = Ko, d = c.prefixCls, f = u.prefixCls || `${d}-modal`, p = c.iconPrefixCls, v = DY();
    return h(Fa, Q(Q({}, c), {}, {
      prefixCls: d
    }), {
      default: () => [h(t2, Q(Q({}, u), {}, {
        rootPrefixCls: d,
        prefixCls: f,
        iconPrefixCls: p,
        locale: v,
        cancelText: u.cancelText || v.cancelText
      }), null)]
    });
  };
  function s(u) {
    const c = h(l, O({}, u));
    return c.appContext = e.parentContext || e.appContext || c.appContext, El(c, t), c;
  }
  return o = s(n), bs.push(i), {
    destroy: i,
    update: a
  };
};
function n2(e) {
  return O(O({}, e), {
    type: "warning"
  });
}
function o2(e) {
  return O(O({}, e), {
    type: "info"
  });
}
function r2(e) {
  return O(O({}, e), {
    type: "success"
  });
}
function i2(e) {
  return O(O({}, e), {
    type: "error"
  });
}
function a2(e) {
  return O(O({}, e), {
    type: "confirm"
  });
}
const eQ = () => ({
  config: Object,
  afterClose: Function,
  destroyAction: Function,
  open: Boolean
}), tQ = be({
  name: "HookModal",
  inheritAttrs: !1,
  props: Mn(eQ(), {
    config: {
      width: 520,
      okType: "primary"
    }
  }),
  setup(e, t) {
    let {
      expose: n
    } = t;
    var o;
    const r = E(() => e.open), i = E(() => e.config), {
      direction: a,
      getPrefixCls: l
    } = kh(), s = l("modal"), u = l(), c = () => {
      var v, g;
      e?.afterClose(), (g = (v = i.value).afterClose) === null || g === void 0 || g.call(v);
    }, d = function() {
      e.destroyAction(...arguments);
    };
    n({
      destroy: d
    });
    const f = (o = i.value.okCancel) !== null && o !== void 0 ? o : i.value.type === "confirm", [p] = Rl("Modal", La.Modal);
    return () => h(t2, Q(Q({
      prefixCls: s,
      rootPrefixCls: u
    }, i.value), {}, {
      close: d,
      open: r.value,
      afterClose: c,
      okText: i.value.okText || (f ? p?.value.okText : p?.value.justOkText),
      direction: i.value.direction || a.value,
      cancelText: i.value.cancelText || p?.value.cancelText
    }), null);
  }
});
let t$ = 0;
const nQ = be({
  name: "ElementsHolder",
  inheritAttrs: !1,
  setup(e, t) {
    let {
      expose: n
    } = t;
    const o = $e([]);
    return n({
      addModal: (i) => (o.value.push(i), o.value = o.value.slice(), () => {
        o.value = o.value.filter((a) => a !== i);
      })
    }), () => o.value.map((i) => i());
  }
});
function l2() {
  const e = $e(null), t = $e([]);
  Ie(t, () => {
    t.value.length && ([...t.value].forEach((a) => {
      a();
    }), t.value = []);
  }, {
    immediate: !0
  });
  const n = (i) => function(l) {
    var s;
    t$ += 1;
    const u = $e(!0), c = $e(null), d = $e(_(l)), f = $e({});
    Ie(() => l, (C) => {
      m(O(O({}, DP(C) ? C.value : C), f.value));
    });
    const p = function() {
      u.value = !1;
      for (var C = arguments.length, P = new Array(C), $ = 0; $ < C; $++)
        P[$] = arguments[$];
      const I = P.some((w) => w && w.triggerCancel);
      d.value.onCancel && I && d.value.onCancel(() => {
      }, ...P.slice(1));
    };
    let v;
    const g = () => h(tQ, {
      key: `modal-${t$}`,
      config: i(d.value),
      ref: c,
      open: u.value,
      destroyAction: p,
      afterClose: () => {
        v?.();
      }
    }, null);
    v = (s = e.value) === null || s === void 0 ? void 0 : s.addModal(g), v && bs.push(v);
    const m = (C) => {
      d.value = O(O({}, d.value), C);
    };
    return {
      destroy: () => {
        c.value ? p() : t.value = [...t.value, p];
      },
      update: (C) => {
        f.value = C, c.value ? m(C) : t.value = [...t.value, () => m(C)];
      }
    };
  }, o = E(() => ({
    info: n(o2),
    success: n(r2),
    error: n(i2),
    warning: n(n2),
    confirm: n(a2)
  })), r = Symbol("modalHolderKey");
  return [o.value, () => h(nQ, {
    key: r,
    ref: e
  }, null)];
}
function s2(e) {
  return Yd(n2(e));
}
Go.useModal = l2;
Go.info = function(t) {
  return Yd(o2(t));
};
Go.success = function(t) {
  return Yd(r2(t));
};
Go.error = function(t) {
  return Yd(i2(t));
};
Go.warning = s2;
Go.warn = s2;
Go.confirm = function(t) {
  return Yd(a2(t));
};
Go.destroyAll = function() {
  for (; bs.length; ) {
    const t = bs.pop();
    t && t();
  }
};
Go.install = function(e) {
  return e.component(Go.name, Go), e;
};
const oQ = {
  small: 8,
  middle: 16,
  large: 24
}, rQ = () => ({
  prefixCls: String,
  size: {
    type: [String, Number, Array]
  },
  direction: pe.oneOf(Ti("horizontal", "vertical")).def("horizontal"),
  align: pe.oneOf(Ti("start", "end", "center", "baseline")),
  wrap: ct()
});
function iQ(e) {
  return typeof e == "string" ? oQ[e] : e || 0;
}
const Ji = be({
  compatConfig: {
    MODE: 3
  },
  name: "ASpace",
  inheritAttrs: !1,
  props: rQ(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: r,
      space: i,
      direction: a
    } = Nt("space", e), [l, s] = PT(r), u = oM(), c = E(() => {
      var x, S, C;
      return (C = (x = e.size) !== null && x !== void 0 ? x : (S = i?.value) === null || S === void 0 ? void 0 : S.size) !== null && C !== void 0 ? C : "small";
    }), d = le(), f = le();
    Ie(c, () => {
      [d.value, f.value] = (Array.isArray(c.value) ? c.value : [c.value, c.value]).map((x) => iQ(x));
    }, {
      immediate: !0
    });
    const p = E(() => e.align === void 0 && e.direction === "horizontal" ? "center" : e.align), v = E(() => Me(r.value, s.value, `${r.value}-${e.direction}`, {
      [`${r.value}-rtl`]: a.value === "rtl",
      [`${r.value}-align-${p.value}`]: p.value
    })), g = E(() => a.value === "rtl" ? "marginLeft" : "marginRight"), m = E(() => {
      const x = {};
      return u.value && (x.columnGap = `${d.value}px`, x.rowGap = `${f.value}px`), O(O({}, x), e.wrap && {
        flexWrap: "wrap",
        marginBottom: `${-f.value}px`
      });
    });
    return () => {
      var x, S;
      const {
        wrap: C,
        direction: P = "horizontal"
      } = e, $ = (x = n.default) === null || x === void 0 ? void 0 : x.call(n), I = Do($), w = I.length;
      if (w === 0)
        return null;
      const T = (S = n.split) === null || S === void 0 ? void 0 : S.call(n), M = `${r.value}-item`, R = d.value, N = w - 1;
      return h("div", Q(Q({}, o), {}, {
        class: [v.value, o.class],
        style: [m.value, o.style]
      }), [I.map((H, L) => {
        let F = $.indexOf(H);
        F === -1 && (F = `$$space-${L}`);
        let A = {};
        return u.value || (P === "vertical" ? L < N && (A = {
          marginBottom: `${R / (T ? 2 : 1)}px`
        }) : A = O(O({}, L < N && {
          [g.value]: `${R / (T ? 2 : 1)}px`
        }), C && {
          paddingBottom: `${f.value}px`
        })), l(h(Je, {
          key: F
        }, [h("div", {
          class: M,
          style: A
        }, [H]), L < N && T && h("span", {
          class: `${M}-split`,
          style: A
        }, [T])]));
      })]);
    };
  }
});
Ji.Compact = Um;
Ji.install = function(e) {
  return e.component(Ji.name, Ji), e.component(Um.name, Um), e;
};
const aQ = ii(iM), Sx = (e, t) => {
  let {
    attrs: n
  } = t;
  const {
    included: o,
    vertical: r,
    style: i,
    class: a
  } = n;
  let {
    length: l,
    offset: s,
    reverse: u
  } = n;
  l < 0 && (u = !u, l = Math.abs(l), s = 100 - s);
  const c = r ? {
    [u ? "top" : "bottom"]: `${s}%`,
    [u ? "bottom" : "top"]: "auto",
    height: `${l}%`
  } : {
    [u ? "right" : "left"]: `${s}%`,
    [u ? "left" : "right"]: "auto",
    width: `${l}%`
  }, d = O(O({}, i), c);
  return o ? h("div", {
    class: a,
    style: d
  }, null) : null;
};
Sx.inheritAttrs = !1;
const lQ = (e, t, n, o, r, i) => {
  wo(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 = r; l <= i; l += o)
      a.indexOf(l) === -1 && a.push(l);
  return a;
}, u2 = (e, t) => {
  let {
    attrs: n
  } = t;
  const {
    prefixCls: o,
    vertical: r,
    reverse: i,
    marks: a,
    dots: l,
    step: s,
    included: u,
    lowerBound: c,
    upperBound: d,
    max: f,
    min: p,
    dotStyle: v,
    activeDotStyle: g
  } = n, m = f - p, x = lQ(r, a, l, s, p, f).map((S) => {
    const C = `${Math.abs(S - p) / m * 100}%`, P = !u && S === d || u && S <= d && S >= c;
    let $ = r ? O(O({}, v), {
      [i ? "top" : "bottom"]: C
    }) : O(O({}, v), {
      [i ? "right" : "left"]: C
    });
    P && ($ = O(O({}, $), g));
    const I = Me({
      [`${o}-dot`]: !0,
      [`${o}-dot-active`]: P,
      [`${o}-dot-reverse`]: i
    });
    return h("span", {
      class: I,
      style: $,
      key: S
    }, null);
  });
  return h("div", {
    class: `${o}-step`
  }, [x]);
};
u2.inheritAttrs = !1;
const c2 = (e, t) => {
  let {
    attrs: n,
    slots: o
  } = t;
  const {
    class: r,
    vertical: i,
    reverse: a,
    marks: l,
    included: s,
    upperBound: u,
    lowerBound: c,
    max: d,
    min: f,
    onClickLabel: p
  } = n, v = Object.keys(l), g = o.mark, m = d - f, x = v.map(parseFloat).sort((S, C) => S - C).map((S) => {
    const C = typeof l[S] == "function" ? l[S]() : l[S], P = typeof C == "object" && !Ao(C);
    let $ = P ? C.label : C;
    if (!$ && $ !== 0)
      return null;
    g && ($ = g({
      point: S,
      label: $
    }));
    const I = !s && S === u || s && S <= u && S >= c, w = Me({
      [`${r}-text`]: !0,
      [`${r}-text-active`]: I
    }), T = {
      marginBottom: "-50%",
      [a ? "top" : "bottom"]: `${(S - f) / m * 100}%`
    }, M = {
      transform: `translateX(${a ? "50%" : "-50%"})`,
      msTransform: `translateX(${a ? "50%" : "-50%"})`,
      [a ? "right" : "left"]: `${(S - f) / m * 100}%`
    }, R = i ? T : M, N = P ? O(O({}, R), C.style) : R, H = {
      [Bo ? "onTouchstartPassive" : "onTouchstart"]: (L) => p(L, S)
    };
    return h("span", Q({
      class: w,
      style: N,
      key: S,
      onMousedown: (L) => p(L, S)
    }, H), [$]);
  });
  return h("div", {
    class: r
  }, [x]);
};
c2.inheritAttrs = !1;
const d2 = be({
  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: pe.oneOfType([pe.number, pe.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: r
    } = t;
    const i = $e(!1), a = $e(), l = () => {
      document.activeElement === a.value && (i.value = !0);
    }, s = (m) => {
      i.value = !1, o("blur", m);
    }, u = () => {
      i.value = !1;
    }, c = () => {
      var m;
      (m = a.value) === null || m === void 0 || m.focus();
    }, d = () => {
      var m;
      (m = a.value) === null || m === void 0 || m.blur();
    }, f = () => {
      i.value = !0, c();
    }, p = (m) => {
      m.preventDefault(), c(), o("mousedown", m);
    };
    r({
      focus: c,
      blur: d,
      clickFocus: f,
      ref: a
    });
    let v = null;
    At(() => {
      v = Ho(document, "mouseup", l);
    }), qt(() => {
      v?.remove();
    });
    const g = E(() => {
      const {
        vertical: m,
        offset: x,
        reverse: S
      } = e;
      return m ? {
        [S ? "top" : "bottom"]: `${x}%`,
        [S ? "bottom" : "top"]: "auto",
        transform: S ? null : "translateY(+50%)"
      } : {
        [S ? "right" : "left"]: `${x}%`,
        [S ? "left" : "right"]: "auto",
        transform: `translateX(${S ? "+" : "-"}50%)`
      };
    });
    return () => {
      const {
        prefixCls: m,
        disabled: x,
        min: S,
        max: C,
        value: P,
        tabindex: $,
        ariaLabel: I,
        ariaLabelledBy: w,
        ariaValueTextFormatter: T,
        onMouseenter: M,
        onMouseleave: R
      } = e, N = Me(n.class, {
        [`${m}-handle-click-focused`]: i.value
      }), H = {
        "aria-valuemin": S,
        "aria-valuemax": C,
        "aria-valuenow": P,
        "aria-disabled": !!x
      }, L = [n.style, g.value];
      let F = $ || 0;
      (x || $ === null) && (F = null);
      let A;
      T && (A = T(P));
      const G = O(O(O(O({}, n), {
        role: "slider",
        tabindex: F
      }), H), {
        class: N,
        onBlur: s,
        onKeydown: u,
        onMousedown: p,
        onMouseenter: M,
        onMouseleave: R,
        ref: a,
        style: L
      });
      return h("div", Q(Q({}, G), {}, {
        "aria-label": I,
        "aria-labelledby": w,
        "aria-valuetext": A
      }), null);
    };
  }
});
function Av(e, t) {
  try {
    return Object.keys(t).some((n) => e.target === t[n].ref);
  } catch {
    return !1;
  }
}
function f2(e, t) {
  let {
    min: n,
    max: o
  } = t;
  return e < n || e > o;
}
function n$(e) {
  return e.touches.length > 1 || e.type.toLowerCase() === "touchend" && e.touches.length > 0;
}
function o$(e, t) {
  let {
    marks: n,
    step: o,
    min: r,
    max: i
  } = t;
  const a = Object.keys(n).map(parseFloat);
  if (o !== null) {
    const s = Math.pow(10, p2(o)), u = Math.floor((i * s - r * s) / (o * s)), c = Math.min((e - r) / o, u), d = Math.round(c) * o + r;
    a.push(d);
  }
  const l = a.map((s) => Math.abs(e - s));
  return a[l.indexOf(Math.min(...l))];
}
function p2(e) {
  const t = e.toString();
  let n = 0;
  return t.indexOf(".") >= 0 && (n = t.length - t.indexOf(".") - 1), n;
}
function r$(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 i$(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 a$(e, t) {
  const n = t.getBoundingClientRect();
  return e ? n.top + n.height * 0.5 : window.scrollX + n.left + n.width * 0.5;
}
function Cx(e, t) {
  let {
    max: n,
    min: o
  } = t;
  return e <= o ? o : e >= n ? n : e;
}
function h2(e, t) {
  const {
    step: n
  } = t, o = isFinite(o$(e, t)) ? o$(e, t) : 0;
  return n === null ? o : parseFloat(o.toFixed(p2(n)));
}
function ec(e) {
  e.stopPropagation(), e.preventDefault();
}
function sQ(e, t, n) {
  const o = {
    increase: (a, l) => a + l,
    decrease: (a, l) => a - l
  }, r = o[e](Object.keys(n.marks).indexOf(JSON.stringify(t)), 1), i = Object.keys(n.marks)[r];
  return n.step ? o[e](t, n.step) : Object.keys(n.marks).length && n.marks[i] ? n.marks[i] : t;
}
function g2(e, t, n) {
  const o = "increase", r = "decrease";
  let i = o;
  switch (e.keyCode) {
    case it.UP:
      i = t && n ? r : o;
      break;
    case it.RIGHT:
      i = !t && n ? r : o;
      break;
    case it.DOWN:
      i = t && n ? o : r;
      break;
    case it.LEFT:
      i = !t && n ? o : r;
      break;
    case it.END:
      return (a, l) => l.max;
    case it.HOME:
      return (a, l) => l.min;
    case it.PAGE_UP:
      return (a, l) => a + l.step * 2;
    case it.PAGE_DOWN:
      return (a, l) => a - l.step * 2;
    default:
      return;
  }
  return (a, l) => sQ(i, a, l);
}
var uQ = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
function ns() {
}
function v2(e) {
  const t = {
    id: String,
    min: Number,
    max: Number,
    step: Number,
    marks: pe.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: pe.object,
    maximumTrackStyle: pe.object,
    handleStyle: pe.oneOfType([pe.object, pe.arrayOf(pe.object)]),
    trackStyle: pe.oneOfType([pe.object, pe.arrayOf(pe.object)]),
    railStyle: pe.object,
    dotStyle: pe.object,
    activeDotStyle: pe.object,
    autofocus: {
      type: Boolean,
      default: void 0
    },
    draggableTrack: {
      type: Boolean,
      default: void 0
    }
  };
  return be({
    compatConfig: {
      MODE: 3
    },
    name: "CreateSlider",
    mixins: [Dd, e],
    inheritAttrs: !1,
    props: Mn(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: r
      } = this, i = isFinite(o - r) ? (o - r) % n === 0 : !0;
      return wo(n && Math.floor(n) === n ? i : !0, `Slider[max] - Slider[min] (${o - r}) 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: r,
          className: i,
          style: a
        } = n, l = uQ(n, ["index", "directives", "className", "style"]);
        if (delete l.dragging, l.value === null)
          return null;
        const s = O(O({}, l), {
          class: i,
          style: a,
          key: o
        });
        return h(d2, s, null);
      },
      onDown(n, o) {
        let r = o;
        const {
          draggableTrack: i,
          vertical: a
        } = this.$props, {
          bounds: l
        } = this.$data, s = i && this.positionGetValue ? this.positionGetValue(r) || [] : [], u = Av(n, this.handlesRefs);
        if (this.dragTrack = i && 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 = r, this.startBounds = [...l];
        else {
          if (!u)
            this.dragOffset = 0;
          else {
            const c = a$(a, n.target);
            this.dragOffset = r - c, r = c;
          }
          this.onStart(r);
        }
      },
      onMouseDown(n) {
        if (n.button !== 0)
          return;
        this.removeDocumentEvents();
        const o = this.$props.vertical, r = r$(o, n);
        this.onDown(n, r), this.addDocumentMouseEvents();
      },
      onTouchStart(n) {
        if (n$(n)) return;
        const o = this.vertical, r = i$(o, n);
        this.onDown(n, r), this.addDocumentTouchEvents(), ec(n);
      },
      onFocus(n) {
        const {
          vertical: o
        } = this;
        if (Av(n, this.handlesRefs) && !this.dragTrack) {
          const r = a$(o, n.target);
          this.dragOffset = 0, this.onStart(r), ec(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 = r$(this.vertical, n);
        this.onMove(n, o - this.dragOffset, this.dragTrack, this.startBounds);
      },
      onTouchMove(n) {
        if (n$(n) || !this.sliderRef) {
          this.onEnd();
          return;
        }
        const o = i$(this.vertical, n);
        this.onMove(n, o - this.dragOffset, this.dragTrack, this.startBounds);
      },
      onKeyDown(n) {
        this.sliderRef && Av(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: r
        } = this, i = n.getBoundingClientRect();
        return o ? r ? i.bottom : i.top : window.scrollX + (r ? i.right : i.left);
      },
      getSliderLength() {
        const n = this.sliderRef;
        if (!n)
          return 0;
        const o = n.getBoundingClientRect();
        return this.vertical ? o.height : o.width;
      },
      addDocumentTouchEvents() {
        this.onTouchMoveListener = Ho(this.document, "touchmove", this.onTouchMove), this.onTouchUpListener = Ho(this.document, "touchend", this.onEnd);
      },
      addDocumentMouseEvents() {
        this.onMouseMoveListener = Ho(this.document, "mousemove", this.onMouseMove), this.onMouseUpListener = Ho(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, r;
          (r = (o = this.handlesRefs[n]) === null || o === void 0 ? void 0 : o.blur) === null || r === void 0 || r.call(o);
        });
      },
      calcValue(n) {
        const {
          vertical: o,
          min: r,
          max: i
        } = this, a = Math.abs(Math.max(n, 0) / this.getSliderLength());
        return o ? (1 - a) * (i - r) + r : a * (i - r) + r;
      },
      calcValueByPos(n) {
        const r = (this.reverse ? -1 : 1) * (n - this.getSliderStart());
        return this.trimAlignValue(this.calcValue(r));
      },
      calcOffset(n) {
        const {
          min: o,
          max: r
        } = this, i = (n - o) / (r - o);
        return Math.max(0, i * 100);
      },
      saveSlider(n) {
        this.sliderRef = n;
      },
      saveHandle(n, o) {
        this.handlesRefs[n] = o;
      }
    },
    render() {
      const {
        prefixCls: n,
        marks: o,
        dots: r,
        step: i,
        included: a,
        disabled: l,
        vertical: s,
        reverse: u,
        min: c,
        max: d,
        maximumTrackStyle: f,
        railStyle: p,
        dotStyle: v,
        activeDotStyle: g,
        id: m
      } = this, {
        class: x,
        style: S
      } = this.$attrs, {
        tracks: C,
        handles: P
      } = this.renderSlider(), $ = Me(n, x, {
        [`${n}-with-marks`]: Object.keys(o).length,
        [`${n}-disabled`]: l,
        [`${n}-vertical`]: s,
        [`${n}-horizontal`]: !s
      }), I = {
        vertical: s,
        marks: o,
        included: a,
        lowerBound: this.getLowerBound(),
        upperBound: this.getUpperBound(),
        max: d,
        min: c,
        reverse: u,
        class: `${n}-mark`,
        onClickLabel: l ? ns : this.onClickMarkLabel
      }, w = {
        [Bo ? "onTouchstartPassive" : "onTouchstart"]: l ? ns : this.onTouchStart
      };
      return h("div", Q(Q({
        id: m,
        ref: this.saveSlider,
        tabindex: "-1",
        class: $
      }, w), {}, {
        onMousedown: l ? ns : this.onMouseDown,
        onMouseup: l ? ns : this.onMouseUp,
        onKeydown: l ? ns : this.onKeyDown,
        onFocus: l ? ns : this.onFocus,
        onBlur: l ? ns : this.onBlur,
        style: S
      }), [h("div", {
        class: `${n}-rail`,
        style: O(O({}, f), p)
      }, null), C, h(u2, {
        prefixCls: n,
        vertical: s,
        reverse: u,
        marks: o,
        dots: r,
        step: i,
        included: a,
        lowerBound: this.getLowerBound(),
        upperBound: this.getUpperBound(),
        max: d,
        min: c,
        dotStyle: v,
        activeDotStyle: g
      }, null), P, h(c2, I, {
        mark: this.$slots.mark
      }), Vk(this)]);
    }
  });
}
const cQ = be({
  compatConfig: {
    MODE: 3
  },
  name: "Slider",
  mixins: [Dd],
  inheritAttrs: !1,
  props: {
    defaultValue: Number,
    value: Number,
    disabled: {
      type: Boolean,
      default: void 0
    },
    autofocus: {
      type: Boolean,
      default: void 0
    },
    tabindex: pe.oneOfType([pe.number, pe.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
      }), f2(t, this.$props) && this.$emit("change", n));
    },
    onChange(e) {
      const t = !Ia(this, "value"), n = e.sValue > this.max ? O(O({}, 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) {
      ec(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 = g2(e, n, t);
      if (o) {
        ec(e);
        const {
          sValue: r
        } = this, i = o(r, this.$props), a = this.trimAlignValue(i);
        if (a === r) 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 = O(O({}, this.$props), t), o = Cx(e, n);
      return h2(o, n);
    },
    getTrack(e) {
      let {
        prefixCls: t,
        reverse: n,
        vertical: o,
        included: r,
        minimumTrackStyle: i,
        mergedTrackStyle: a,
        length: l,
        offset: s
      } = e;
      return h(Sx, {
        class: `${t}-track`,
        vertical: o,
        included: r,
        offset: s,
        reverse: n,
        length: l,
        style: O(O({}, i), a)
      }, null);
    },
    renderSlider() {
      const {
        prefixCls: e,
        vertical: t,
        included: n,
        disabled: o,
        minimumTrackStyle: r,
        trackStyle: i,
        handleStyle: a,
        tabindex: l,
        ariaLabelForHandle: s,
        ariaLabelledByForHandle: u,
        ariaValueTextFormatterForHandle: c,
        min: d,
        max: f,
        startPoint: p,
        reverse: v,
        handle: g,
        defaultHandle: m
      } = this, x = g || m, {
        sValue: S,
        dragging: C
      } = this, P = this.calcOffset(S), $ = x({
        class: `${e}-handle`,
        prefixCls: e,
        vertical: t,
        offset: P,
        value: S,
        dragging: C,
        disabled: o,
        min: d,
        max: f,
        reverse: v,
        index: 0,
        tabindex: l,
        ariaLabel: s,
        ariaLabelledBy: u,
        ariaValueTextFormatter: c,
        style: a[0] || a,
        ref: (T) => this.saveHandle(0, T),
        onFocus: this.onFocus,
        onBlur: this.onBlur
      }), I = p !== void 0 ? this.calcOffset(p) : 0, w = i[0] || i;
      return {
        tracks: this.getTrack({
          prefixCls: e,
          reverse: v,
          vertical: t,
          included: n,
          offset: I,
          minimumTrackStyle: r,
          mergedTrackStyle: w,
          length: P - I
        }),
        handles: $
      };
    }
  }
}), dQ = v2(cQ), Dc = (e) => {
  let {
    value: t,
    handle: n,
    bounds: o,
    props: r
  } = e;
  const {
    allowCross: i,
    pushable: a
  } = r, l = Number(a), s = Cx(t, r);
  let u = s;
  return !i && 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)), h2(u, r);
}, fQ = {
  defaultValue: pe.arrayOf(pe.number),
  value: pe.arrayOf(pe.number),
  count: Number,
  pushable: k6(pe.oneOfType([pe.looseBool, pe.number])),
  allowCross: {
    type: Boolean,
    default: void 0
  },
  disabled: {
    type: Boolean,
    default: void 0
  },
  reverse: {
    type: Boolean,
    default: void 0
  },
  tabindex: pe.arrayOf(pe.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
  }
}, pQ = be({
  compatConfig: {
    MODE: 3
  },
  name: "Range",
  mixins: [Dd],
  inheritAttrs: !1,
  props: Mn(fQ, {
    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), r = Ia(this, "defaultValue") ? this.defaultValue : o;
    let {
      value: i
    } = this;
    i === void 0 && (i = r);
    const a = i.map((s, u) => Dc({
      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, r) => Dc({
        value: o,
        handle: r,
        bounds: t,
        props: this.$props
      }));
      if (t.length === n.length) {
        if (n.every((o, r) => o === t[r]))
          return null;
      } else
        n = e.map((o, r) => Dc({
          value: o,
          handle: r,
          props: this.$props
        }));
      if (this.setState({
        bounds: n
      }), e.some((o) => f2(o, this.$props))) {
        const o = e.map((r) => Cx(r, this.$props));
        this.$emit("change", o);
      }
    },
    onChange(e) {
      if (!Ia(this, "value"))
        this.setState(e);
      else {
        const r = {};
        ["sHandle", "recent"].forEach((i) => {
          e[i] !== void 0 && (r[i] = e[i]);
        }), Object.keys(r).length && this.setState(r);
      }
      const o = O(O({}, this.$data), e).bounds;
      this.$emit("change", o);
    },
    positionGetValue(e) {
      const t = this.getValue(), n = this.calcValueByPos(e), o = this.getClosestBound(n), r = this.getBoundNeedMoving(n, o), i = t[r];
      if (n === i) return null;
      const a = [...t];
      return a[r] = 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 r = t[this.prevMovedHandleIndex];
      if (n === r) return;
      const i = [...t];
      i[this.prevMovedHandleIndex] = n, this.onChange({
        bounds: i
      });
    },
    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) {
      ec(e);
      const {
        $data: r,
        $props: i
      } = this, a = i.max || 100, l = i.min || 0;
      if (n) {
        let f = i.vertical ? -t : t;
        f = i.reverse ? -f : f;
        const p = a - Math.max(...o), v = l - Math.min(...o), g = Math.min(Math.max(f / (this.getSliderLength() / 100), v), p), m = o.map((x) => Math.floor(Math.max(Math.min(x + g, a), l)));
        r.bounds.map((x, S) => x === m[S]).some((x) => !x) && this.onChange({
          bounds: m
        });
        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 = g2(e, n, t);
      if (o) {
        ec(e);
        const {
          bounds: r,
          sHandle: i
        } = this, a = r[i === null ? this.recent : i], l = o(a, this.$props), s = Dc({
          value: l,
          handle: i,
          bounds: r,
          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 r = t;
      const i = n[t + 1] === n[t];
      return i && n[o] === n[t] && (r = o), i && e !== n[t + 1] && (r = e < n[t + 1] ? t : t + 1), r;
    },
    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, r = this.internalPointsCache;
      if (!r || r.marks !== e || r.step !== t) {
        const i = O({}, e);
        if (t !== null)
          for (let l = n; l <= o; l += t)
            i[l] = l;
        const a = Object.keys(i).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: r
      } = this, i = o === null ? r : o;
      n[i] = e;
      let a = i;
      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, r = Number(o);
      let i = 0;
      if (e[t + 1] - n < r && (i = 1), n - e[t - 1] < r && (i = -1), i === 0)
        return;
      const a = t + i, l = i * (e[a] - n);
      this.pushHandle(e, a, i, r - l) || (e[t] = e[a] - i * r);
    },
    pushHandle(e, t, n, o) {
      const r = e[t];
      let i = e[t];
      for (; n * (i - r) < o; ) {
        if (!this.pushHandleOnePoint(e, t, n))
          return e[t] = r, !1;
        i = e[t];
      }
      return !0;
    },
    pushHandleOnePoint(e, t, n) {
      const o = this.getPoints(), i = o.indexOf(e[t]) + n;
      if (i >= o.length || i < 0)
        return !1;
      const a = t + n, l = o[i], {
        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 Dc({
        value: e,
        handle: t,
        bounds: n,
        props: this.$props
      });
    },
    ensureValueNotConflict(e, t, n) {
      let {
        allowCross: o,
        pushable: r
      } = n;
      const i = this.$data || {}, {
        bounds: a
      } = i;
      if (e = e === void 0 ? i.sHandle : e, r = Number(r), !o && e != null && a !== void 0) {
        if (e > 0 && t <= a[e - 1] + r)
          return a[e - 1] + r;
        if (e < a.length - 1 && t >= a[e + 1] - r)
          return a[e + 1] - r;
      }
      return t;
    },
    getTrack(e) {
      let {
        bounds: t,
        prefixCls: n,
        reverse: o,
        vertical: r,
        included: i,
        offsets: a,
        trackStyle: l
      } = e;
      return t.slice(0, -1).map((s, u) => {
        const c = u + 1, d = Me({
          [`${n}-track`]: !0,
          [`${n}-track-${c}`]: !0
        });
        return h(Sx, {
          class: d,
          vertical: r,
          reverse: o,
          included: i,
          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: r,
        disabled: i,
        min: a,
        max: l,
        reverse: s,
        handle: u,
        defaultHandle: c,
        trackStyle: d,
        handleStyle: f,
        tabindex: p,
        ariaLabelGroupForHandles: v,
        ariaLabelledByGroupForHandles: g,
        ariaValueTextFormatterGroupForHandles: m
      } = this, x = u || c, S = t.map(($) => this.calcOffset($)), C = `${n}-handle`, P = t.map(($, I) => {
        let w = p[I] || 0;
        (i || p[I] === null) && (w = null);
        const T = e === I;
        return x({
          class: Me({
            [C]: !0,
            [`${C}-${I + 1}`]: !0,
            [`${C}-dragging`]: T
          }),
          prefixCls: n,
          vertical: o,
          dragging: T,
          offset: S[I],
          value: $,
          index: I,
          tabindex: w,
          min: a,
          max: l,
          reverse: s,
          disabled: i,
          style: f[I],
          ref: (M) => this.saveHandle(I, M),
          onFocus: this.onFocus,
          onBlur: this.onBlur,
          ariaLabel: v[I],
          ariaLabelledBy: g[I],
          ariaValueTextFormatter: m[I]
        });
      });
      return {
        tracks: this.getTrack({
          bounds: t,
          prefixCls: n,
          reverse: s,
          vertical: o,
          included: r,
          offsets: S,
          trackStyle: d
        }),
        handles: P
      };
    }
  }
}), hQ = v2(pQ), gQ = be({
  compatConfig: {
    MODE: 3
  },
  name: "SliderTooltip",
  inheritAttrs: !1,
  props: RT(),
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const r = le(null), i = le(null);
    function a() {
      Vt.cancel(i.value), i.value = null;
    }
    function l() {
      i.value = Vt(() => {
        var u;
        (u = r.value) === null || u === void 0 || u.forcePopupAlign(), i.value = null;
      });
    }
    const s = () => {
      a(), e.open && l();
    };
    return Ie([() => e.open, () => e.title], () => {
      s();
    }, {
      flush: "post",
      immediate: !0
    }), RP(() => {
      s();
    }), qt(() => {
      a();
    }), () => h(Lo, Q(Q({
      ref: r
    }, e), n), o);
  }
}), vQ = (e) => {
  const {
    componentCls: t,
    controlSize: n,
    dotSize: o,
    marginFull: r,
    marginPart: i,
    colorFillContentHover: a
  } = e;
  return {
    [t]: O(O({}, fn(e)), {
      position: "relative",
      height: n,
      margin: `${i}px ${r}px`,
      padding: 0,
      cursor: "pointer",
      touchAction: "none",
      "&-vertical": {
        margin: `${r}px ${i}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"
        }
      }
    })
  };
}, m2 = (e, t) => {
  const {
    componentCls: n,
    railSize: o,
    handleSize: r,
    dotSize: i
  } = 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 - r) / 2
    },
    [`${n}-mark`]: {
      // Reset all
      insetInlineStart: 0,
      top: 0,
      [c]: r,
      [l]: "100%"
    },
    [`${n}-step`]: {
      // Reset all
      insetInlineStart: 0,
      top: 0,
      [c]: o,
      [l]: "100%",
      [s]: o
    },
    [`${n}-dot`]: {
      position: "absolute",
      [u]: (o - i) / 2
    }
  };
}, mQ = (e) => {
  const {
    componentCls: t,
    marginPartWithMark: n
  } = e;
  return {
    [`${t}-horizontal`]: O(O({}, m2(e, !0)), {
      [`&${t}-with-marks`]: {
        marginBottom: n
      }
    })
  };
}, bQ = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-vertical`]: O(O({}, m2(e, !1)), {
      height: "100%"
    })
  };
}, yQ = On("Slider", (e) => {
  const t = Qt(e, {
    marginPart: (e.controlHeight - e.controlSize) / 2,
    marginFull: e.controlSize / 2,
    marginPartWithMark: e.controlHeightLG - e.controlSize
  });
  return [vQ(t), mQ(t), bQ(t)];
}, (e) => {
  const n = e.controlHeightLG / 4, o = e.controlHeightSM / 2, r = e.lineWidth + 1, i = e.lineWidth + 3;
  return {
    controlSize: n,
    railSize: 4,
    handleSize: n,
    handleSizeHover: o,
    dotSize: 8,
    handleLineWidth: r,
    handleLineWidthHover: i
  };
});
var l$ = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const xQ = (e) => typeof e == "number" ? e.toString() : "", wQ = () => ({
  id: String,
  prefixCls: String,
  tooltipPrefixCls: String,
  range: en([Boolean, Object]),
  reverse: ct(),
  min: Number,
  max: Number,
  step: en([Object, Number]),
  marks: Mt(),
  dots: ct(),
  value: en([Array, Number]),
  defaultValue: en([Array, Number]),
  included: ct(),
  disabled: ct(),
  vertical: ct(),
  tipFormatter: en([Function, Object], () => xQ),
  tooltipOpen: ct(),
  /** @deprecated `tooltipVisible` is deprecated. Please use `tooltipOpen` instead. */
  tooltipVisible: ct(),
  tooltipPlacement: rn(),
  getTooltipPopupContainer: et(),
  autofocus: ct(),
  handleStyle: en([Array, Object]),
  trackStyle: en([Array, Object]),
  onChange: et(),
  onAfterChange: et(),
  onFocus: et(),
  onBlur: et(),
  "onUpdate:value": et()
}), SQ = be({
  compatConfig: {
    MODE: 3
  },
  name: "ASlider",
  inheritAttrs: !1,
  props: wQ(),
  // emits: ['update:value', 'change', 'afterChange', 'blur'],
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      emit: r,
      expose: i
    } = t;
    process.env.NODE_ENV !== "production" && [["tooltipVisible", "tooltipOpen"]].forEach((w) => {
      let [T, M] = w;
      dn(e.tooltipVisible === void 0, "Slider", `\`${T}\` is deprecated, please use \`${M}\` instead.`);
    });
    const {
      prefixCls: a,
      rootPrefixCls: l,
      direction: s,
      getPopupContainer: u,
      configProvider: c
    } = Nt("slider", e), [d, f] = yQ(a), p = Br(), v = le(), g = le({}), m = (w, T) => {
      g.value[w] = T;
    }, x = E(() => e.tooltipPlacement ? e.tooltipPlacement : e.vertical ? s.value === "rtl" ? "left" : "right" : "top"), S = () => {
      var w;
      (w = v.value) === null || w === void 0 || w.focus();
    }, C = () => {
      var w;
      (w = v.value) === null || w === void 0 || w.blur();
    }, P = (w) => {
      r("update:value", w), r("change", w), p.onFieldChange();
    }, $ = (w) => {
      r("blur", w);
    };
    i({
      focus: S,
      blur: C
    });
    const I = (w) => {
      var {
        tooltipPrefixCls: T
      } = w, M = w.info, {
        value: R,
        dragging: N,
        index: H
      } = M, L = l$(M, ["value", "dragging", "index"]);
      const {
        tipFormatter: F,
        tooltipOpen: A = e.tooltipVisible,
        getTooltipPopupContainer: G
      } = e, j = F ? g.value[H] || N : !1, Z = A || A === void 0 && j;
      return h(gQ, {
        prefixCls: T,
        title: F ? F(R) : "",
        open: Z,
        placement: x.value,
        transitionName: `${l.value}-zoom-down`,
        key: H,
        overlayClassName: `${a.value}-tooltip`,
        getPopupContainer: G || u?.value
      }, {
        default: () => [h(d2, Q(Q({}, L), {}, {
          value: R,
          onMouseenter: () => m(H, !0),
          onMouseleave: () => m(H, !1)
        }), null)]
      });
    };
    return () => {
      const {
        tooltipPrefixCls: w,
        range: T,
        id: M = p.id.value
      } = e, R = l$(e, ["tooltipPrefixCls", "range", "id"]), N = c.getPrefixCls("tooltip", w), H = Me(n.class, {
        [`${a.value}-rtl`]: s.value === "rtl"
      }, f.value);
      s.value === "rtl" && !R.vertical && (R.reverse = !R.reverse);
      let L;
      return typeof T == "object" && (L = T.draggableTrack), d(T ? h(hQ, Q(Q(Q({}, n), R), {}, {
        step: R.step,
        draggableTrack: L,
        class: H,
        ref: v,
        handle: (F) => I({
          tooltipPrefixCls: N,
          prefixCls: a.value,
          info: F
        }),
        prefixCls: a.value,
        onChange: P,
        onBlur: $
      }), {
        mark: o.mark
      }) : h(dQ, Q(Q(Q({}, n), R), {}, {
        id: M,
        step: R.step,
        class: H,
        ref: v,
        handle: (F) => I({
          tooltipPrefixCls: N,
          prefixCls: a.value,
          info: F
        }),
        prefixCls: a.value,
        onChange: P,
        onBlur: $
      }), {
        mark: o.mark
      }));
    };
  }
}), yr = ii(SQ), CQ = (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
            }
          }
        }
      }
    }
  };
}, $Q = (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
      }
    }
  };
}, PQ = (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
        }
      }
    }
  };
}, OQ = (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
          }
        }
      }
    }
  };
}, kQ = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [t]: O(O(O(O({}, fn(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
      }
    }), Nl(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"
      }
    })
  };
}, IQ = On("Switch", (e) => {
  const t = e.fontSize * e.lineHeight, n = e.controlHeight / 2, o = 2, r = t - o * 2, i = n - o * 2, a = Qt(e, {
    switchMinWidth: r * 2 + o * 4,
    switchHeight: t,
    switchDuration: e.motionDurationMid,
    switchColor: e.colorPrimary,
    switchDisabledOpacity: e.opacityLoading,
    switchInnerMarginMin: r / 2,
    switchInnerMarginMax: r + o + o * 2,
    switchPadding: o,
    switchPinSize: r,
    switchBg: e.colorBgContainer,
    switchMinWidthSM: i * 2 + o * 2,
    switchHeightSM: n,
    switchInnerMarginMinSM: i / 2,
    switchInnerMarginMaxSM: i + o + o * 2,
    switchPinSizeSM: i,
    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 [
    kQ(a),
    // inner style
    OQ(a),
    // handle style
    PQ(a),
    // loading style
    $Q(a),
    // small style
    CQ(a)
  ];
}), TQ = Ti("small", "default"), _Q = () => ({
  id: String,
  prefixCls: String,
  size: pe.oneOf(TQ),
  disabled: {
    type: Boolean,
    default: void 0
  },
  checkedChildren: pe.any,
  unCheckedChildren: pe.any,
  tabindex: pe.oneOfType([pe.string, pe.number]),
  autofocus: {
    type: Boolean,
    default: void 0
  },
  loading: {
    type: Boolean,
    default: void 0
  },
  checked: pe.oneOfType([pe.string, pe.number, pe.looseBool]),
  checkedValue: pe.oneOfType([pe.string, pe.number, pe.looseBool]).def(!0),
  unCheckedValue: pe.oneOfType([pe.string, pe.number, pe.looseBool]).def(!1),
  onChange: {
    type: Function
  },
  onClick: {
    type: Function
  },
  onKeydown: {
    type: Function
  },
  onMouseup: {
    type: Function
  },
  "onUpdate:checked": {
    type: Function
  },
  onBlur: Function,
  onFocus: Function
}), MQ = be({
  compatConfig: {
    MODE: 3
  },
  name: "ASwitch",
  __ANT_SWITCH: !0,
  inheritAttrs: !1,
  props: _Q(),
  slots: Object,
  // emits: ['update:checked', 'mouseup', 'change', 'click', 'keydown', 'blur'],
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      expose: r,
      emit: i
    } = t;
    const a = Br(), l = _i(), s = E(() => {
      var M;
      return (M = e.disabled) !== null && M !== void 0 ? M : l.value;
    });
    nh(() => {
      wo(!("defaultChecked" in n), "Switch", "'defaultChecked' is deprecated, please use 'v-model:checked'"), wo(!("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 = E(() => u.value === e.checkedValue);
    Ie(() => e.checked, () => {
      u.value = e.checked;
    });
    const {
      prefixCls: d,
      direction: f,
      size: p
    } = Nt("switch", e), [v, g] = IQ(d), m = le(), x = () => {
      var M;
      (M = m.value) === null || M === void 0 || M.focus();
    };
    r({
      focus: x,
      blur: () => {
        var M;
        (M = m.value) === null || M === void 0 || M.blur();
      }
    }), At(() => {
      Yt(() => {
        e.autofocus && !s.value && m.value.focus();
      });
    });
    const C = (M, R) => {
      s.value || (i("update:checked", M), i("change", M, R), a.onFieldChange());
    }, P = (M) => {
      i("blur", M);
    }, $ = (M) => {
      x();
      const R = c.value ? e.unCheckedValue : e.checkedValue;
      C(R, M), i("click", R, M);
    }, I = (M) => {
      M.keyCode === it.LEFT ? C(e.unCheckedValue, M) : M.keyCode === it.RIGHT && C(e.checkedValue, M), i("keydown", M);
    }, w = (M) => {
      var R;
      (R = m.value) === null || R === void 0 || R.blur(), i("mouseup", M);
    }, T = E(() => ({
      [`${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",
      [g.value]: !0
    }));
    return () => {
      var M;
      return v(h(I0, null, {
        default: () => [h("button", Q(Q(Q({}, Fn(e, ["prefixCls", "checkedChildren", "unCheckedChildren", "checked", "autofocus", "checkedValue", "unCheckedValue", "id", "onChange", "onUpdate:checked"])), n), {}, {
          id: (M = e.id) !== null && M !== void 0 ? M : a.id.value,
          onKeydown: I,
          onClick: $,
          onBlur: P,
          onMouseup: w,
          type: "button",
          role: "switch",
          "aria-checked": u.value,
          disabled: s.value || e.loading,
          class: [n.class, T.value],
          ref: m
        }), [h("div", {
          class: `${d.value}-handle`
        }, [e.loading ? h(Mi, {
          class: `${d.value}-loading-icon`
        }, null) : null]), h("span", {
          class: `${d.value}-inner`
        }, [h("span", {
          class: `${d.value}-inner-checked`
        }, [ei(o, e, "checkedChildren")]), h("span", {
          class: `${d.value}-inner-unchecked`
        }, [ei(o, e, "unCheckedChildren")])])])]
      }));
    };
  }
}), Pa = ii(MQ), b2 = Symbol("TableContextProps"), EQ = (e) => {
  Bt(b2, e);
}, ua = () => zt(b2, {}), DQ = "RC_TABLE_KEY";
function y2(e) {
  return e == null ? [] : Array.isArray(e) ? e : [e];
}
function x2(e, t) {
  if (!t && typeof t != "number")
    return e;
  const n = y2(t);
  let o = e;
  for (let r = 0; r < n.length; r += 1) {
    if (!o)
      return null;
    const i = n[r];
    o = o[i];
  }
  return o;
}
function lg(e) {
  const t = [], n = {};
  return e.forEach((o) => {
    const {
      key: r,
      dataIndex: i
    } = o || {};
    let a = r || y2(i).join("-") || DQ;
    for (; n[a]; )
      a = `${a}_next`;
    n[a] = !0, t.push(a);
  }), t;
}
function AQ() {
  const e = {};
  function t(i, a) {
    a && Object.keys(a).forEach((l) => {
      const s = a[l];
      s && typeof s == "object" ? (i[l] = i[l] || {}, t(i[l], s)) : i[l] = s;
    });
  }
  for (var n = arguments.length, o = new Array(n), r = 0; r < n; r++)
    o[r] = arguments[r];
  return o.forEach((i) => {
    t(e, i);
  }), e;
}
function Db(e) {
  return e != null;
}
const w2 = Symbol("SlotsContextProps"), NQ = (e) => {
  Bt(w2, e);
}, $x = () => zt(w2, E(() => ({}))), S2 = Symbol("ContextProps"), RQ = (e) => {
  Bt(S2, e);
}, zQ = () => zt(S2, {
  onResizeColumn: () => {
  }
}), Ru = "RC_TABLE_INTERNAL_COL_DEFINE", C2 = Symbol("HoverContextProps"), FQ = (e) => {
  Bt(C2, e);
}, BQ = () => zt(C2, {
  startRow: $e(-1),
  endRow: $e(-1),
  onHover() {
  }
}), Ab = $e(!1), LQ = () => {
  At(() => {
    Ab.value = Ab.value || tq("position", "sticky");
  });
}, HQ = () => Ab;
var VQ = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
function jQ(e, t, n, o) {
  const r = e + t - 1;
  return e <= o && r >= n;
}
function WQ(e) {
  return e && typeof e == "object" && !Array.isArray(e) && !dr(e);
}
const sg = be({
  name: "Cell",
  props: ["prefixCls", "record", "index", "renderIndex", "dataIndex", "customRender", "component", "colSpan", "rowSpan", "fixLeft", "fixRight", "firstFixLeft", "lastFixLeft", "firstFixRight", "lastFixRight", "appendNode", "additionalProps", "ellipsis", "align", "rowType", "isSticky", "column", "cellType", "transformCellText"],
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = $x(), {
      onHover: r,
      startRow: i,
      endRow: a
    } = BQ(), l = E(() => {
      var g, m, x, S;
      return (x = (g = e.colSpan) !== null && g !== void 0 ? g : (m = e.additionalProps) === null || m === void 0 ? void 0 : m.colSpan) !== null && x !== void 0 ? x : (S = e.additionalProps) === null || S === void 0 ? void 0 : S.colspan;
    }), s = E(() => {
      var g, m, x, S;
      return (x = (g = e.rowSpan) !== null && g !== void 0 ? g : (m = e.additionalProps) === null || m === void 0 ? void 0 : m.rowSpan) !== null && x !== void 0 ? x : (S = e.additionalProps) === null || S === void 0 ? void 0 : S.rowspan;
    }), u = gi(() => {
      const {
        index: g
      } = e;
      return jQ(g, s.value || 1, i.value, a.value);
    }), c = HQ(), d = (g, m) => {
      var x;
      const {
        record: S,
        index: C,
        additionalProps: P
      } = e;
      S && r(C, C + m - 1), (x = P?.onMouseenter) === null || x === void 0 || x.call(P, g);
    }, f = (g) => {
      var m;
      const {
        record: x,
        additionalProps: S
      } = e;
      x && r(-1, -1), (m = S?.onMouseleave) === null || m === void 0 || m.call(S, g);
    }, p = (g) => {
      const m = Do(g)[0];
      return dr(m) ? m.type === Zb ? m.children : Array.isArray(m.children) ? p(m.children) : void 0 : m;
    }, v = $e(null);
    return Ie([u, () => e.prefixCls, v], () => {
      const g = Qi(v.value);
      g && (u.value ? Zm(g, `${e.prefixCls}-cell-row-hover`) : Jm(g, `${e.prefixCls}-cell-row-hover`));
    }), () => {
      var g, m, x, S, C, P;
      const {
        prefixCls: $,
        record: I,
        index: w,
        renderIndex: T,
        dataIndex: M,
        customRender: R,
        component: N = "td",
        fixLeft: H,
        fixRight: L,
        firstFixLeft: F,
        lastFixLeft: A,
        firstFixRight: G,
        lastFixRight: j,
        appendNode: Z = (g = n.appendNode) === null || g === void 0 ? void 0 : g.call(n),
        additionalProps: W = {},
        ellipsis: K,
        align: q,
        rowType: U,
        isSticky: ae,
        column: se = {},
        cellType: ie
      } = e, re = `${$}-cell`;
      let te, ve;
      const ce = (m = n.default) === null || m === void 0 ? void 0 : m.call(n);
      if (Db(ce) || ie === "header")
        ve = ce;
      else {
        const Se = x2(I, M);
        if (ve = Se, R) {
          const Ce = R({
            text: Se,
            value: Se,
            record: I,
            index: w,
            renderIndex: T,
            column: se.__originColumn__
          });
          WQ(Ce) ? (process.env.NODE_ENV !== "production" && wn(!1, "`columns.customRender` return cell props is deprecated with perf issue, please use `customCell` instead."), ve = Ce.children, te = Ce.props) : ve = Ce;
        }
        if (!(Ru in se) && ie === "body" && o.value.bodyCell && !(!((x = se.slots) === null || x === void 0) && x.customRender)) {
          const Ce = Nh(o.value, "bodyCell", {
            text: Se,
            value: Se,
            record: I,
            index: w,
            column: se.__originColumn__
          }, () => {
            const Ae = ve === void 0 ? Se : ve;
            return [typeof Ae == "object" && Ao(Ae) || typeof Ae != "object" ? Ae : null];
          });
          ve = go(Ce);
        }
        e.transformCellText && (ve = e.transformCellText({
          text: ve,
          record: I,
          index: w,
          column: se.__originColumn__
        }));
      }
      typeof ve == "object" && !Array.isArray(ve) && !dr(ve) && (ve = null), K && (A || G) && (ve = h("span", {
        class: `${re}-content`
      }, [ve])), Array.isArray(ve) && ve.length === 1 && (ve = ve[0]);
      const fe = te || {}, {
        colSpan: ge,
        rowSpan: Te,
        style: ze,
        class: Ke
      } = fe, He = VQ(fe, ["colSpan", "rowSpan", "style", "class"]), Ne = (S = ge !== void 0 ? ge : l.value) !== null && S !== void 0 ? S : 1, Xe = (C = Te !== void 0 ? Te : s.value) !== null && C !== void 0 ? C : 1;
      if (Ne === 0 || Xe === 0)
        return null;
      const De = {}, Fe = typeof H == "number" && c.value, Ve = typeof L == "number" && c.value;
      Fe && (De.position = "sticky", De.left = `${H}px`), Ve && (De.position = "sticky", De.right = `${L}px`);
      const ot = {};
      q && (ot.textAlign = q);
      let je;
      const Pe = K === !0 ? {
        showTitle: !0
      } : K;
      Pe && (Pe.showTitle || U === "header") && (typeof ve == "string" || typeof ve == "number" ? je = ve.toString() : dr(ve) && (je = p([ve])));
      const Ge = O(O(O({
        title: je
      }, He), W), {
        colSpan: Ne !== 1 ? Ne : null,
        rowSpan: Xe !== 1 ? Xe : null,
        class: Me(re, {
          [`${re}-fix-left`]: Fe && c.value,
          [`${re}-fix-left-first`]: F && c.value,
          [`${re}-fix-left-last`]: A && c.value,
          [`${re}-fix-right`]: Ve && c.value,
          [`${re}-fix-right-first`]: G && c.value,
          [`${re}-fix-right-last`]: j && c.value,
          [`${re}-ellipsis`]: K,
          [`${re}-with-append`]: Z,
          [`${re}-fix-sticky`]: (Fe || Ve) && ae && c.value
        }, W.class, Ke),
        onMouseenter: (Se) => {
          d(Se, Xe);
        },
        onMouseleave: f,
        style: [W.style, ot, De, ze]
      });
      return h(N, Q(Q({}, Ge), {}, {
        ref: v
      }), {
        default: () => [Z, ve, (P = n.dragHandle) === null || P === void 0 ? void 0 : P.call(n)]
      });
    };
  }
});
function Px(e, t, n, o, r) {
  const i = n[e] || {}, a = n[t] || {};
  let l, s;
  i.fixed === "left" ? l = o.left[e] : a.fixed === "right" && (s = o.right[t]);
  let u = !1, c = !1, d = !1, f = !1;
  const p = n[t + 1], v = n[e - 1];
  return r === "rtl" ? l !== void 0 ? f = !(v && v.fixed === "left") : s !== void 0 && (d = !(p && p.fixed === "right")) : l !== void 0 ? u = !(p && p.fixed === "left") : s !== void 0 && (c = !(v && v.fixed === "right")), {
    fixLeft: l,
    fixRight: s,
    lastFixLeft: u,
    firstFixRight: c,
    lastFixRight: d,
    firstFixLeft: f,
    isSticky: o.isSticky
  };
}
const s$ = {
  mouse: {
    move: "mousemove",
    stop: "mouseup"
  },
  touch: {
    move: "touchmove",
    stop: "touchend"
  }
}, u$ = 50, KQ = be({
  compatConfig: {
    MODE: 3
  },
  name: "DragHandle",
  props: {
    prefixCls: String,
    width: {
      type: Number,
      required: !0
    },
    minWidth: {
      type: Number,
      default: u$
    },
    maxWidth: {
      type: Number,
      default: 1 / 0
    },
    column: {
      type: Object,
      default: void 0
    }
  },
  setup(e) {
    let t = 0, n = {
      remove: () => {
      }
    }, o = {
      remove: () => {
      }
    };
    const r = () => {
      n.remove(), o.remove();
    };
    Vo(() => {
      r();
    }), It(() => {
      dn(!isNaN(e.width), "Table", "width must be a number when use resizable");
    });
    const {
      onResizeColumn: i
    } = zQ(), a = E(() => typeof e.minWidth == "number" && !isNaN(e.minWidth) ? e.minWidth : u$), l = E(() => typeof e.maxWidth == "number" && !isNaN(e.maxWidth) ? e.maxWidth : 1 / 0), s = pr();
    let u = 0;
    const c = $e(!1);
    let d;
    const f = (C) => {
      let P = 0;
      C.touches ? C.touches.length ? P = C.touches[0].pageX : P = C.changedTouches[0].pageX : P = C.pageX;
      const $ = t - P;
      let I = Math.max(u - $, a.value);
      I = Math.min(I, l.value), Vt.cancel(d), d = Vt(() => {
        i(I, e.column.__originColumn__);
      });
    }, p = (C) => {
      f(C);
    }, v = (C) => {
      c.value = !1, f(C), r();
    }, g = (C, P) => {
      c.value = !0, r(), u = s.vnode.el.parentNode.getBoundingClientRect().width, !(C instanceof MouseEvent && C.which !== 1) && (C.stopPropagation && C.stopPropagation(), t = C.touches ? C.touches[0].pageX : C.pageX, n = Ho(document.documentElement, P.move, p), o = Ho(document.documentElement, P.stop, v));
    }, m = (C) => {
      C.stopPropagation(), C.preventDefault(), g(C, s$.mouse);
    }, x = (C) => {
      C.stopPropagation(), C.preventDefault(), g(C, s$.touch);
    }, S = (C) => {
      C.stopPropagation(), C.preventDefault();
    };
    return () => {
      const {
        prefixCls: C
      } = e, P = {
        [Bo ? "onTouchstartPassive" : "onTouchstart"]: ($) => x($)
      };
      return h("div", Q(Q({
        class: `${C}-resize-handle ${c.value ? "dragging" : ""}`,
        onMousedown: m
      }, P), {}, {
        onClick: S
      }), [h("div", {
        class: `${C}-resize-handle-line`
      }, null)]);
    };
  }
}), qQ = be({
  name: "HeaderRow",
  props: ["cells", "stickyOffsets", "flattenColumns", "rowComponent", "cellComponent", "index", "customHeaderRow"],
  setup(e) {
    const t = ua();
    return () => {
      const {
        prefixCls: n,
        direction: o
      } = t, {
        cells: r,
        stickyOffsets: i,
        flattenColumns: a,
        rowComponent: l,
        cellComponent: s,
        customHeaderRow: u,
        index: c
      } = e;
      let d;
      u && (d = u(r.map((p) => p.column), c));
      const f = lg(r.map((p) => p.column));
      return h(l, d, {
        default: () => [r.map((p, v) => {
          const {
            column: g
          } = p, m = Px(p.colStart, p.colEnd, a, i, o);
          let x;
          g && g.customHeaderCell && (x = p.column.customHeaderCell(g));
          const S = g;
          return h(sg, Q(Q(Q({}, p), {}, {
            cellType: "header",
            ellipsis: g.ellipsis,
            align: g.align,
            component: s,
            prefixCls: n,
            key: f[v]
          }, m), {}, {
            additionalProps: x,
            rowType: "header",
            column: g
          }), {
            default: () => g.title,
            dragHandle: () => S.resizable ? h(KQ, {
              prefixCls: n,
              width: S.width,
              minWidth: S.minWidth,
              maxWidth: S.maxWidth,
              column: S
            }, null) : null
          });
        })]
      });
    };
  }
});
function YQ(e) {
  const t = [];
  function n(r, i) {
    let a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;
    t[a] = t[a] || [];
    let l = i;
    return r.filter(Boolean).map((u) => {
      const c = {
        key: u.key,
        class: Me(u.className, u.class),
        // children: column.title,
        column: u,
        colStart: l
      };
      let d = 1;
      const f = u.children;
      return f && f.length > 0 && (d = n(f, l, a + 1).reduce((p, v) => p + v, 0), c.hasSubColumns = !0), "colSpan" in u && ({
        colSpan: d
      } = u), "rowSpan" in u && (c.rowSpan = u.rowSpan), c.colSpan = d, c.colEnd = c.colStart + d - 1, t[a].push(c), l += d, d;
    });
  }
  n(e, 0);
  const o = t.length;
  for (let r = 0; r < o; r += 1)
    t[r].forEach((i) => {
      !("rowSpan" in i) && !i.hasSubColumns && (i.rowSpan = o - r);
    });
  return t;
}
const c$ = be({
  name: "TableHeader",
  inheritAttrs: !1,
  props: ["columns", "flattenColumns", "stickyOffsets", "customHeaderRow"],
  setup(e) {
    const t = ua(), n = E(() => YQ(e.columns));
    return () => {
      const {
        prefixCls: o,
        getComponent: r
      } = t, {
        stickyOffsets: i,
        flattenColumns: a,
        customHeaderRow: l
      } = e, s = r(["header", "wrapper"], "thead"), u = r(["header", "row"], "tr"), c = r(["header", "cell"], "th");
      return h(s, {
        class: `${o}-thead`
      }, {
        default: () => [n.value.map((d, f) => h(qQ, {
          key: f,
          flattenColumns: a,
          cells: d,
          stickyOffsets: i,
          rowComponent: u,
          cellComponent: c,
          customHeaderRow: l,
          index: f
        }, null))]
      });
    };
  }
}), $2 = Symbol("ExpandedRowProps"), GQ = (e) => {
  Bt($2, e);
}, UQ = () => zt($2, {}), P2 = be({
  name: "ExpandedRow",
  inheritAttrs: !1,
  props: ["prefixCls", "component", "cellComponent", "expanded", "colSpan", "isEmpty"],
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const r = ua(), i = UQ(), {
      fixHeader: a,
      fixColumn: l,
      componentWidth: s,
      horizonScroll: u
    } = i;
    return () => {
      const {
        prefixCls: c,
        component: d,
        cellComponent: f,
        expanded: p,
        colSpan: v,
        isEmpty: g
      } = e;
      return h(d, {
        class: o.class,
        style: {
          display: p ? null : "none"
        }
      }, {
        default: () => [h(sg, {
          component: f,
          prefixCls: c,
          colSpan: v
        }, {
          default: () => {
            var m;
            let x = (m = n.default) === null || m === void 0 ? void 0 : m.call(n);
            return (g ? u.value : l.value) && (x = h("div", {
              style: {
                width: `${s.value - (a.value ? r.scrollbarSize : 0)}px`,
                position: "sticky",
                left: 0,
                overflow: "hidden"
              },
              class: `${c}-expanded-row-fixed`
            }, [x])), x;
          }
        })]
      });
    };
  }
}), XQ = be({
  name: "MeasureCell",
  props: ["columnKey"],
  setup(e, t) {
    let {
      emit: n
    } = t;
    const o = le();
    return At(() => {
      o.value && n("columnResize", e.columnKey, o.value.offsetWidth);
    }), () => h(Al, {
      onResize: (r) => {
        let {
          offsetWidth: i
        } = r;
        n("columnResize", e.columnKey, i);
      }
    }, {
      default: () => [h("td", {
        ref: o,
        style: {
          padding: 0,
          border: 0,
          height: 0
        }
      }, [h("div", {
        style: {
          height: 0,
          overflow: "hidden"
        }
      }, [Le(" ")])])]
    });
  }
}), O2 = Symbol("BodyContextProps"), QQ = (e) => {
  Bt(O2, e);
}, k2 = () => zt(O2, {}), ZQ = be({
  name: "BodyRow",
  inheritAttrs: !1,
  props: ["record", "index", "renderIndex", "recordKey", "expandedKeys", "rowComponent", "cellComponent", "customRow", "rowExpandable", "indent", "rowKey", "getRowKey", "childrenColumnName"],
  setup(e, t) {
    let {
      attrs: n
    } = t;
    const o = ua(), r = k2(), i = $e(!1), a = E(() => e.expandedKeys && e.expandedKeys.has(e.recordKey));
    It(() => {
      a.value && (i.value = !0);
    });
    const l = E(() => r.expandableType === "row" && (!e.rowExpandable || e.rowExpandable(e.record))), s = E(() => r.expandableType === "nest"), u = E(() => e.childrenColumnName && e.record && e.record[e.childrenColumnName]), c = E(() => l.value || s.value), d = (m, x) => {
      r.onTriggerExpand(m, x);
    }, f = E(() => {
      var m;
      return ((m = e.customRow) === null || m === void 0 ? void 0 : m.call(e, e.record, e.index)) || {};
    }), p = function(m) {
      var x, S;
      r.expandRowByClick && c.value && d(e.record, m);
      for (var C = arguments.length, P = new Array(C > 1 ? C - 1 : 0), $ = 1; $ < C; $++)
        P[$ - 1] = arguments[$];
      (S = (x = f.value) === null || x === void 0 ? void 0 : x.onClick) === null || S === void 0 || S.call(x, m, ...P);
    }, v = E(() => {
      const {
        record: m,
        index: x,
        indent: S
      } = e, {
        rowClassName: C
      } = r;
      return typeof C == "string" ? C : typeof C == "function" ? C(m, x, S) : "";
    }), g = E(() => lg(r.flattenColumns));
    return () => {
      const {
        class: m,
        style: x
      } = n, {
        record: S,
        index: C,
        rowKey: P,
        indent: $ = 0,
        rowComponent: I,
        cellComponent: w
      } = e, {
        prefixCls: T,
        fixedInfoList: M,
        transformCellText: R
      } = o, {
        flattenColumns: N,
        expandedRowClassName: H,
        indentSize: L,
        expandIcon: F,
        expandedRowRender: A,
        expandIconColumnIndex: G
      } = r, j = h(I, Q(Q({}, f.value), {}, {
        "data-row-key": P,
        class: Me(m, `${T}-row`, `${T}-row-level-${$}`, v.value, f.value.class),
        style: [x, f.value.style],
        onClick: p
      }), {
        default: () => [N.map((W, K) => {
          const {
            customRender: q,
            dataIndex: U,
            className: ae
          } = W, se = g[K], ie = M[K];
          let re;
          W.customCell && (re = W.customCell(S, C, W));
          const te = K === (G || 0) && s.value ? h(Je, null, [h("span", {
            style: {
              paddingLeft: `${L * $}px`
            },
            class: `${T}-row-indent indent-level-${$}`
          }, null), F({
            prefixCls: T,
            expanded: a.value,
            expandable: u.value,
            record: S,
            onExpand: d
          })]) : null;
          return h(sg, Q(Q({
            cellType: "body",
            class: ae,
            ellipsis: W.ellipsis,
            align: W.align,
            component: w,
            prefixCls: T,
            key: se,
            record: S,
            index: C,
            renderIndex: e.renderIndex,
            dataIndex: U,
            customRender: q
          }, ie), {}, {
            additionalProps: re,
            column: W,
            transformCellText: R,
            appendNode: te
          }), null);
        })]
      });
      let Z;
      if (l.value && (i.value || a.value)) {
        const W = A({
          record: S,
          index: C,
          indent: $ + 1,
          expanded: a.value
        }), K = H && H(S, C, $);
        Z = h(P2, {
          expanded: a.value,
          class: Me(`${T}-expanded-row`, `${T}-expanded-row-level-${$ + 1}`, K),
          prefixCls: T,
          component: I,
          cellComponent: w,
          colSpan: N.length,
          isEmpty: !1
        }, {
          default: () => [W]
        });
      }
      return h(Je, null, [j, Z]);
    };
  }
});
function I2(e, t, n, o, r, i) {
  const a = [];
  a.push({
    record: e,
    indent: t,
    index: i
  });
  const l = r(e), s = o?.has(l);
  if (e && Array.isArray(e[n]) && s)
    for (let u = 0; u < e[n].length; u += 1) {
      const c = I2(e[n][u], t + 1, n, o, r, u);
      a.push(...c);
    }
  return a;
}
function JQ(e, t, n, o) {
  return E(() => {
    const i = t.value, a = n.value, l = e.value;
    if (a?.size) {
      const s = [];
      for (let u = 0; u < l?.length; u += 1) {
        const c = l[u];
        s.push(...I2(c, 0, i, a, o.value, u));
      }
      return s;
    }
    return l?.map((s, u) => ({
      record: s,
      indent: 0,
      index: u
    }));
  });
}
const T2 = Symbol("ResizeContextProps"), eZ = (e) => {
  Bt(T2, e);
}, tZ = () => zt(T2, {
  onColumnResize: () => {
  }
}), nZ = be({
  name: "TableBody",
  props: ["data", "getRowKey", "measureColumnWidth", "expandedKeys", "customRow", "rowExpandable", "childrenColumnName"],
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = tZ(), r = ua(), i = k2(), a = JQ(Kt(e, "data"), Kt(e, "childrenColumnName"), Kt(e, "expandedKeys"), Kt(e, "getRowKey")), l = $e(-1), s = $e(-1);
    let u;
    return FQ({
      startRow: l,
      endRow: s,
      onHover: (c, d) => {
        clearTimeout(u), u = setTimeout(() => {
          l.value = c, s.value = d;
        }, 100);
      }
    }), () => {
      var c;
      const {
        data: d,
        getRowKey: f,
        measureColumnWidth: p,
        expandedKeys: v,
        customRow: g,
        rowExpandable: m,
        childrenColumnName: x
      } = e, {
        onColumnResize: S
      } = o, {
        prefixCls: C,
        getComponent: P
      } = r, {
        flattenColumns: $
      } = i, I = P(["body", "wrapper"], "tbody"), w = P(["body", "row"], "tr"), T = P(["body", "cell"], "td");
      let M;
      d.length ? M = a.value.map((N, H) => {
        const {
          record: L,
          indent: F,
          index: A
        } = N, G = f(L, H);
        return h(ZQ, {
          key: G,
          rowKey: G,
          record: L,
          recordKey: G,
          index: H,
          renderIndex: A,
          rowComponent: w,
          cellComponent: T,
          expandedKeys: v,
          customRow: g,
          getRowKey: f,
          rowExpandable: m,
          childrenColumnName: x,
          indent: F
        }, null);
      }) : M = h(P2, {
        expanded: !0,
        class: `${C}-placeholder`,
        prefixCls: C,
        component: w,
        cellComponent: T,
        colSpan: $.length,
        isEmpty: !0
      }, {
        default: () => [(c = n.emptyNode) === null || c === void 0 ? void 0 : c.call(n)]
      });
      const R = lg($);
      return h(I, {
        class: `${C}-tbody`
      }, {
        default: () => [p && h("tr", {
          "aria-hidden": "true",
          class: `${C}-measure-row`,
          style: {
            height: 0,
            fontSize: 0
          }
        }, [R.map((N) => h(XQ, {
          key: N,
          columnKey: N,
          onColumnResize: S
        }, null))]), M]
      });
    };
  }
}), Yi = {};
var oZ = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
function Nb(e) {
  return e.reduce((t, n) => {
    const {
      fixed: o
    } = n, r = o === !0 ? "left" : o, i = n.children;
    return i && i.length > 0 ? [...t, ...Nb(i).map((a) => O({
      fixed: r
    }, a))] : [...t, O(O({}, n), {
      fixed: r
    })];
  }, []);
}
function rZ(e) {
  let t = !0;
  for (let o = 0; o < e.length; o += 1) {
    const r = e[o];
    if (t && r.fixed !== "left")
      t = !1;
    else if (!t && r.fixed === "left") {
      wn(!1, `Index ${o - 1} of \`columns\` missing \`fixed='left'\` prop.`);
      break;
    }
  }
  let n = !0;
  for (let o = e.length - 1; o >= 0; o -= 1) {
    const r = e[o];
    if (n && r.fixed !== "right")
      n = !1;
    else if (!n && r.fixed === "right") {
      wn(!1, `Index ${o + 1} of \`columns\` missing \`fixed='right'\` prop.`);
      break;
    }
  }
}
function iZ(e) {
  return e.map((t) => {
    const {
      fixed: n
    } = t, o = oZ(t, ["fixed"]);
    let r = n;
    return n === "left" ? r = "right" : n === "right" && (r = "left"), O({
      fixed: r
    }, o);
  });
}
function aZ(e, t) {
  let {
    prefixCls: n,
    columns: o,
    // children,
    expandable: r,
    expandedKeys: i,
    getRowKey: a,
    onTriggerExpand: l,
    expandIcon: s,
    rowExpandable: u,
    expandIconColumnIndex: c,
    direction: d,
    expandRowByClick: f,
    expandColumnWidth: p,
    expandFixed: v
  } = e;
  const g = $x(), m = E(() => {
    if (r.value) {
      let C = o.value.slice();
      if (process.env.NODE_ENV !== "production" && c.value >= 0 && wn(!1, "`expandIconColumnIndex` is deprecated. Please use `Table.EXPAND_COLUMN` in `columns` instead."), !C.includes(Yi)) {
        const L = c.value || 0;
        L >= 0 && C.splice(L, 0, Yi);
      }
      process.env.NODE_ENV !== "production" && C.filter((L) => L === Yi).length > 1 && wn(!1, "There exist more than one `EXPAND_COLUMN` in `columns`.");
      const P = C.indexOf(Yi);
      C = C.filter((L, F) => L !== Yi || F === P);
      const $ = o.value[P];
      let I;
      (v.value === "left" || v.value) && !c.value ? I = "left" : (v.value === "right" || v.value) && c.value === o.value.length ? I = "right" : I = $ ? $.fixed : null;
      const w = i.value, T = u.value, M = s.value, R = n.value, N = f.value, H = {
        [Ru]: {
          class: `${n.value}-expand-icon-col`,
          columnType: "EXPAND_COLUMN"
        },
        title: Nh(g.value, "expandColumnTitle", {}, () => [""]),
        fixed: I,
        class: `${n.value}-row-expand-icon-cell`,
        width: p.value,
        customRender: (L) => {
          let {
            record: F,
            index: A
          } = L;
          const G = a.value(F, A), j = w.has(G), Z = T ? T(F) : !0, W = M({
            prefixCls: R,
            expanded: j,
            expandable: Z,
            record: F,
            onExpand: l
          });
          return N ? h("span", {
            onClick: (K) => K.stopPropagation()
          }, [W]) : W;
        }
      };
      return C.map((L) => L === Yi ? H : L);
    }
    return process.env.NODE_ENV !== "production" && o.value.includes(Yi) && wn(!1, "`expandable` is not config but there exist `EXPAND_COLUMN` in `columns`."), o.value.filter((C) => C !== Yi);
  }), x = E(() => {
    let C = m.value;
    return t.value && (C = t.value(C)), C.length || (C = [{
      customRender: () => null
    }]), C;
  }), S = E(() => d.value === "rtl" ? iZ(Nb(x.value)) : Nb(x.value));
  return process.env.NODE_ENV !== "production" && It(() => {
    setTimeout(() => {
      rZ(S.value);
    });
  }), [x, S];
}
function _2(e) {
  const t = $e(e);
  let n;
  const o = $e([]);
  function r(i) {
    o.value.push(i), Vt.cancel(n), n = Vt(() => {
      const a = o.value;
      o.value = [], a.forEach((l) => {
        t.value = l(t.value);
      });
    });
  }
  return qt(() => {
    Vt.cancel(n);
  }), [t, r];
}
function lZ(e) {
  const t = le(null), n = le();
  function o() {
    clearTimeout(n.value);
  }
  function r(a) {
    t.value = a, o(), n.value = setTimeout(() => {
      t.value = null, n.value = void 0;
    }, 100);
  }
  function i() {
    return t.value;
  }
  return qt(() => {
    o();
  }), [r, i];
}
function sZ(e, t, n) {
  return E(() => {
    const r = [], i = [];
    let a = 0, l = 0;
    const s = e.value, u = t.value, c = n.value;
    for (let d = 0; d < u; d += 1)
      if (c === "rtl") {
        i[d] = l, l += s[d] || 0;
        const f = u - d - 1;
        r[f] = a, a += s[f] || 0;
      } else {
        r[d] = a, a += s[d] || 0;
        const f = u - d - 1;
        i[f] = l, l += s[f] || 0;
      }
    return {
      left: r,
      right: i
    };
  });
}
var uZ = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
function M2(e) {
  let {
    colWidths: t,
    columns: n,
    columCount: o
  } = e;
  const r = [], i = o || n.length;
  let a = !1;
  for (let l = i - 1; l >= 0; l -= 1) {
    const s = t[l], u = n && n[l], c = u && u[Ru];
    if (s || c || a) {
      const d = c || {}, {
        columnType: f
      } = d, p = uZ(d, ["columnType"]);
      r.unshift(h("col", Q({
        key: l,
        style: {
          width: typeof s == "number" ? `${s}px` : s
        }
      }, p), null)), a = !0;
    }
  }
  return h("colgroup", null, [r]);
}
function Rb(e, t) {
  let {
    slots: n
  } = t;
  var o;
  return h("div", null, [(o = n.default) === null || o === void 0 ? void 0 : o.call(n)]);
}
Rb.displayName = "Panel";
let cZ = 0;
const dZ = be({
  name: "TableSummary",
  props: ["fixed"],
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = ua(), r = `table-summary-uni-key-${++cZ}`, i = E(() => e.fixed === "" || e.fixed);
    return It(() => {
      o.summaryCollect(r, i.value);
    }), qt(() => {
      o.summaryCollect(r, !1);
    }), () => {
      var a;
      return (a = n.default) === null || a === void 0 ? void 0 : a.call(n);
    };
  }
}), fZ = be({
  compatConfig: {
    MODE: 3
  },
  name: "ATableSummaryRow",
  setup(e, t) {
    let {
      slots: n
    } = t;
    return () => {
      var o;
      return h("tr", null, [(o = n.default) === null || o === void 0 ? void 0 : o.call(n)]);
    };
  }
}), E2 = Symbol("SummaryContextProps"), pZ = (e) => {
  Bt(E2, e);
}, hZ = () => zt(E2, {}), gZ = be({
  name: "ATableSummaryCell",
  props: ["index", "colSpan", "rowSpan", "align"],
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const r = ua(), i = hZ();
    return () => {
      const {
        index: a,
        colSpan: l = 1,
        rowSpan: s,
        align: u
      } = e, {
        prefixCls: c,
        direction: d
      } = r, {
        scrollColumnIndex: f,
        stickyOffsets: p,
        flattenColumns: v
      } = i, m = a + l - 1 + 1 === f ? l + 1 : l, x = Px(a, a + m - 1, v, p, d);
      return h(sg, Q({
        class: n.class,
        index: a,
        component: "td",
        prefixCls: c,
        record: null,
        dataIndex: null,
        align: u,
        colSpan: m,
        rowSpan: s,
        customRender: () => {
          var S;
          return (S = o.default) === null || S === void 0 ? void 0 : S.call(o);
        }
      }, x), null);
    };
  }
}), zf = be({
  name: "TableFooter",
  inheritAttrs: !1,
  props: ["stickyOffsets", "flattenColumns"],
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = ua();
    return pZ($n({
      stickyOffsets: Kt(e, "stickyOffsets"),
      flattenColumns: Kt(e, "flattenColumns"),
      scrollColumnIndex: E(() => {
        const r = e.flattenColumns.length - 1, i = e.flattenColumns[r];
        return i?.scrollbar ? r : null;
      })
    })), () => {
      var r;
      const {
        prefixCls: i
      } = o;
      return h("tfoot", {
        class: `${i}-summary`
      }, [(r = n.default) === null || r === void 0 ? void 0 : r.call(n)]);
    };
  }
}), vZ = dZ;
function mZ(e) {
  let {
    prefixCls: t,
    record: n,
    onExpand: o,
    expanded: r,
    expandable: i
  } = e;
  const a = `${t}-row-expand-icon`;
  if (!i)
    return h("span", {
      class: [a, `${t}-row-spaced`]
    }, null);
  const l = (s) => {
    o(n, s), s.stopPropagation();
  };
  return h("span", {
    class: {
      [a]: !0,
      [`${t}-row-expanded`]: r,
      [`${t}-row-collapsed`]: !r
    },
    onClick: l
  }, null);
}
function bZ(e, t, n) {
  const o = [];
  function r(i) {
    (i || []).forEach((a, l) => {
      o.push(t(a, l)), r(a[n]);
    });
  }
  return r(e), o;
}
const yZ = be({
  name: "StickyScrollBar",
  inheritAttrs: !1,
  props: ["offsetScroll", "container", "scrollBodyRef", "scrollBodySizeInfo"],
  emits: ["scroll"],
  setup(e, t) {
    let {
      emit: n,
      expose: o
    } = t;
    const r = ua(), i = $e(0), a = $e(0), l = $e(0);
    It(() => {
      i.value = e.scrollBodySizeInfo.scrollWidth || 0, a.value = e.scrollBodySizeInfo.clientWidth || 0, l.value = i.value && a.value * (a.value / i.value);
    }, {
      flush: "post"
    });
    const s = $e(), [u, c] = _2({
      scrollLeft: 0,
      isHiddenScrollBar: !0
    }), d = le({
      delta: 0,
      x: 0
    }), f = $e(!1), p = () => {
      f.value = !1;
    }, v = (w) => {
      d.value = {
        delta: w.pageX - u.value.scrollLeft,
        x: 0
      }, f.value = !0, w.preventDefault();
    }, g = (w) => {
      const {
        buttons: T
      } = w || window?.event;
      if (!f.value || T === 0) {
        f.value && (f.value = !1);
        return;
      }
      let M = d.value.x + w.pageX - d.value.x - d.value.delta;
      M <= 0 && (M = 0), M + l.value >= a.value && (M = a.value - l.value), n("scroll", {
        scrollLeft: M / a.value * (i.value + 2)
      }), d.value.x = w.pageX;
    }, m = () => {
      if (!e.scrollBodyRef.value)
        return;
      const w = Y1(e.scrollBodyRef.value).top, T = w + e.scrollBodyRef.value.offsetHeight, M = e.container === window ? document.documentElement.scrollTop + window.innerHeight : Y1(e.container).top + e.container.clientHeight;
      T - Rp() <= M || w >= M - e.offsetScroll ? c((R) => O(O({}, R), {
        isHiddenScrollBar: !0
      })) : c((R) => O(O({}, R), {
        isHiddenScrollBar: !1
      }));
    };
    o({
      setScrollLeft: (w) => {
        c((T) => O(O({}, T), {
          scrollLeft: w / i.value * a.value || 0
        }));
      }
    });
    let S = null, C = null, P = null, $ = null;
    At(() => {
      S = Ho(document.body, "mouseup", p, !1), C = Ho(document.body, "mousemove", g, !1), P = Ho(window, "resize", m, !1);
    }), RP(() => {
      Yt(() => {
        m();
      });
    }), At(() => {
      setTimeout(() => {
        Ie([l, f], () => {
          m();
        }, {
          immediate: !0,
          flush: "post"
        });
      });
    }), Ie(() => e.container, () => {
      $?.remove(), $ = Ho(e.container, "scroll", m, !1);
    }, {
      immediate: !0,
      flush: "post"
    }), qt(() => {
      S?.remove(), C?.remove(), $?.remove(), P?.remove();
    }), Ie(() => O({}, u.value), (w, T) => {
      w.isHiddenScrollBar !== T?.isHiddenScrollBar && !w.isHiddenScrollBar && c((M) => {
        const R = e.scrollBodyRef.value;
        return R ? O(O({}, M), {
          scrollLeft: R.scrollLeft / R.scrollWidth * R.clientWidth
        }) : M;
      });
    }, {
      immediate: !0
    });
    const I = Rp();
    return () => {
      if (i.value <= a.value || !l.value || u.value.isHiddenScrollBar)
        return null;
      const {
        prefixCls: w
      } = r;
      return h("div", {
        style: {
          height: `${I}px`,
          width: `${a.value}px`,
          bottom: `${e.offsetScroll}px`
        },
        class: `${w}-sticky-scroll`
      }, [h("div", {
        onMousedown: v,
        ref: s,
        class: Me(`${w}-sticky-scroll-bar`, {
          [`${w}-sticky-scroll-bar-active`]: f.value
        }),
        style: {
          width: `${l.value}px`,
          transform: `translate3d(${u.value.scrollLeft}px, 0, 0)`
        }
      }, null)]);
    };
  }
}), d$ = wr() ? window : null;
function xZ(e, t) {
  return E(() => {
    const {
      offsetHeader: n = 0,
      offsetSummary: o = 0,
      offsetScroll: r = 0,
      getContainer: i = () => d$
    } = typeof e.value == "object" ? e.value : {}, a = i() || d$, l = !!e.value;
    return {
      isSticky: l,
      stickyClassName: l ? `${t.value}-sticky-holder` : "",
      offsetHeader: n,
      offsetSummary: o,
      offsetScroll: r,
      container: a
    };
  });
}
function wZ(e, t) {
  return E(() => {
    const n = [], o = e.value, r = t.value;
    for (let i = 0; i < r; i += 1) {
      const a = o[i];
      if (a !== void 0)
        n[i] = a;
      else
        return null;
    }
    return n;
  });
}
const f$ = be({
  name: "FixedHolder",
  inheritAttrs: !1,
  props: ["columns", "flattenColumns", "stickyOffsets", "customHeaderRow", "noData", "maxContentScroll", "colWidths", "columCount", "direction", "fixHeader", "stickyTopOffset", "stickyBottomOffset", "stickyClassName"],
  emits: ["scroll"],
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      emit: r
    } = t;
    const i = ua(), a = E(() => i.isSticky && !e.fixHeader ? 0 : i.scrollbarSize), l = le(), s = (g) => {
      const {
        currentTarget: m,
        deltaX: x
      } = g;
      x && (r("scroll", {
        currentTarget: m,
        scrollLeft: m.scrollLeft + x
      }), g.preventDefault());
    }, u = le();
    At(() => {
      Yt(() => {
        u.value = Ho(l.value, "wheel", s);
      });
    }), qt(() => {
      var g;
      (g = u.value) === null || g === void 0 || g.remove();
    });
    const c = E(() => e.flattenColumns.every((g) => g.width && g.width !== 0 && g.width !== "0px")), d = le([]), f = le([]);
    It(() => {
      const g = e.flattenColumns[e.flattenColumns.length - 1], m = {
        fixed: g ? g.fixed : null,
        scrollbar: !0,
        customHeaderCell: () => ({
          class: `${i.prefixCls}-cell-scrollbar`
        })
      };
      d.value = a.value ? [...e.columns, m] : e.columns, f.value = a.value ? [...e.flattenColumns, m] : e.flattenColumns;
    });
    const p = E(() => {
      const {
        stickyOffsets: g,
        direction: m
      } = e, {
        right: x,
        left: S
      } = g;
      return O(O({}, g), {
        left: m === "rtl" ? [...S.map((C) => C + a.value), 0] : S,
        right: m === "rtl" ? x : [...x.map((C) => C + a.value), 0],
        isSticky: i.isSticky
      });
    }), v = wZ(Kt(e, "colWidths"), Kt(e, "columCount"));
    return () => {
      var g;
      const {
        noData: m,
        columCount: x,
        stickyTopOffset: S,
        stickyBottomOffset: C,
        stickyClassName: P,
        maxContentScroll: $
      } = e, {
        isSticky: I
      } = i;
      return h("div", {
        style: O({
          overflow: "hidden"
        }, I ? {
          top: `${S}px`,
          bottom: `${C}px`
        } : {}),
        ref: l,
        class: Me(n.class, {
          [P]: !!P
        })
      }, [h("table", {
        style: {
          tableLayout: "fixed",
          visibility: m || v.value ? null : "hidden"
        }
      }, [(!m || !$ || c.value) && h(M2, {
        colWidths: v.value ? [...v.value, a.value] : [],
        columCount: x + 1,
        columns: f.value
      }, null), (g = o.default) === null || g === void 0 ? void 0 : g.call(o, O(O({}, e), {
        stickyOffsets: p.value,
        columns: d.value,
        flattenColumns: f.value
      }))])]);
    };
  }
});
function p$(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(FE(n.map((r) => [r, Kt(e, r)])));
}
const SZ = [], CZ = {}, zb = "rc-table-internal-hook", $Z = be({
  name: "VcTable",
  inheritAttrs: !1,
  props: ["prefixCls", "data", "columns", "rowKey", "tableLayout", "scroll", "rowClassName", "title", "footer", "id", "showHeader", "components", "customRow", "customHeaderRow", "direction", "expandFixed", "expandColumnWidth", "expandedRowKeys", "defaultExpandedRowKeys", "expandedRowRender", "expandRowByClick", "expandIcon", "onExpand", "onExpandedRowsChange", "onUpdate:expandedRowKeys", "defaultExpandAllRows", "indentSize", "expandIconColumnIndex", "expandedRowClassName", "childrenColumnName", "rowExpandable", "sticky", "transformColumns", "internalHooks", "internalRefs", "canExpandable", "onUpdateInternalRefs", "transformCellText"],
  emits: ["expand", "expandedRowsChange", "updateInternalRefs", "update:expandedRowKeys"],
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      emit: r
    } = t;
    const i = E(() => e.data || SZ), a = E(() => !!i.value.length), l = E(() => AQ(e.components, {})), s = (Ce, Ae) => x2(l.value, Ce) || Ae, u = E(() => {
      const Ce = e.rowKey;
      return typeof Ce == "function" ? Ce : (Ae) => {
        const qe = Ae && Ae[Ce];
        return process.env.NODE_ENV !== "production" && wn(qe !== void 0, "Each record in table should have a unique `key` prop, or set `rowKey` to an unique primary key."), qe;
      };
    }), c = E(() => e.expandIcon || mZ), d = E(() => e.childrenColumnName || "children"), f = E(() => e.expandedRowRender ? "row" : e.canExpandable || i.value.some((Ce) => Ce && typeof Ce == "object" && Ce[d.value]) ? "nest" : !1), p = $e([]);
    It(() => {
      e.defaultExpandedRowKeys && (p.value = e.defaultExpandedRowKeys), e.defaultExpandAllRows && (p.value = bZ(i.value, u.value, d.value));
    })();
    const g = E(() => new Set(e.expandedRowKeys || p.value || [])), m = (Ce) => {
      const Ae = u.value(Ce, i.value.indexOf(Ce));
      let qe;
      const We = g.value.has(Ae);
      We ? (g.value.delete(Ae), qe = [...g.value]) : qe = [...g.value, Ae], p.value = qe, r("expand", !We, Ce), r("update:expandedRowKeys", qe), r("expandedRowsChange", qe);
    };
    process.env.NODE_ENV !== "production" && e.expandedRowRender && i.value.some((Ce) => Array.isArray(Ce?.[d.value])) && wn(!1, "`expandedRowRender` should not use with nested Table");
    const x = le(0), [S, C] = aZ(O(O({}, ys(e)), {
      // children,
      expandable: E(() => !!e.expandedRowRender),
      expandedKeys: g,
      getRowKey: u,
      onTriggerExpand: m,
      expandIcon: c
    }), E(() => e.internalHooks === zb ? e.transformColumns : null)), P = E(() => ({
      columns: S.value,
      flattenColumns: C.value
    })), $ = le(), I = le(), w = le(), T = le({
      scrollWidth: 0,
      clientWidth: 0
    }), M = le(), [R, N] = Cn(!1), [H, L] = Cn(!1), [F, A] = _2(/* @__PURE__ */ new Map()), G = E(() => lg(C.value)), j = E(() => G.value.map((Ce) => F.value.get(Ce))), Z = E(() => C.value.length), W = sZ(j, Z, Kt(e, "direction")), K = E(() => e.scroll && Db(e.scroll.y)), q = E(() => e.scroll && Db(e.scroll.x) || !!e.expandFixed), U = E(() => q.value && C.value.some((Ce) => {
      let {
        fixed: Ae
      } = Ce;
      return Ae;
    })), ae = le(), se = xZ(Kt(e, "sticky"), Kt(e, "prefixCls")), ie = $n({}), re = E(() => {
      const Ce = Object.values(ie)[0];
      return (K.value || se.value.isSticky) && Ce;
    }), te = (Ce, Ae) => {
      Ae ? ie[Ce] = Ae : delete ie[Ce];
    }, ve = le({}), ce = le({}), fe = le({});
    It(() => {
      K.value && (ce.value = {
        overflowY: "scroll",
        maxHeight: cs(e.scroll.y)
      }), q.value && (ve.value = {
        overflowX: "auto"
      }, K.value || (ce.value = {
        overflowY: "hidden"
      }), fe.value = {
        width: e.scroll.x === !0 ? "auto" : cs(e.scroll.x),
        minWidth: "100%"
      });
    });
    const ge = (Ce, Ae) => {
      Rh($.value) && A((qe) => {
        if (qe.get(Ce) !== Ae) {
          const We = new Map(qe);
          return We.set(Ce, Ae), We;
        }
        return qe;
      });
    }, [Te, ze] = lZ();
    function Ke(Ce, Ae) {
      if (!Ae)
        return;
      if (typeof Ae == "function") {
        Ae(Ce);
        return;
      }
      const qe = Ae.$el || Ae;
      qe.scrollLeft !== Ce && (qe.scrollLeft = Ce);
    }
    const He = (Ce) => {
      let {
        currentTarget: Ae,
        scrollLeft: qe
      } = Ce;
      var We;
      const tt = e.direction === "rtl", Ee = typeof qe == "number" ? qe : Ae.scrollLeft, Re = Ae || CZ;
      if ((!ze() || ze() === Re) && (Te(Re), Ke(Ee, I.value), Ke(Ee, w.value), Ke(Ee, M.value), Ke(Ee, (We = ae.value) === null || We === void 0 ? void 0 : We.setScrollLeft)), Ae) {
        const {
          scrollWidth: Be,
          clientWidth: rt
        } = Ae;
        tt ? (N(-Ee < Be - rt), L(-Ee > 0)) : (N(Ee > 0), L(Ee < Be - rt));
      }
    }, Ne = () => {
      q.value && w.value ? He({
        currentTarget: w.value
      }) : (N(!1), L(!1));
    };
    let Xe;
    const De = (Ce) => {
      Ce !== x.value && (Ne(), x.value = $.value ? $.value.offsetWidth : Ce);
    }, Fe = (Ce) => {
      let {
        width: Ae
      } = Ce;
      if (clearTimeout(Xe), x.value === 0) {
        De(Ae);
        return;
      }
      Xe = setTimeout(() => {
        De(Ae);
      }, 100);
    };
    Ie([q, () => e.data, () => e.columns], () => {
      q.value && Ne();
    }, {
      flush: "post"
    });
    const [Ve, ot] = Cn(0);
    LQ(), At(() => {
      Yt(() => {
        var Ce, Ae;
        Ne(), ot($5(w.value).width), T.value = {
          scrollWidth: ((Ce = w.value) === null || Ce === void 0 ? void 0 : Ce.scrollWidth) || 0,
          clientWidth: ((Ae = w.value) === null || Ae === void 0 ? void 0 : Ae.clientWidth) || 0
        };
      });
    }), Ya(() => {
      Yt(() => {
        var Ce, Ae;
        const qe = ((Ce = w.value) === null || Ce === void 0 ? void 0 : Ce.scrollWidth) || 0, We = ((Ae = w.value) === null || Ae === void 0 ? void 0 : Ae.clientWidth) || 0;
        (T.value.scrollWidth !== qe || T.value.clientWidth !== We) && (T.value = {
          scrollWidth: qe,
          clientWidth: We
        });
      });
    }), It(() => {
      e.internalHooks === zb && e.internalRefs && e.onUpdateInternalRefs({
        body: w.value ? w.value.$el || w.value : null
      });
    }, {
      flush: "post"
    });
    const je = E(() => e.tableLayout ? e.tableLayout : U.value ? e.scroll.x === "max-content" ? "auto" : "fixed" : K.value || se.value.isSticky || C.value.some((Ce) => {
      let {
        ellipsis: Ae
      } = Ce;
      return Ae;
    }) ? "fixed" : "auto"), Pe = () => {
      var Ce;
      return a.value ? null : ((Ce = o.emptyText) === null || Ce === void 0 ? void 0 : Ce.call(o)) || "No Data";
    };
    EQ($n(O(O({}, ys(p$(e, "prefixCls", "direction", "transformCellText"))), {
      getComponent: s,
      scrollbarSize: Ve,
      fixedInfoList: E(() => C.value.map((Ce, Ae) => Px(Ae, Ae, C.value, W.value, e.direction))),
      isSticky: E(() => se.value.isSticky),
      summaryCollect: te
    }))), QQ($n(O(O({}, ys(p$(e, "rowClassName", "expandedRowClassName", "expandRowByClick", "expandedRowRender", "expandIconColumnIndex", "indentSize"))), {
      columns: S,
      flattenColumns: C,
      tableLayout: je,
      expandIcon: c,
      expandableType: f,
      onTriggerExpand: m
    }))), eZ({
      onColumnResize: ge
    }), GQ({
      componentWidth: x,
      fixHeader: K,
      fixColumn: U,
      horizonScroll: q
    });
    const Ge = () => h(nZ, {
      data: i.value,
      measureColumnWidth: K.value || q.value || se.value.isSticky,
      expandedKeys: g.value,
      rowExpandable: e.rowExpandable,
      getRowKey: u.value,
      customRow: e.customRow,
      childrenColumnName: d.value
    }, {
      emptyNode: Pe
    }), Se = () => h(M2, {
      colWidths: C.value.map((Ce) => {
        let {
          width: Ae
        } = Ce;
        return Ae;
      }),
      columns: C.value
    }, null);
    return () => {
      var Ce;
      const {
        prefixCls: Ae,
        scroll: qe,
        tableLayout: We,
        direction: tt,
        // Additional Part
        title: Ee = o.title,
        footer: Re = o.footer,
        // Customize
        id: Be,
        showHeader: rt,
        customHeaderRow: pt
      } = e, {
        isSticky: at,
        offsetHeader: ft,
        offsetSummary: wt,
        offsetScroll: Ct,
        stickyClassName: St,
        container: yt
      } = se.value, Ot = s(["table"], "table"), Wt = s(["body"]), Xt = (Ce = o.summary) === null || Ce === void 0 ? void 0 : Ce.call(o, {
        pageData: i.value
      });
      let ln = () => null;
      const pn = {
        colWidths: j.value,
        columCount: C.value.length,
        stickyOffsets: W.value,
        customHeaderRow: pt,
        fixHeader: K.value,
        scroll: qe
      };
      if (process.env.NODE_ENV !== "production" && typeof Wt == "function" && a.value && !K.value && wn(!1, "`components.body` with render props is only work on `scroll.y`."), K.value || at) {
        let hn = () => null;
        typeof Wt == "function" ? (hn = () => Wt(i.value, {
          scrollbarSize: Ve.value,
          ref: w,
          onScroll: He
        }), pn.colWidths = C.value.map((so, Uo) => {
          let {
            width: Ue
          } = so;
          const ht = Uo === S.value.length - 1 ? Ue - Ve.value : Ue;
          return typeof ht == "number" && !Number.isNaN(ht) ? ht : (wn(!1, "When use `components.body` with render props. Each column should have a fixed `width` value."), 0);
        })) : hn = () => h("div", {
          style: O(O({}, ve.value), ce.value),
          onScroll: He,
          ref: w,
          class: Me(`${Ae}-body`)
        }, [h(Ot, {
          style: O(O({}, fe.value), {
            tableLayout: je.value
          })
        }, {
          default: () => [Se(), Ge(), !re.value && Xt && h(zf, {
            stickyOffsets: W.value,
            flattenColumns: C.value
          }, {
            default: () => [Xt]
          })]
        })]);
        const Kn = O(O(O({
          noData: !i.value.length,
          maxContentScroll: q.value && qe.x === "max-content"
        }, pn), P.value), {
          direction: tt,
          stickyClassName: St,
          onScroll: He
        });
        ln = () => h(Je, null, [rt !== !1 && h(f$, Q(Q({}, Kn), {}, {
          stickyTopOffset: ft,
          class: `${Ae}-header`,
          ref: I
        }), {
          default: (so) => h(Je, null, [h(c$, so, null), re.value === "top" && h(zf, so, {
            default: () => [Xt]
          })])
        }), hn(), re.value && re.value !== "top" && h(f$, Q(Q({}, Kn), {}, {
          stickyBottomOffset: wt,
          class: `${Ae}-summary`,
          ref: M
        }), {
          default: (so) => h(zf, so, {
            default: () => [Xt]
          })
        }), at && w.value && h(yZ, {
          ref: ae,
          offsetScroll: Ct,
          scrollBodyRef: w,
          onScroll: He,
          container: yt,
          scrollBodySizeInfo: T.value
        }, null)]);
      } else
        ln = () => h("div", {
          style: O(O({}, ve.value), ce.value),
          class: Me(`${Ae}-content`),
          onScroll: He,
          ref: w
        }, [h(Ot, {
          style: O(O({}, fe.value), {
            tableLayout: je.value
          })
        }, {
          default: () => [Se(), rt !== !1 && h(c$, Q(Q({}, pn), P.value), null), Ge(), Xt && h(zf, {
            stickyOffsets: W.value,
            flattenColumns: C.value
          }, {
            default: () => [Xt]
          })]
        })]);
      const gt = Bs(n, {
        aria: !0,
        data: !0
      }), En = () => h("div", Q(Q({}, gt), {}, {
        class: Me(Ae, {
          [`${Ae}-rtl`]: tt === "rtl",
          [`${Ae}-ping-left`]: R.value,
          [`${Ae}-ping-right`]: H.value,
          [`${Ae}-layout-fixed`]: We === "fixed",
          [`${Ae}-fixed-header`]: K.value,
          /** No used but for compatible */
          [`${Ae}-fixed-column`]: U.value,
          [`${Ae}-scroll-horizontal`]: q.value,
          [`${Ae}-has-fix-left`]: C.value[0] && C.value[0].fixed,
          [`${Ae}-has-fix-right`]: C.value[Z.value - 1] && C.value[Z.value - 1].fixed === "right",
          [n.class]: n.class
        }),
        style: n.style,
        id: Be,
        ref: $
      }), [Ee && h(Rb, {
        class: `${Ae}-title`
      }, {
        default: () => [Ee(i.value)]
      }), h("div", {
        class: `${Ae}-container`
      }, [ln()]), Re && h(Rb, {
        class: `${Ae}-footer`
      }, {
        default: () => [Re(i.value)]
      })]);
      return q.value ? h(Al, {
        onResize: Fe
      }, {
        default: En
      }) : En();
    };
  }
});
function PZ() {
  const e = O({}, arguments.length <= 0 ? void 0 : arguments[0]);
  for (let t = 1; t < arguments.length; t++) {
    const n = t < 0 || arguments.length <= t ? void 0 : arguments[t];
    n && Object.keys(n).forEach((o) => {
      const r = n[o];
      r !== void 0 && (e[o] = r);
    });
  }
  return e;
}
const Fb = 10;
function OZ(e, t) {
  const n = {
    current: e.current,
    pageSize: e.pageSize
  };
  return Object.keys(t && typeof t == "object" ? t : {}).forEach((r) => {
    const i = e[r];
    typeof i != "function" && (n[r] = i);
  }), n;
}
function kZ(e, t, n) {
  const o = E(() => t.value && typeof t.value == "object" ? t.value : {}), r = E(() => o.value.total || 0), [i, a] = Cn(() => ({
    current: "defaultCurrent" in o.value ? o.value.defaultCurrent : 1,
    pageSize: "defaultPageSize" in o.value ? o.value.defaultPageSize : Fb
  })), l = E(() => {
    const c = PZ(i.value, o.value, {
      total: r.value > 0 ? r.value : e.value
    }), d = Math.ceil((r.value || e.value) / c.pageSize);
    return c.current > d && (c.current = d || 1), c;
  }), s = (c, d) => {
    t.value !== !1 && a({
      current: c ?? 1,
      pageSize: d || l.value.pageSize
    });
  }, u = (c, d) => {
    var f, p;
    t.value && ((p = (f = o.value).onChange) === null || p === void 0 || p.call(f, c, d)), s(c, d), n(c, d || l.value.pageSize);
  };
  return [E(() => t.value === !1 ? {} : O(O({}, l.value), {
    onChange: u
  })), s];
}
function IZ(e, t, n) {
  const o = $e({});
  Ie([e, t, n], () => {
    const i = /* @__PURE__ */ new Map(), a = n.value, l = t.value;
    function s(u) {
      u.forEach((c, d) => {
        const f = a(c, d);
        i.set(f, c), c && typeof c == "object" && l in c && s(c[l] || []);
      });
    }
    s(e.value), o.value = {
      kvMap: i
    };
  }, {
    deep: !0,
    immediate: !0
  });
  function r(i) {
    return o.value.kvMap.get(i);
  }
  return [r];
}
const vi = {}, Bb = "SELECT_ALL", Lb = "SELECT_INVERT", Hb = "SELECT_NONE", TZ = [];
function D2(e, t) {
  let n = [];
  return (t || []).forEach((o) => {
    n.push(o), o && typeof o == "object" && e in o && (n = [...n, ...D2(e, o[e])]);
  }), n;
}
function _Z(e, t) {
  const n = E(() => {
    const M = e.value || {}, {
      checkStrictly: R = !0
    } = M;
    return O(O({}, M), {
      checkStrictly: R
    });
  }), [o, r] = sr(n.value.selectedRowKeys || n.value.defaultSelectedRowKeys || TZ, {
    value: E(() => n.value.selectedRowKeys)
  }), i = $e(/* @__PURE__ */ new Map()), a = (M) => {
    if (n.value.preserveSelectedRowKeys) {
      const R = /* @__PURE__ */ new Map();
      M.forEach((N) => {
        let H = t.getRecordByKey(N);
        !H && i.value.has(N) && (H = i.value.get(N)), R.set(N, H);
      }), i.value = R;
    }
  };
  It(() => {
    a(o.value);
  });
  const l = E(() => n.value.checkStrictly ? null : rx(t.data.value, {
    externalGetKey: t.getRowKey.value,
    childrenPropName: t.childrenColumnName.value
  }).keyEntities), s = E(() => D2(t.childrenColumnName.value, t.pageData.value)), u = E(() => {
    const M = /* @__PURE__ */ new Map(), R = t.getRowKey.value, N = n.value.getCheckboxProps;
    return s.value.forEach((H, L) => {
      const F = R(H, L), A = (N ? N(H) : null) || {};
      M.set(F, A), process.env.NODE_ENV !== "production" && ("checked" in A || "defaultChecked" in A) && dn(!1, "Table", "Do not set `checked` or `defaultChecked` in `getCheckboxProps`. Please use `selectedRowKeys` instead.");
    }), M;
  }), {
    maxLevel: c,
    levelEntities: d
  } = eM(l), f = (M) => {
    var R;
    return !!(!((R = u.value.get(t.getRowKey.value(M))) === null || R === void 0) && R.disabled);
  }, p = E(() => {
    if (n.value.checkStrictly)
      return [o.value || [], []];
    const {
      checkedKeys: M,
      halfCheckedKeys: R
    } = Au(o.value, !0, l.value, c.value, d.value, f);
    return [M || [], R];
  }), v = E(() => p.value[0]), g = E(() => p.value[1]), m = E(() => {
    const M = n.value.type === "radio" ? v.value.slice(0, 1) : v.value;
    return new Set(M);
  }), x = E(() => n.value.type === "radio" ? /* @__PURE__ */ new Set() : new Set(g.value)), [S, C] = Cn(null), P = (M) => {
    let R, N;
    a(M);
    const {
      preserveSelectedRowKeys: H,
      onChange: L
    } = n.value, {
      getRecordByKey: F
    } = t;
    H ? (R = M, N = M.map((A) => i.value.get(A))) : (R = [], N = [], M.forEach((A) => {
      const G = F(A);
      G !== void 0 && (R.push(A), N.push(G));
    })), r(R), L?.(R, N);
  }, $ = (M, R, N, H) => {
    const {
      onSelect: L
    } = n.value, {
      getRecordByKey: F
    } = t || {};
    if (L) {
      const A = N.map((G) => F(G));
      L(F(M), R, A, H);
    }
    P(N);
  }, I = E(() => {
    const {
      onSelectInvert: M,
      onSelectNone: R,
      selections: N,
      hideSelectAll: H
    } = n.value, {
      data: L,
      pageData: F,
      getRowKey: A,
      locale: G
    } = t;
    return !N || H ? null : (N === !0 ? [Bb, Lb, Hb] : N).map((Z) => Z === Bb ? {
      key: "all",
      text: G.value.selectionAll,
      onSelect() {
        P(L.value.map((W, K) => A.value(W, K)).filter((W) => {
          const K = u.value.get(W);
          return !K?.disabled || m.value.has(W);
        }));
      }
    } : Z === Lb ? {
      key: "invert",
      text: G.value.selectInvert,
      onSelect() {
        const W = new Set(m.value);
        F.value.forEach((q, U) => {
          const ae = A.value(q, U), se = u.value.get(ae);
          se?.disabled || (W.has(ae) ? W.delete(ae) : W.add(ae));
        });
        const K = Array.from(W);
        M && (dn(!1, "Table", "`onSelectInvert` will be removed in future. Please use `onChange` instead."), M(K)), P(K);
      }
    } : Z === Hb ? {
      key: "none",
      text: G.value.selectNone,
      onSelect() {
        R?.(), P(Array.from(m.value).filter((W) => {
          const K = u.value.get(W);
          return K?.disabled;
        }));
      }
    } : Z);
  }), w = E(() => s.value.length);
  return [(M) => {
    var R;
    const {
      onSelectAll: N,
      onSelectMultiple: H,
      columnWidth: L,
      type: F,
      fixed: A,
      renderCell: G,
      hideSelectAll: j,
      checkStrictly: Z
    } = n.value, {
      prefixCls: W,
      getRecordByKey: K,
      getRowKey: q,
      expandType: U,
      getPopupContainer: ae
    } = t;
    if (!e.value)
      return process.env.NODE_ENV !== "production" && dn(!M.includes(vi), "Table", "`rowSelection` is not config but `SELECTION_COLUMN` exists in the `columns`."), M.filter((De) => De !== vi);
    let se = M.slice();
    const ie = new Set(m.value), re = s.value.map(q.value).filter((De) => !u.value.get(De).disabled), te = re.every((De) => ie.has(De)), ve = re.some((De) => ie.has(De)), ce = () => {
      const De = [];
      te ? re.forEach((Ve) => {
        ie.delete(Ve), De.push(Ve);
      }) : re.forEach((Ve) => {
        ie.has(Ve) || (ie.add(Ve), De.push(Ve));
      });
      const Fe = Array.from(ie);
      N?.(!te, Fe.map((Ve) => K(Ve)), De.map((Ve) => K(Ve))), P(Fe);
    };
    let fe;
    if (F !== "radio") {
      let De;
      if (I.value) {
        const Pe = h(fo, {
          getPopupContainer: ae.value
        }, {
          default: () => [I.value.map((Ge, Se) => {
            const {
              key: Ce,
              text: Ae,
              onSelect: qe
            } = Ge;
            return h(fo.Item, {
              key: Ce || Se,
              onClick: () => {
                qe?.(re);
              }
            }, {
              default: () => [Ae]
            });
          })]
        });
        De = h("div", {
          class: `${W.value}-selection-extra`
        }, [h(Er, {
          overlay: Pe,
          getPopupContainer: ae.value
        }, {
          default: () => [h("span", null, [h(Rd, null, null)])]
        })]);
      }
      const Fe = s.value.map((Pe, Ge) => {
        const Se = q.value(Pe, Ge), Ce = u.value.get(Se) || {};
        return O({
          checked: ie.has(Se)
        }, Ce);
      }).filter((Pe) => {
        let {
          disabled: Ge
        } = Pe;
        return Ge;
      }), Ve = !!Fe.length && Fe.length === w.value, ot = Ve && Fe.every((Pe) => {
        let {
          checked: Ge
        } = Pe;
        return Ge;
      }), je = Ve && Fe.some((Pe) => {
        let {
          checked: Ge
        } = Pe;
        return Ge;
      });
      fe = !j && h("div", {
        class: `${W.value}-selection`
      }, [h(Eo, {
        checked: Ve ? ot : !!w.value && te,
        indeterminate: Ve ? !ot && je : !te && ve,
        onChange: ce,
        disabled: w.value === 0 || Ve,
        "aria-label": De ? "Custom selection" : "Select all",
        skipGroup: !0
      }, null), De]);
    }
    let ge;
    F === "radio" ? ge = (De) => {
      let {
        record: Fe,
        index: Ve
      } = De;
      const ot = q.value(Fe, Ve), je = ie.has(ot);
      return {
        node: h(To, Q(Q({}, u.value.get(ot)), {}, {
          checked: je,
          onClick: (Pe) => Pe.stopPropagation(),
          onChange: (Pe) => {
            ie.has(ot) || $(ot, !0, [ot], Pe.nativeEvent);
          }
        }), null),
        checked: je
      };
    } : ge = (De) => {
      let {
        record: Fe,
        index: Ve
      } = De;
      var ot;
      const je = q.value(Fe, Ve), Pe = ie.has(je), Ge = x.value.has(je), Se = u.value.get(je);
      let Ce;
      return U.value === "nest" ? (Ce = Ge, dn(typeof Se?.indeterminate != "boolean", "Table", "set `indeterminate` using `rowSelection.getCheckboxProps` is not allowed with tree structured dataSource.")) : Ce = (ot = Se?.indeterminate) !== null && ot !== void 0 ? ot : Ge, {
        node: h(Eo, Q(Q({}, Se), {}, {
          indeterminate: Ce,
          checked: Pe,
          skipGroup: !0,
          onClick: (Ae) => Ae.stopPropagation(),
          onChange: (Ae) => {
            let {
              nativeEvent: qe
            } = Ae;
            const {
              shiftKey: We
            } = qe;
            let tt = -1, Ee = -1;
            if (We && Z) {
              const Re = /* @__PURE__ */ new Set([S.value, je]);
              re.some((Be, rt) => {
                if (Re.has(Be))
                  if (tt === -1)
                    tt = rt;
                  else
                    return Ee = rt, !0;
                return !1;
              });
            }
            if (Ee !== -1 && tt !== Ee && Z) {
              const Re = re.slice(tt, Ee + 1), Be = [];
              Pe ? Re.forEach((pt) => {
                ie.has(pt) && (Be.push(pt), ie.delete(pt));
              }) : Re.forEach((pt) => {
                ie.has(pt) || (Be.push(pt), ie.add(pt));
              });
              const rt = Array.from(ie);
              H?.(!Pe, rt.map((pt) => K(pt)), Be.map((pt) => K(pt))), P(rt);
            } else {
              const Re = v.value;
              if (Z) {
                const Be = Pe ? Ki(Re, je) : $a(Re, je);
                $(je, !Pe, Be, qe);
              } else {
                const Be = Au([...Re, je], !0, l.value, c.value, d.value, f), {
                  checkedKeys: rt,
                  halfCheckedKeys: pt
                } = Be;
                let at = rt;
                if (Pe) {
                  const ft = new Set(rt);
                  ft.delete(je), at = Au(Array.from(ft), {
                    halfCheckedKeys: pt
                  }, l.value, c.value, d.value, f).checkedKeys;
                }
                $(je, !Pe, at, qe);
              }
            }
            C(je);
          }
        }), null),
        checked: Pe
      };
    };
    const Te = (De) => {
      let {
        record: Fe,
        index: Ve
      } = De;
      const {
        node: ot,
        checked: je
      } = ge({
        record: Fe,
        index: Ve
      });
      return G ? G(je, Fe, Ve, ot) : ot;
    };
    if (!se.includes(vi))
      if (se.findIndex((De) => {
        var Fe;
        return ((Fe = De[Ru]) === null || Fe === void 0 ? void 0 : Fe.columnType) === "EXPAND_COLUMN";
      }) === 0) {
        const [De, ...Fe] = se;
        se = [De, vi, ...Fe];
      } else
        se = [vi, ...se];
    const ze = se.indexOf(vi);
    process.env.NODE_ENV !== "production" && se.filter((De) => De === vi).length > 1 && dn(!1, "Table", "Multiple `SELECTION_COLUMN` exist in `columns`."), se = se.filter((De, Fe) => De !== vi || Fe === ze);
    const Ke = se[ze - 1], He = se[ze + 1];
    let Ne = A;
    Ne === void 0 && (He?.fixed !== void 0 ? Ne = He.fixed : Ke?.fixed !== void 0 && (Ne = Ke.fixed)), Ne && Ke && ((R = Ke[Ru]) === null || R === void 0 ? void 0 : R.columnType) === "EXPAND_COLUMN" && Ke.fixed === void 0 && (Ke.fixed = Ne);
    const Xe = {
      fixed: Ne,
      width: L,
      className: `${W.value}-selection-column`,
      title: n.value.columnTitle || fe,
      customRender: Te,
      [Ru]: {
        class: `${W.value}-selection-col`
      }
    };
    return se.map((De) => De === vi ? Xe : De);
  }, m];
}
var MZ = { icon: { tag: "svg", attrs: { viewBox: "0 0 1024 1024", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z" } }] }, name: "caret-down", theme: "outlined" };
function h$(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      EZ(e, r, n[r]);
    });
  }
  return e;
}
function EZ(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Ox = function(t, n) {
  var o = h$({}, t, n.attrs);
  return h(an, h$({}, o, {
    icon: MZ
  }), null);
};
Ox.displayName = "CaretDownOutlined";
Ox.inheritAttrs = !1;
var DZ = { icon: { tag: "svg", attrs: { viewBox: "0 0 1024 1024", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z" } }] }, name: "caret-up", theme: "outlined" };
function g$(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      AZ(e, r, n[r]);
    });
  }
  return e;
}
function AZ(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var kx = function(t, n) {
  var o = g$({}, t, n.attrs);
  return h(an, g$({}, o, {
    icon: DZ
  }), null);
};
kx.displayName = "CaretUpOutlined";
kx.inheritAttrs = !1;
var NZ = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
function As(e, t) {
  return "key" in e && e.key !== void 0 && e.key !== null ? e.key : e.dataIndex ? Array.isArray(e.dataIndex) ? e.dataIndex.join(".") : e.dataIndex : t;
}
function Gd(e, t) {
  return t ? `${t}-${e}` : `${e}`;
}
function Ix(e, t) {
  return typeof e == "function" ? e(t) : e;
}
function A2() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
  const t = go(e), n = [];
  return t.forEach((o) => {
    var r, i, a, l;
    if (!o)
      return;
    const s = o.key, u = ((r = o.props) === null || r === void 0 ? void 0 : r.style) || {}, c = ((i = o.props) === null || i === void 0 ? void 0 : i.class) || "", d = o.props || {};
    for (const [m, x] of Object.entries(d))
      d[Md(m)] = x;
    const f = o.children || {}, {
      default: p
    } = f, v = NZ(f, ["default"]), g = O(O(O({}, v), d), {
      style: u,
      class: c
    });
    if (s && (g.key = s), !((a = o.type) === null || a === void 0) && a.__ANT_TABLE_COLUMN_GROUP)
      g.children = A2(typeof p == "function" ? p() : p);
    else {
      const m = (l = o.children) === null || l === void 0 ? void 0 : l.default;
      g.customRender = g.customRender || m;
    }
    n.push(g);
  }), n;
}
const gp = "ascend", Nv = "descend";
function Jp(e) {
  return typeof e.sorter == "object" && typeof e.sorter.multiple == "number" ? e.sorter.multiple : !1;
}
function v$(e) {
  return typeof e == "function" ? e : e && typeof e == "object" && e.compare ? e.compare : !1;
}
function RZ(e, t) {
  return t ? e[e.indexOf(t) + 1] : e[0];
}
function Vb(e, t, n) {
  let o = [];
  function r(i, a) {
    o.push({
      column: i,
      key: As(i, a),
      multiplePriority: Jp(i),
      sortOrder: i.sortOrder
    });
  }
  return (e || []).forEach((i, a) => {
    const l = Gd(a, n);
    i.children ? ("sortOrder" in i && r(i, l), o = [...o, ...Vb(i.children, t, l)]) : i.sorter && ("sortOrder" in i ? r(i, l) : t && i.defaultSortOrder && o.push({
      column: i,
      key: As(i, l),
      multiplePriority: Jp(i),
      sortOrder: i.defaultSortOrder
    }));
  }), o;
}
function N2(e, t, n, o, r, i, a, l) {
  return (t || []).map((s, u) => {
    const c = Gd(u, l);
    let d = s;
    if (d.sorter) {
      const f = d.sortDirections || r, p = d.showSorterTooltip === void 0 ? a : d.showSorterTooltip, v = As(d, c), g = n.find((M) => {
        let {
          key: R
        } = M;
        return R === v;
      }), m = g ? g.sortOrder : null, x = RZ(f, m), S = f.includes(gp) && h(kx, {
        class: Me(`${e}-column-sorter-up`, {
          active: m === gp
        }),
        role: "presentation"
      }, null), C = f.includes(Nv) && h(Ox, {
        role: "presentation",
        class: Me(`${e}-column-sorter-down`, {
          active: m === Nv
        })
      }, null), {
        cancelSort: P,
        triggerAsc: $,
        triggerDesc: I
      } = i || {};
      let w = P;
      x === Nv ? w = I : x === gp && (w = $);
      const T = typeof p == "object" ? p : {
        title: w
      };
      d = O(O({}, d), {
        className: Me(d.className, {
          [`${e}-column-sort`]: m
        }),
        title: (M) => {
          const R = h("div", {
            class: `${e}-column-sorters`
          }, [h("span", {
            class: `${e}-column-title`
          }, [Ix(s.title, M)]), h("span", {
            class: Me(`${e}-column-sorter`, {
              [`${e}-column-sorter-full`]: !!(S && C)
            })
          }, [h("span", {
            class: `${e}-column-sorter-inner`
          }, [S, C])])]);
          return p ? h(Lo, T, {
            default: () => [R]
          }) : R;
        },
        customHeaderCell: (M) => {
          const R = s.customHeaderCell && s.customHeaderCell(M) || {}, N = R.onClick, H = R.onKeydown;
          return R.onClick = (L) => {
            o({
              column: s,
              key: v,
              sortOrder: x,
              multiplePriority: Jp(s)
            }), N && N(L);
          }, R.onKeydown = (L) => {
            L.keyCode === it.ENTER && (o({
              column: s,
              key: v,
              sortOrder: x,
              multiplePriority: Jp(s)
            }), H?.(L));
          }, m && (R["aria-sort"] = m === "ascend" ? "ascending" : "descending"), R.class = Me(R.class, `${e}-column-has-sorters`), R.tabindex = 0, R;
        }
      });
    }
    return "children" in d && (d = O(O({}, d), {
      children: N2(e, d.children, n, o, r, i, a, c)
    })), d;
  });
}
function m$(e) {
  const {
    column: t,
    sortOrder: n
  } = e;
  return {
    column: t,
    order: n,
    field: t.dataIndex,
    columnKey: t.key
  };
}
function b$(e) {
  const t = e.filter((n) => {
    let {
      sortOrder: o
    } = n;
    return o;
  }).map(m$);
  return t.length === 0 && e.length ? O(O({}, m$(e[e.length - 1])), {
    column: void 0
  }) : t.length <= 1 ? t[0] || {} : t;
}
function jb(e, t, n) {
  const o = t.slice().sort((a, l) => l.multiplePriority - a.multiplePriority), r = e.slice(), i = o.filter((a) => {
    let {
      column: {
        sorter: l
      },
      sortOrder: s
    } = a;
    return v$(l) && s;
  });
  return i.length ? r.sort((a, l) => {
    for (let s = 0; s < i.length; s += 1) {
      const u = i[s], {
        column: {
          sorter: c
        },
        sortOrder: d
      } = u, f = v$(c);
      if (f && d) {
        const p = f(a, l, d);
        if (p !== 0)
          return d === gp ? p : -p;
      }
    }
    return 0;
  }).map((a) => {
    const l = a[n];
    return l ? O(O({}, a), {
      [n]: jb(l, t, n)
    }) : a;
  }) : r;
}
function zZ(e) {
  let {
    prefixCls: t,
    mergedColumns: n,
    onSorterChange: o,
    sortDirections: r,
    tableLocale: i,
    showSorterTooltip: a
  } = e;
  const [l, s] = Cn(Vb(n.value, !0)), u = E(() => {
    let v = !0;
    const g = Vb(n.value, !1);
    if (!g.length)
      return l.value;
    const m = [];
    function x(C) {
      v ? m.push(C) : m.push(O(O({}, C), {
        sortOrder: null
      }));
    }
    let S = null;
    return g.forEach((C) => {
      S === null ? (x(C), C.sortOrder && (C.multiplePriority === !1 ? v = !1 : S = !0)) : (S && C.multiplePriority !== !1 || (v = !1), x(C));
    }), m;
  }), c = E(() => {
    const v = u.value.map((g) => {
      let {
        column: m,
        sortOrder: x
      } = g;
      return {
        column: m,
        order: x
      };
    });
    return {
      sortColumns: v,
      // Legacy
      sortColumn: v[0] && v[0].column,
      sortOrder: v[0] && v[0].order
    };
  });
  function d(v) {
    let g;
    v.multiplePriority === !1 || !u.value.length || u.value[0].multiplePriority === !1 ? g = [v] : g = [...u.value.filter((m) => {
      let {
        key: x
      } = m;
      return x !== v.key;
    }), v], s(g), o(b$(g), g);
  }
  const f = (v) => N2(t.value, v, u.value, d, r.value, i.value, a.value), p = E(() => b$(u.value));
  return [f, u, c, p];
}
var FZ = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z" } }] }, name: "filter", theme: "filled" };
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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      BZ(e, r, n[r]);
    });
  }
  return e;
}
function BZ(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Tx = function(t, n) {
  var o = y$({}, t, n.attrs);
  return h(an, y$({}, o, {
    icon: FZ
  }), null);
};
Tx.displayName = "FilterFilled";
Tx.inheritAttrs = !1;
const LZ = (e) => {
  const {
    keyCode: t
  } = e;
  t === it.ENTER && e.stopPropagation();
}, HZ = (e, t) => {
  let {
    slots: n
  } = t;
  var o;
  return h("div", {
    onClick: (r) => r.stopPropagation(),
    onKeydown: LZ
  }, [(o = n.default) === null || o === void 0 ? void 0 : o.call(n)]);
}, x$ = be({
  compatConfig: {
    MODE: 3
  },
  name: "FilterSearch",
  inheritAttrs: !1,
  props: {
    value: rn(),
    onChange: et(),
    filterSearch: en([Boolean, Function]),
    tablePrefixCls: rn(),
    locale: Mt()
  },
  setup(e) {
    return () => {
      const {
        value: t,
        onChange: n,
        filterSearch: o,
        tablePrefixCls: r,
        locale: i
      } = e;
      return o ? h("div", {
        class: `${r}-filter-dropdown-search`
      }, [h(kt, {
        placeholder: i.filterSearchPlaceholder,
        onChange: n,
        value: t,
        htmlSize: 1,
        class: `${r}-filter-dropdown-search-input`
      }, {
        prefix: () => h(zd, null, null)
      })]) : null;
    };
  }
});
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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const VZ = be({
  compatConfig: {
    MODE: 3
  },
  name: "MotionTreeNode",
  inheritAttrs: !1,
  props: O(O({}, X_), {
    active: Boolean,
    motion: Object,
    motionNodes: {
      type: Array
    },
    onMotionStart: Function,
    onMotionEnd: Function,
    motionType: String
  }),
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const r = $e(!0), i = nx(), a = $e(!1), l = E(() => e.motion ? e.motion : Kh()), s = (u, c) => {
      var d, f, p, v;
      c === "appear" ? (f = (d = l.value) === null || d === void 0 ? void 0 : d.onAfterEnter) === null || f === void 0 || f.call(d, u) : c === "leave" && ((v = (p = l.value) === null || p === void 0 ? void 0 : p.onAfterLeave) === null || v === void 0 || v.call(p, u)), a.value || e.onMotionEnd(), a.value = !0;
    };
    return Ie(() => e.motionNodes, () => {
      e.motionNodes && e.motionType === "hide" && r.value && Yt(() => {
        r.value = !1;
      });
    }, {
      immediate: !0,
      flush: "post"
    }), At(() => {
      e.motionNodes && e.onMotionStart();
    }), qt(() => {
      e.motionNodes && s();
    }), () => {
      const {
        motion: u,
        motionNodes: c,
        motionType: d,
        active: f,
        eventKey: p
      } = e, v = w$(e, ["motion", "motionNodes", "motionType", "active", "eventKey"]);
      return c ? h(Dr, Q(Q({}, l.value), {}, {
        appear: d === "show",
        onAfterAppear: (g) => s(g, "appear"),
        onAfterLeave: (g) => s(g, "leave")
      }), {
        default: () => [ti(h("div", {
          class: `${i.value.prefixCls}-treenode-motion`
        }, [c.map((g) => {
          const m = w$(g.data, []), {
            title: x,
            key: S,
            isStart: C,
            isEnd: P
          } = g;
          return delete m.children, h(pb, Q(Q({}, m), {}, {
            title: x,
            active: f,
            data: g.data,
            key: S,
            eventKey: S,
            isStart: C,
            isEnd: P
          }), o);
        })]), [[Oi, r.value]])]
      }) : h(pb, Q(Q({
        class: n.class,
        style: n.style
      }, v), {}, {
        active: f,
        eventKey: p
      }), o);
    };
  }
});
function jZ() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
  const n = e.length, o = t.length;
  if (Math.abs(n - o) !== 1)
    return {
      add: !1,
      key: null
    };
  function r(i, a) {
    const l = /* @__PURE__ */ new Map();
    i.forEach((u) => {
      l.set(u, !0);
    });
    const s = a.filter((u) => !l.has(u));
    return s.length === 1 ? s[0] : null;
  }
  return n < o ? {
    add: !0,
    key: r(e, t)
  } : {
    add: !1,
    key: r(t, e)
  };
}
function S$(e, t, n) {
  const o = e.findIndex((a) => a.key === n), r = e[o + 1], i = t.findIndex((a) => a.key === n);
  if (r) {
    const a = t.findIndex((l) => l.key === r.key);
    return t.slice(i + 1, a);
  }
  return t.slice(i + 1);
}
var C$ = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const $$ = {
  width: 0,
  height: 0,
  display: "flex",
  overflow: "hidden",
  opacity: 0,
  border: 0,
  padding: 0,
  margin: 0
}, WZ = () => {
}, Ns = `RC_TREE_MOTION_${Math.random()}`, Wb = {
  key: Ns
}, R2 = {
  key: Ns,
  level: 0,
  index: 0,
  pos: "0",
  node: Wb,
  nodes: [Wb]
}, P$ = {
  parent: null,
  children: [],
  pos: R2.pos,
  data: Wb,
  title: null,
  key: Ns,
  /** Hold empty list here since we do not use it */
  isStart: [],
  isEnd: []
};
function O$(e, t, n, o) {
  return t === !1 || !n ? e : e.slice(0, Math.ceil(n / o) + 1);
}
function k$(e) {
  const {
    key: t,
    pos: n
  } = e;
  return Kd(t, n);
}
function KZ(e) {
  let t = String(e.key), n = e;
  for (; n.parent; )
    n = n.parent, t = `${n.key} > ${t}`;
  return t;
}
const qZ = be({
  compatConfig: {
    MODE: 3
  },
  name: "NodeList",
  inheritAttrs: !1,
  props: BK,
  setup(e, t) {
    let {
      expose: n,
      attrs: o
    } = t;
    const r = le(), i = le(), {
      expandedKeys: a,
      flattenNodes: l
    } = U_();
    n({
      scrollTo: (g) => {
        r.value.scrollTo(g);
      },
      getIndentWidth: () => i.value.offsetWidth
    });
    const s = $e(l.value), u = $e([]), c = le(null);
    function d() {
      s.value = l.value, u.value = [], c.value = null, e.onListChangeEnd();
    }
    const f = nx();
    Ie([() => a.value.slice(), l], (g, m) => {
      let [x, S] = g, [C, P] = m;
      const $ = jZ(C, x);
      if ($.key !== null) {
        const {
          virtual: I,
          height: w,
          itemHeight: T
        } = e;
        if ($.add) {
          const M = P.findIndex((H) => {
            let {
              key: L
            } = H;
            return L === $.key;
          }), R = O$(S$(P, S, $.key), I, w, T), N = P.slice();
          N.splice(M + 1, 0, P$), s.value = N, u.value = R, c.value = "show";
        } else {
          const M = S.findIndex((H) => {
            let {
              key: L
            } = H;
            return L === $.key;
          }), R = O$(S$(S, P, $.key), I, w, T), N = S.slice();
          N.splice(M + 1, 0, P$), s.value = N, u.value = R, c.value = "hide";
        }
      } else P !== S && (s.value = S);
    }), Ie(() => f.value.dragging, (g) => {
      g || d();
    });
    const p = E(() => e.motion === void 0 ? s.value : l.value), v = () => {
      e.onActiveChange(null);
    };
    return () => {
      const g = O(O({}, e), o), {
        prefixCls: m,
        selectable: x,
        checkable: S,
        disabled: C,
        motion: P,
        height: $,
        itemHeight: I,
        virtual: w,
        focusable: T,
        activeItem: M,
        focused: R,
        tabindex: N,
        onKeydown: H,
        onFocus: L,
        onBlur: F,
        onListChangeStart: A,
        onListChangeEnd: G
      } = g, j = C$(g, ["prefixCls", "selectable", "checkable", "disabled", "motion", "height", "itemHeight", "virtual", "focusable", "activeItem", "focused", "tabindex", "onKeydown", "onFocus", "onBlur", "onListChangeStart", "onListChangeEnd"]);
      return h(Je, null, [R && M && h("span", {
        style: $$,
        "aria-live": "assertive"
      }, [KZ(M)]), h("div", null, [h("input", {
        style: $$,
        disabled: T === !1 || C,
        tabindex: T !== !1 ? N : null,
        onKeydown: H,
        onFocus: L,
        onBlur: F,
        value: "",
        onChange: WZ,
        "aria-label": "for screen reader"
      }, null)]), h("div", {
        class: `${m}-treenode`,
        "aria-hidden": !0,
        style: {
          position: "absolute",
          pointerEvents: "none",
          visibility: "hidden",
          height: 0,
          overflow: "hidden"
        }
      }, [h("div", {
        class: `${m}-indent`
      }, [h("div", {
        ref: i,
        class: `${m}-indent-unit`
      }, null)])]), h(pT, Q(Q({}, Fn(j, ["onActiveChange"])), {}, {
        data: p.value,
        itemKey: k$,
        height: $,
        fullHeight: !1,
        virtual: w,
        itemHeight: I,
        prefixCls: `${m}-list`,
        ref: r,
        onVisibleChange: (Z, W) => {
          const K = new Set(Z);
          W.filter((U) => !K.has(U)).some((U) => k$(U) === Ns) && d();
        }
      }), {
        default: (Z) => {
          const {
            pos: W
          } = Z, K = C$(Z.data, []), {
            title: q,
            key: U,
            isStart: ae,
            isEnd: se
          } = Z, ie = Kd(U, W);
          return delete K.key, delete K.children, h(VZ, Q(Q({}, K), {}, {
            eventKey: ie,
            title: q,
            active: !!M && U === M.key,
            data: Z.data,
            isStart: ae,
            isEnd: se,
            motion: P,
            motionNodes: U === Ns ? u.value : null,
            motionType: c.value,
            onMotionStart: A,
            onMotionEnd: d,
            onMousemove: v
          }), null);
        }
      })]);
    };
  }
});
function YZ(e) {
  let {
    dropPosition: t,
    dropLevelOffset: n,
    indent: o
  } = e;
  const r = {
    pointerEvents: "none",
    position: "absolute",
    right: 0,
    backgroundColor: "red",
    height: "2px"
  };
  switch (t) {
    case -1:
      r.top = 0, r.left = `${-n * o}px`;
      break;
    case 1:
      r.bottom = 0, r.left = `${-n * o}px`;
      break;
    case 0:
      r.bottom = 0, r.left = `${o}`;
      break;
  }
  return h("div", {
    style: r
  }, null);
}
const GZ = 10, UZ = be({
  compatConfig: {
    MODE: 3
  },
  name: "Tree",
  inheritAttrs: !1,
  props: Mn(Q_(), {
    prefixCls: "vc-tree",
    showLine: !1,
    showIcon: !0,
    selectable: !0,
    multiple: !1,
    checkable: !1,
    disabled: !1,
    checkStrictly: !1,
    draggable: !1,
    expandAction: !1,
    defaultExpandParent: !0,
    autoExpandParent: !1,
    defaultExpandAll: !1,
    defaultExpandedKeys: [],
    defaultCheckedKeys: [],
    defaultSelectedKeys: [],
    dropIndicatorRender: YZ,
    allowDrop: () => !0
  }),
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      expose: r
    } = t;
    const i = $e(!1);
    let a = {};
    const l = $e(), s = $e([]), u = $e([]), c = $e([]), d = $e([]), f = $e([]), p = $e([]), v = {}, g = $n({
      draggingNodeKey: null,
      dragChildrenKeys: [],
      // dropTargetKey is the key of abstract-drop-node
      // the abstract-drop-node is the real drop node when drag and drop
      // not the DOM drag over node
      dropTargetKey: null,
      dropPosition: null,
      dropContainerKey: null,
      dropLevelOffset: null,
      dropTargetPos: null,
      dropAllowed: !0,
      // the abstract-drag-over-node
      // if mouse is on the bottom of top dom node or no the top of the bottom dom node
      // abstract-drag-over-node is the top node
      dragOverNodeKey: null
    }), m = $e([]);
    Ie([() => e.treeData, () => e.children], () => {
      m.value = e.treeData !== void 0 ? e.treeData.slice() : gb(fr(e.children));
    }, {
      immediate: !0,
      deep: !0
    });
    const x = $e({}), S = $e(!1), C = $e(null), P = $e(!1), $ = E(() => eg(e.fieldNames)), I = $e();
    let w = null, T = null, M = null;
    const R = E(() => ({
      expandedKeysSet: N.value,
      selectedKeysSet: H.value,
      loadedKeysSet: L.value,
      loadingKeysSet: F.value,
      checkedKeysSet: A.value,
      halfCheckedKeysSet: G.value,
      dragOverNodeKey: g.dragOverNodeKey,
      dropPosition: g.dropPosition,
      keyEntities: x.value
    })), N = E(() => new Set(p.value)), H = E(() => new Set(s.value)), L = E(() => new Set(d.value)), F = E(() => new Set(f.value)), A = E(() => new Set(u.value)), G = E(() => new Set(c.value));
    It(() => {
      if (m.value) {
        const Ee = rx(m.value, {
          fieldNames: $.value
        });
        x.value = O({
          [Ns]: R2
        }, Ee.keyEntities);
      }
    });
    let j = !1;
    Ie(
      [() => e.expandedKeys, () => e.autoExpandParent, x],
      // eslint-disable-next-line @typescript-eslint/no-unused-vars
      (Ee, Re) => {
        let [Be, rt] = Ee, [pt, at] = Re, ft = p.value;
        if (e.expandedKeys !== void 0 || j && rt !== at)
          ft = e.autoExpandParent || !j && e.defaultExpandParent ? hb(e.expandedKeys, x.value) : e.expandedKeys;
        else if (!j && e.defaultExpandAll) {
          const wt = O({}, x.value);
          delete wt[Ns], ft = Object.keys(wt).map((Ct) => wt[Ct].key);
        } else !j && e.defaultExpandedKeys && (ft = e.autoExpandParent || e.defaultExpandParent ? hb(e.defaultExpandedKeys, x.value) : e.defaultExpandedKeys);
        ft && (p.value = ft), j = !0;
      },
      {
        immediate: !0
      }
    );
    const Z = $e([]);
    It(() => {
      Z.value = YK(m.value, p.value, $.value);
    }), It(() => {
      e.selectable && (e.selectedKeys !== void 0 ? s.value = dC(e.selectedKeys, e) : !j && e.defaultSelectedKeys && (s.value = dC(e.defaultSelectedKeys, e)));
    });
    const {
      maxLevel: W,
      levelEntities: K
    } = eM(x);
    It(() => {
      if (e.checkable) {
        let Ee;
        if (e.checkedKeys !== void 0 ? Ee = bv(e.checkedKeys) || {} : !j && e.defaultCheckedKeys ? Ee = bv(e.defaultCheckedKeys) || {} : m.value && (Ee = bv(e.checkedKeys) || {
          checkedKeys: u.value,
          halfCheckedKeys: c.value
        }), Ee) {
          let {
            checkedKeys: Re = [],
            halfCheckedKeys: Be = []
          } = Ee;
          e.checkStrictly || ({
            checkedKeys: Re,
            halfCheckedKeys: Be
          } = Au(Re, !0, x.value, W.value, K.value)), u.value = Re, c.value = Be;
        }
      }
    }), It(() => {
      e.loadedKeys && (d.value = e.loadedKeys);
    });
    const q = () => {
      O(g, {
        dragOverNodeKey: null,
        dropPosition: null,
        dropLevelOffset: null,
        dropTargetKey: null,
        dropContainerKey: null,
        dropTargetPos: null,
        dropAllowed: !1
      });
    }, U = (Ee) => {
      I.value.scrollTo(Ee);
    };
    Ie(() => e.activeKey, () => {
      e.activeKey !== void 0 && (C.value = e.activeKey);
    }, {
      immediate: !0
    }), Ie(C, (Ee) => {
      Yt(() => {
        Ee !== null && U({
          key: Ee
        });
      });
    }, {
      immediate: !0,
      flush: "post"
    });
    const ae = (Ee) => {
      e.expandedKeys === void 0 && (p.value = Ee);
    }, se = () => {
      g.draggingNodeKey !== null && O(g, {
        draggingNodeKey: null,
        dropPosition: null,
        dropContainerKey: null,
        dropTargetKey: null,
        dropLevelOffset: null,
        dropAllowed: !0,
        dragOverNodeKey: null
      }), w = null, M = null;
    }, ie = (Ee, Re) => {
      const {
        onDragend: Be
      } = e;
      g.dragOverNodeKey = null, se(), Be?.({
        event: Ee,
        node: Re.eventData
      }), T = null;
    }, re = (Ee) => {
      ie(Ee, null), window.removeEventListener("dragend", re);
    }, te = (Ee, Re) => {
      const {
        onDragstart: Be
      } = e, {
        eventKey: rt,
        eventData: pt
      } = Re;
      T = Re, w = {
        x: Ee.clientX,
        y: Ee.clientY
      };
      const at = Ki(p.value, rt);
      g.draggingNodeKey = rt, g.dragChildrenKeys = jK(rt, x.value), l.value = I.value.getIndentWidth(), ae(at), window.addEventListener("dragend", re), Be && Be({
        event: Ee,
        node: pt
      });
    }, ve = (Ee, Re) => {
      const {
        onDragenter: Be,
        onExpand: rt,
        allowDrop: pt,
        direction: at
      } = e, {
        pos: ft,
        eventKey: wt
      } = Re;
      if (M !== wt && (M = wt), !T) {
        q();
        return;
      }
      const {
        dropPosition: Ct,
        dropLevelOffset: St,
        dropTargetKey: yt,
        dropContainerKey: Ot,
        dropTargetPos: Wt,
        dropAllowed: Xt,
        dragOverNodeKey: ln
      } = cC(Ee, T, Re, l.value, w, pt, Z.value, x.value, N.value, at);
      if (
        // don't allow drop inside its children
        g.dragChildrenKeys.indexOf(yt) !== -1 || // don't allow drop when drop is not allowed caculated by calcDropPosition
        !Xt
      ) {
        q();
        return;
      }
      if (a || (a = {}), Object.keys(a).forEach((pn) => {
        clearTimeout(a[pn]);
      }), T.eventKey !== Re.eventKey && (a[ft] = window.setTimeout(() => {
        if (g.draggingNodeKey === null) return;
        let pn = p.value.slice();
        const gt = x.value[Re.eventKey];
        gt && (gt.children || []).length && (pn = $a(p.value, Re.eventKey)), ae(pn), rt && rt(pn, {
          node: Re.eventData,
          expanded: !0,
          nativeEvent: Ee
        });
      }, 800)), T.eventKey === yt && St === 0) {
        q();
        return;
      }
      O(g, {
        dragOverNodeKey: ln,
        dropPosition: Ct,
        dropLevelOffset: St,
        dropTargetKey: yt,
        dropContainerKey: Ot,
        dropTargetPos: Wt,
        dropAllowed: Xt
      }), Be && Be({
        event: Ee,
        node: Re.eventData,
        expandedKeys: p.value
      });
    }, ce = (Ee, Re) => {
      const {
        onDragover: Be,
        allowDrop: rt,
        direction: pt
      } = e;
      if (!T)
        return;
      const {
        dropPosition: at,
        dropLevelOffset: ft,
        dropTargetKey: wt,
        dropContainerKey: Ct,
        dropAllowed: St,
        dropTargetPos: yt,
        dragOverNodeKey: Ot
      } = cC(Ee, T, Re, l.value, w, rt, Z.value, x.value, N.value, pt);
      g.dragChildrenKeys.indexOf(wt) !== -1 || !St || (T.eventKey === wt && ft === 0 ? g.dropPosition === null && g.dropLevelOffset === null && g.dropTargetKey === null && g.dropContainerKey === null && g.dropTargetPos === null && g.dropAllowed === !1 && g.dragOverNodeKey === null || q() : at === g.dropPosition && ft === g.dropLevelOffset && wt === g.dropTargetKey && Ct === g.dropContainerKey && yt === g.dropTargetPos && St === g.dropAllowed && Ot === g.dragOverNodeKey || O(g, {
        dropPosition: at,
        dropLevelOffset: ft,
        dropTargetKey: wt,
        dropContainerKey: Ct,
        dropTargetPos: yt,
        dropAllowed: St,
        dragOverNodeKey: Ot
      }), Be && Be({
        event: Ee,
        node: Re.eventData
      }));
    }, fe = (Ee, Re) => {
      M === Re.eventKey && !Ee.currentTarget.contains(Ee.relatedTarget) && (q(), M = null);
      const {
        onDragleave: Be
      } = e;
      Be && Be({
        event: Ee,
        node: Re.eventData
      });
    }, ge = function(Ee, Re) {
      let Be = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
      var rt;
      const {
        dragChildrenKeys: pt,
        dropPosition: at,
        dropTargetKey: ft,
        dropTargetPos: wt,
        dropAllowed: Ct
      } = g;
      if (!Ct) return;
      const {
        onDrop: St
      } = e;
      if (g.dragOverNodeKey = null, se(), ft === null) return;
      const yt = O(O({}, sp(ft, fr(R.value))), {
        active: ((rt = Ae.value) === null || rt === void 0 ? void 0 : rt.key) === ft,
        data: x.value[ft].node
      }), Ot = pt.indexOf(ft) !== -1;
      wn(!Ot, "Can not drop to dragNode's children node. Maybe this is a bug of ant-design-vue. Please report an issue.");
      const Wt = ox(wt), Xt = {
        event: Ee,
        node: up(yt),
        dragNode: T ? T.eventData : null,
        dragNodesKeys: [T.eventKey].concat(pt),
        dropToGap: at !== 0,
        dropPosition: at + Number(Wt[Wt.length - 1])
      };
      Be || St?.(Xt), T = null;
    }, Te = (Ee, Re) => {
      const {
        expanded: Be,
        key: rt
      } = Re, pt = Z.value.filter((ft) => ft.key === rt)[0], at = up(O(O({}, sp(rt, R.value)), {
        data: pt.data
      }));
      ae(Be ? Ki(p.value, rt) : $a(p.value, rt)), Pe(Ee, at);
    }, ze = (Ee, Re) => {
      const {
        onClick: Be,
        expandAction: rt
      } = e;
      rt === "click" && Te(Ee, Re), Be && Be(Ee, Re);
    }, Ke = (Ee, Re) => {
      const {
        onDblclick: Be,
        expandAction: rt
      } = e;
      (rt === "doubleclick" || rt === "dblclick") && Te(Ee, Re), Be && Be(Ee, Re);
    }, He = (Ee, Re) => {
      let Be = s.value;
      const {
        onSelect: rt,
        multiple: pt
      } = e, {
        selected: at
      } = Re, ft = Re[$.value.key], wt = !at;
      wt ? pt ? Be = $a(Be, ft) : Be = [ft] : Be = Ki(Be, ft);
      const Ct = x.value, St = Be.map((yt) => {
        const Ot = Ct[yt];
        return Ot ? Ot.node : null;
      }).filter((yt) => yt);
      e.selectedKeys === void 0 && (s.value = Be), rt && rt(Be, {
        event: "select",
        selected: wt,
        node: Re,
        selectedNodes: St,
        nativeEvent: Ee
      });
    }, Ne = (Ee, Re, Be) => {
      const {
        checkStrictly: rt,
        onCheck: pt
      } = e, at = Re[$.value.key];
      let ft;
      const wt = {
        event: "check",
        node: Re,
        checked: Be,
        nativeEvent: Ee
      }, Ct = x.value;
      if (rt) {
        const St = Be ? $a(u.value, at) : Ki(u.value, at), yt = Ki(c.value, at);
        ft = {
          checked: St,
          halfChecked: yt
        }, wt.checkedNodes = St.map((Ot) => Ct[Ot]).filter((Ot) => Ot).map((Ot) => Ot.node), e.checkedKeys === void 0 && (u.value = St);
      } else {
        let {
          checkedKeys: St,
          halfCheckedKeys: yt
        } = Au([...u.value, at], !0, Ct, W.value, K.value);
        if (!Be) {
          const Ot = new Set(St);
          Ot.delete(at), {
            checkedKeys: St,
            halfCheckedKeys: yt
          } = Au(Array.from(Ot), {
            halfCheckedKeys: yt
          }, Ct, W.value, K.value);
        }
        ft = St, wt.checkedNodes = [], wt.checkedNodesPositions = [], wt.halfCheckedKeys = yt, St.forEach((Ot) => {
          const Wt = Ct[Ot];
          if (!Wt) return;
          const {
            node: Xt,
            pos: ln
          } = Wt;
          wt.checkedNodes.push(Xt), wt.checkedNodesPositions.push({
            node: Xt,
            pos: ln
          });
        }), e.checkedKeys === void 0 && (u.value = St, c.value = yt);
      }
      pt && pt(ft, wt);
    }, Xe = (Ee) => {
      const Re = Ee[$.value.key], Be = new Promise((rt, pt) => {
        const {
          loadData: at,
          onLoad: ft
        } = e;
        if (!at || L.value.has(Re) || F.value.has(Re))
          return null;
        at(Ee).then(() => {
          const Ct = $a(d.value, Re), St = Ki(f.value, Re);
          ft && ft(Ct, {
            event: "load",
            node: Ee
          }), e.loadedKeys === void 0 && (d.value = Ct), f.value = St, rt();
        }).catch((Ct) => {
          const St = Ki(f.value, Re);
          if (f.value = St, v[Re] = (v[Re] || 0) + 1, v[Re] >= GZ) {
            wn(!1, "Retry for `loadData` many times but still failed. No more retry.");
            const yt = $a(d.value, Re);
            e.loadedKeys === void 0 && (d.value = yt), rt();
          }
          pt(Ct);
        }), f.value = $a(f.value, Re);
      });
      return Be.catch(() => {
      }), Be;
    }, De = (Ee, Re) => {
      const {
        onMouseenter: Be
      } = e;
      Be && Be({
        event: Ee,
        node: Re
      });
    }, Fe = (Ee, Re) => {
      const {
        onMouseleave: Be
      } = e;
      Be && Be({
        event: Ee,
        node: Re
      });
    }, Ve = (Ee, Re) => {
      const {
        onRightClick: Be
      } = e;
      Be && (Ee.preventDefault(), Be({
        event: Ee,
        node: Re
      }));
    }, ot = (Ee) => {
      const {
        onFocus: Re
      } = e;
      S.value = !0, Re && Re(Ee);
    }, je = (Ee) => {
      const {
        onBlur: Re
      } = e;
      S.value = !1, Ce(null), Re && Re(Ee);
    }, Pe = (Ee, Re) => {
      let Be = p.value;
      const {
        onExpand: rt,
        loadData: pt
      } = e, {
        expanded: at
      } = Re, ft = Re[$.value.key];
      if (P.value)
        return;
      const wt = Be.indexOf(ft), Ct = !at;
      if (wn(at && wt !== -1 || !at && wt === -1, "Expand state not sync with index check"), Ct ? Be = $a(Be, ft) : Be = Ki(Be, ft), ae(Be), rt && rt(Be, {
        node: Re,
        expanded: Ct,
        nativeEvent: Ee
      }), Ct && pt) {
        const St = Xe(Re);
        St && St.then(() => {
        }).catch((yt) => {
          const Ot = Ki(p.value, ft);
          ae(Ot), Promise.reject(yt);
        });
      }
    }, Ge = () => {
      P.value = !0;
    }, Se = () => {
      setTimeout(() => {
        P.value = !1;
      });
    }, Ce = (Ee) => {
      const {
        onActiveChange: Re
      } = e;
      C.value !== Ee && (e.activeKey !== void 0 && (C.value = Ee), Ee !== null && U({
        key: Ee
      }), Re && Re(Ee));
    }, Ae = E(() => C.value === null ? null : Z.value.find((Ee) => {
      let {
        key: Re
      } = Ee;
      return Re === C.value;
    }) || null), qe = (Ee) => {
      let Re = Z.value.findIndex((rt) => {
        let {
          key: pt
        } = rt;
        return pt === C.value;
      });
      Re === -1 && Ee < 0 && (Re = Z.value.length), Re = (Re + Ee + Z.value.length) % Z.value.length;
      const Be = Z.value[Re];
      if (Be) {
        const {
          key: rt
        } = Be;
        Ce(rt);
      } else
        Ce(null);
    }, We = E(() => up(O(O({}, sp(C.value, R.value)), {
      data: Ae.value.data,
      active: !0
    }))), tt = (Ee) => {
      const {
        onKeydown: Re,
        checkable: Be,
        selectable: rt
      } = e;
      switch (Ee.which) {
        case it.UP: {
          qe(-1), Ee.preventDefault();
          break;
        }
        case it.DOWN: {
          qe(1), Ee.preventDefault();
          break;
        }
      }
      const pt = Ae.value;
      if (pt && pt.data) {
        const at = pt.data.isLeaf === !1 || !!(pt.data.children || []).length, ft = We.value;
        switch (Ee.which) {
          // >>> Expand
          case it.LEFT: {
            at && N.value.has(C.value) ? Pe({}, ft) : pt.parent && Ce(pt.parent.key), Ee.preventDefault();
            break;
          }
          case it.RIGHT: {
            at && !N.value.has(C.value) ? Pe({}, ft) : pt.children && pt.children.length && Ce(pt.children[0].key), Ee.preventDefault();
            break;
          }
          // Selection
          case it.ENTER:
          case it.SPACE: {
            Be && !ft.disabled && ft.checkable !== !1 && !ft.disableCheckbox ? Ne({}, ft, !A.value.has(C.value)) : !Be && rt && !ft.disabled && ft.selectable !== !1 && He({}, ft);
            break;
          }
        }
      }
      Re && Re(Ee);
    };
    return r({
      onNodeExpand: Pe,
      scrollTo: U,
      onKeydown: tt,
      selectedKeys: E(() => s.value),
      checkedKeys: E(() => u.value),
      halfCheckedKeys: E(() => c.value),
      loadedKeys: E(() => d.value),
      loadingKeys: E(() => f.value),
      expandedKeys: E(() => p.value)
    }), Vo(() => {
      window.removeEventListener("dragend", re), i.value = !0;
    }), zK({
      expandedKeys: p,
      selectedKeys: s,
      loadedKeys: d,
      loadingKeys: f,
      checkedKeys: u,
      halfCheckedKeys: c,
      expandedKeysSet: N,
      selectedKeysSet: H,
      loadedKeysSet: L,
      loadingKeysSet: F,
      checkedKeysSet: A,
      halfCheckedKeysSet: G,
      flattenNodes: Z
    }), () => {
      const {
        // focused,
        // flattenNodes,
        // keyEntities,
        draggingNodeKey: Ee,
        // activeKey,
        dropLevelOffset: Re,
        dropContainerKey: Be,
        dropTargetKey: rt,
        dropPosition: pt,
        dragOverNodeKey: at
        // indent,
      } = g, {
        prefixCls: ft,
        showLine: wt,
        focusable: Ct,
        tabindex: St = 0,
        selectable: yt,
        showIcon: Ot,
        icon: Wt = o.icon,
        switcherIcon: Xt,
        draggable: ln,
        checkable: pn,
        checkStrictly: gt,
        disabled: En,
        motion: hn,
        loadData: Kn,
        filterTreeNode: so,
        height: Uo,
        itemHeight: Ue,
        virtual: ht,
        dropIndicatorRender: vt,
        onContextmenu: Zt,
        onScroll: Zn,
        direction: Qn,
        rootClassName: $o,
        rootStyle: Sn
      } = e, {
        class: Tt,
        style: po
      } = n, zo = Bs(O(O({}, e), n), {
        aria: !0,
        data: !0
      });
      let un;
      return ln ? typeof ln == "object" ? un = ln : typeof ln == "function" ? un = {
        nodeDraggable: ln
      } : un = {} : un = !1, h(RK, {
        value: {
          prefixCls: ft,
          selectable: yt,
          showIcon: Ot,
          icon: Wt,
          switcherIcon: Xt,
          draggable: un,
          draggingNodeKey: Ee,
          checkable: pn,
          customCheckable: o.checkable,
          checkStrictly: gt,
          disabled: En,
          keyEntities: x.value,
          dropLevelOffset: Re,
          dropContainerKey: Be,
          dropTargetKey: rt,
          dropPosition: pt,
          dragOverNodeKey: at,
          dragging: Ee !== null,
          indent: l.value,
          direction: Qn,
          dropIndicatorRender: vt,
          loadData: Kn,
          filterTreeNode: so,
          onNodeClick: ze,
          onNodeDoubleClick: Ke,
          onNodeExpand: Pe,
          onNodeSelect: He,
          onNodeCheck: Ne,
          onNodeLoad: Xe,
          onNodeMouseEnter: De,
          onNodeMouseLeave: Fe,
          onNodeContextMenu: Ve,
          onNodeDragStart: te,
          onNodeDragEnter: ve,
          onNodeDragOver: ce,
          onNodeDragLeave: fe,
          onNodeDragEnd: ie,
          onNodeDrop: ge,
          slots: o
        }
      }, {
        default: () => [h("div", {
          role: "tree",
          class: Me(ft, Tt, $o, {
            [`${ft}-show-line`]: wt,
            [`${ft}-focused`]: S.value,
            [`${ft}-active-focused`]: C.value !== null
          }),
          style: Sn
        }, [h(qZ, Q({
          ref: I,
          prefixCls: ft,
          style: po,
          disabled: En,
          selectable: yt,
          checkable: !!pn,
          motion: hn,
          height: Uo,
          itemHeight: Ue,
          virtual: ht,
          focusable: Ct,
          focused: S.value,
          tabindex: St,
          activeItem: Ae.value,
          onFocus: ot,
          onBlur: je,
          onKeydown: tt,
          onActiveChange: Ce,
          onListChangeStart: Ge,
          onListChangeEnd: Se,
          onContextmenu: Zt,
          onScroll: Zn
        }, zo), null)])]
      });
    };
  }
});
var XZ = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z" } }] }, name: "file", theme: "outlined" };
function I$(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      QZ(e, r, n[r]);
    });
  }
  return e;
}
function QZ(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var ug = function(t, n) {
  var o = I$({}, t, n.attrs);
  return h(an, I$({}, o, {
    icon: XZ
  }), null);
};
ug.displayName = "FileOutlined";
ug.inheritAttrs = !1;
var ZZ = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z" } }, { tag: "path", attrs: { d: "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z" } }] }, name: "minus-square", theme: "outlined" };
function T$(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      JZ(e, r, n[r]);
    });
  }
  return e;
}
function JZ(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var _x = function(t, n) {
  var o = T$({}, t, n.attrs);
  return h(an, T$({}, o, {
    icon: ZZ
  }), null);
};
_x.displayName = "MinusSquareOutlined";
_x.inheritAttrs = !1;
var eJ = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z" } }, { tag: "path", attrs: { d: "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z" } }] }, name: "plus-square", theme: "outlined" };
function _$(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      tJ(e, r, n[r]);
    });
  }
  return e;
}
function tJ(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Mx = function(t, n) {
  var o = _$({}, t, n.attrs);
  return h(an, _$({}, o, {
    icon: eJ
  }), null);
};
Mx.displayName = "PlusSquareOutlined";
Mx.inheritAttrs = !1;
var nJ = { icon: { tag: "svg", attrs: { viewBox: "0 0 1024 1024", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z" } }] }, name: "caret-down", theme: "filled" };
function M$(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      oJ(e, r, n[r]);
    });
  }
  return e;
}
function oJ(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Ex = function(t, n) {
  var o = M$({}, t, n.attrs);
  return h(an, M$({}, o, {
    icon: nJ
  }), null);
};
Ex.displayName = "CaretDownFilled";
Ex.inheritAttrs = !1;
function rJ(e, t, n, o, r) {
  const {
    isLeaf: i,
    expanded: a,
    loading: l
  } = n;
  let s = t;
  if (l)
    return h(Mi, {
      class: `${e}-switcher-loading-icon`
    }, null);
  let u;
  r && typeof r == "object" && (u = r.showLeafIcon);
  let c = null;
  const d = `${e}-switcher-icon`;
  return i ? r ? u && o ? o(n) : (typeof r == "object" && !u ? c = h("span", {
    class: `${e}-switcher-leaf-line`
  }, null) : c = h(ug, {
    class: `${e}-switcher-line-icon`
  }, null), c) : null : (c = h(Ex, {
    class: d
  }, null), r && (c = a ? h(_x, {
    class: `${e}-switcher-line-icon`
  }, null) : h(Mx, {
    class: `${e}-switcher-line-icon`
  }, null)), typeof t == "function" ? s = t(O(O({}, n), {
    defaultIcon: c,
    switcherCls: d
  })) : Ao(s) && (s = Ml(s, {
    class: d
  })), s || c);
}
const E$ = 4;
function iJ(e) {
  const {
    dropPosition: t,
    dropLevelOffset: n,
    prefixCls: o,
    indent: r,
    direction: i = "ltr"
  } = e, a = i === "ltr" ? "left" : "right", l = i === "ltr" ? "right" : "left", s = {
    [a]: `${-n * r + E$}px`,
    [l]: 0
  };
  switch (t) {
    case -1:
      s.top = "-3px";
      break;
    case 1:
      s.bottom = "-3px";
      break;
    default:
      s.bottom = "-3px", s[a] = `${r + E$}px`;
      break;
  }
  return h("div", {
    style: s,
    class: `${o}-drop-indicator`
  }, null);
}
const aJ = new tn("ant-tree-node-fx-do-not-use", {
  "0%": {
    opacity: 0
  },
  "100%": {
    opacity: 1
  }
}), lJ = (e, t) => ({
  [`.${e}-switcher-icon`]: {
    display: "inline-block",
    fontSize: 10,
    verticalAlign: "baseline",
    svg: {
      transition: `transform ${t.motionDurationSlow}`
    }
  }
}), sJ = (e, t) => ({
  [`.${e}-drop-indicator`]: {
    position: "absolute",
    // it should displayed over the following node
    zIndex: 1,
    height: 2,
    backgroundColor: t.colorPrimary,
    borderRadius: 1,
    pointerEvents: "none",
    "&:after": {
      position: "absolute",
      top: -3,
      insetInlineStart: -6,
      width: 8,
      height: 8,
      backgroundColor: "transparent",
      border: `${t.lineWidthBold}px solid ${t.colorPrimary}`,
      borderRadius: "50%",
      content: '""'
    }
  }
}), uJ = (e, t) => {
  const {
    treeCls: n,
    treeNodeCls: o,
    treeNodePadding: r,
    treeTitleHeight: i
  } = t, a = (i - t.fontSizeLG) / 2, l = t.paddingXS;
  return {
    [n]: O(O({}, fn(t)), {
      background: t.colorBgContainer,
      borderRadius: t.borderRadius,
      transition: `background-color ${t.motionDurationSlow}`,
      [`&${n}-rtl`]: {
        // >>> Switcher
        [`${n}-switcher`]: {
          "&_close": {
            [`${n}-switcher-icon`]: {
              svg: {
                transform: "rotate(90deg)"
              }
            }
          }
        }
      },
      [`&-focused:not(:hover):not(${n}-active-focused)`]: O({}, Wa(t)),
      // =================== Virtual List ===================
      [`${n}-list-holder-inner`]: {
        alignItems: "flex-start"
      },
      [`&${n}-block-node`]: {
        [`${n}-list-holder-inner`]: {
          alignItems: "stretch",
          // >>> Title
          [`${n}-node-content-wrapper`]: {
            flex: "auto"
          },
          // >>> Drag
          [`${o}.dragging`]: {
            position: "relative",
            "&:after": {
              position: "absolute",
              top: 0,
              insetInlineEnd: 0,
              bottom: r,
              insetInlineStart: 0,
              border: `1px solid ${t.colorPrimary}`,
              opacity: 0,
              animationName: aJ,
              animationDuration: t.motionDurationSlow,
              animationPlayState: "running",
              animationFillMode: "forwards",
              content: '""',
              pointerEvents: "none"
            }
          }
        }
      },
      // ===================== TreeNode =====================
      [`${o}`]: {
        display: "flex",
        alignItems: "flex-start",
        padding: `0 0 ${r}px 0`,
        outline: "none",
        "&-rtl": {
          direction: "rtl"
        },
        // Disabled
        "&-disabled": {
          // >>> Title
          [`${n}-node-content-wrapper`]: {
            color: t.colorTextDisabled,
            cursor: "not-allowed",
            "&:hover": {
              background: "transparent"
            }
          }
        },
        [`&-active ${n}-node-content-wrapper`]: O({}, Wa(t)),
        [`&:not(${o}-disabled).filter-node ${n}-title`]: {
          color: "inherit",
          fontWeight: 500
        },
        "&-draggable": {
          [`${n}-draggable-icon`]: {
            width: i,
            lineHeight: `${i}px`,
            textAlign: "center",
            visibility: "visible",
            opacity: 0.2,
            transition: `opacity ${t.motionDurationSlow}`,
            [`${o}:hover &`]: {
              opacity: 0.45
            }
          },
          [`&${o}-disabled`]: {
            [`${n}-draggable-icon`]: {
              visibility: "hidden"
            }
          }
        }
      },
      // >>> Indent
      [`${n}-indent`]: {
        alignSelf: "stretch",
        whiteSpace: "nowrap",
        userSelect: "none",
        "&-unit": {
          display: "inline-block",
          width: i
        }
      },
      // >>> Drag Handler
      [`${n}-draggable-icon`]: {
        visibility: "hidden"
      },
      // >>> Switcher
      [`${n}-switcher`]: O(O({}, lJ(e, t)), {
        position: "relative",
        flex: "none",
        alignSelf: "stretch",
        width: i,
        margin: 0,
        lineHeight: `${i}px`,
        textAlign: "center",
        cursor: "pointer",
        userSelect: "none",
        "&-noop": {
          cursor: "default"
        },
        "&_close": {
          [`${n}-switcher-icon`]: {
            svg: {
              transform: "rotate(-90deg)"
            }
          }
        },
        "&-loading-icon": {
          color: t.colorPrimary
        },
        "&-leaf-line": {
          position: "relative",
          zIndex: 1,
          display: "inline-block",
          width: "100%",
          height: "100%",
          // https://github.com/ant-design/ant-design/issues/31884
          "&:before": {
            position: "absolute",
            top: 0,
            insetInlineEnd: i / 2,
            bottom: -r,
            marginInlineStart: -1,
            borderInlineEnd: `1px solid ${t.colorBorder}`,
            content: '""'
          },
          "&:after": {
            position: "absolute",
            width: i / 2 * 0.8,
            height: i / 2,
            borderBottom: `1px solid ${t.colorBorder}`,
            content: '""'
          }
        }
      }),
      // >>> Checkbox
      [`${n}-checkbox`]: {
        top: "initial",
        marginInlineEnd: l,
        marginBlockStart: a
      },
      // >>> Title
      // add `${treeCls}-checkbox + span` to cover checkbox `${checkboxCls} + span`
      [`${n}-node-content-wrapper, ${n}-checkbox + span`]: {
        position: "relative",
        zIndex: "auto",
        minHeight: i,
        margin: 0,
        padding: `0 ${t.paddingXS / 2}px`,
        color: "inherit",
        lineHeight: `${i}px`,
        background: "transparent",
        borderRadius: t.borderRadius,
        cursor: "pointer",
        transition: `all ${t.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`,
        "&:hover": {
          backgroundColor: t.controlItemBgHover
        },
        [`&${n}-node-selected`]: {
          backgroundColor: t.controlItemBgActive
        },
        // Icon
        [`${n}-iconEle`]: {
          display: "inline-block",
          width: i,
          height: i,
          lineHeight: `${i}px`,
          textAlign: "center",
          verticalAlign: "top",
          "&:empty": {
            display: "none"
          }
        }
      },
      // https://github.com/ant-design/ant-design/issues/28217
      [`${n}-unselectable ${n}-node-content-wrapper:hover`]: {
        backgroundColor: "transparent"
      },
      // ==================== Draggable =====================
      [`${n}-node-content-wrapper`]: O({
        lineHeight: `${i}px`,
        userSelect: "none"
      }, sJ(e, t)),
      [`${o}.drop-container`]: {
        "> [draggable]": {
          boxShadow: `0 0 0 2px ${t.colorPrimary}`
        }
      },
      // ==================== Show Line =====================
      "&-show-line": {
        // ================ Indent lines ================
        [`${n}-indent`]: {
          "&-unit": {
            position: "relative",
            height: "100%",
            "&:before": {
              position: "absolute",
              top: 0,
              insetInlineEnd: i / 2,
              bottom: -r,
              borderInlineEnd: `1px solid ${t.colorBorder}`,
              content: '""'
            },
            "&-end": {
              "&:before": {
                display: "none"
              }
            }
          }
        },
        // ============== Cover Background ==============
        [`${n}-switcher`]: {
          background: "transparent",
          "&-line-icon": {
            // https://github.com/ant-design/ant-design/issues/32813
            verticalAlign: "-0.15em"
          }
        }
      },
      [`${o}-leaf-last`]: {
        [`${n}-switcher`]: {
          "&-leaf-line": {
            "&:before": {
              top: "auto !important",
              bottom: "auto !important",
              height: `${i / 2}px !important`
            }
          }
        }
      }
    })
  };
}, cJ = (e) => {
  const {
    treeCls: t,
    treeNodeCls: n,
    treeNodePadding: o
  } = e;
  return {
    [`${t}${t}-directory`]: {
      // ================== TreeNode ==================
      [n]: {
        position: "relative",
        // Hover color
        "&:before": {
          position: "absolute",
          top: 0,
          insetInlineEnd: 0,
          bottom: o,
          insetInlineStart: 0,
          transition: `background-color ${e.motionDurationMid}`,
          content: '""',
          pointerEvents: "none"
        },
        "&:hover": {
          "&:before": {
            background: e.controlItemBgHover
          }
        },
        // Elements
        "> *": {
          zIndex: 1
        },
        // >>> Switcher
        [`${t}-switcher`]: {
          transition: `color ${e.motionDurationMid}`
        },
        // >>> Title
        [`${t}-node-content-wrapper`]: {
          borderRadius: 0,
          userSelect: "none",
          "&:hover": {
            background: "transparent"
          },
          [`&${t}-node-selected`]: {
            color: e.colorTextLightSolid,
            background: "transparent"
          }
        },
        // ============= Selected =============
        "&-selected": {
          "\n            &:hover::before,\n            &::before\n          ": {
            background: e.colorPrimary
          },
          // >>> Switcher
          [`${t}-switcher`]: {
            color: e.colorTextLightSolid
          },
          // >>> Title
          [`${t}-node-content-wrapper`]: {
            color: e.colorTextLightSolid,
            background: "transparent"
          }
        }
      }
    }
  };
}, dJ = (e, t) => {
  const n = `.${e}`, o = `${n}-treenode`, r = t.paddingXS / 2, i = t.controlHeightSM, a = Qt(t, {
    treeCls: n,
    treeNodeCls: o,
    treeNodePadding: r,
    treeTitleHeight: i
  });
  return [
    // Basic
    uJ(e, a),
    // Directory
    cJ(a)
  ];
}, fJ = On("Tree", (e, t) => {
  let {
    prefixCls: n
  } = t;
  return [{
    [e.componentCls]: vM(`${n}-checkbox`, e)
  }, dJ(n, e), Wh(e)];
}), z2 = () => {
  const e = Q_();
  return O(O({}, e), {
    showLine: en([Boolean, Object]),
    /** 是否支持多选 */
    multiple: ct(),
    /** 是否自动展开父节点 */
    autoExpandParent: ct(),
    /** checkable状态下节点选择完全受控（父子节点选中状态不再关联）*/
    checkStrictly: ct(),
    /** 是否支持选中 */
    checkable: ct(),
    /** 是否禁用树 */
    disabled: ct(),
    /** 默认展开所有树节点 */
    defaultExpandAll: ct(),
    /** 默认展开对应树节点 */
    defaultExpandParent: ct(),
    /** 默认展开指定的树节点 */
    defaultExpandedKeys: jn(),
    /** （受控）展开指定的树节点 */
    expandedKeys: jn(),
    /** （受控）选中复选框的树节点 */
    checkedKeys: en([Array, Object]),
    /** 默认选中复选框的树节点 */
    defaultCheckedKeys: jn(),
    /** （受控）设置选中的树节点 */
    selectedKeys: jn(),
    /** 默认选中的树节点 */
    defaultSelectedKeys: jn(),
    selectable: ct(),
    loadedKeys: jn(),
    draggable: ct(),
    showIcon: ct(),
    icon: et(),
    switcherIcon: pe.any,
    prefixCls: String,
    /**
     * @default{title,key,children}
     * deprecated, please use `fieldNames` instead
     * 替换treeNode中 title,key,children字段为treeData中对应的字段
     */
    replaceFields: Mt(),
    blockNode: ct(),
    openAnimation: pe.any,
    onDoubleclick: e.onDblclick,
    "onUpdate:selectedKeys": et(),
    "onUpdate:checkedKeys": et(),
    "onUpdate:expandedKeys": et()
  });
}, vp = be({
  compatConfig: {
    MODE: 3
  },
  name: "ATree",
  inheritAttrs: !1,
  props: Mn(z2(), {
    checkable: !1,
    selectable: !0,
    showIcon: !1,
    blockNode: !1
  }),
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      expose: o,
      emit: r,
      slots: i
    } = t;
    wn(!(e.treeData === void 0 && i.default), "`children` of Tree is deprecated. Please use `treeData` instead.");
    const {
      prefixCls: a,
      direction: l,
      virtual: s
    } = Nt("tree", e), [u, c] = fJ(a), d = le();
    o({
      treeRef: d,
      onNodeExpand: function() {
        var m;
        (m = d.value) === null || m === void 0 || m.onNodeExpand(...arguments);
      },
      scrollTo: (m) => {
        var x;
        (x = d.value) === null || x === void 0 || x.scrollTo(m);
      },
      selectedKeys: E(() => {
        var m;
        return (m = d.value) === null || m === void 0 ? void 0 : m.selectedKeys;
      }),
      checkedKeys: E(() => {
        var m;
        return (m = d.value) === null || m === void 0 ? void 0 : m.checkedKeys;
      }),
      halfCheckedKeys: E(() => {
        var m;
        return (m = d.value) === null || m === void 0 ? void 0 : m.halfCheckedKeys;
      }),
      loadedKeys: E(() => {
        var m;
        return (m = d.value) === null || m === void 0 ? void 0 : m.loadedKeys;
      }),
      loadingKeys: E(() => {
        var m;
        return (m = d.value) === null || m === void 0 ? void 0 : m.loadingKeys;
      }),
      expandedKeys: E(() => {
        var m;
        return (m = d.value) === null || m === void 0 ? void 0 : m.expandedKeys;
      })
    }), It(() => {
      dn(e.replaceFields === void 0, "Tree", "`replaceFields` is deprecated, please use fieldNames instead");
    });
    const p = (m, x) => {
      r("update:checkedKeys", m), r("check", m, x);
    }, v = (m, x) => {
      r("update:expandedKeys", m), r("expand", m, x);
    }, g = (m, x) => {
      r("update:selectedKeys", m), r("select", m, x);
    };
    return () => {
      const {
        showIcon: m,
        showLine: x,
        switcherIcon: S = i.switcherIcon,
        icon: C = i.icon,
        blockNode: P,
        checkable: $,
        selectable: I,
        fieldNames: w = e.replaceFields,
        motion: T = e.openAnimation,
        itemHeight: M = 28,
        onDoubleclick: R,
        onDblclick: N
      } = e, H = O(O(O({}, n), Fn(e, ["onUpdate:checkedKeys", "onUpdate:expandedKeys", "onUpdate:selectedKeys", "onDoubleclick"])), {
        showLine: !!x,
        dropIndicatorRender: iJ,
        fieldNames: w,
        icon: C,
        itemHeight: M
      }), L = i.default ? Do(i.default()) : void 0;
      return u(h(UZ, Q(Q({}, H), {}, {
        virtual: s.value,
        motion: T,
        ref: d,
        prefixCls: a.value,
        class: Me({
          [`${a.value}-icon-hide`]: !m,
          [`${a.value}-block-node`]: P,
          [`${a.value}-unselectable`]: !I,
          [`${a.value}-rtl`]: l.value === "rtl"
        }, n.class, c.value),
        direction: l.value,
        checkable: $,
        selectable: I,
        switcherIcon: (F) => rJ(a.value, S, F, i.leafIcon, x),
        onCheck: p,
        onExpand: v,
        onSelect: g,
        onDblclick: N || R,
        children: L
      }), O(O({}, i), {
        checkable: () => h("span", {
          class: `${a.value}-checkbox-inner`
        }, null)
      })));
    };
  }
});
var pJ = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z" } }] }, name: "folder-open", theme: "outlined" };
function D$(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      hJ(e, r, n[r]);
    });
  }
  return e;
}
function hJ(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Dx = function(t, n) {
  var o = D$({}, t, n.attrs);
  return h(an, D$({}, o, {
    icon: pJ
  }), null);
};
Dx.displayName = "FolderOpenOutlined";
Dx.inheritAttrs = !1;
var gJ = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z" } }] }, name: "folder", theme: "outlined" };
function A$(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(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      vJ(e, r, n[r]);
    });
  }
  return e;
}
function vJ(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Ax = function(t, n) {
  var o = A$({}, t, n.attrs);
  return h(an, A$({}, o, {
    icon: gJ
  }), null);
};
Ax.displayName = "FolderOutlined";
Ax.inheritAttrs = !1;
var ka;
(function(e) {
  e[e.None = 0] = "None", e[e.Start = 1] = "Start", e[e.End = 2] = "End";
})(ka || (ka = {}));
function Nx(e, t, n) {
  function o(r) {
    const i = r[t.key], a = r[t.children];
    n(i, r) !== !1 && Nx(a || [], t, n);
  }
  e.forEach(o);
}
function mJ(e) {
  let {
    treeData: t,
    expandedKeys: n,
    startKey: o,
    endKey: r,
    fieldNames: i = {
      title: "title",
      key: "key",
      children: "children"
    }
  } = e;
  const a = [];
  let l = ka.None;
  if (o && o === r)
    return [o];
  if (!o || !r)
    return [];
  function s(u) {
    return u === o || u === r;
  }
  return Nx(t, i, (u) => {
    if (l === ka.End)
      return !1;
    if (s(u)) {
      if (a.push(u), l === ka.None)
        l = ka.Start;
      else if (l === ka.Start)
        return l = ka.End, !1;
    } else l === ka.Start && a.push(u);
    return n.includes(u);
  }), a;
}
function Rv(e, t, n) {
  const o = [...t], r = [];
  return Nx(e, n, (i, a) => {
    const l = o.indexOf(i);
    return l !== -1 && (r.push(a), o.splice(l, 1)), !!o.length;
  }), r;
}
var bJ = 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 r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const yJ = () => O(O({}, z2()), {
  expandAction: en([Boolean, String])
});
function xJ(e) {
  const {
    isLeaf: t,
    expanded: n
  } = e;
  return t ? h(ug, null, null) : n ? h(Dx, null, null) : h(Ax, null, null);
}
const zv = be({
  compatConfig: {
    MODE: 3
  },
  name: "ADirectoryTree",
  inheritAttrs: !1,
  props: Mn(yJ(), {
    showIcon: !0,
    expandAction: "click"
  }),
  slots: Object,
  // emits: [
  //   'update:selectedKeys',
  //   'update:checkedKeys',
  //   'update:expandedKeys',
  //   'expand',
  //   'select',
  //   'check',
  //   'doubleclick',
  //   'dblclick',
  //   'click',
  // ],
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      emit: r,
      expose: i
    } = t;
    var a;
    const l = le(e.treeData || gb(Do((a = o.default) === null || a === void 0 ? void 0 : a.call(o))));
    Ie(() => e.treeData, () => {
      l.value = e.treeData;
    }), Ya(() => {
      Yt(() => {
        var M;
        e.treeData === void 0 && o.default && (l.value = gb(Do((M = o.default) === null || M === void 0 ? void 0 : M.call(o))));
      });
    });
    const s = le(), u = le(), c = E(() => eg(e.fieldNames)), d = le();
    i({
      scrollTo: (M) => {
        var R;
        (R = d.value) === null || R === void 0 || R.scrollTo(M);
      },
      selectedKeys: E(() => {
        var M;
        return (M = d.value) === null || M === void 0 ? void 0 : M.selectedKeys;
      }),
      checkedKeys: E(() => {
        var M;
        return (M = d.value) === null || M === void 0 ? void 0 : M.checkedKeys;
      }),
      halfCheckedKeys: E(() => {
        var M;
        return (M = d.value) === null || M === void 0 ? void 0 : M.halfCheckedKeys;
      }),
      loadedKeys: E(() => {
        var M;
        return (M = d.value) === null || M === void 0 ? void 0 : M.loadedKeys;
      }),
      loadingKeys: E(() => {
        var M;
        return (M = d.value) === null || M === void 0 ? void 0 : M.loadingKeys;
      }),
      expandedKeys: E(() => {
        var M;
        return (M = d.value) === null || M === void 0 ? void 0 : M.expandedKeys;
      })
    });
    const p = () => {
      const {
        keyEntities: M
      } = rx(l.value, {
        fieldNames: c.value
      });
      let R;
      return e.defaultExpandAll ? R = Object.keys(M) : e.defaultExpandParent ? R = hb(e.expandedKeys || e.defaultExpandedKeys || [], M) : R = e.expandedKeys || e.defaultExpandedKeys, R;
    }, v = le(e.selectedKeys || e.defaultSelectedKeys || []), g = le(p());
    Ie(() => e.selectedKeys, () => {
      e.selectedKeys !== void 0 && (v.value = e.selectedKeys);
    }, {
      immediate: !0
    }), Ie(() => e.expandedKeys, () => {
      e.expandedKeys !== void 0 && (g.value = e.expandedKeys);
    }, {
      immediate: !0
    });
    const x = LP((M, R) => {
      const {
        isLeaf: N
      } = R;
      N || M.shiftKey || M.metaKey || M.ctrlKey || d.value.onNodeExpand(M, R);
    }, 200, {
      leading: !0
    }), S = (M, R) => {
      e.expandedKeys === void 0 && (g.value = M), r("update:expandedKeys", M), r("expand", M, R);
    }, C = (M, R) => {
      const {
        expandAction: N
      } = e;
      N === "click" && x(M, R), r("click", M, R);
    }, P = (M, R) => {
      const {
        expandAction: N
      } = e;
      (N === "dblclick" || N === "doubleclick") && x(M, R), r("doubleclick", M, R), r("dblclick", M, R);
    }, $ = (M, R) => {
      const {
        multiple: N
      } = e, {
        node: H,
        nativeEvent: L
      } = R, F = H[c.value.key], A = O(O({}, R), {
        selected: !0
      }), G = L?.ctrlKey || L?.metaKey, j = L?.shiftKey;
      let Z;
      N && G ? (Z = M, s.value = F, u.value = Z, A.selectedNodes = Rv(l.value, Z, c.value)) : N && j ? (Z = Array.from(/* @__PURE__ */ new Set([...u.value || [], ...mJ({
        treeData: l.value,
        expandedKeys: g.value,
        startKey: F,
        endKey: s.value,
        fieldNames: c.value
      })])), A.selectedNodes = Rv(l.value, Z, c.value)) : (Z = [F], s.value = F, u.value = Z, A.selectedNodes = Rv(l.value, Z, c.value)), r("update:selectedKeys", Z), r("select", Z, A), e.selectedKeys === void 0 && (v.value = Z);
    }, I = (M, R) => {
      r("update:checkedKeys", M), r("check", M, R);
    }, {
      prefixCls: w,
      direction: T
    } = Nt("tree", e);
    return () => {
      const M = Me(`${w.value}-directory`, {
        [`${w.value}-directory-rtl`]: T.value === "rtl"
      }, n.class), {
        icon: R = o.icon,
        blockNode: N = !0
      } = e, H = bJ(e, ["icon", "blockNode"]);
      return h(vp, Q(Q(Q({}, n), {}, {
        icon: R || xJ,
        ref: d,
        blockNode: N
      }, H), {}, {
        prefixCls: w.value,
        class: M,
        expandedKeys: g.value,
        selectedKeys: v.value,
        onSelect: $,
        onClick: C,
        onDblclick: P,
        onExpand: S,
        onCheck: I
      }), o);
    };
  }
}), Fv = pb, wJ = O(vp, {
  DirectoryTree: zv,
  TreeNode: Fv,
  install: (e) => (e.component(vp.name, vp), e.component(Fv.name, Fv), e.component(zv.name, zv), e)
});
function N$(e, t) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
  const o = /* @__PURE__ */ new Set();
  function r(i, a) {
    let l = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1;
    const s = o.has(i);
    if (mr(!s, "Warning: There may be circular references"), s)
      return !1;
    if (i === a)
      return !0;
    if (n && l > 1)
      return !1;
    o.add(i);
    const u = l + 1;
    if (Array.isArray(i)) {
      if (!Array.isArray(a) || i.length !== a.length)
        return !1;
      for (let c = 0; c < i.length; c++)
        if (!r(i[c], a[c], u))
          return !1;
      return !0;
    }
    if (i && a && typeof i == "object" && typeof a == "object") {
      const c = Object.keys(i);
      return c.length !== Object.keys(a).length ? !1 : c.every((d) => r(i[d], a[d], u));
    }
    return !1;
  }
  return r(e, t);
}
const {
  SubMenu: SJ,
  Item: CJ
} = fo;
function $J(e) {
  return e.some((t) => {
    let {
      children: n
    } = t;
    return n && n.length > 0;
  });
}
function F2(e, t) {
  return typeof t == "string" || typeof t == "number" ? t?.toString().toLowerCase().includes(e.trim().toLowerCase()) : !1;
}
function B2(e) {
  let {
    filters: t,
    prefixCls: n,
    filteredKeys: o,
    filterMultiple: r,
    searchValue: i,
    filterSearch: a
  } = e;
  return t.map((l, s) => {
    const u = String(l.value);
    if (l.children)
      return h(SJ, {
        key: u || s,
        title: l.text,
        popupClassName: `${n}-dropdown-submenu`
      }, {
        default: () => [B2({
          filters: l.children,
          prefixCls: n,
          filteredKeys: o,
          filterMultiple: r,
          searchValue: i,
          filterSearch: a
        })]
      });
    const c = r ? Eo : To, d = h(CJ, {
      key: l.value !== void 0 ? u : s
    }, {
      default: () => [h(c, {
        checked: o.includes(u)
      }, null), h("span", null, [l.text])]
    });
    return i.trim() ? typeof a == "function" ? a(i, l) ? d : void 0 : F2(i, l.text) ? d : void 0 : d;
  });
}
const PJ = be({
  name: "FilterDropdown",
  props: ["tablePrefixCls", "prefixCls", "dropdownPrefixCls", "column", "filterState", "filterMultiple", "filterMode", "filterSearch", "columnKey", "triggerFilter", "locale", "getPopupContainer"],
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = $x(), r = E(() => {
      var U;
      return (U = e.filterMode) !== null && U !== void 0 ? U : "menu";
    }), i = E(() => {
      var U;
      return (U = e.filterSearch) !== null && U !== void 0 ? U : !1;
    }), a = E(() => e.column.filterDropdownOpen || e.column.filterDropdownVisible), l = E(() => e.column.onFilterDropdownOpenChange || e.column.onFilterDropdownVisibleChange);
    process.env.NODE_ENV !== "production" && [["filterDropdownVisible", "filterDropdownOpen", e.column.filterDropdownVisible], ["onFilterDropdownVisibleChange", "onFilterDropdownOpenChange", e.column.onFilterDropdownVisibleChange]].forEach((U) => {
      let [ae, se, ie] = U;
      dn(ie == null, "Table", `\`${ae}\` is deprecated. Please use \`${se}\` instead.`);
    });
    const s = $e(!1), u = E(() => {
      var U;
      return !!(e.filterState && (!((U = e.filterState.filteredKeys) === null || U === void 0) && U.length || e.filterState.forceFiltered));
    }), c = E(() => {
      var U;
      return cg((U = e.column) === null || U === void 0 ? void 0 : U.filters);
    }), d = E(() => {
      const {
        filterDropdown: U,
        slots: ae = {},
        customFilterDropdown: se
      } = e.column;
      return U || ae.filterDropdown && o.value[ae.filterDropdown] || se && o.value.customFilterDropdown;
    }), f = E(() => {
      const {
        filterIcon: U,
        slots: ae = {}
      } = e.column;
      return U || ae.filterIcon && o.value[ae.filterIcon] || o.value.customFilterIcon;
    }), p = (U) => {
      var ae;
      s.value = U, (ae = l.value) === null || ae === void 0 || ae.call(l, U);
    }, v = E(() => typeof a.value == "boolean" ? a.value : s.value), g = E(() => {
      var U;
      return (U = e.filterState) === null || U === void 0 ? void 0 : U.filteredKeys;
    }), m = $e([]), x = (U) => {
      let {
        selectedKeys: ae
      } = U;
      m.value = ae;
    }, S = (U, ae) => {
      let {
        node: se,
        checked: ie
      } = ae;
      e.filterMultiple ? x({
        selectedKeys: U
      }) : x({
        selectedKeys: ie && se.key ? [se.key] : []
      });
    };
    Ie(g, () => {
      s.value && x({
        selectedKeys: g.value || []
      });
    }, {
      immediate: !0
    });
    const C = $e([]), P = $e(), $ = (U) => {
      P.value = setTimeout(() => {
        C.value = U;
      });
    }, I = () => {
      clearTimeout(P.value);
    };
    qt(() => {
      clearTimeout(P.value);
    });
    const w = $e(""), T = (U) => {
      const {
        value: ae
      } = U.target;
      w.value = ae;
    };
    Ie(s, () => {
      s.value || (w.value = "");
    });
    const M = (U) => {
      const {
        column: ae,
        columnKey: se,
        filterState: ie
      } = e, re = U && U.length ? U : null;
      if (re === null && (!ie || !ie.filteredKeys) || N$(re, ie?.filteredKeys, !0))
        return null;
      e.triggerFilter({
        column: ae,
        key: se,
        filteredKeys: re
      });
    }, R = () => {
      p(!1), M(m.value);
    }, N = function() {
      let {
        confirm: U,
        closeDropdown: ae
      } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
        confirm: !1,
        closeDropdown: !1
      };
      U && M([]), ae && p(!1), w.value = "", e.column.filterResetToDefaultFilteredValue ? m.value = (e.column.defaultFilteredValue || []).map((se) => String(se)) : m.value = [];
    }, H = function() {
      let {
        closeDropdown: U
      } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
        closeDropdown: !0
      };
      U && p(!1), M(m.value);
    }, L = (U) => {
      U && g.value !== void 0 && (m.value = g.value || []), p(U), !U && !d.value && R();
    }, {
      direction: F
    } = Nt("", e), A = (U) => {
      if (U.target.checked) {
        const ae = c.value;
        m.value = ae;
      } else
        m.value = [];
    }, G = (U) => {
      let {
        filters: ae
      } = U;
      return (ae || []).map((se, ie) => {
        const re = String(se.value), te = {
          title: se.text,
          key: se.value !== void 0 ? re : ie
        };
        return se.children && (te.children = G({
          filters: se.children
        })), te;
      });
    }, j = (U) => {
      var ae;
      return O(O({}, U), {
        text: U.title,
        value: U.key,
        children: ((ae = U.children) === null || ae === void 0 ? void 0 : ae.map((se) => j(se))) || []
      });
    }, Z = E(() => G({
      filters: e.column.filters
    })), W = E(() => Me({
      [`${e.dropdownPrefixCls}-menu-without-submenu`]: !$J(e.column.filters || [])
    })), K = () => {
      const U = m.value, {
        column: ae,
        locale: se,
        tablePrefixCls: ie,
        filterMultiple: re,
        dropdownPrefixCls: te,
        getPopupContainer: ve,
        prefixCls: ce
      } = e;
      return (ae.filters || []).length === 0 ? h(fs, {
        image: fs.PRESENTED_IMAGE_SIMPLE,
        description: se.filterEmptyText,
        imageStyle: {
          height: 24
        },
        style: {
          margin: 0,
          padding: "16px 0"
        }
      }, null) : r.value === "tree" ? h(Je, null, [h(x$, {
        filterSearch: i.value,
        value: w.value,
        onChange: T,
        tablePrefixCls: ie,
        locale: se
      }, null), h("div", {
        class: `${ie}-filter-dropdown-tree`
      }, [re ? h(Eo, {
        class: `${ie}-filter-dropdown-checkall`,
        onChange: A,
        checked: U.length === c.value.length,
        indeterminate: U.length > 0 && U.length < c.value.length
      }, {
        default: () => [se.filterCheckall]
      }) : null, h(wJ, {
        checkable: !0,
        selectable: !1,
        blockNode: !0,
        multiple: re,
        checkStrictly: !re,
        class: `${te}-menu`,
        onCheck: S,
        checkedKeys: U,
        selectedKeys: U,
        showIcon: !1,
        treeData: Z.value,
        autoExpandParent: !0,
        defaultExpandAll: !0,
        filterTreeNode: w.value.trim() ? (fe) => typeof i.value == "function" ? i.value(w.value, j(fe)) : F2(w.value, fe.title) : void 0
      }, null)])]) : h(Je, null, [h(x$, {
        filterSearch: i.value,
        value: w.value,
        onChange: T,
        tablePrefixCls: ie,
        locale: se
      }, null), h(fo, {
        multiple: re,
        prefixCls: `${te}-menu`,
        class: W.value,
        onClick: I,
        onSelect: x,
        onDeselect: x,
        selectedKeys: U,
        getPopupContainer: ve,
        openKeys: C.value,
        onOpenChange: $
      }, {
        default: () => B2({
          filters: ae.filters || [],
          filterSearch: i.value,
          prefixCls: ce,
          filteredKeys: m.value,
          filterMultiple: re,
          searchValue: w.value
        })
      })]);
    }, q = E(() => {
      const U = m.value;
      return e.column.filterResetToDefaultFilteredValue ? N$((e.column.defaultFilteredValue || []).map((ae) => String(ae)), U, !0) : U.length === 0;
    });
    return () => {
      var U;
      const {
        tablePrefixCls: ae,
        prefixCls: se,
        column: ie,
        dropdownPrefixCls: re,
        locale: te,
        getPopupContainer: ve
      } = e;
      let ce;
      typeof d.value == "function" ? ce = d.value({
        prefixCls: `${re}-custom`,
        setSelectedKeys: (Te) => x({
          selectedKeys: Te
        }),
        selectedKeys: m.value,
        confirm: H,
        clearFilters: N,
        filters: ie.filters,
        visible: v.value,
        column: ie.__originColumn__,
        close: () => {
          p(!1);
        }
      }) : d.value ? ce = d.value : ce = h(Je, null, [K(), h("div", {
        class: `${se}-dropdown-btns`
      }, [h(Ft, {
        type: "link",
        size: "small",
        disabled: q.value,
        onClick: () => N()
      }, {
        default: () => [te.filterReset]
      }), h(Ft, {
        type: "primary",
        size: "small",
        onClick: R
      }, {
        default: () => [te.filterConfirm]
      })])]);
      const fe = h(HZ, {
        class: `${se}-dropdown`
      }, {
        default: () => [ce]
      });
      let ge;
      return typeof f.value == "function" ? ge = f.value({
        filtered: u.value,
        column: ie.__originColumn__
      }) : f.value ? ge = f.value : ge = h(Tx, null, null), h("div", {
        class: `${se}-column`
      }, [h("span", {
        class: `${ae}-column-title`
      }, [(U = n.default) === null || U === void 0 ? void 0 : U.call(n)]), h(Er, {
        overlay: fe,
        trigger: ["click"],
        open: v.value,
        onOpenChange: L,
        getPopupContainer: ve,
        placement: F.value === "rtl" ? "bottomLeft" : "bottomRight"
      }, {
        default: () => [h("span", {
          role: "button",
          tabindex: -1,
          class: Me(`${se}-trigger`, {
            active: u.value
          }),
          onClick: (Te) => {
            Te.stopPropagation();
          }
        }, [ge])]
      })]);
    };
  }
});
function Kb(e, t, n) {
  let o = [];
  return (e || []).forEach((r, i) => {
    var a, l;
    const s = Gd(i, n), u = r.filterDropdown || ((a = r?.slots) === null || a === void 0 ? void 0 : a.filterDropdown) || r.customFilterDropdown;
    if (r.filters || u || "onFilter" in r)
      if ("filteredValue" in r) {
        let c = r.filteredValue;
        u || (c = (l = c?.map(String)) !== null && l !== void 0 ? l : c), o.push({
          column: r,
          key: As(r, s),
          filteredKeys: c,
          forceFiltered: r.filtered
        });
      } else
        o.push({
          column: r,
          key: As(r, s),
          filteredKeys: t && r.defaultFilteredValue ? r.defaultFilteredValue : void 0,
          forceFiltered: r.filtered
        });
    "children" in r && (o = [...o, ...Kb(r.children, t, s)]);
  }), o;
}
function L2(e, t, n, o, r, i, a, l) {
  return n.map((s, u) => {
    var c;
    const d = Gd(u, l), {
      filterMultiple: f = !0,
      filterMode: p,
      filterSearch: v
    } = s;
    let g = s;
    const m = s.filterDropdown || ((c = s?.slots) === null || c === void 0 ? void 0 : c.filterDropdown) || s.customFilterDropdown;
    if (g.filters || m) {
      const x = As(g, d), S = o.find((C) => {
        let {
          key: P
        } = C;
        return x === P;
      });
      g = O(O({}, g), {
        title: (C) => h(PJ, {
          tablePrefixCls: e,
          prefixCls: `${e}-filter`,
          dropdownPrefixCls: t,
          column: g,
          columnKey: x,
          filterState: S,
          filterMultiple: f,
          filterMode: p,
          filterSearch: v,
          triggerFilter: i,
          locale: r,
          getPopupContainer: a
        }, {
          default: () => [Ix(s.title, C)]
        })
      });
    }
    return "children" in g && (g = O(O({}, g), {
      children: L2(e, t, g.children, o, r, i, a, d)
    })), g;
  });
}
function cg(e) {
  let t = [];
  return (e || []).forEach((n) => {
    let {
      value: o,
      children: r
    } = n;
    t.push(o), r && (t = [...t, ...cg(r)]);
  }), t;
}
function R$(e) {
  const t = {};
  return e.forEach((n) => {
    let {
      key: o,
      filteredKeys: r,
      column: i
    } = n;
    var a;
    const l = i.filterDropdown || ((a = i?.slots) === null || a === void 0 ? void 0 : a.filterDropdown) || i.customFilterDropdown, {
      filters: s
    } = i;
    if (l)
      t[o] = r || null;
    else if (Array.isArray(r)) {
      const u = cg(s);
      t[o] = u.filter((c) => r.includes(String(c)));
    } else
      t[o] = null;
  }), t;
}
function z$(e, t) {
  return t.reduce((n, o) => {
    const {
      column: {
        onFilter: r,
        filters: i
      },
      filteredKeys: a
    } = o;
    return r && a && a.length ? n.filter((l) => a.some((s) => {
      const u = cg(i), c = u.findIndex((f) => String(f) === String(s)), d = c !== -1 ? u[c] : s;
      return r(d, l);
    })) : n;
  }, e);
}
function H2(e) {
  return e.flatMap((t) => "children" in t ? [t, ...H2(t.children || [])] : [t]);
}
function OJ(e) {
  let {
    prefixCls: t,
    dropdownPrefixCls: n,
    mergedColumns: o,
    locale: r,
    onFilterChange: i,
    getPopupContainer: a
  } = e;
  const l = E(() => H2(o.value)), [s, u] = Cn(Kb(l.value, !0)), c = E(() => {
    const v = Kb(l.value, !1);
    if (v.length === 0)
      return v;
    let g = !0, m = !0;
    if (v.forEach((x) => {
      let {
        filteredKeys: S
      } = x;
      S !== void 0 ? g = !1 : m = !1;
    }), g) {
      const x = (l.value || []).map((S, C) => As(S, Gd(C)));
      return s.value.filter((S) => {
        let {
          key: C
        } = S;
        return x.includes(C);
      }).map((S) => {
        const C = l.value[x.findIndex((P) => P === S.key)];
        return O(O({}, S), {
          column: O(O({}, S.column), C),
          forceFiltered: C.filtered
        });
      });
    }
    return dn(m, "Table", "Columns should all contain `filteredValue` or not contain `filteredValue`."), v;
  }), d = E(() => R$(c.value)), f = (v) => {
    const g = c.value.filter((m) => {
      let {
        key: x
      } = m;
      return x !== v.key;
    });
    g.push(v), u(g), i(R$(g), g);
  };
  return [(v) => L2(t.value, n.value, v, c.value, r.value, f, a.value), c, d];
}
function V2(e, t) {
  return e.map((n) => {
    const o = O({}, n);
    return o.title = Ix(o.title, t), "children" in o && (o.children = V2(o.children, t)), o;
  });
}
function kJ(e) {
  return [(n) => V2(n, e.value)];
}
function IJ(e) {
  return function(n) {
    let {
      prefixCls: o,
      onExpand: r,
      record: i,
      expanded: a,
      expandable: l
    } = n;
    const s = `${o}-row-expand-icon`;
    return h("button", {
      type: "button",
      onClick: (u) => {
        r(i, u), u.stopPropagation();
      },
      class: Me(s, {
        [`${s}-spaced`]: !l,
        [`${s}-expanded`]: l && a,
        [`${s}-collapsed`]: l && !a
      }),
      "aria-label": a ? e.collapse : e.expand,
      "aria-expanded": a
    }, null);
  };
}
function j2(e, t) {
  const n = t.value;
  return e.map((o) => {
    var r;
    if (o === vi || o === Yi) return o;
    const i = O({}, o), {
      slots: a = {}
    } = i;
    return i.__originColumn__ = o, dn(!("slots" in i), "Table", "`column.slots` is deprecated. Please use `v-slot:headerCell` `v-slot:bodyCell` instead."), Object.keys(a).forEach((l) => {
      const s = a[l];
      i[l] === void 0 && n[s] && (i[l] = n[s]);
    }), t.value.headerCell && !(!((r = o.slots) === null || r === void 0) && r.title) && (i.title = Nh(t.value, "headerCell", {
      title: o.title,
      column: o
    }, () => [o.title])), "children" in i && Array.isArray(i.children) && (i.children = j2(i.children, t)), i;
  });
}
function TJ(e) {
  return [(n) => j2(n, e)];
}
const _J = (e) => {
  const {
    componentCls: t
  } = e, n = `${e.lineWidth}px ${e.lineType} ${e.tableBorderColor}`, o = (r, i, a) => ({
    [`&${t}-${r}`]: {
      [`> ${t}-container`]: {
        [`> ${t}-content, > ${t}-body`]: {
          "> table > tbody > tr > td": {
            [`> ${t}-expanded-row-fixed`]: {
              margin: `-${i}px -${a + e.lineWidth}px`
            }
          }
        }
      }
    }
  });
  return {
    [`${t}-wrapper`]: {
      [`${t}${t}-bordered`]: O(O(O({
        // ============================ Title =============================
        [`> ${t}-title`]: {
          border: n,
          borderBottom: 0
        },
        // ============================ Content ============================
        [`> ${t}-container`]: {
          borderInlineStart: n,
          [`
            > ${t}-content,
            > ${t}-header,
            > ${t}-body,
            > ${t}-summary
          `]: {
            "> table": {
              // ============================= Cell =============================
              "\n                > thead > tr > th,\n                > tbody > tr > td,\n                > tfoot > tr > th,\n                > tfoot > tr > td\n              ": {
                borderInlineEnd: n
              },
              // ============================ Header ============================
              "> thead": {
                "> tr:not(:last-child) > th": {
                  borderBottom: n
                },
                "> tr > th::before": {
                  backgroundColor: "transparent !important"
                }
              },
              // Fixed right should provides additional border
              "\n                > thead > tr,\n                > tbody > tr,\n                > tfoot > tr\n              ": {
                [`> ${t}-cell-fix-right-first::after`]: {
                  borderInlineEnd: n
                }
              },
              // ========================== Expandable ==========================
              "> tbody > tr > td": {
                [`> ${t}-expanded-row-fixed`]: {
                  margin: `-${e.tablePaddingVertical}px -${e.tablePaddingHorizontal + e.lineWidth}px`,
                  "&::after": {
                    position: "absolute",
                    top: 0,
                    insetInlineEnd: e.lineWidth,
                    bottom: 0,
                    borderInlineEnd: n,
                    content: '""'
                  }
                }
              }
            }
          },
          [`
            > ${t}-content,
            > ${t}-header
          `]: {
            "> table": {
              borderTop: n
            }
          }
        },
        // ============================ Scroll ============================
        [`&${t}-scroll-horizontal`]: {
          [`> ${t}-container > ${t}-body`]: {
            "> table > tbody": {
              [`
                > tr${t}-expanded-row,
                > tr${t}-placeholder
              `]: {
                "> td": {
                  borderInlineEnd: 0
                }
              }
            }
          }
        }
      }, o("middle", e.tablePaddingVerticalMiddle, e.tablePaddingHorizontalMiddle)), o("small", e.tablePaddingVerticalSmall, e.tablePaddingHorizontalSmall)), {
        // ============================ Footer ============================
        [`> ${t}-footer`]: {
          border: n,
          borderTop: 0
        }
      }),
      // ============================ Nested ============================
      [`${t}-cell`]: {
        [`${t}-container:first-child`]: {
          // :first-child to avoid the case when bordered and title is set
          borderTop: 0
        },
        // https://github.com/ant-design/ant-design/issues/35577
        "&-scrollbar:not([rowspan])": {
          boxShadow: `0 ${e.lineWidth}px 0 ${e.lineWidth}px ${e.tableHeaderBg}`
        }
      }
    }
  };
}, MJ = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-wrapper`]: {
      [`${t}-cell-ellipsis`]: O(O({}, Va), {
        wordBreak: "keep-all",
        // Fixed first or last should special process
        [`
          &${t}-cell-fix-left-last,
          &${t}-cell-fix-right-first
        `]: {
          overflow: "visible",
          [`${t}-cell-content`]: {
            display: "block",
            overflow: "hidden",
            textOverflow: "ellipsis"
          }
        },
        [`${t}-column-title`]: {
          overflow: "hidden",
          textOverflow: "ellipsis",
          wordBreak: "keep-all"
        }
      })
    }
  };
}, EJ = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-wrapper`]: {
      [`${t}-tbody > tr${t}-placeholder`]: {
        textAlign: "center",
        color: e.colorTextDisabled,
        "&:hover > td": {
          background: e.colorBgContainer
        }
      }
    }
  };
}, DJ = (e) => {
  const {
    componentCls: t,
    antCls: n,
    controlInteractiveSize: o,
    motionDurationSlow: r,
    lineWidth: i,
    paddingXS: a,
    lineType: l,
    tableBorderColor: s,
    tableExpandIconBg: u,
    tableExpandColumnWidth: c,
    borderRadius: d,
    fontSize: f,
    fontSizeSM: p,
    lineHeight: v,
    tablePaddingVertical: g,
    tablePaddingHorizontal: m,
    tableExpandedRowBg: x,
    paddingXXS: S
  } = e, C = o / 2 - i, P = C * 2 + i * 3, $ = `${i}px ${l} ${s}`, I = S - i;
  return {
    [`${t}-wrapper`]: {
      [`${t}-expand-icon-col`]: {
        width: c
      },
      [`${t}-row-expand-icon-cell`]: {
        textAlign: "center",
        [`${t}-row-expand-icon`]: {
          display: "inline-flex",
          float: "none",
          verticalAlign: "sub"
        }
      },
      [`${t}-row-indent`]: {
        height: 1,
        float: "left"
      },
      [`${t}-row-expand-icon`]: O(O({}, V8(e)), {
        position: "relative",
        float: "left",
        boxSizing: "border-box",
        width: P,
        height: P,
        padding: 0,
        color: "inherit",
        lineHeight: `${P}px`,
        background: u,
        border: $,
        borderRadius: d,
        transform: `scale(${o / P})`,
        transition: `all ${r}`,
        userSelect: "none",
        "&:focus, &:hover, &:active": {
          borderColor: "currentcolor"
        },
        "&::before, &::after": {
          position: "absolute",
          background: "currentcolor",
          transition: `transform ${r} ease-out`,
          content: '""'
        },
        "&::before": {
          top: C,
          insetInlineEnd: I,
          insetInlineStart: I,
          height: i
        },
        "&::after": {
          top: I,
          bottom: I,
          insetInlineStart: C,
          width: i,
          transform: "rotate(90deg)"
        },
        // Motion effect
        "&-collapsed::before": {
          transform: "rotate(-180deg)"
        },
        "&-collapsed::after": {
          transform: "rotate(0deg)"
        },
        "&-spaced": {
          "&::before, &::after": {
            display: "none",
            content: "none"
          },
          background: "transparent",
          border: 0,
          visibility: "hidden"
        }
      }),
      [`${t}-row-indent + ${t}-row-expand-icon`]: {
        marginTop: (f * v - i * 3) / 2 - Math.ceil((p * 1.4 - i * 3) / 2),
        marginInlineEnd: a
      },
      [`tr${t}-expanded-row`]: {
        "&, &:hover": {
          "> td": {
            background: x
          }
        },
        // https://github.com/ant-design/ant-design/issues/25573
        [`${n}-descriptions-view`]: {
          display: "flex",
          table: {
            flex: "auto",
            width: "auto"
          }
        }
      },
      // With fixed
      [`${t}-expanded-row-fixed`]: {
        position: "relative",
        margin: `-${g}px -${m}px`,
        padding: `${g}px ${m}px`
      }
    }
  };
}, AJ = (e) => {
  const {
    componentCls: t,
    antCls: n,
    iconCls: o,
    tableFilterDropdownWidth: r,
    tableFilterDropdownSearchWidth: i,
    paddingXXS: a,
    paddingXS: l,
    colorText: s,
    lineWidth: u,
    lineType: c,
    tableBorderColor: d,
    tableHeaderIconColor: f,
    fontSizeSM: p,
    tablePaddingHorizontal: v,
    borderRadius: g,
    motionDurationSlow: m,
    colorTextDescription: x,
    colorPrimary: S,
    tableHeaderFilterActiveBg: C,
    colorTextDisabled: P,
    tableFilterDropdownBg: $,
    tableFilterDropdownHeight: I,
    controlItemBgHover: w,
    controlItemBgActive: T,
    boxShadowSecondary: M
  } = e, R = `${n}-dropdown`, N = `${t}-filter-dropdown`, H = `${n}-tree`, L = `${u}px ${c} ${d}`;
  return [
    {
      [`${t}-wrapper`]: {
        [`${t}-filter-column`]: {
          display: "flex",
          justifyContent: "space-between"
        },
        [`${t}-filter-trigger`]: {
          position: "relative",
          display: "flex",
          alignItems: "center",
          marginBlock: -a,
          marginInline: `${a}px ${-v / 2}px`,
          padding: `0 ${a}px`,
          color: f,
          fontSize: p,
          borderRadius: g,
          cursor: "pointer",
          transition: `all ${m}`,
          "&:hover": {
            color: x,
            background: C
          },
          "&.active": {
            color: S
          }
        }
      }
    },
    {
      // Dropdown
      [`${n}-dropdown`]: {
        [N]: O(O({}, fn(e)), {
          minWidth: r,
          backgroundColor: $,
          borderRadius: g,
          boxShadow: M,
          // Reset menu
          [`${R}-menu`]: {
            // https://github.com/ant-design/ant-design/issues/4916
            // https://github.com/ant-design/ant-design/issues/19542
            maxHeight: I,
            overflowX: "hidden",
            border: 0,
            boxShadow: "none",
            "&:empty::after": {
              display: "block",
              padding: `${l}px 0`,
              color: P,
              fontSize: p,
              textAlign: "center",
              content: '"Not Found"'
            }
          },
          [`${N}-tree`]: {
            paddingBlock: `${l}px 0`,
            paddingInline: l,
            [H]: {
              padding: 0
            },
            [`${H}-treenode ${H}-node-content-wrapper:hover`]: {
              backgroundColor: w
            },
            [`${H}-treenode-checkbox-checked ${H}-node-content-wrapper`]: {
              "&, &:hover": {
                backgroundColor: T
              }
            }
          },
          [`${N}-search`]: {
            padding: l,
            borderBottom: L,
            "&-input": {
              input: {
                minWidth: i
              },
              [o]: {
                color: P
              }
            }
          },
          [`${N}-checkall`]: {
            width: "100%",
            marginBottom: a,
            marginInlineStart: a
          },
          // Operation
          [`${N}-btns`]: {
            display: "flex",
            justifyContent: "space-between",
            padding: `${l - u}px ${l}px`,
            overflow: "hidden",
            backgroundColor: "inherit",
            borderTop: L
          }
        })
      }
    },
    // Dropdown Menu & SubMenu
    {
      // submenu of table filter dropdown
      [`${n}-dropdown ${N}, ${N}-submenu`]: {
        // Checkbox
        [`${n}-checkbox-wrapper + span`]: {
          paddingInlineStart: l,
          color: s
        },
        "> ul": {
          maxHeight: "calc(100vh - 130px)",
          overflowX: "hidden",
          overflowY: "auto"
        }
      }
    }
  ];
}, NJ = (e) => {
  const {
    componentCls: t,
    lineWidth: n,
    colorSplit: o,
    motionDurationSlow: r,
    zIndexTableFixed: i,
    tableBg: a,
    zIndexTableSticky: l
  } = e, s = o;
  return {
    [`${t}-wrapper`]: {
      [`
        ${t}-cell-fix-left,
        ${t}-cell-fix-right
      `]: {
        position: "sticky !important",
        zIndex: i,
        background: a
      },
      [`
        ${t}-cell-fix-left-first::after,
        ${t}-cell-fix-left-last::after
      `]: {
        position: "absolute",
        top: 0,
        right: {
          _skip_check_: !0,
          value: 0
        },
        bottom: -n,
        width: 30,
        transform: "translateX(100%)",
        transition: `box-shadow ${r}`,
        content: '""',
        pointerEvents: "none"
      },
      [`${t}-cell-fix-left-all::after`]: {
        display: "none"
      },
      [`
        ${t}-cell-fix-right-first::after,
        ${t}-cell-fix-right-last::after
      `]: {
        position: "absolute",
        top: 0,
        bottom: -n,
        left: {
          _skip_check_: !0,
          value: 0
        },
        width: 30,
        transform: "translateX(-100%)",
        transition: `box-shadow ${r}`,
        content: '""',
        pointerEvents: "none"
      },
      [`${t}-container`]: {
        "&::before, &::after": {
          position: "absolute",
          top: 0,
          bottom: 0,
          zIndex: l + 1,
          width: 30,
          transition: `box-shadow ${r}`,
          content: '""',
          pointerEvents: "none"
        },
        "&::before": {
          insetInlineStart: 0
        },
        "&::after": {
          insetInlineEnd: 0
        }
      },
      [`${t}-ping-left`]: {
        [`&:not(${t}-has-fix-left) ${t}-container`]: {
          position: "relative",
          "&::before": {
            boxShadow: `inset 10px 0 8px -8px ${s}`
          }
        },
        [`
          ${t}-cell-fix-left-first::after,
          ${t}-cell-fix-left-last::after
        `]: {
          boxShadow: `inset 10px 0 8px -8px ${s}`
        },
        [`${t}-cell-fix-left-last::before`]: {
          backgroundColor: "transparent !important"
        }
      },
      [`${t}-ping-right`]: {
        [`&:not(${t}-has-fix-right) ${t}-container`]: {
          position: "relative",
          "&::after": {
            boxShadow: `inset -10px 0 8px -8px ${s}`
          }
        },
        [`
          ${t}-cell-fix-right-first::after,
          ${t}-cell-fix-right-last::after
        `]: {
          boxShadow: `inset -10px 0 8px -8px ${s}`
        }
      }
    }
  };
}, RJ = (e) => {
  const {
    componentCls: t,
    antCls: n
  } = e;
  return {
    [`${t}-wrapper`]: {
      // ========================== Pagination ==========================
      [`${t}-pagination${n}-pagination`]: {
        margin: `${e.margin}px 0`
      },
      [`${t}-pagination`]: {
        display: "flex",
        flexWrap: "wrap",
        rowGap: e.paddingXS,
        "> *": {
          flex: "none"
        },
        "&-left": {
          justifyContent: "flex-start"
        },
        "&-center": {
          justifyContent: "center"
        },
        "&-right": {
          justifyContent: "flex-end"
        }
      }
    }
  };
}, zJ = (e) => {
  const {
    componentCls: t,
    tableRadius: n
  } = e;
  return {
    [`${t}-wrapper`]: {
      [t]: {
        // https://github.com/ant-design/ant-design/issues/39115#issuecomment-1362314574
        [`${t}-title, ${t}-header`]: {
          borderRadius: `${n}px ${n}px 0 0`
        },
        [`${t}-title + ${t}-container`]: {
          borderStartStartRadius: 0,
          borderStartEndRadius: 0,
          table: {
            borderRadius: 0,
            "> thead > tr:first-child": {
              "th:first-child": {
                borderRadius: 0
              },
              "th:last-child": {
                borderRadius: 0
              }
            }
          }
        },
        "&-container": {
          borderStartStartRadius: n,
          borderStartEndRadius: n,
          "table > thead > tr:first-child": {
            "> *:first-child": {
              borderStartStartRadius: n
            },
            "> *:last-child": {
              borderStartEndRadius: n
            }
          }
        },
        "&-footer": {
          borderRadius: `0 0 ${n}px ${n}px`
        }
      }
    }
  };
}, FJ = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-wrapper-rtl`]: {
      direction: "rtl",
      table: {
        direction: "rtl"
      },
      [`${t}-pagination-left`]: {
        justifyContent: "flex-end"
      },
      [`${t}-pagination-right`]: {
        justifyContent: "flex-start"
      },
      [`${t}-row-expand-icon`]: {
        "&::after": {
          transform: "rotate(-90deg)"
        },
        "&-collapsed::before": {
          transform: "rotate(180deg)"
        },
        "&-collapsed::after": {
          transform: "rotate(0deg)"
        }
      }
    }
  };
}, BJ = (e) => {
  const {
    componentCls: t,
    antCls: n,
    iconCls: o,
    fontSizeIcon: r,
    paddingXS: i,
    tableHeaderIconColor: a,
    tableHeaderIconColorHover: l
  } = e;
  return {
    [`${t}-wrapper`]: {
      // ========================== Selections ==========================
      [`${t}-selection-col`]: {
        width: e.tableSelectionColumnWidth
      },
      [`${t}-bordered ${t}-selection-col`]: {
        width: e.tableSelectionColumnWidth + i * 2
      },
      [`
        table tr th${t}-selection-column,
        table tr td${t}-selection-column
      `]: {
        paddingInlineEnd: e.paddingXS,
        paddingInlineStart: e.paddingXS,
        textAlign: "center",
        [`${n}-radio-wrapper`]: {
          marginInlineEnd: 0
        }
      },
      [`table tr th${t}-selection-column${t}-cell-fix-left`]: {
        zIndex: e.zIndexTableFixed + 1
      },
      [`table tr th${t}-selection-column::after`]: {
        backgroundColor: "transparent !important"
      },
      [`${t}-selection`]: {
        position: "relative",
        display: "inline-flex",
        flexDirection: "column"
      },
      [`${t}-selection-extra`]: {
        position: "absolute",
        top: 0,
        zIndex: 1,
        cursor: "pointer",
        transition: `all ${e.motionDurationSlow}`,
        marginInlineStart: "100%",
        paddingInlineStart: `${e.tablePaddingHorizontal / 4}px`,
        [o]: {
          color: a,
          fontSize: r,
          verticalAlign: "baseline",
          "&:hover": {
            color: l
          }
        }
      }
    }
  };
}, LJ = (e) => {
  const {
    componentCls: t
  } = e, n = (o, r, i, a) => ({
    [`${t}${t}-${o}`]: {
      fontSize: a,
      [`
        ${t}-title,
        ${t}-footer,
        ${t}-thead > tr > th,
        ${t}-tbody > tr > td,
        tfoot > tr > th,
        tfoot > tr > td
      `]: {
        padding: `${r}px ${i}px`
      },
      [`${t}-filter-trigger`]: {
        marginInlineEnd: `-${i / 2}px`
      },
      [`${t}-expanded-row-fixed`]: {
        margin: `-${r}px -${i}px`
      },
      [`${t}-tbody`]: {
        // ========================= Nest Table ===========================
        [`${t}-wrapper:only-child ${t}`]: {
          marginBlock: `-${r}px`,
          marginInline: `${e.tableExpandColumnWidth - i}px -${i}px`
        }
      },
      // https://github.com/ant-design/ant-design/issues/35167
      [`${t}-selection-column`]: {
        paddingInlineStart: `${i / 4}px`
      }
    }
  });
  return {
    [`${t}-wrapper`]: O(O({}, n("middle", e.tablePaddingVerticalMiddle, e.tablePaddingHorizontalMiddle, e.tableFontSizeMiddle)), n("small", e.tablePaddingVerticalSmall, e.tablePaddingHorizontalSmall, e.tableFontSizeSmall))
  };
}, HJ = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-wrapper ${t}-resize-handle`]: {
      position: "absolute",
      top: 0,
      height: "100% !important",
      bottom: 0,
      left: " auto !important",
      right: " -8px",
      cursor: "col-resize",
      touchAction: "none",
      userSelect: "auto",
      width: "16px",
      zIndex: 1,
      "&-line": {
        display: "block",
        width: "1px",
        marginLeft: "7px",
        height: "100% !important",
        backgroundColor: e.colorPrimary,
        opacity: 0
      },
      "&:hover &-line": {
        opacity: 1
      }
    },
    [`${t}-wrapper  ${t}-resize-handle.dragging`]: {
      overflow: "hidden",
      [`${t}-resize-handle-line`]: {
        opacity: 1
      },
      "&:before": {
        position: "absolute",
        top: 0,
        bottom: 0,
        content: '" "',
        width: "200vw",
        transform: "translateX(-50%)",
        opacity: 0
      }
    }
  };
}, VJ = (e) => {
  const {
    componentCls: t,
    marginXXS: n,
    fontSizeIcon: o,
    tableHeaderIconColor: r,
    tableHeaderIconColorHover: i
  } = e;
  return {
    [`${t}-wrapper`]: {
      [`${t}-thead th${t}-column-has-sorters`]: {
        outline: "none",
        cursor: "pointer",
        transition: `all ${e.motionDurationSlow}`,
        "&:hover": {
          background: e.tableHeaderSortHoverBg,
          "&::before": {
            backgroundColor: "transparent !important"
          }
        },
        "&:focus-visible": {
          color: e.colorPrimary
        },
        // https://github.com/ant-design/ant-design/issues/30969
        [`
          &${t}-cell-fix-left:hover,
          &${t}-cell-fix-right:hover
        `]: {
          background: e.tableFixedHeaderSortActiveBg
        }
      },
      [`${t}-thead th${t}-column-sort`]: {
        background: e.tableHeaderSortBg,
        "&::before": {
          backgroundColor: "transparent !important"
        }
      },
      [`td${t}-column-sort`]: {
        background: e.tableBodySortBg
      },
      [`${t}-column-title`]: {
        position: "relative",
        zIndex: 1,
        flex: 1
      },
      [`${t}-column-sorters`]: {
        display: "flex",
        flex: "auto",
        alignItems: "center",
        justifyContent: "space-between",
        "&::after": {
          position: "absolute",
          inset: 0,
          width: "100%",
          height: "100%",
          content: '""'
        }
      },
      [`${t}-column-sorter`]: {
        marginInlineStart: n,
        color: r,
        fontSize: 0,
        transition: `color ${e.motionDurationSlow}`,
        "&-inner": {
          display: "inline-flex",
          flexDirection: "column",
          alignItems: "center"
        },
        "&-up, &-down": {
          fontSize: o,
          "&.active": {
            color: e.colorPrimary
          }
        },
        [`${t}-column-sorter-up + ${t}-column-sorter-down`]: {
          marginTop: "-0.3em"
        }
      },
      [`${t}-column-sorters:hover ${t}-column-sorter`]: {
        color: i
      }
    }
  };
}, jJ = (e) => {
  const {
    componentCls: t,
    opacityLoading: n,
    tableScrollThumbBg: o,
    tableScrollThumbBgHover: r,
    tableScrollThumbSize: i,
    tableScrollBg: a,
    zIndexTableSticky: l
  } = e, s = `${e.lineWidth}px ${e.lineType} ${e.tableBorderColor}`;
  return {
    [`${t}-wrapper`]: {
      [`${t}-sticky`]: {
        "&-holder": {
          position: "sticky",
          zIndex: l,
          background: e.colorBgContainer
        },
        "&-scroll": {
          position: "sticky",
          bottom: 0,
          height: `${i}px !important`,
          zIndex: l,
          display: "flex",
          alignItems: "center",
          background: a,
          borderTop: s,
          opacity: n,
          "&:hover": {
            transformOrigin: "center bottom"
          },
          // fake scrollbar style of sticky
          "&-bar": {
            height: i,
            backgroundColor: o,
            borderRadius: 100,
            transition: `all ${e.motionDurationSlow}, transform none`,
            position: "absolute",
            bottom: 0,
            "&:hover, &-active": {
              backgroundColor: r
            }
          }
        }
      }
    }
  };
}, F$ = (e) => {
  const {
    componentCls: t,
    lineWidth: n,
    tableBorderColor: o
  } = e, r = `${n}px ${e.lineType} ${o}`;
  return {
    [`${t}-wrapper`]: {
      [`${t}-summary`]: {
        position: "relative",
        zIndex: e.zIndexTableFixed,
        background: e.tableBg,
        "> tr": {
          "> th, > td": {
            borderBottom: r
          }
        }
      },
      [`div${t}-summary`]: {
        boxShadow: `0 -${n}px 0 ${o}`
      }
    }
  };
}, WJ = (e) => {
  const {
    componentCls: t,
    fontWeightStrong: n,
    tablePaddingVertical: o,
    tablePaddingHorizontal: r,
    lineWidth: i,
    lineType: a,
    tableBorderColor: l,
    tableFontSize: s,
    tableBg: u,
    tableRadius: c,
    tableHeaderTextColor: d,
    motionDurationMid: f,
    tableHeaderBg: p,
    tableHeaderCellSplitColor: v,
    tableRowHoverBg: g,
    tableSelectedRowBg: m,
    tableSelectedRowHoverBg: x,
    tableFooterTextColor: S,
    tableFooterBg: C,
    paddingContentVerticalLG: P
  } = e, $ = `${i}px ${a} ${l}`;
  return {
    [`${t}-wrapper`]: O(O({
      clear: "both",
      maxWidth: "100%"
    }, ja()), {
      [t]: O(O({}, fn(e)), {
        fontSize: s,
        background: u,
        borderRadius: `${c}px ${c}px 0 0`
      }),
      // https://github.com/ant-design/ant-design/issues/17611
      table: {
        width: "100%",
        textAlign: "start",
        borderRadius: `${c}px ${c}px 0 0`,
        borderCollapse: "separate",
        borderSpacing: 0
      },
      // ============================= Cell =============================
      [`
          ${t}-thead > tr > th,
          ${t}-tbody > tr > td,
          tfoot > tr > th,
          tfoot > tr > td
        `]: {
        position: "relative",
        padding: `${P}px ${r}px`,
        overflowWrap: "break-word"
      },
      // ============================ Title =============================
      [`${t}-title`]: {
        padding: `${o}px ${r}px`
      },
      // ============================ Header ============================
      [`${t}-thead`]: {
        "\n          > tr > th,\n          > tr > td\n        ": {
          position: "relative",
          color: d,
          fontWeight: n,
          textAlign: "start",
          background: p,
          borderBottom: $,
          transition: `background ${f} ease`,
          "&[colspan]:not([colspan='1'])": {
            textAlign: "center"
          },
          [`&:not(:last-child):not(${t}-selection-column):not(${t}-row-expand-icon-cell):not([colspan])::before`]: {
            position: "absolute",
            top: "50%",
            insetInlineEnd: 0,
            width: 1,
            height: "1.6em",
            backgroundColor: v,
            transform: "translateY(-50%)",
            transition: `background-color ${f}`,
            content: '""'
          }
        },
        "> tr:not(:last-child) > th[colspan]": {
          borderBottom: 0
        }
      },
      // ============================ Body ============================
      // Borderless Table has unique hover style, which would be implemented with `borderTop`.
      [`${t}:not(${t}-bordered)`]: {
        [`${t}-tbody`]: {
          "> tr": {
            "> td": {
              borderTop: $,
              borderBottom: "transparent"
            },
            "&:last-child > td": {
              borderBottom: $
            },
            [`&:first-child > td,
              &${t}-measure-row + tr > td`]: {
              borderTop: "none",
              borderTopColor: "transparent"
            }
          }
        }
      },
      // Bordered Table remains simple `borderBottom`.
      // Ref issue: https://github.com/ant-design/ant-design/issues/38724
      [`${t}${t}-bordered`]: {
        [`${t}-tbody`]: {
          "> tr": {
            "> td": {
              borderBottom: $
            }
          }
        }
      },
      [`${t}-tbody`]: {
        "> tr": {
          "> td": {
            transition: `background ${f}, border-color ${f}`,
            // ========================= Nest Table ===========================
            [`
              > ${t}-wrapper:only-child,
              > ${t}-expanded-row-fixed > ${t}-wrapper:only-child
            `]: {
              [t]: {
                marginBlock: `-${o}px`,
                marginInline: `${e.tableExpandColumnWidth - r}px -${r}px`,
                [`${t}-tbody > tr:last-child > td`]: {
                  borderBottom: 0,
                  "&:first-child, &:last-child": {
                    borderRadius: 0
                  }
                }
              }
            }
          },
          [`
            &${t}-row:hover > td,
            > td${t}-cell-row-hover
          `]: {
            background: g
          },
          [`&${t}-row-selected`]: {
            "> td": {
              background: m
            },
            "&:hover > td": {
              background: x
            }
          }
        }
      },
      // ============================ Footer ============================
      [`${t}-footer`]: {
        padding: `${o}px ${r}px`,
        color: S,
        background: C
      }
    })
  };
}, KJ = On("Table", (e) => {
  const {
    controlItemBgActive: t,
    controlItemBgActiveHover: n,
    colorTextPlaceholder: o,
    colorTextHeading: r,
    colorSplit: i,
    colorBorderSecondary: a,
    fontSize: l,
    padding: s,
    paddingXS: u,
    paddingSM: c,
    controlHeight: d,
    colorFillAlter: f,
    colorIcon: p,
    colorIconHover: v,
    opacityLoading: g,
    colorBgContainer: m,
    borderRadiusLG: x,
    colorFillContent: S,
    colorFillSecondary: C,
    controlInteractiveSize: P
  } = e, $ = new In(p), I = new In(v), w = t, T = 2, M = new In(C).onBackground(m).toHexString(), R = new In(S).onBackground(m).toHexString(), N = new In(f).onBackground(m).toHexString(), H = Qt(e, {
    tableFontSize: l,
    tableBg: m,
    tableRadius: x,
    tablePaddingVertical: s,
    tablePaddingHorizontal: s,
    tablePaddingVerticalMiddle: c,
    tablePaddingHorizontalMiddle: u,
    tablePaddingVerticalSmall: u,
    tablePaddingHorizontalSmall: u,
    tableBorderColor: a,
    tableHeaderTextColor: r,
    tableHeaderBg: N,
    tableFooterTextColor: r,
    tableFooterBg: N,
    tableHeaderCellSplitColor: a,
    tableHeaderSortBg: M,
    tableHeaderSortHoverBg: R,
    tableHeaderIconColor: $.clone().setAlpha($.getAlpha() * g).toRgbString(),
    tableHeaderIconColorHover: I.clone().setAlpha(I.getAlpha() * g).toRgbString(),
    tableBodySortBg: N,
    tableFixedHeaderSortActiveBg: M,
    tableHeaderFilterActiveBg: S,
    tableFilterDropdownBg: m,
    tableRowHoverBg: N,
    tableSelectedRowBg: w,
    tableSelectedRowHoverBg: n,
    zIndexTableFixed: T,
    zIndexTableSticky: T + 1,
    tableFontSizeMiddle: l,
    tableFontSizeSmall: l,
    tableSelectionColumnWidth: d,
    tableExpandIconBg: m,
    tableExpandColumnWidth: P + 2 * e.padding,
    tableExpandedRowBg: f,
    // Dropdown
    tableFilterDropdownWidth: 120,
    tableFilterDropdownHeight: 264,
    tableFilterDropdownSearchWidth: 140,
    // Virtual Scroll Bar
    tableScrollThumbSize: 8,
    tableScrollThumbBg: o,
    tableScrollThumbBgHover: r,
    tableScrollBg: i
  });
  return [WJ(H), RJ(H), F$(H), VJ(H), AJ(H), _J(H), zJ(H), DJ(H), F$(H), EJ(H), BJ(H), NJ(H), jJ(H), MJ(H), LJ(H), HJ(H), FJ(H)];
}), qJ = [], W2 = () => ({
  prefixCls: rn(),
  columns: jn(),
  rowKey: en([String, Function]),
  tableLayout: rn(),
  rowClassName: en([String, Function]),
  title: et(),
  footer: et(),
  id: rn(),
  showHeader: ct(),
  components: Mt(),
  customRow: et(),
  customHeaderRow: et(),
  direction: rn(),
  expandFixed: en([Boolean, String]),
  expandColumnWidth: Number,
  expandedRowKeys: jn(),
  defaultExpandedRowKeys: jn(),
  expandedRowRender: et(),
  expandRowByClick: ct(),
  expandIcon: et(),
  onExpand: et(),
  onExpandedRowsChange: et(),
  "onUpdate:expandedRowKeys": et(),
  defaultExpandAllRows: ct(),
  indentSize: Number,
  /** @deprecated Please use `EXPAND_COLUMN` in `columns` directly */
  expandIconColumnIndex: Number,
  showExpandColumn: ct(),
  expandedRowClassName: et(),
  childrenColumnName: rn(),
  rowExpandable: et(),
  sticky: en([Boolean, Object]),
  dropdownPrefixCls: String,
  dataSource: jn(),
  pagination: en([Boolean, Object]),
  loading: en([Boolean, Object]),
  size: rn(),
  bordered: ct(),
  locale: Mt(),
  onChange: et(),
  onResizeColumn: et(),
  rowSelection: Mt(),
  getPopupContainer: et(),
  scroll: Mt(),
  sortDirections: jn(),
  showSorterTooltip: en([Boolean, Object], !0),
  transformCellText: et()
}), YJ = be({
  name: "InternalTable",
  inheritAttrs: !1,
  props: Mn(O(O({}, W2()), {
    contextSlots: Mt()
  }), {
    rowKey: "key"
  }),
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      expose: r,
      emit: i
    } = t;
    dn(!(typeof e.rowKey == "function" && e.rowKey.length > 1), "Table", "`index` parameter of `rowKey` function is deprecated. There is no guarantee that it will work as expected."), NQ(E(() => e.contextSlots)), RQ({
      onResizeColumn: (Ne, Xe) => {
        i("resizeColumn", Ne, Xe);
      }
    });
    const a = IT(), l = E(() => {
      const Ne = new Set(Object.keys(a.value).filter((Xe) => a.value[Xe]));
      return e.columns.filter((Xe) => !Xe.responsive || Xe.responsive.some((De) => Ne.has(De)));
    }), {
      size: s,
      renderEmpty: u,
      direction: c,
      prefixCls: d,
      configProvider: f
    } = Nt("table", e), [p, v] = KJ(d), g = E(() => {
      var Ne;
      return e.transformCellText || ((Ne = f.transformCellText) === null || Ne === void 0 ? void 0 : Ne.value);
    }), [m] = Rl("Table", La.Table, Kt(e, "locale")), x = E(() => e.dataSource || qJ), S = E(() => f.getPrefixCls("dropdown", e.dropdownPrefixCls)), C = E(() => e.childrenColumnName || "children"), P = E(() => x.value.some((Ne) => Ne?.[C.value]) ? "nest" : e.expandedRowRender ? "row" : null), $ = $n({
      body: null
    }), I = (Ne) => {
      O($, Ne);
    }, w = E(() => typeof e.rowKey == "function" ? e.rowKey : (Ne) => Ne?.[e.rowKey]), [T] = IZ(x, C, w), M = {}, R = function(Ne, Xe) {
      let De = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
      const {
        pagination: Fe,
        scroll: Ve,
        onChange: ot
      } = e, je = O(O({}, M), Ne);
      De && (M.resetPagination(), je.pagination.current && (je.pagination.current = 1), Fe && Fe.onChange && Fe.onChange(1, je.pagination.pageSize)), Ve && Ve.scrollToFirstRowOnChange !== !1 && $.body && a6(0, {
        getContainer: () => $.body
      }), ot?.(je.pagination, je.filters, je.sorter, {
        currentDataSource: z$(jb(x.value, je.sorterStates, C.value), je.filterStates),
        action: Xe
      });
    }, N = (Ne, Xe) => {
      R({
        sorter: Ne,
        sorterStates: Xe
      }, "sort", !1);
    }, [H, L, F, A] = zZ({
      prefixCls: d,
      mergedColumns: l,
      onSorterChange: N,
      sortDirections: E(() => e.sortDirections || ["ascend", "descend"]),
      tableLocale: m,
      showSorterTooltip: Kt(e, "showSorterTooltip")
    }), G = E(() => jb(x.value, L.value, C.value)), j = (Ne, Xe) => {
      R({
        filters: Ne,
        filterStates: Xe
      }, "filter", !0);
    }, [Z, W, K] = OJ({
      prefixCls: d,
      locale: m,
      dropdownPrefixCls: S,
      mergedColumns: l,
      onFilterChange: j,
      getPopupContainer: Kt(e, "getPopupContainer")
    }), q = E(() => z$(G.value, W.value)), [U] = TJ(Kt(e, "contextSlots")), ae = E(() => {
      const Ne = {}, Xe = K.value;
      return Object.keys(Xe).forEach((De) => {
        Xe[De] !== null && (Ne[De] = Xe[De]);
      }), O(O({}, F.value), {
        filters: Ne
      });
    }), [se] = kJ(ae), ie = (Ne, Xe) => {
      R({
        pagination: O(O({}, M.pagination), {
          current: Ne,
          pageSize: Xe
        })
      }, "paginate");
    }, [re, te] = kZ(E(() => q.value.length), Kt(e, "pagination"), ie);
    It(() => {
      M.sorter = A.value, M.sorterStates = L.value, M.filters = K.value, M.filterStates = W.value, M.pagination = e.pagination === !1 ? {} : OZ(re.value, e.pagination), M.resetPagination = te;
    });
    const ve = E(() => {
      if (e.pagination === !1 || !re.value.pageSize)
        return q.value;
      const {
        current: Ne = 1,
        total: Xe,
        pageSize: De = Fb
      } = re.value;
      return dn(Ne > 0, "Table", "`current` should be positive number."), q.value.length < Xe ? q.value.length > De ? q.value.slice((Ne - 1) * De, Ne * De) : q.value : q.value.slice((Ne - 1) * De, Ne * De);
    });
    It(() => {
      Yt(() => {
        const {
          total: Ne,
          pageSize: Xe = Fb
        } = re.value;
        q.value.length < Ne && q.value.length > Xe && dn(!1, "Table", "`dataSource` length is less than `pagination.total` but large than `pagination.pageSize`. Please make sure your config correct data with async mode.");
      });
    }, {
      flush: "post"
    });
    const ce = E(() => e.showExpandColumn === !1 ? -1 : P.value === "nest" && e.expandIconColumnIndex === void 0 ? e.rowSelection ? 1 : 0 : e.expandIconColumnIndex > 0 && e.rowSelection ? e.expandIconColumnIndex - 1 : e.expandIconColumnIndex), fe = le();
    Ie(() => e.rowSelection, () => {
      fe.value = e.rowSelection ? O({}, e.rowSelection) : e.rowSelection;
    }, {
      deep: !0,
      immediate: !0
    });
    const [ge, Te] = _Z(fe, {
      prefixCls: d,
      data: q,
      pageData: ve,
      getRowKey: w,
      getRecordByKey: T,
      expandType: P,
      childrenColumnName: C,
      locale: m,
      getPopupContainer: E(() => e.getPopupContainer)
    }), ze = (Ne, Xe, De) => {
      let Fe;
      const {
        rowClassName: Ve
      } = e;
      return typeof Ve == "function" ? Fe = Me(Ve(Ne, Xe, De)) : Fe = Me(Ve), Me({
        [`${d.value}-row-selected`]: Te.value.has(w.value(Ne, Xe))
      }, Fe);
    };
    r({
      selectedKeySet: Te
    });
    const Ke = E(() => typeof e.indentSize == "number" ? e.indentSize : 15), He = (Ne) => se(ge(Z(H(U(Ne)))));
    return () => {
      var Ne;
      const {
        expandIcon: Xe = o.expandIcon || IJ(m.value),
        pagination: De,
        loading: Fe,
        bordered: Ve
      } = e;
      let ot, je;
      if (De !== !1 && (!((Ne = re.value) === null || Ne === void 0) && Ne.total)) {
        let Ce;
        re.value.size ? Ce = re.value.size : Ce = s.value === "small" || s.value === "middle" ? "small" : void 0;
        const Ae = (tt) => h(GX, Q(Q({}, re.value), {}, {
          class: [`${d.value}-pagination ${d.value}-pagination-${tt}`, re.value.class],
          size: Ce
        }), null), qe = c.value === "rtl" ? "left" : "right", {
          position: We
        } = re.value;
        if (We !== null && Array.isArray(We)) {
          const tt = We.find((Be) => Be.includes("top")), Ee = We.find((Be) => Be.includes("bottom")), Re = We.every((Be) => `${Be}` == "none");
          !tt && !Ee && !Re && (je = Ae(qe)), tt && (ot = Ae(tt.toLowerCase().replace("top", ""))), Ee && (je = Ae(Ee.toLowerCase().replace("bottom", "")));
        } else
          je = Ae(qe);
      }
      let Pe;
      typeof Fe == "boolean" ? Pe = {
        spinning: Fe
      } : typeof Fe == "object" && (Pe = O({
        spinning: !0
      }, Fe));
      const Ge = Me(`${d.value}-wrapper`, {
        [`${d.value}-wrapper-rtl`]: c.value === "rtl"
      }, n.class, v.value), Se = Fn(e, ["columns"]);
      return p(h("div", {
        class: Ge,
        style: n.style
      }, [h(Xo, Q({
        spinning: !1
      }, Pe), {
        default: () => [ot, h($Z, Q(Q(Q({}, n), Se), {}, {
          expandedRowKeys: e.expandedRowKeys,
          defaultExpandedRowKeys: e.defaultExpandedRowKeys,
          expandIconColumnIndex: ce.value,
          indentSize: Ke.value,
          expandIcon: Xe,
          columns: l.value,
          direction: c.value,
          prefixCls: d.value,
          class: Me({
            [`${d.value}-middle`]: s.value === "middle",
            [`${d.value}-small`]: s.value === "small",
            [`${d.value}-bordered`]: Ve,
            [`${d.value}-empty`]: x.value.length === 0
          }),
          data: ve.value,
          rowKey: w.value,
          rowClassName: ze,
          internalHooks: zb,
          internalRefs: $,
          onUpdateInternalRefs: I,
          transformColumns: He,
          transformCellText: g.value
        }), O(O({}, o), {
          emptyText: () => {
            var Ce, Ae;
            return ((Ce = o.emptyText) === null || Ce === void 0 ? void 0 : Ce.call(o)) || ((Ae = e.locale) === null || Ae === void 0 ? void 0 : Ae.emptyText) || u("Table");
          }
        })), je]
      })]));
    };
  }
}), Bv = be({
  name: "ATable",
  inheritAttrs: !1,
  props: Mn(W2(), {
    rowKey: "key"
  }),
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      expose: r
    } = t;
    const i = le();
    return r({
      table: i
    }), () => {
      var a;
      const l = e.columns || A2((a = o.default) === null || a === void 0 ? void 0 : a.call(o));
      return h(YJ, Q(Q(Q({
        ref: i
      }, n), e), {}, {
        columns: l || [],
        expandedRowRender: o.expandedRowRender || e.expandedRowRender,
        contextSlots: O({}, o)
      }), o);
    };
  }
}), Lv = be({
  name: "ATableColumn",
  slots: Object,
  render() {
    return null;
  }
}), Hv = be({
  name: "ATableColumnGroup",
  slots: Object,
  __ANT_TABLE_COLUMN_GROUP: !0,
  render() {
    return null;
  }
}), qb = fZ, Yb = gZ, Vv = O(vZ, {
  Cell: Yb,
  Row: qb,
  name: "ATableSummary"
}), GJ = O(Bv, {
  SELECTION_ALL: Bb,
  SELECTION_INVERT: Lb,
  SELECTION_NONE: Hb,
  SELECTION_COLUMN: vi,
  EXPAND_COLUMN: Yi,
  Column: Lv,
  ColumnGroup: Hv,
  Summary: Vv,
  install: (e) => (e.component(Vv.name, Vv), e.component(Yb.name, Yb), e.component(qb.name, qb), e.component(Bv.name, Bv), e.component(Lv.name, Lv), e.component(Hv.name, Hv), e)
}), K2 = Symbol("appConfigContext"), UJ = (e) => Bt(K2, e), XJ = () => zt(K2, {}), q2 = Symbol("appContext"), QJ = (e) => Bt(q2, e), ZJ = $n({
  message: {},
  notification: {},
  modal: {}
}), JJ = () => zt(q2, ZJ), eee = (e) => {
  const {
    componentCls: t,
    colorText: n,
    fontSize: o,
    lineHeight: r,
    fontFamily: i
  } = e;
  return {
    [t]: {
      color: n,
      fontSize: o,
      lineHeight: r,
      fontFamily: i
    }
  };
}, tee = On("App", (e) => [eee(e)]), nee = () => ({
  rootClassName: String,
  message: Mt(),
  notification: Mt()
}), oee = () => JJ(), od = be({
  name: "AApp",
  props: Mn(nee(), {}),
  setup(e, t) {
    let {
      slots: n
    } = t;
    const {
      prefixCls: o
    } = Nt("app", e), [r, i] = tee(o), a = E(() => Me(i.value, o.value, e.rootClassName)), l = XJ(), s = E(() => ({
      message: O(O({}, l.message), e.message),
      notification: O(O({}, l.notification), e.notification)
    }));
    UJ(s.value);
    const [u, c] = wM(s.value.message), [d, f] = AM(s.value.notification), [p, v] = l2(), g = E(() => ({
      message: u,
      notification: d,
      modal: p
    }));
    return QJ(g.value), () => {
      var m;
      return r(h("div", {
        class: a.value
      }, [v(), c(), f(), (m = n.default) === null || m === void 0 ? void 0 : m.call(n)]));
    };
  }
});
od.useApp = oee;
od.install = function(e) {
  e.component(od.name, od);
};
const vl = (e, t) => new In(e).setAlpha(t).toRgbString(), cu = (e, t) => new In(e).lighten(t).toHexString(), ree = (e) => {
  const t = Ha(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],
  };
}, iee = (e, t) => {
  const n = e || "#000", o = t || "#fff";
  return {
    colorBgBase: n,
    colorTextBase: o,
    colorText: vl(o, 0.85),
    colorTextSecondary: vl(o, 0.65),
    colorTextTertiary: vl(o, 0.45),
    colorTextQuaternary: vl(o, 0.25),
    colorFill: vl(o, 0.18),
    colorFillSecondary: vl(o, 0.12),
    colorFillTertiary: vl(o, 0.08),
    colorFillQuaternary: vl(o, 0.04),
    colorBgElevated: cu(n, 12),
    colorBgContainer: cu(n, 8),
    colorBgLayout: cu(n, 0),
    colorBgSpotlight: cu(n, 26),
    colorBorder: cu(n, 26),
    colorBorderSecondary: cu(n, 19)
  };
}, aee = (e, t) => {
  const n = Object.keys(qy).map((r) => {
    const i = Ha(e[r], {
      theme: "dark"
    });
    return new Array(10).fill(1).reduce((a, l, s) => (a[`${r}-${s + 1}`] = i[s], a), {});
  }).reduce((r, i) => (r = O(O({}, r), i), r), {}), o = t ?? Yy(e);
  return O(O(O({}, o), n), PI(e, {
    generateColorPalettes: ree,
    generateNeutralColorPalettes: iee
  }));
}, B$ = {
  /** Default seedToken */
  defaultSeed: Uy.token,
  defaultAlgorithm: Yy,
  darkAlgorithm: aee
}, lee = typeof window < "u";
var L$;
lee && ((L$ = window?.navigator) != null && L$.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
function Ir(e) {
  return e == null;
}
function Y2() {
}
const see = 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(see)));
function uee() {
  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((r) => {
        r(...n);
      });
    }
  };
}
function H$(e, t = 16) {
  if (typeof e != "function")
    return Y2;
  const n = (...i) => {
    e(...i);
  };
  if (t <= 0)
    return G2(n);
  let o = 0, r;
  return function(...i) {
    const a = Date.now(), l = a - o;
    clearTimeout(r), l >= t ? (o = a, n(...i)) : r = setTimeout(
      () => {
        o = Date.now(), n(...i);
      },
      Math.max(0, t - l)
    );
  };
}
function cee(e, t = 100) {
  if (typeof e != "function")
    return Y2;
  const n = (...r) => {
    e(...r);
  };
  if (t <= 0)
    return G2(n);
  let o;
  return function(...r) {
    clearTimeout(o), o = setTimeout(() => {
      n(...r);
    }, t);
  };
}
function G2(e) {
  if (typeof e != "function")
    return e;
  let t = !1, n, o;
  return function(...r) {
    return n = r, t || (t = !0, o = Promise.resolve().then(() => (t = !1, o = void 0, e(...n)))), o;
  };
}
const rd = /* @__PURE__ */ new Set(), U2 = /* @__PURE__ */ new WeakMap();
function dee() {
  rd.forEach((e) => {
    e(...U2.get(e));
  }), rd.clear();
}
function rr(e, ...t) {
  if (typeof e != "function")
    return e;
  U2.set(e, t), !rd.has(e) && (rd.add(e), rd.size === 1 && Promise.resolve().then(dee));
}
const X2 = Symbol("LAYOUT_KEY"), Q2 = Symbol("EMITTER_KEY");
function fee(e) {
  let t = 0, n;
  for (let o = 0, r = e.length; o < r; o++)
    n = e[o].y + e[o].h, n > t && (t = n);
  return t;
}
function Gb(e) {
  const t = Array(e.length);
  for (let n = 0, o = e.length; n < o; n++)
    t[n] = pee(e[n]);
  return t;
}
function pee(e) {
  return { ...e };
}
function Z2(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 bu(e, t, n) {
  const o = eE(e), r = tE(e), i = Array(e.length);
  for (let a = 0, l = r.length; a < l; a++) {
    let s = r[a];
    s.static || (s = hee(o, s, t, n), o.push(s)), i[e.findIndex((u) => u.i === s.i)] = s, s.moved = !1;
  }
  return i;
}
function hee(e, t, n, o) {
  if (n)
    for (; t.y > 0 && !id(e, t); )
      t.y--;
  else if (o) {
    const i = o[t.i].y;
    for (; t.y > i && !id(e, t); )
      t.y--;
  }
  let r;
  for (; r = id(e, t); )
    t.y = r.y + r.h;
  return t;
}
function gee(e, t) {
  const n = eE(e);
  for (let o = 0, r = e.length; o < r; o++) {
    const i = e[o];
    if (i.x + i.w > t.cols && (i.x = t.cols - i.w), i.x < 0 && (i.x = 0, i.w = t.cols), !i.static) n.push(i);
    else
      for (; id(n, i); )
        i.y++;
  }
  return e;
}
function V$(e, t) {
  for (let n = 0, o = e.length; n < o; n++)
    if (e[n].i === t) return e[n];
}
function id(e, t) {
  for (let n = 0, o = e.length; n < o; n++)
    if (Z2(e[n], t)) return e[n];
}
function J2(e, t) {
  return e.filter((n) => Z2(n, t));
}
function eE(e) {
  return e.filter((t) => t.static);
}
function Ub(e, t, n, o, r = !1, i = !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 = tE(e);
  s && (u = u.reverse());
  const c = J2(u, t);
  if (i && 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 = j$(e, p, t, r) : e = j$(e, t, p, r));
  }
  return e;
}
function j$(e, t, n, o) {
  if (o) {
    const r = {
      x: n.x,
      y: n.y,
      w: n.w,
      h: n.h
    };
    if (r.y = Math.max(t.y - n.h, 0), !id(e, r))
      return Ub(e, n, void 0, r.y, !1);
  }
  return Ub(e, n, void 0, n.y + 1, !1);
}
function vee(e, t, n, o) {
  const r = "translate3d(" + t + "px," + e + "px, 0)";
  return {
    transform: r,
    WebkitTransform: r,
    MozTransform: r,
    msTransform: r,
    OTransform: r,
    width: n + "px",
    height: o + "px",
    position: "absolute"
  };
}
function mee(e, t, n, o) {
  const r = "translate3d(" + t * -1 + "px," + e + "px, 0)";
  return {
    transform: r,
    WebkitTransform: r,
    MozTransform: r,
    msTransform: r,
    OTransform: r,
    width: n + "px",
    height: o + "px",
    position: "absolute"
  };
}
function bee(e, t, n, o) {
  return {
    top: e + "px",
    left: t + "px",
    width: n + "px",
    height: o + "px",
    position: "absolute"
  };
}
function yee(e, t, n, o) {
  return {
    top: e + "px",
    right: t + "px",
    width: n + "px",
    height: o + "px",
    position: "absolute"
  };
}
function tE(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 xee(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 r = 0, i = e.length; r < i; r++) {
    const a = e[r];
    for (let l = 0; l < n.length; l++)
      if (typeof a[n[l]] != "number")
        throw new Error(
          "VueGridLayout: " + t + "[" + r + "]." + n[l] + " must be a number!"
        );
    if (a.i === void 0 || a.i === null)
      throw new Error("VueGridLayout: " + t + "[" + r + "].i cannot be null!");
    if (typeof a.i != "number" && typeof a.i != "string")
      throw new Error("VueGridLayout: " + t + "[" + r + "].i must be a string or number!");
    if (o.indexOf(a.i) >= 0)
      throw new Error("VueGridLayout: " + t + "[" + r + "].i must be unique!");
    if (o.push(a.i), a.static !== void 0 && typeof a.static != "boolean")
      throw new Error("VueGridLayout: " + t + "[" + r + "].static must be a boolean!");
  }
}
function wee(e, t = "vgl") {
  const n = () => `${t}-${e}`;
  return {
    b: n,
    be: (o) => `${n()}__${o}`,
    bm: (o) => `${n()}--${o}`,
    bem: (o, r) => `${n()}__${o}--${r}`
  };
}
function W$(e) {
  return See(e);
}
function See(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(), r = e.clientX + n.scrollLeft - o.left, i = e.clientY + n.scrollTop - o.top;
  return { x: r, y: i };
}
function K$(e, t, n, o) {
  return Cee(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 Cee(e) {
  return typeof e == "number" && !Number.isNaN(e);
}
function $ee(e, t) {
  const n = oE(e);
  let o = n[0];
  for (let r = 1, i = n.length; r < i; r++) {
    const a = n[r];
    t > e[a] && (o = a);
  }
  return o;
}
function nE(e, t) {
  if (!t[e])
    throw new Error(
      "ResponsiveGridLayout: `cols` entry for breakpoint " + e + " is missing!"
    );
  return t[e];
}
function Pee(e, t, n, o, r, i, a) {
  if (t[o]) return Gb(t[o]);
  let l = e;
  const s = oE(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 = Gb(l || []), bu(gee(l, { cols: i }), a);
}
function oE(e) {
  return Object.keys(e).sort((t, n) => e[t] - e[n]);
}
let Oee = "auto";
function kee() {
  return typeof document < "u";
}
function q$() {
  return kee() ? typeof document.dir < "u" ? document.dir : document.getElementsByTagName("html")[0].getAttribute("dir") : Oee;
}
var jc = { exports: {} }, Iee = jc.exports, Y$;
function Tee() {
  return Y$ || (Y$ = 1, (function(e, t) {
    (function(n, o) {
      e.exports = o();
    })(Iee, (function() {
      function n(b, y) {
        var k = Object.keys(b);
        if (Object.getOwnPropertySymbols) {
          var D = Object.getOwnPropertySymbols(b);
          y && (D = D.filter((function(z) {
            return Object.getOwnPropertyDescriptor(b, z).enumerable;
          }))), k.push.apply(k, D);
        }
        return k;
      }
      function o(b) {
        for (var y = 1; y < arguments.length; y++) {
          var k = arguments[y] != null ? arguments[y] : {};
          y % 2 ? n(Object(k), !0).forEach((function(D) {
            s(b, D, k[D]);
          })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(b, Object.getOwnPropertyDescriptors(k)) : n(Object(k)).forEach((function(D) {
            Object.defineProperty(b, D, Object.getOwnPropertyDescriptor(k, D));
          }));
        }
        return b;
      }
      function r(b) {
        return r = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(y) {
          return typeof y;
        } : function(y) {
          return y && typeof Symbol == "function" && y.constructor === Symbol && y !== Symbol.prototype ? "symbol" : typeof y;
        }, r(b);
      }
      function i(b, y) {
        if (!(b instanceof y)) throw new TypeError("Cannot call a class as a function");
      }
      function a(b, y) {
        for (var k = 0; k < y.length; k++) {
          var D = y[k];
          D.enumerable = D.enumerable || !1, D.configurable = !0, "value" in D && (D.writable = !0), Object.defineProperty(b, g(D.key), D);
        }
      }
      function l(b, y, k) {
        return y && a(b.prototype, y), Object.defineProperty(b, "prototype", { writable: !1 }), b;
      }
      function s(b, y, k) {
        return (y = g(y)) in b ? Object.defineProperty(b, y, { value: k, enumerable: !0, configurable: !0, writable: !0 }) : b[y] = k, b;
      }
      function u(b, y) {
        if (typeof y != "function" && y !== null) throw new TypeError("Super expression must either be null or a function");
        b.prototype = Object.create(y && y.prototype, { constructor: { value: b, writable: !0, configurable: !0 } }), Object.defineProperty(b, "prototype", { writable: !1 }), y && d(b, y);
      }
      function c(b) {
        return c = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(y) {
          return y.__proto__ || Object.getPrototypeOf(y);
        }, c(b);
      }
      function d(b, y) {
        return d = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(k, D) {
          return k.__proto__ = D, k;
        }, d(b, y);
      }
      function f(b) {
        if (b === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        return b;
      }
      function p(b) {
        var y = (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 k, D = c(b);
          if (y) {
            var z = c(this).constructor;
            k = Reflect.construct(D, arguments, z);
          } else k = D.apply(this, arguments);
          return (function(V, X) {
            if (X && (typeof X == "object" || typeof X == "function")) return X;
            if (X !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
            return f(V);
          })(this, k);
        };
      }
      function v() {
        return v = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(b, y, k) {
          var D = (function(V, X) {
            for (; !Object.prototype.hasOwnProperty.call(V, X) && (V = c(V)) !== null; ) ;
            return V;
          })(b, y);
          if (D) {
            var z = Object.getOwnPropertyDescriptor(D, y);
            return z.get ? z.get.call(arguments.length < 3 ? b : k) : z.value;
          }
        }, v.apply(this, arguments);
      }
      function g(b) {
        var y = (function(k, D) {
          if (typeof k != "object" || k === null) return k;
          var z = k[Symbol.toPrimitive];
          if (z !== void 0) {
            var V = z.call(k, D);
            if (typeof V != "object") return V;
            throw new TypeError("@@toPrimitive must return a primitive value.");
          }
          return String(k);
        })(b, "string");
        return typeof y == "symbol" ? y : y + "";
      }
      var m = function(b) {
        return !(!b || !b.Window) && b instanceof b.Window;
      }, x = void 0, S = void 0;
      function C(b) {
        x = b;
        var y = b.document.createTextNode("");
        y.ownerDocument !== b.document && typeof b.wrap == "function" && b.wrap(y) === y && (b = b.wrap(b)), S = b;
      }
      function P(b) {
        return m(b) ? b : (b.ownerDocument || b).defaultView || S.window;
      }
      typeof window < "u" && window && C(window);
      var $ = function(b) {
        return !!b && r(b) === "object";
      }, I = function(b) {
        return typeof b == "function";
      }, w = { window: function(b) {
        return b === S || m(b);
      }, docFrag: function(b) {
        return $(b) && b.nodeType === 11;
      }, object: $, func: I, number: function(b) {
        return typeof b == "number";
      }, bool: function(b) {
        return typeof b == "boolean";
      }, string: function(b) {
        return typeof b == "string";
      }, element: function(b) {
        if (!b || r(b) !== "object") return !1;
        var y = P(b) || S;
        return /object|function/.test(typeof Element > "u" ? "undefined" : r(Element)) ? b instanceof Element || b instanceof y.Element : b.nodeType === 1 && typeof b.nodeName == "string";
      }, plainObject: function(b) {
        return $(b) && !!b.constructor && /function Object\b/.test(b.constructor.toString());
      }, array: function(b) {
        return $(b) && b.length !== void 0 && I(b.splice);
      } };
      function T(b) {
        var y = b.interaction;
        if (y.prepared.name === "drag") {
          var k = y.prepared.axis;
          k === "x" ? (y.coords.cur.page.y = y.coords.start.page.y, y.coords.cur.client.y = y.coords.start.client.y, y.coords.velocity.client.y = 0, y.coords.velocity.page.y = 0) : k === "y" && (y.coords.cur.page.x = y.coords.start.page.x, y.coords.cur.client.x = y.coords.start.client.x, y.coords.velocity.client.x = 0, y.coords.velocity.page.x = 0);
        }
      }
      function M(b) {
        var y = b.iEvent, k = b.interaction;
        if (k.prepared.name === "drag") {
          var D = k.prepared.axis;
          if (D === "x" || D === "y") {
            var z = D === "x" ? "y" : "x";
            y.page[z] = k.coords.start.page[z], y.client[z] = k.coords.start.client[z], y.delta[z] = 0;
          }
        }
      }
      var R = { id: "actions/drag", install: function(b) {
        var y = b.actions, k = b.Interactable, D = b.defaults;
        k.prototype.draggable = R.draggable, y.map.drag = R, y.methodDict.drag = "draggable", D.actions.drag = R.defaults;
      }, listeners: { "interactions:before-action-move": T, "interactions:action-resume": T, "interactions:action-move": M, "auto-start:check": function(b) {
        var y = b.interaction, k = b.interactable, D = b.buttons, z = k.options.drag;
        if (z && z.enabled && (!y.pointerIsDown || !/mouse|pointer/.test(y.pointerType) || (D & k.options.drag.mouseButtons) != 0)) return b.action = { name: "drag", axis: z.lockAxis === "start" ? z.startAxis : z.lockAxis }, !1;
      } }, draggable: function(b) {
        return w.object(b) ? (this.options.drag.enabled = b.enabled !== !1, this.setPerAction("drag", b), this.setOnEvents("drag", b), /^(xy|x|y|start)$/.test(b.lockAxis) && (this.options.drag.lockAxis = b.lockAxis), /^(xy|x|y)$/.test(b.startAxis) && (this.options.drag.startAxis = b.startAxis), this) : w.bool(b) ? (this.options.drag.enabled = b, this) : this.options.drag;
      }, beforeMove: T, move: M, defaults: { startAxis: "xy", lockAxis: "xy" }, getCursor: function() {
        return "move";
      }, filterEventType: function(b) {
        return b.search("drag") === 0;
      } }, N = R, H = { init: function(b) {
        var y = b;
        H.document = y.document, H.DocumentFragment = y.DocumentFragment || L, H.SVGElement = y.SVGElement || L, H.SVGSVGElement = y.SVGSVGElement || L, H.SVGElementInstance = y.SVGElementInstance || L, H.Element = y.Element || L, H.HTMLElement = y.HTMLElement || H.Element, H.Event = y.Event, H.Touch = y.Touch || L, H.PointerEvent = y.PointerEvent || y.MSPointerEvent;
      }, document: null, DocumentFragment: null, SVGElement: null, SVGSVGElement: null, SVGElementInstance: null, Element: null, HTMLElement: null, Event: null, Touch: null, PointerEvent: null };
      function L() {
      }
      var F = H, A = { init: function(b) {
        var y = F.Element, k = b.navigator || {};
        A.supportsTouch = "ontouchstart" in b || w.func(b.DocumentTouch) && F.document instanceof b.DocumentTouch, A.supportsPointerEvent = k.pointerEnabled !== !1 && !!F.PointerEvent, A.isIOS = /iP(hone|od|ad)/.test(k.platform), A.isIOS7 = /iP(hone|od|ad)/.test(k.platform) && /OS 7[^\d]/.test(k.appVersion), A.isIe9 = /MSIE 9/.test(k.userAgent), A.isOperaMobile = k.appName === "Opera" && A.supportsTouch && /Presto/.test(k.userAgent), A.prefixedMatchesSelector = "matches" in y.prototype ? "matches" : "webkitMatchesSelector" in y.prototype ? "webkitMatchesSelector" : "mozMatchesSelector" in y.prototype ? "mozMatchesSelector" : "oMatchesSelector" in y.prototype ? "oMatchesSelector" : "msMatchesSelector", A.pEventTypes = A.supportsPointerEvent ? F.PointerEvent === b.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 = F.document && "onmousewheel" in F.document ? "mousewheel" : "wheel";
      }, supportsTouch: null, supportsPointerEvent: null, isIOS7: null, isIOS: null, isIe9: null, isOperaMobile: null, prefixedMatchesSelector: null, pEventTypes: null, wheelEvent: null }, G = A;
      function j(b, y) {
        if (b.contains) return b.contains(y);
        for (; y; ) {
          if (y === b) return !0;
          y = y.parentNode;
        }
        return !1;
      }
      function Z(b, y) {
        for (; w.element(b); ) {
          if (K(b, y)) return b;
          b = W(b);
        }
        return null;
      }
      function W(b) {
        var y = b.parentNode;
        if (w.docFrag(y)) {
          for (; (y = y.host) && w.docFrag(y); ) ;
          return y;
        }
        return y;
      }
      function K(b, y) {
        return S !== x && (y = y.replace(/\/deep\//g, " ")), b[G.prefixedMatchesSelector](y);
      }
      var q = function(b) {
        return b.parentNode || b.host;
      };
      function U(b, y) {
        for (var k, D = [], z = b; (k = q(z)) && z !== y && k !== z.ownerDocument; ) D.unshift(z), z = k;
        return D;
      }
      function ae(b, y, k) {
        for (; w.element(b); ) {
          if (K(b, y)) return !0;
          if ((b = W(b)) === k) return K(b, y);
        }
        return !1;
      }
      function se(b) {
        return b.correspondingUseElement || b;
      }
      function ie(b) {
        var y = b instanceof F.SVGElement ? b.getBoundingClientRect() : b.getClientRects()[0];
        return y && { left: y.left, right: y.right, top: y.top, bottom: y.bottom, width: y.width || y.right - y.left, height: y.height || y.bottom - y.top };
      }
      function re(b) {
        var y, k = ie(b);
        if (!G.isIOS7 && k) {
          var D = { x: (y = (y = P(b)) || S).scrollX || y.document.documentElement.scrollLeft, y: y.scrollY || y.document.documentElement.scrollTop };
          k.left += D.x, k.right += D.x, k.top += D.y, k.bottom += D.y;
        }
        return k;
      }
      function te(b) {
        for (var y = []; b; ) y.push(b), b = W(b);
        return y;
      }
      function ve(b) {
        return !!w.string(b) && (F.document.querySelector(b), !0);
      }
      function ce(b, y) {
        for (var k in y) b[k] = y[k];
        return b;
      }
      function fe(b, y, k) {
        return b === "parent" ? W(k) : b === "self" ? y.getRect(k) : Z(k, b);
      }
      function ge(b, y, k, D) {
        var z = b;
        return w.string(z) ? z = fe(z, y, k) : w.func(z) && (z = z.apply(void 0, D)), w.element(z) && (z = re(z)), z;
      }
      function Te(b) {
        return b && { x: "x" in b ? b.x : b.left, y: "y" in b ? b.y : b.top };
      }
      function ze(b) {
        return !b || "x" in b && "y" in b || ((b = ce({}, b)).x = b.left || 0, b.y = b.top || 0, b.width = b.width || (b.right || 0) - b.x, b.height = b.height || (b.bottom || 0) - b.y), b;
      }
      function Ke(b, y, k) {
        b.left && (y.left += k.x), b.right && (y.right += k.x), b.top && (y.top += k.y), b.bottom && (y.bottom += k.y), y.width = y.right - y.left, y.height = y.bottom - y.top;
      }
      function He(b, y, k) {
        var D = k && b.options[k];
        return Te(ge(D && D.origin || b.options.origin, b, y, [b && y])) || { x: 0, y: 0 };
      }
      function Ne(b, y) {
        var k = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : function(ue) {
          return !0;
        }, D = arguments.length > 3 ? arguments[3] : void 0;
        if (D = D || {}, w.string(b) && b.search(" ") !== -1 && (b = Xe(b)), w.array(b)) return b.forEach((function(ue) {
          return Ne(ue, y, k, D);
        })), D;
        if (w.object(b) && (y = b, b = ""), w.func(y) && k(b)) D[b] = D[b] || [], D[b].push(y);
        else if (w.array(y)) for (var z = 0, V = y; z < V.length; z++) {
          var X = V[z];
          Ne(b, X, k, D);
        }
        else if (w.object(y)) for (var J in y)
          Ne(Xe(J).map((function(ue) {
            return "".concat(b).concat(ue);
          })), y[J], k, D);
        return D;
      }
      function Xe(b) {
        return b.trim().split(/ +/);
      }
      var De = function(b, y) {
        return Math.sqrt(b * b + y * y);
      }, Fe = ["webkit", "moz"];
      function Ve(b, y) {
        b.__set || (b.__set = {});
        var k = function(z) {
          if (Fe.some((function(V) {
            return z.indexOf(V) === 0;
          }))) return 1;
          typeof b[z] != "function" && z !== "__set" && Object.defineProperty(b, z, { get: function() {
            return z in b.__set ? b.__set[z] : b.__set[z] = y[z];
          }, set: function(V) {
            b.__set[z] = V;
          }, configurable: !0 });
        };
        for (var D in y) k(D);
        return b;
      }
      function ot(b, y) {
        b.page = b.page || {}, b.page.x = y.page.x, b.page.y = y.page.y, b.client = b.client || {}, b.client.x = y.client.x, b.client.y = y.client.y, b.timeStamp = y.timeStamp;
      }
      function je(b) {
        b.page.x = 0, b.page.y = 0, b.client.x = 0, b.client.y = 0;
      }
      function Pe(b) {
        return b instanceof F.Event || b instanceof F.Touch;
      }
      function Ge(b, y, k) {
        return b = b || "page", (k = k || {}).x = y[b + "X"], k.y = y[b + "Y"], k;
      }
      function Se(b, y) {
        return y = y || { x: 0, y: 0 }, G.isOperaMobile && Pe(b) ? (Ge("screen", b, y), y.x += window.scrollX, y.y += window.scrollY) : Ge("page", b, y), y;
      }
      function Ce(b) {
        return w.number(b.pointerId) ? b.pointerId : b.identifier;
      }
      function Ae(b, y, k) {
        var D = y.length > 1 ? We(y) : y[0];
        Se(D, b.page), (function(z, V) {
          V = V || {}, G.isOperaMobile && Pe(z) ? Ge("screen", z, V) : Ge("client", z, V);
        })(D, b.client), b.timeStamp = k;
      }
      function qe(b) {
        var y = [];
        return w.array(b) ? (y[0] = b[0], y[1] = b[1]) : b.type === "touchend" ? b.touches.length === 1 ? (y[0] = b.touches[0], y[1] = b.changedTouches[0]) : b.touches.length === 0 && (y[0] = b.changedTouches[0], y[1] = b.changedTouches[1]) : (y[0] = b.touches[0], y[1] = b.touches[1]), y;
      }
      function We(b) {
        for (var y = { pageX: 0, pageY: 0, clientX: 0, clientY: 0, screenX: 0, screenY: 0 }, k = 0; k < b.length; k++) {
          var D = b[k];
          for (var z in y) y[z] += D[z];
        }
        for (var V in y) y[V] /= b.length;
        return y;
      }
      function tt(b) {
        if (!b.length) return null;
        var y = qe(b), k = Math.min(y[0].pageX, y[1].pageX), D = Math.min(y[0].pageY, y[1].pageY), z = Math.max(y[0].pageX, y[1].pageX), V = Math.max(y[0].pageY, y[1].pageY);
        return { x: k, y: D, left: k, top: D, right: z, bottom: V, width: z - k, height: V - D };
      }
      function Ee(b, y) {
        var k = y + "X", D = y + "Y", z = qe(b), V = z[0][k] - z[1][k], X = z[0][D] - z[1][D];
        return De(V, X);
      }
      function Re(b, y) {
        var k = y + "X", D = y + "Y", z = qe(b), V = z[1][k] - z[0][k], X = z[1][D] - z[0][D];
        return 180 * Math.atan2(X, V) / Math.PI;
      }
      function Be(b) {
        return w.string(b.pointerType) ? b.pointerType : w.number(b.pointerType) ? [void 0, void 0, "touch", "pen", "mouse"][b.pointerType] : /touch/.test(b.type || "") || b instanceof F.Touch ? "touch" : "mouse";
      }
      function rt(b) {
        var y = w.func(b.composedPath) ? b.composedPath() : b.path;
        return [se(y ? y[0] : b.target), se(b.currentTarget)];
      }
      var pt = (function() {
        function b(y) {
          i(this, b), this.immediatePropagationStopped = !1, this.propagationStopped = !1, this._interaction = y;
        }
        return l(b, [{ key: "preventDefault", value: function() {
        } }, { key: "stopPropagation", value: function() {
          this.propagationStopped = !0;
        } }, { key: "stopImmediatePropagation", value: function() {
          this.immediatePropagationStopped = this.propagationStopped = !0;
        } }]), b;
      })();
      Object.defineProperty(pt.prototype, "interaction", { get: function() {
        return this._interaction._proxy;
      }, set: function() {
      } });
      var at = function(b, y) {
        for (var k = 0; k < y.length; k++) {
          var D = y[k];
          b.push(D);
        }
        return b;
      }, ft = function(b) {
        return at([], b);
      }, wt = function(b, y) {
        for (var k = 0; k < b.length; k++) if (y(b[k], k, b)) return k;
        return -1;
      }, Ct = function(b, y) {
        return b[wt(b, y)];
      }, St = (function(b) {
        u(k, b);
        var y = p(k);
        function k(D, z, V) {
          var X;
          i(this, k), (X = y.call(this, z._interaction)).dropzone = void 0, X.dragEvent = void 0, X.relatedTarget = void 0, X.draggable = void 0, X.propagationStopped = !1, X.immediatePropagationStopped = !1;
          var J = V === "dragleave" ? D.prev : D.cur, ue = J.element, we = J.dropzone;
          return X.type = V, X.target = ue, X.currentTarget = ue, X.dropzone = we, X.dragEvent = z, X.relatedTarget = z.target, X.draggable = z.interactable, X.timeStamp = z.timeStamp, X;
        }
        return l(k, [{ key: "reject", value: function() {
          var D = this, z = this._interaction.dropState;
          if (this.type === "dropactivate" || this.dropzone && z.cur.dropzone === this.dropzone && z.cur.element === this.target) if (z.prev.dropzone = this.dropzone, z.prev.element = this.target, z.rejected = !0, z.events.enter = null, this.stopImmediatePropagation(), this.type === "dropactivate") {
            var V = z.activeDrops, X = wt(V, (function(ue) {
              var we = ue.dropzone, de = ue.element;
              return we === D.dropzone && de === D.target;
            }));
            z.activeDrops.splice(X, 1);
            var J = new k(z, this.dragEvent, "dropdeactivate");
            J.dropzone = this.dropzone, J.target = this.target, this.dropzone.fire(J);
          } else this.dropzone.fire(new k(z, this.dragEvent, "dragleave"));
        } }, { key: "preventDefault", value: function() {
        } }, { key: "stopPropagation", value: function() {
          this.propagationStopped = !0;
        } }, { key: "stopImmediatePropagation", value: function() {
          this.immediatePropagationStopped = this.propagationStopped = !0;
        } }]), k;
      })(pt);
      function yt(b, y) {
        for (var k = 0, D = b.slice(); k < D.length; k++) {
          var z = D[k], V = z.dropzone, X = z.element;
          y.dropzone = V, y.target = X, V.fire(y), y.propagationStopped = y.immediatePropagationStopped = !1;
        }
      }
      function Ot(b, y) {
        for (var k = (function(V, X) {
          for (var J = [], ue = 0, we = V.interactables.list; ue < we.length; ue++) {
            var de = we[ue];
            if (de.options.drop.enabled) {
              var Oe = de.options.drop.accept;
              if (!(w.element(Oe) && Oe !== X || w.string(Oe) && !K(X, Oe) || w.func(Oe) && !Oe({ dropzone: de, draggableElement: X }))) for (var _e = 0, Ye = de.getAllElements(); _e < Ye.length; _e++) {
                var Qe = Ye[_e];
                Qe !== X && J.push({ dropzone: de, element: Qe, rect: de.getRect(Qe) });
              }
            }
          }
          return J;
        })(b, y), D = 0; D < k.length; D++) {
          var z = k[D];
          z.rect = z.dropzone.getRect(z.element);
        }
        return k;
      }
      function Wt(b, y, k) {
        for (var D = b.dropState, z = b.interactable, V = b.element, X = [], J = 0, ue = D.activeDrops; J < ue.length; J++) {
          var we = ue[J], de = we.dropzone, Oe = we.element, _e = we.rect, Ye = de.dropCheck(y, k, z, V, Oe, _e);
          X.push(Ye ? Oe : null);
        }
        var Qe = (function(Ze) {
          for (var lt, st, xt, Rt = [], Gt = 0; Gt < Ze.length; Gt++) {
            var _t = Ze[Gt], jt = Ze[lt];
            if (_t && Gt !== lt) if (jt) {
              var Nn = q(_t), xn = q(jt);
              if (Nn !== _t.ownerDocument) if (xn !== _t.ownerDocument) if (Nn !== xn) {
                Rt = Rt.length ? Rt : U(jt);
                var Bn = void 0;
                if (jt instanceof F.HTMLElement && _t instanceof F.SVGElement && !(_t instanceof F.SVGSVGElement)) {
                  if (_t === xn) continue;
                  Bn = _t.ownerSVGElement;
                } else Bn = _t;
                for (var Yn = U(Bn, jt.ownerDocument), co = 0; Yn[co] && Yn[co] === Rt[co]; ) co++;
                var di = [Yn[co - 1], Yn[co], Rt[co]];
                if (di[0]) for (var gr = di[0].lastChild; gr; ) {
                  if (gr === di[1]) {
                    lt = Gt, Rt = Yn;
                    break;
                  }
                  if (gr === di[2]) break;
                  gr = gr.previousSibling;
                }
              } else xt = jt, (parseInt(P(st = _t).getComputedStyle(st).zIndex, 10) || 0) >= (parseInt(P(xt).getComputedStyle(xt).zIndex, 10) || 0) && (lt = Gt);
              else lt = Gt;
            } else lt = Gt;
          }
          return lt;
        })(X);
        return D.activeDrops[Qe] || null;
      }
      function Xt(b, y, k) {
        var D = b.dropState, z = { enter: null, leave: null, activate: null, deactivate: null, move: null, drop: null };
        return k.type === "dragstart" && (z.activate = new St(D, k, "dropactivate"), z.activate.target = null, z.activate.dropzone = null), k.type === "dragend" && (z.deactivate = new St(D, k, "dropdeactivate"), z.deactivate.target = null, z.deactivate.dropzone = null), D.rejected || (D.cur.element !== D.prev.element && (D.prev.dropzone && (z.leave = new St(D, k, "dragleave"), k.dragLeave = z.leave.target = D.prev.element, k.prevDropzone = z.leave.dropzone = D.prev.dropzone), D.cur.dropzone && (z.enter = new St(D, k, "dragenter"), k.dragEnter = D.cur.element, k.dropzone = D.cur.dropzone)), k.type === "dragend" && D.cur.dropzone && (z.drop = new St(D, k, "drop"), k.dropzone = D.cur.dropzone, k.relatedTarget = D.cur.element), k.type === "dragmove" && D.cur.dropzone && (z.move = new St(D, k, "dropmove"), k.dropzone = D.cur.dropzone)), z;
      }
      function ln(b, y) {
        var k = b.dropState, D = k.activeDrops, z = k.cur, V = k.prev;
        y.leave && V.dropzone.fire(y.leave), y.enter && z.dropzone.fire(y.enter), y.move && z.dropzone.fire(y.move), y.drop && z.dropzone.fire(y.drop), y.deactivate && yt(D, y.deactivate), k.prev.dropzone = z.dropzone, k.prev.element = z.element;
      }
      function pn(b, y) {
        var k = b.interaction, D = b.iEvent, z = b.event;
        if (D.type === "dragmove" || D.type === "dragend") {
          var V = k.dropState;
          y.dynamicDrop && (V.activeDrops = Ot(y, k.element));
          var X = D, J = Wt(k, X, z);
          V.rejected = V.rejected && !!J && J.dropzone === V.cur.dropzone && J.element === V.cur.element, V.cur.dropzone = J && J.dropzone, V.cur.element = J && J.element, V.events = Xt(k, 0, X);
        }
      }
      var gt = { id: "actions/drop", install: function(b) {
        var y = b.actions, k = b.interactStatic, D = b.Interactable, z = b.defaults;
        b.usePlugin(N), D.prototype.dropzone = function(V) {
          return (function(X, J) {
            if (w.object(J)) {
              if (X.options.drop.enabled = J.enabled !== !1, J.listeners) {
                var ue = Ne(J.listeners), we = Object.keys(ue).reduce((function(Oe, _e) {
                  return Oe[/^(enter|leave)/.test(_e) ? "drag".concat(_e) : /^(activate|deactivate|move)/.test(_e) ? "drop".concat(_e) : _e] = ue[_e], Oe;
                }), {}), de = X.options.drop.listeners;
                de && X.off(de), X.on(we), X.options.drop.listeners = we;
              }
              return w.func(J.ondrop) && X.on("drop", J.ondrop), w.func(J.ondropactivate) && X.on("dropactivate", J.ondropactivate), w.func(J.ondropdeactivate) && X.on("dropdeactivate", J.ondropdeactivate), w.func(J.ondragenter) && X.on("dragenter", J.ondragenter), w.func(J.ondragleave) && X.on("dragleave", J.ondragleave), w.func(J.ondropmove) && X.on("dropmove", J.ondropmove), /^(pointer|center)$/.test(J.overlap) ? X.options.drop.overlap = J.overlap : w.number(J.overlap) && (X.options.drop.overlap = Math.max(Math.min(1, J.overlap), 0)), "accept" in J && (X.options.drop.accept = J.accept), "checker" in J && (X.options.drop.checker = J.checker), X;
            }
            return w.bool(J) ? (X.options.drop.enabled = J, X) : X.options.drop;
          })(this, V);
        }, D.prototype.dropCheck = function(V, X, J, ue, we, de) {
          return (function(Oe, _e, Ye, Qe, Ze, lt, st) {
            var xt = !1;
            if (!(st = st || Oe.getRect(lt))) return !!Oe.options.drop.checker && Oe.options.drop.checker(_e, Ye, xt, Oe, lt, Qe, Ze);
            var Rt = Oe.options.drop.overlap;
            if (Rt === "pointer") {
              var Gt = He(Qe, Ze, "drag"), _t = Se(_e);
              _t.x += Gt.x, _t.y += Gt.y;
              var jt = _t.x > st.left && _t.x < st.right, Nn = _t.y > st.top && _t.y < st.bottom;
              xt = jt && Nn;
            }
            var xn = Qe.getRect(Ze);
            if (xn && Rt === "center") {
              var Bn = xn.left + xn.width / 2, Yn = xn.top + xn.height / 2;
              xt = Bn >= st.left && Bn <= st.right && Yn >= st.top && Yn <= st.bottom;
            }
            return xn && w.number(Rt) && (xt = Math.max(0, Math.min(st.right, xn.right) - Math.max(st.left, xn.left)) * Math.max(0, Math.min(st.bottom, xn.bottom) - Math.max(st.top, xn.top)) / (xn.width * xn.height) >= Rt), Oe.options.drop.checker && (xt = Oe.options.drop.checker(_e, Ye, xt, Oe, lt, Qe, Ze)), xt;
          })(this, V, X, J, ue, we, de);
        }, k.dynamicDrop = function(V) {
          return w.bool(V) ? (b.dynamicDrop = V, k) : b.dynamicDrop;
        }, ce(y.phaselessTypes, { dragenter: !0, dragleave: !0, dropactivate: !0, dropdeactivate: !0, dropmove: !0, drop: !0 }), y.methodDict.drop = "dropzone", b.dynamicDrop = !1, z.actions.drop = gt.defaults;
      }, listeners: { "interactions:before-action-start": function(b) {
        var y = b.interaction;
        y.prepared.name === "drag" && (y.dropState = { cur: { dropzone: null, element: null }, prev: { dropzone: null, element: null }, rejected: null, events: null, activeDrops: [] });
      }, "interactions:after-action-start": function(b, y) {
        var k = b.interaction, D = (b.event, b.iEvent);
        if (k.prepared.name === "drag") {
          var z = k.dropState;
          z.activeDrops = [], z.events = {}, z.activeDrops = Ot(y, k.element), z.events = Xt(k, 0, D), z.events.activate && (yt(z.activeDrops, z.events.activate), y.fire("actions/drop:start", { interaction: k, dragEvent: D }));
        }
      }, "interactions:action-move": pn, "interactions:after-action-move": function(b, y) {
        var k = b.interaction, D = b.iEvent;
        if (k.prepared.name === "drag") {
          var z = k.dropState;
          ln(k, z.events), y.fire("actions/drop:move", { interaction: k, dragEvent: D }), z.events = {};
        }
      }, "interactions:action-end": function(b, y) {
        if (b.interaction.prepared.name === "drag") {
          var k = b.interaction, D = b.iEvent;
          pn(b, y), ln(k, k.dropState.events), y.fire("actions/drop:end", { interaction: k, dragEvent: D });
        }
      }, "interactions:stop": function(b) {
        var y = b.interaction;
        if (y.prepared.name === "drag") {
          var k = y.dropState;
          k && (k.activeDrops = null, k.events = null, k.cur.dropzone = null, k.cur.element = null, k.prev.dropzone = null, k.prev.element = null, k.rejected = !1);
        }
      } }, getActiveDrops: Ot, getDrop: Wt, getDropEvents: Xt, fireDropEvents: ln, filterEventType: function(b) {
        return b.search("drag") === 0 || b.search("drop") === 0;
      }, defaults: { enabled: !1, accept: null, overlap: "pointer" } }, En = gt;
      function hn(b) {
        var y = b.interaction, k = b.iEvent, D = b.phase;
        if (y.prepared.name === "gesture") {
          var z = y.pointers.map((function(we) {
            return we.pointer;
          })), V = D === "start", X = D === "end", J = y.interactable.options.deltaSource;
          if (k.touches = [z[0], z[1]], V) k.distance = Ee(z, J), k.box = tt(z), k.scale = 1, k.ds = 0, k.angle = Re(z, J), k.da = 0, y.gesture.startDistance = k.distance, y.gesture.startAngle = k.angle;
          else if (X || y.pointers.length < 2) {
            var ue = y.prevEvent;
            k.distance = ue.distance, k.box = ue.box, k.scale = ue.scale, k.ds = 0, k.angle = ue.angle, k.da = 0;
          } else k.distance = Ee(z, J), k.box = tt(z), k.scale = k.distance / y.gesture.startDistance, k.angle = Re(z, J), k.ds = k.scale - y.gesture.scale, k.da = k.angle - y.gesture.angle;
          y.gesture.distance = k.distance, y.gesture.angle = k.angle, w.number(k.scale) && k.scale !== 1 / 0 && !isNaN(k.scale) && (y.gesture.scale = k.scale);
        }
      }
      var Kn = { id: "actions/gesture", before: ["actions/drag", "actions/resize"], install: function(b) {
        var y = b.actions, k = b.Interactable, D = b.defaults;
        k.prototype.gesturable = function(z) {
          return w.object(z) ? (this.options.gesture.enabled = z.enabled !== !1, this.setPerAction("gesture", z), this.setOnEvents("gesture", z), this) : w.bool(z) ? (this.options.gesture.enabled = z, this) : this.options.gesture;
        }, y.map.gesture = Kn, y.methodDict.gesture = "gesturable", D.actions.gesture = Kn.defaults;
      }, listeners: { "interactions:action-start": hn, "interactions:action-move": hn, "interactions:action-end": hn, "interactions:new": function(b) {
        b.interaction.gesture = { angle: 0, distance: 0, scale: 1, startAngle: 0, startDistance: 0 };
      }, "auto-start:check": function(b) {
        if (!(b.interaction.pointers.length < 2)) {
          var y = b.interactable.options.gesture;
          if (y && y.enabled) return b.action = { name: "gesture" }, !1;
        }
      } }, defaults: {}, getCursor: function() {
        return "";
      }, filterEventType: function(b) {
        return b.search("gesture") === 0;
      } }, so = Kn;
      function Uo(b, y, k, D, z, V, X) {
        if (!y) return !1;
        if (y === !0) {
          var J = w.number(V.width) ? V.width : V.right - V.left, ue = w.number(V.height) ? V.height : V.bottom - V.top;
          if (X = Math.min(X, Math.abs((b === "left" || b === "right" ? J : ue) / 2)), J < 0 && (b === "left" ? b = "right" : b === "right" && (b = "left")), ue < 0 && (b === "top" ? b = "bottom" : b === "bottom" && (b = "top")), b === "left") {
            var we = J >= 0 ? V.left : V.right;
            return k.x < we + X;
          }
          if (b === "top") {
            var de = ue >= 0 ? V.top : V.bottom;
            return k.y < de + X;
          }
          if (b === "right") return k.x > (J >= 0 ? V.right : V.left) - X;
          if (b === "bottom") return k.y > (ue >= 0 ? V.bottom : V.top) - X;
        }
        return !!w.element(D) && (w.element(y) ? y === D : ae(D, y, z));
      }
      function Ue(b) {
        var y = b.iEvent, k = b.interaction;
        if (k.prepared.name === "resize" && k.resizeAxes) {
          var D = y;
          k.interactable.options.resize.square ? (k.resizeAxes === "y" ? D.delta.x = D.delta.y : D.delta.y = D.delta.x, D.axes = "xy") : (D.axes = k.resizeAxes, k.resizeAxes === "x" ? D.delta.y = 0 : k.resizeAxes === "y" && (D.delta.x = 0));
        }
      }
      var ht, vt, Zt = { id: "actions/resize", before: ["actions/drag"], install: function(b) {
        var y = b.actions, k = b.browser, D = b.Interactable, z = b.defaults;
        Zt.cursors = (function(V) {
          return V.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" };
        })(k), Zt.defaultMargin = k.supportsTouch || k.supportsPointerEvent ? 20 : 10, D.prototype.resizable = function(V) {
          return (function(X, J, ue) {
            return w.object(J) ? (X.options.resize.enabled = J.enabled !== !1, X.setPerAction("resize", J), X.setOnEvents("resize", J), w.string(J.axis) && /^x$|^y$|^xy$/.test(J.axis) ? X.options.resize.axis = J.axis : J.axis === null && (X.options.resize.axis = ue.defaults.actions.resize.axis), w.bool(J.preserveAspectRatio) ? X.options.resize.preserveAspectRatio = J.preserveAspectRatio : w.bool(J.square) && (X.options.resize.square = J.square), X) : w.bool(J) ? (X.options.resize.enabled = J, X) : X.options.resize;
          })(this, V, b);
        }, y.map.resize = Zt, y.methodDict.resize = "resizable", z.actions.resize = Zt.defaults;
      }, listeners: { "interactions:new": function(b) {
        b.interaction.resizeAxes = "xy";
      }, "interactions:action-start": function(b) {
        (function(y) {
          var k = y.iEvent, D = y.interaction;
          if (D.prepared.name === "resize" && D.prepared.edges) {
            var z = k, V = D.rect;
            D._rects = { start: ce({}, V), corrected: ce({}, V), previous: ce({}, V), delta: { left: 0, right: 0, width: 0, top: 0, bottom: 0, height: 0 } }, z.edges = D.prepared.edges, z.rect = D._rects.corrected, z.deltaRect = D._rects.delta;
          }
        })(b), Ue(b);
      }, "interactions:action-move": function(b) {
        (function(y) {
          var k = y.iEvent, D = y.interaction;
          if (D.prepared.name === "resize" && D.prepared.edges) {
            var z = k, V = D.interactable.options.resize.invert, X = V === "reposition" || V === "negate", J = D.rect, ue = D._rects, we = ue.start, de = ue.corrected, Oe = ue.delta, _e = ue.previous;
            if (ce(_e, de), X) {
              if (ce(de, J), V === "reposition") {
                if (de.top > de.bottom) {
                  var Ye = de.top;
                  de.top = de.bottom, de.bottom = Ye;
                }
                if (de.left > de.right) {
                  var Qe = de.left;
                  de.left = de.right, de.right = Qe;
                }
              }
            } else de.top = Math.min(J.top, we.bottom), de.bottom = Math.max(J.bottom, we.top), de.left = Math.min(J.left, we.right), de.right = Math.max(J.right, we.left);
            for (var Ze in de.width = de.right - de.left, de.height = de.bottom - de.top, de) Oe[Ze] = de[Ze] - _e[Ze];
            z.edges = D.prepared.edges, z.rect = de, z.deltaRect = Oe;
          }
        })(b), Ue(b);
      }, "interactions:action-end": function(b) {
        var y = b.iEvent, k = b.interaction;
        if (k.prepared.name === "resize" && k.prepared.edges) {
          var D = y;
          D.edges = k.prepared.edges, D.rect = k._rects.corrected, D.deltaRect = k._rects.delta;
        }
      }, "auto-start:check": function(b) {
        var y = b.interaction, k = b.interactable, D = b.element, z = b.rect, V = b.buttons;
        if (z) {
          var X = ce({}, y.coords.cur.page), J = k.options.resize;
          if (J && J.enabled && (!y.pointerIsDown || !/mouse|pointer/.test(y.pointerType) || (V & J.mouseButtons) != 0)) {
            if (w.object(J.edges)) {
              var ue = { left: !1, right: !1, top: !1, bottom: !1 };
              for (var we in ue) ue[we] = Uo(we, J.edges[we], X, y._latestPointer.eventTarget, D, z, J.margin || Zt.defaultMargin);
              ue.left = ue.left && !ue.right, ue.top = ue.top && !ue.bottom, (ue.left || ue.right || ue.top || ue.bottom) && (b.action = { name: "resize", edges: ue });
            } else {
              var de = J.axis !== "y" && X.x > z.right - Zt.defaultMargin, Oe = J.axis !== "x" && X.y > z.bottom - Zt.defaultMargin;
              (de || Oe) && (b.action = { name: "resize", axes: (de ? "x" : "") + (Oe ? "y" : "") });
            }
            return !b.action && void 0;
          }
        }
      } }, defaults: { square: !1, preserveAspectRatio: !1, axis: "xy", margin: NaN, edges: null, invert: "none" }, cursors: null, getCursor: function(b) {
        var y = b.edges, k = b.axis, D = b.name, z = Zt.cursors, V = null;
        if (k) V = z[D + k];
        else if (y) {
          for (var X = "", J = 0, ue = ["top", "bottom", "left", "right"]; J < ue.length; J++) {
            var we = ue[J];
            y[we] && (X += we);
          }
          V = z[X];
        }
        return V;
      }, filterEventType: function(b) {
        return b.search("resize") === 0;
      }, defaultMargin: null }, Zn = Zt, Qn = { id: "actions", install: function(b) {
        b.usePlugin(so), b.usePlugin(Zn), b.usePlugin(N), b.usePlugin(En);
      } }, $o = 0, Sn = { request: function(b) {
        return ht(b);
      }, cancel: function(b) {
        return vt(b);
      }, init: function(b) {
        if (ht = b.requestAnimationFrame, vt = b.cancelAnimationFrame, !ht) for (var y = ["ms", "moz", "webkit", "o"], k = 0; k < y.length; k++) {
          var D = y[k];
          ht = b["".concat(D, "RequestAnimationFrame")], vt = b["".concat(D, "CancelAnimationFrame")] || b["".concat(D, "CancelRequestAnimationFrame")];
        }
        ht = ht && ht.bind(b), vt = vt && vt.bind(b), ht || (ht = function(z) {
          var V = Date.now(), X = Math.max(0, 16 - (V - $o)), J = b.setTimeout((function() {
            z(V + X);
          }), X);
          return $o = V + X, J;
        }, vt = function(z) {
          return clearTimeout(z);
        });
      } }, Tt = { 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(b) {
        Tt.isScrolling = !0, Sn.cancel(Tt.i), b.autoScroll = Tt, Tt.interaction = b, Tt.prevTime = Tt.now(), Tt.i = Sn.request(Tt.scroll);
      }, stop: function() {
        Tt.isScrolling = !1, Tt.interaction && (Tt.interaction.autoScroll = null), Sn.cancel(Tt.i);
      }, scroll: function() {
        var b = Tt.interaction, y = b.interactable, k = b.element, D = b.prepared.name, z = y.options[D].autoScroll, V = po(z.container, y, k), X = Tt.now(), J = (X - Tt.prevTime) / 1e3, ue = z.speed * J;
        if (ue >= 1) {
          var we = { x: Tt.x * ue, y: Tt.y * ue };
          if (we.x || we.y) {
            var de = zo(V);
            w.window(V) ? V.scrollBy(we.x, we.y) : V && (V.scrollLeft += we.x, V.scrollTop += we.y);
            var Oe = zo(V), _e = { x: Oe.x - de.x, y: Oe.y - de.y };
            (_e.x || _e.y) && y.fire({ type: "autoscroll", target: k, interactable: y, delta: _e, interaction: b, container: V });
          }
          Tt.prevTime = X;
        }
        Tt.isScrolling && (Sn.cancel(Tt.i), Tt.i = Sn.request(Tt.scroll));
      }, check: function(b, y) {
        var k;
        return (k = b.options[y].autoScroll) == null ? void 0 : k.enabled;
      }, onInteractionMove: function(b) {
        var y = b.interaction, k = b.pointer;
        if (y.interacting() && Tt.check(y.interactable, y.prepared.name)) if (y.simulation) Tt.x = Tt.y = 0;
        else {
          var D, z, V, X, J = y.interactable, ue = y.element, we = y.prepared.name, de = J.options[we].autoScroll, Oe = po(de.container, J, ue);
          if (w.window(Oe)) X = k.clientX < Tt.margin, D = k.clientY < Tt.margin, z = k.clientX > Oe.innerWidth - Tt.margin, V = k.clientY > Oe.innerHeight - Tt.margin;
          else {
            var _e = ie(Oe);
            X = k.clientX < _e.left + Tt.margin, D = k.clientY < _e.top + Tt.margin, z = k.clientX > _e.right - Tt.margin, V = k.clientY > _e.bottom - Tt.margin;
          }
          Tt.x = z ? 1 : X ? -1 : 0, Tt.y = V ? 1 : D ? -1 : 0, Tt.isScrolling || (Tt.margin = de.margin, Tt.speed = de.speed, Tt.start(y));
        }
      } };
      function po(b, y, k) {
        return (w.string(b) ? fe(b, y, k) : b) || P(k);
      }
      function zo(b) {
        return w.window(b) && (b = window.document.body), { x: b.scrollLeft, y: b.scrollTop };
      }
      var un = { id: "auto-scroll", install: function(b) {
        var y = b.defaults, k = b.actions;
        b.autoScroll = Tt, Tt.now = function() {
          return b.now();
        }, k.phaselessTypes.autoscroll = !0, y.perAction.autoScroll = Tt.defaults;
      }, listeners: { "interactions:new": function(b) {
        b.interaction.autoScroll = null;
      }, "interactions:destroy": function(b) {
        b.interaction.autoScroll = null, Tt.stop(), Tt.interaction && (Tt.interaction = null);
      }, "interactions:stop": Tt.stop, "interactions:action-move": function(b) {
        return Tt.onInteractionMove(b);
      } } }, Dn = un;
      function cn(b, y) {
        var k = !1;
        return function() {
          return k || (S.console.warn(y), k = !0), b.apply(this, arguments);
        };
      }
      function An(b, y) {
        return b.name = y.name, b.axis = y.axis, b.edges = y.edges, b;
      }
      function er(b) {
        return w.bool(b) ? (this.options.styleCursor = b, this) : b === null ? (delete this.options.styleCursor, this) : this.options.styleCursor;
      }
      function Jn(b) {
        return w.func(b) ? (this.options.actionChecker = b, this) : b === null ? (delete this.options.actionChecker, this) : this.options.actionChecker;
      }
      var hr = { id: "auto-start/interactableMethods", install: function(b) {
        var y = b.Interactable;
        y.prototype.getAction = function(k, D, z, V) {
          var X = (function(J, ue, we, de, Oe) {
            var _e = J.getRect(de), Ye = ue.buttons || { 0: 1, 1: 4, 3: 8, 4: 16 }[ue.button], Qe = { action: null, interactable: J, interaction: we, element: de, rect: _e, buttons: Ye };
            return Oe.fire("auto-start:check", Qe), Qe.action;
          })(this, D, z, V, b);
          return this.options.actionChecker ? this.options.actionChecker(k, D, X, this, V, z) : X;
        }, y.prototype.ignoreFrom = cn((function(k) {
          return this._backCompatOption("ignoreFrom", k);
        }), "Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."), y.prototype.allowFrom = cn((function(k) {
          return this._backCompatOption("allowFrom", k);
        }), "Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."), y.prototype.actionChecker = Jn, y.prototype.styleCursor = er;
      } };
      function jo(b, y, k, D, z) {
        return y.testIgnoreAllow(y.options[b.name], k, D) && y.options[b.name].enabled && Di(y, k, b, z) ? b : null;
      }
      function ca(b, y, k, D, z, V, X) {
        for (var J = 0, ue = D.length; J < ue; J++) {
          var we = D[J], de = z[J], Oe = we.getAction(y, k, b, de);
          if (Oe) {
            var _e = jo(Oe, we, de, V, X);
            if (_e) return { action: _e, interactable: we, element: de };
          }
        }
        return { action: null, interactable: null, element: null };
      }
      function da(b, y, k, D, z) {
        var V = [], X = [], J = D;
        function ue(de) {
          V.push(de), X.push(J);
        }
        for (; w.element(J); ) {
          V = [], X = [], z.interactables.forEachMatch(J, ue);
          var we = ca(b, y, k, V, X, D, z);
          if (we.action && !we.interactable.options[we.action.name].manualStart) return we;
          J = W(J);
        }
        return { action: null, interactable: null, element: null };
      }
      function ai(b, y, k) {
        var D = y.action, z = y.interactable, V = y.element;
        D = D || { name: null }, b.interactable = z, b.element = V, An(b.prepared, D), b.rect = z && D.name ? z.getRect(V) : null, Za(b, k), k.fire("autoStart:prepared", { interaction: b });
      }
      function Di(b, y, k, D) {
        var z = b.options, V = z[k.name].max, X = z[k.name].maxPerElement, J = D.autoStart.maxInteractions, ue = 0, we = 0, de = 0;
        if (!(V && X && J)) return !1;
        for (var Oe = 0, _e = D.interactions.list; Oe < _e.length; Oe++) {
          var Ye = _e[Oe], Qe = Ye.prepared.name;
          if (Ye.interacting() && (++ue >= J || Ye.interactable === b && ((we += Qe === k.name ? 1 : 0) >= V || Ye.element === y && (de++, Qe === k.name && de >= X))))
            return !1;
        }
        return J > 0;
      }
      function Qa(b, y) {
        return w.number(b) ? (y.autoStart.maxInteractions = b, this) : y.autoStart.maxInteractions;
      }
      function Ai(b, y, k) {
        var D = k.autoStart.cursorElement;
        D && D !== b && (D.style.cursor = ""), b.ownerDocument.documentElement.style.cursor = y, b.style.cursor = y, k.autoStart.cursorElement = y ? b : null;
      }
      function Za(b, y) {
        var k = b.interactable, D = b.element, z = b.prepared;
        if (b.pointerType === "mouse" && k && k.options.styleCursor) {
          var V = "";
          if (z.name) {
            var X = k.options[z.name].cursorChecker;
            V = w.func(X) ? X(z, k, D, b._interacting) : y.actions.map[z.name].getCursor(z);
          }
          Ai(b.element, V || "", y);
        } else y.autoStart.cursorElement && Ai(y.autoStart.cursorElement, "", y);
      }
      var li = { id: "auto-start/base", before: ["actions"], install: function(b) {
        var y = b.interactStatic, k = b.defaults;
        b.usePlugin(hr), k.base.actionChecker = null, k.base.styleCursor = !0, ce(k.perAction, { manualStart: !1, max: 1 / 0, maxPerElement: 1, allowFrom: null, ignoreFrom: null, mouseButtons: 1 }), y.maxInteractions = function(D) {
          return Qa(D, b);
        }, b.autoStart = { maxInteractions: 1 / 0, withinInteractionLimit: Di, cursorElement: null };
      }, listeners: { "interactions:down": function(b, y) {
        var k = b.interaction, D = b.pointer, z = b.event, V = b.eventTarget;
        k.interacting() || ai(k, da(k, D, z, V, y), y);
      }, "interactions:move": function(b, y) {
        (function(k, D) {
          var z = k.interaction, V = k.pointer, X = k.event, J = k.eventTarget;
          z.pointerType !== "mouse" || z.pointerIsDown || z.interacting() || ai(z, da(z, V, X, J, D), D);
        })(b, y), (function(k, D) {
          var z = k.interaction;
          if (z.pointerIsDown && !z.interacting() && z.pointerWasMoved && z.prepared.name) {
            D.fire("autoStart:before-start", k);
            var V = z.interactable, X = z.prepared.name;
            X && V && (V.options[X].manualStart || !Di(V, z.element, z.prepared, D) ? z.stop() : (z.start(z.prepared, V, z.element), Za(z, D)));
          }
        })(b, y);
      }, "interactions:stop": function(b, y) {
        var k = b.interaction, D = k.interactable;
        D && D.options.styleCursor && Ai(k.element, "", y);
      } }, maxInteractions: Qa, withinInteractionLimit: Di, validateAction: jo }, Ni = li, Hl = { id: "auto-start/dragAxis", listeners: { "autoStart:before-start": function(b, y) {
        var k = b.interaction, D = b.eventTarget, z = b.dx, V = b.dy;
        if (k.prepared.name === "drag") {
          var X = Math.abs(z), J = Math.abs(V), ue = k.interactable.options.drag, we = ue.startAxis, de = X > J ? "x" : X < J ? "y" : "xy";
          if (k.prepared.axis = ue.lockAxis === "start" ? de[0] : ue.lockAxis, de !== "xy" && we !== "xy" && we !== de) {
            k.prepared.name = null;
            for (var Oe = D, _e = function(Qe) {
              if (Qe !== k.interactable) {
                var Ze = k.interactable.options.drag;
                if (!Ze.manualStart && Qe.testIgnoreAllow(Ze, Oe, D)) {
                  var lt = Qe.getAction(k.downPointer, k.downEvent, k, Oe);
                  if (lt && lt.name === "drag" && (function(st, xt) {
                    if (!xt) return !1;
                    var Rt = xt.options.drag.startAxis;
                    return st === "xy" || Rt === "xy" || Rt === st;
                  })(de, Qe) && Ni.validateAction(lt, Qe, Oe, D, y)) return Qe;
                }
              }
            }; w.element(Oe); ) {
              var Ye = y.interactables.forEachMatch(Oe, _e);
              if (Ye) {
                k.prepared.name = "drag", k.interactable = Ye, k.element = Oe;
                break;
              }
              Oe = W(Oe);
            }
          }
        }
      } } };
      function tr(b) {
        var y = b.prepared && b.prepared.name;
        if (!y) return null;
        var k = b.interactable.options;
        return k[y].hold || k[y].delay;
      }
      var Ks = { id: "auto-start/hold", install: function(b) {
        var y = b.defaults;
        b.usePlugin(Ni), y.perAction.hold = 0, y.perAction.delay = 0;
      }, listeners: { "interactions:new": function(b) {
        b.interaction.autoStartHoldTimer = null;
      }, "autoStart:prepared": function(b) {
        var y = b.interaction, k = tr(y);
        k > 0 && (y.autoStartHoldTimer = setTimeout((function() {
          y.start(y.prepared, y.interactable, y.element);
        }), k));
      }, "interactions:move": function(b) {
        var y = b.interaction, k = b.duplicate;
        y.autoStartHoldTimer && y.pointerWasMoved && !k && (clearTimeout(y.autoStartHoldTimer), y.autoStartHoldTimer = null);
      }, "autoStart:before-start": function(b) {
        var y = b.interaction;
        tr(y) > 0 && (y.prepared.name = null);
      } }, getHoldDuration: tr }, Vl = Ks, Ja = { id: "auto-start", install: function(b) {
        b.usePlugin(Ni), b.usePlugin(Vl), b.usePlugin(Hl);
      } }, jl = function(b) {
        return /^(always|never|auto)$/.test(b) ? (this.options.preventDefault = b, this) : w.bool(b) ? (this.options.preventDefault = b ? "always" : "never", this) : this.options.preventDefault;
      };
      function Wl(b) {
        var y = b.interaction, k = b.event;
        y.interactable && y.interactable.checkAndPreventDefault(k);
      }
      var el = { id: "core/interactablePreventDefault", install: function(b) {
        var y = b.Interactable;
        y.prototype.preventDefault = jl, y.prototype.checkAndPreventDefault = function(k) {
          return (function(D, z, V) {
            var X = D.options.preventDefault;
            if (X !== "never") if (X !== "always") {
              if (z.events.supportsPassive && /^touch(start|move)$/.test(V.type)) {
                var J = P(V.target).document, ue = z.getDocOptions(J);
                if (!ue || !ue.events || ue.events.passive !== !1) return;
              }
              /^(mouse|pointer|touch)*(down|start)/i.test(V.type) || w.element(V.target) && K(V.target, "input,select,textarea,[contenteditable=true],[contenteditable=true] *") || V.preventDefault();
            } else V.preventDefault();
          })(this, b, k);
        }, b.interactions.docEvents.push({ type: "dragstart", listener: function(k) {
          for (var D = 0, z = b.interactions.list; D < z.length; D++) {
            var V = z[D];
            if (V.element && (V.element === k.target || j(V.element, k.target))) return void V.interactable.checkAndPreventDefault(k);
          }
        } });
      }, listeners: ["down", "move", "up", "cancel"].reduce((function(b, y) {
        return b["interactions:".concat(y)] = Wl, b;
      }), {}) };
      function tl(b, y) {
        if (y.phaselessTypes[b]) return !0;
        for (var k in y.map) if (b.indexOf(k) === 0 && b.substr(k.length) in y.phases) return !0;
        return !1;
      }
      function ro(b) {
        var y = {};
        for (var k in b) {
          var D = b[k];
          w.plainObject(D) ? y[k] = ro(D) : w.array(D) ? y[k] = ft(D) : y[k] = D;
        }
        return y;
      }
      var nr = (function() {
        function b(y) {
          i(this, b), 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 = y, this.result = fa(), this.edges = { left: !1, right: !1, top: !1, bottom: !1 };
        }
        return l(b, [{ key: "start", value: function(y, k) {
          var D, z, V = y.phase, X = this.interaction, J = (function(we) {
            var de = we.interactable.options[we.prepared.name], Oe = de.modifiers;
            return Oe && Oe.length ? Oe : ["snap", "snapSize", "snapEdges", "restrict", "restrictEdges", "restrictSize"].map((function(_e) {
              var Ye = de[_e];
              return Ye && Ye.enabled && { options: Ye, methods: Ye._methods };
            })).filter((function(_e) {
              return !!_e;
            }));
          })(X);
          this.prepareStates(J), this.startEdges = ce({}, X.edges), this.edges = ce({}, this.startEdges), this.startOffset = (D = X.rect, z = k, D ? { left: z.x - D.left, top: z.y - D.top, right: D.right - z.x, bottom: D.bottom - z.y } : { left: 0, top: 0, right: 0, bottom: 0 }), this.startDelta = { x: 0, y: 0 };
          var ue = this.fillArg({ phase: V, pageCoords: k, preEnd: !1 });
          return this.result = fa(), this.startAll(ue), this.result = this.setAll(ue);
        } }, { key: "fillArg", value: function(y) {
          var k = this.interaction;
          return y.interaction = k, y.interactable = k.interactable, y.element = k.element, y.rect || (y.rect = k.rect), y.edges || (y.edges = this.startEdges), y.startOffset = this.startOffset, y;
        } }, { key: "startAll", value: function(y) {
          for (var k = 0, D = this.states; k < D.length; k++) {
            var z = D[k];
            z.methods.start && (y.state = z, z.methods.start(y));
          }
        } }, { key: "setAll", value: function(y) {
          var k = y.phase, D = y.preEnd, z = y.skipModifiers, V = y.rect, X = y.edges;
          y.coords = ce({}, y.pageCoords), y.rect = ce({}, V), y.edges = ce({}, X);
          for (var J = z ? this.states.slice(z) : this.states, ue = fa(y.coords, y.rect), we = 0; we < J.length; we++) {
            var de, Oe = J[we], _e = Oe.options, Ye = ce({}, y.coords), Qe = null;
            (de = Oe.methods) != null && de.set && this.shouldDo(_e, D, k) && (y.state = Oe, Qe = Oe.methods.set(y), Ke(y.edges, y.rect, { x: y.coords.x - Ye.x, y: y.coords.y - Ye.y })), ue.eventProps.push(Qe);
          }
          ce(this.edges, y.edges), ue.delta.x = y.coords.x - y.pageCoords.x, ue.delta.y = y.coords.y - y.pageCoords.y, ue.rectDelta.left = y.rect.left - V.left, ue.rectDelta.right = y.rect.right - V.right, ue.rectDelta.top = y.rect.top - V.top, ue.rectDelta.bottom = y.rect.bottom - V.bottom;
          var Ze = this.result.coords, lt = this.result.rect;
          if (Ze && lt) {
            var st = ue.rect.left !== lt.left || ue.rect.right !== lt.right || ue.rect.top !== lt.top || ue.rect.bottom !== lt.bottom;
            ue.changed = st || Ze.x !== ue.coords.x || Ze.y !== ue.coords.y;
          }
          return ue;
        } }, { key: "applyToInteraction", value: function(y) {
          var k = this.interaction, D = y.phase, z = k.coords.cur, V = k.coords.start, X = this.result, J = this.startDelta, ue = X.delta;
          D === "start" && ce(this.startDelta, X.delta);
          for (var we = 0, de = [[V, J], [z, ue]]; we < de.length; we++) {
            var Oe = de[we], _e = Oe[0], Ye = Oe[1];
            _e.page.x += Ye.x, _e.page.y += Ye.y, _e.client.x += Ye.x, _e.client.y += Ye.y;
          }
          var Qe = this.result.rectDelta, Ze = y.rect || k.rect;
          Ze.left += Qe.left, Ze.right += Qe.right, Ze.top += Qe.top, Ze.bottom += Qe.bottom, Ze.width = Ze.right - Ze.left, Ze.height = Ze.bottom - Ze.top;
        } }, { key: "setAndApply", value: function(y) {
          var k = this.interaction, D = y.phase, z = y.preEnd, V = y.skipModifiers, X = this.setAll(this.fillArg({ preEnd: z, phase: D, pageCoords: y.modifiedCoords || k.coords.cur.page }));
          if (this.result = X, !X.changed && (!V || V < this.states.length) && k.interacting()) return !1;
          if (y.modifiedCoords) {
            var J = k.coords.cur.page, ue = { x: y.modifiedCoords.x - J.x, y: y.modifiedCoords.y - J.y };
            X.coords.x += ue.x, X.coords.y += ue.y, X.delta.x += ue.x, X.delta.y += ue.y;
          }
          this.applyToInteraction(y);
        } }, { key: "beforeEnd", value: function(y) {
          var k = y.interaction, D = y.event, z = this.states;
          if (z && z.length) {
            for (var V = !1, X = 0; X < z.length; X++) {
              var J = z[X];
              y.state = J;
              var ue = J.options, we = J.methods, de = we.beforeEnd && we.beforeEnd(y);
              if (de) return this.endResult = de, !1;
              V = V || !V && this.shouldDo(ue, !0, y.phase, !0);
            }
            V && k.move({ event: D, preEnd: !0 });
          }
        } }, { key: "stop", value: function(y) {
          var k = y.interaction;
          if (this.states && this.states.length) {
            var D = ce({ states: this.states, interactable: k.interactable, element: k.element, rect: null }, y);
            this.fillArg(D);
            for (var z = 0, V = this.states; z < V.length; z++) {
              var X = V[z];
              D.state = X, X.methods.stop && X.methods.stop(D);
            }
            this.states = null, this.endResult = null;
          }
        } }, { key: "prepareStates", value: function(y) {
          this.states = [];
          for (var k = 0; k < y.length; k++) {
            var D = y[k], z = D.options, V = D.methods, X = D.name;
            this.states.push({ options: z, methods: V, index: k, name: X });
          }
          return this.states;
        } }, { key: "restoreInteractionCoords", value: function(y) {
          var k = y.interaction, D = k.coords, z = k.rect, V = k.modification;
          if (V.result) {
            for (var X = V.startDelta, J = V.result, ue = J.delta, we = J.rectDelta, de = 0, Oe = [[D.start, X], [D.cur, ue]]; de < Oe.length; de++) {
              var _e = Oe[de], Ye = _e[0], Qe = _e[1];
              Ye.page.x -= Qe.x, Ye.page.y -= Qe.y, Ye.client.x -= Qe.x, Ye.client.y -= Qe.y;
            }
            z.left -= we.left, z.right -= we.right, z.top -= we.top, z.bottom -= we.bottom;
          }
        } }, { key: "shouldDo", value: function(y, k, D, z) {
          return !(!y || y.enabled === !1 || z && !y.endOnly || y.endOnly && !k || D === "start" && !y.setStart);
        } }, { key: "copyFrom", value: function(y) {
          this.startOffset = y.startOffset, this.startDelta = y.startDelta, this.startEdges = y.startEdges, this.edges = y.edges, this.states = y.states.map((function(k) {
            return ro(k);
          })), this.result = fa(ce({}, y.result.coords), ce({}, y.result.rect));
        } }, { key: "destroy", value: function() {
          for (var y in this) this[y] = null;
        } }]), b;
      })();
      function fa(b, y) {
        return { rect: y, coords: b, delta: { x: 0, y: 0 }, rectDelta: { left: 0, right: 0, top: 0, bottom: 0 }, eventProps: [], changed: !0 };
      }
      function or(b, y) {
        var k = b.defaults, D = { start: b.start, set: b.set, beforeEnd: b.beforeEnd, stop: b.stop }, z = function(V) {
          var X = V || {};
          for (var J in X.enabled = X.enabled !== !1, k) J in X || (X[J] = k[J]);
          var ue = { options: X, methods: D, name: y, enable: function() {
            return X.enabled = !0, ue;
          }, disable: function() {
            return X.enabled = !1, ue;
          } };
          return ue;
        };
        return y && typeof y == "string" && (z._defaults = k, z._methods = D), z;
      }
      function Fo(b) {
        var y = b.iEvent, k = b.interaction.modification.result;
        k && (y.modifiers = k.eventProps);
      }
      var nl = { id: "modifiers/base", before: ["actions"], install: function(b) {
        b.defaults.perAction.modifiers = [];
      }, listeners: { "interactions:new": function(b) {
        var y = b.interaction;
        y.modification = new nr(y);
      }, "interactions:before-action-start": function(b) {
        var y = b.interaction, k = b.interaction.modification;
        k.start(b, y.coords.start.page), y.edges = k.edges, k.applyToInteraction(b);
      }, "interactions:before-action-move": function(b) {
        var y = b.interaction, k = y.modification, D = k.setAndApply(b);
        return y.edges = k.edges, D;
      }, "interactions:before-action-end": function(b) {
        var y = b.interaction, k = y.modification, D = k.beforeEnd(b);
        return y.edges = k.startEdges, D;
      }, "interactions:action-start": Fo, "interactions:action-move": Fo, "interactions:action-end": Fo, "interactions:after-action-start": function(b) {
        return b.interaction.modification.restoreInteractionCoords(b);
      }, "interactions:after-action-move": function(b) {
        return b.interaction.modification.restoreInteractionCoords(b);
      }, "interactions:stop": function(b) {
        return b.interaction.modification.stop(b);
      } } }, ol = nl, rl = { base: { preventDefault: "auto", deltaSource: "page" }, perAction: { enabled: !1, origin: { x: 0, y: 0 } }, actions: {} }, Ri = (function(b) {
        u(k, b);
        var y = p(k);
        function k(D, z, V, X, J, ue, we) {
          var de;
          i(this, k), (de = y.call(this, D)).relatedTarget = null, de.screenX = void 0, de.screenY = void 0, de.button = void 0, de.buttons = void 0, de.ctrlKey = void 0, de.shiftKey = void 0, de.altKey = void 0, de.metaKey = void 0, de.page = void 0, de.client = void 0, de.delta = void 0, de.rect = void 0, de.x0 = void 0, de.y0 = void 0, de.t0 = void 0, de.dt = void 0, de.duration = void 0, de.clientX0 = void 0, de.clientY0 = void 0, de.velocity = void 0, de.speed = void 0, de.swipe = void 0, de.axes = void 0, de.preEnd = void 0, J = J || D.element;
          var Oe = D.interactable, _e = (Oe && Oe.options || rl).deltaSource, Ye = He(Oe, J, V), Qe = X === "start", Ze = X === "end", lt = Qe ? f(de) : D.prevEvent, st = Qe ? D.coords.start : Ze ? { page: lt.page, client: lt.client, timeStamp: D.coords.cur.timeStamp } : D.coords.cur;
          return de.page = ce({}, st.page), de.client = ce({}, st.client), de.rect = ce({}, D.rect), de.timeStamp = st.timeStamp, Ze || (de.page.x -= Ye.x, de.page.y -= Ye.y, de.client.x -= Ye.x, de.client.y -= Ye.y), de.ctrlKey = z.ctrlKey, de.altKey = z.altKey, de.shiftKey = z.shiftKey, de.metaKey = z.metaKey, de.button = z.button, de.buttons = z.buttons, de.target = J, de.currentTarget = J, de.preEnd = ue, de.type = we || V + (X || ""), de.interactable = Oe, de.t0 = Qe ? D.pointers[D.pointers.length - 1].downTime : lt.t0, de.x0 = D.coords.start.page.x - Ye.x, de.y0 = D.coords.start.page.y - Ye.y, de.clientX0 = D.coords.start.client.x - Ye.x, de.clientY0 = D.coords.start.client.y - Ye.y, de.delta = Qe || Ze ? { x: 0, y: 0 } : { x: de[_e].x - lt[_e].x, y: de[_e].y - lt[_e].y }, de.dt = D.coords.delta.timeStamp, de.duration = de.timeStamp - de.t0, de.velocity = ce({}, D.coords.velocity[_e]), de.speed = De(de.velocity.x, de.velocity.y), de.swipe = Ze || X === "inertiastart" ? de.getSwipe() : null, de;
        }
        return l(k, [{ key: "getSwipe", value: function() {
          var D = this._interaction;
          if (D.prevEvent.speed < 600 || this.timeStamp - D.prevEvent.timeStamp > 150) return null;
          var z = 180 * Math.atan2(D.prevEvent.velocityY, D.prevEvent.velocityX) / Math.PI;
          z < 0 && (z += 360);
          var V = 112.5 <= z && z < 247.5, X = 202.5 <= z && z < 337.5;
          return { up: X, down: !X && 22.5 <= z && z < 157.5, left: V, right: !V && (292.5 <= z || z < 67.5), angle: z, speed: D.prevEvent.speed, velocity: { x: D.prevEvent.velocityX, y: D.prevEvent.velocityY } };
        } }, { key: "preventDefault", value: function() {
        } }, { key: "stopImmediatePropagation", value: function() {
          this.immediatePropagationStopped = this.propagationStopped = !0;
        } }, { key: "stopPropagation", value: function() {
          this.propagationStopped = !0;
        } }]), k;
      })(pt);
      Object.defineProperties(Ri.prototype, { pageX: { get: function() {
        return this.page.x;
      }, set: function(b) {
        this.page.x = b;
      } }, pageY: { get: function() {
        return this.page.y;
      }, set: function(b) {
        this.page.y = b;
      } }, clientX: { get: function() {
        return this.client.x;
      }, set: function(b) {
        this.client.x = b;
      } }, clientY: { get: function() {
        return this.client.y;
      }, set: function(b) {
        this.client.y = b;
      } }, dx: { get: function() {
        return this.delta.x;
      }, set: function(b) {
        this.delta.x = b;
      } }, dy: { get: function() {
        return this.delta.y;
      }, set: function(b) {
        this.delta.y = b;
      } }, velocityX: { get: function() {
        return this.velocity.x;
      }, set: function(b) {
        this.velocity.x = b;
      } }, velocityY: { get: function() {
        return this.velocity.y;
      }, set: function(b) {
        this.velocity.y = b;
      } } });
      var qs = l((function b(y, k, D, z, V) {
        i(this, b), this.id = void 0, this.pointer = void 0, this.event = void 0, this.downTime = void 0, this.downTarget = void 0, this.id = y, this.pointer = k, this.event = D, this.downTime = z, this.downTarget = V;
      })), Kl = (function(b) {
        return b.interactable = "", b.element = "", b.prepared = "", b.pointerIsDown = "", b.pointerWasMoved = "", b._proxy = "", b;
      })({}), Ud = (function(b) {
        return b.start = "", b.move = "", b.end = "", b.stop = "", b.interacting = "", b;
      })({}), il = 0, Ys = (function() {
        function b(y) {
          var k = this, D = y.pointerType, z = y.scopeFire;
          i(this, b), 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 = cn((function(de) {
            this.move(de);
          }), "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 = il++, this._scopeFire = z, this.pointerType = D;
          var V = this;
          this._proxy = {};
          var X = function(de) {
            Object.defineProperty(k._proxy, de, { get: function() {
              return V[de];
            } });
          };
          for (var J in Kl) X(J);
          var ue = function(de) {
            Object.defineProperty(k._proxy, de, { value: function() {
              return V[de].apply(V, arguments);
            } });
          };
          for (var we in Ud) ue(we);
          this._scopeFire("interactions:new", { interaction: this });
        }
        return l(b, [{ key: "pointerMoveTolerance", get: function() {
          return 1;
        } }, { key: "pointerDown", value: function(y, k, D) {
          var z = this.updatePointer(y, k, D, !0), V = this.pointers[z];
          this._scopeFire("interactions:down", { pointer: y, event: k, eventTarget: D, pointerIndex: z, pointerInfo: V, type: "down", interaction: this });
        } }, { key: "start", value: function(y, k, D) {
          return !(this.interacting() || !this.pointerIsDown || this.pointers.length < (y.name === "gesture" ? 2 : 1) || !k.options[y.name].enabled) && (An(this.prepared, y), this.interactable = k, this.element = D, this.rect = k.getRect(D), this.edges = this.prepared.edges ? ce({}, 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(y, k, D) {
          this.simulation || this.modification && this.modification.endResult || this.updatePointer(y, k, D, !1);
          var z, V, X = 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 && (z = this.coords.cur.client.x - this.coords.start.client.x, V = this.coords.cur.client.y - this.coords.start.client.y, this.pointerWasMoved = De(z, V) > this.pointerMoveTolerance);
          var J, ue, we, de = this.getPointerIndex(y), Oe = { pointer: y, pointerIndex: de, pointerInfo: this.pointers[de], event: k, type: "move", eventTarget: D, dx: z, dy: V, duplicate: X, interaction: this };
          X || (J = this.coords.velocity, ue = this.coords.delta, we = Math.max(ue.timeStamp / 1e3, 1e-3), J.page.x = ue.page.x / we, J.page.y = ue.page.y / we, J.client.x = ue.client.x / we, J.client.y = ue.client.y / we, J.timeStamp = we), this._scopeFire("interactions:move", Oe), X || this.simulation || (this.interacting() && (Oe.type = null, this.move(Oe)), this.pointerWasMoved && ot(this.coords.prev, this.coords.cur));
        } }, { key: "move", value: function(y) {
          y && y.event || je(this.coords.delta), (y = ce({ pointer: this._latestPointer.pointer, event: this._latestPointer.event, eventTarget: this._latestPointer.eventTarget, interaction: this }, y || {})).phase = "move", this._doPhase(y);
        } }, { key: "pointerUp", value: function(y, k, D, z) {
          var V = this.getPointerIndex(y);
          V === -1 && (V = this.updatePointer(y, k, D, !1));
          var X = /cancel$/i.test(k.type) ? "cancel" : "up";
          this._scopeFire("interactions:".concat(X), { pointer: y, pointerIndex: V, pointerInfo: this.pointers[V], event: k, eventTarget: D, type: X, curEventTarget: z, interaction: this }), this.simulation || this.end(k), this.removePointer(y, k);
        } }, { key: "documentBlur", value: function(y) {
          this.end(y), this._scopeFire("interactions:blur", { event: y, type: "blur", interaction: this });
        } }, { key: "end", value: function(y) {
          var k;
          this._ending = !0, y = y || this._latestPointer.event, this.interacting() && (k = this._doPhase({ event: y, interaction: this, phase: "end" })), this._ending = !1, k === !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(y) {
          var k = Ce(y);
          return this.pointerType === "mouse" || this.pointerType === "pen" ? this.pointers.length - 1 : wt(this.pointers, (function(D) {
            return D.id === k;
          }));
        } }, { key: "getPointerInfo", value: function(y) {
          return this.pointers[this.getPointerIndex(y)];
        } }, { key: "updatePointer", value: function(y, k, D, z) {
          var V, X, J, ue = Ce(y), we = this.getPointerIndex(y), de = this.pointers[we];
          return z = z !== !1 && (z || /(down|start)$/i.test(k.type)), de ? de.pointer = y : (de = new qs(ue, y, k, null, null), we = this.pointers.length, this.pointers.push(de)), Ae(this.coords.cur, this.pointers.map((function(Oe) {
            return Oe.pointer;
          })), this._now()), V = this.coords.delta, X = this.coords.prev, J = this.coords.cur, V.page.x = J.page.x - X.page.x, V.page.y = J.page.y - X.page.y, V.client.x = J.client.x - X.client.x, V.client.y = J.client.y - X.client.y, V.timeStamp = J.timeStamp - X.timeStamp, z && (this.pointerIsDown = !0, de.downTime = this.coords.cur.timeStamp, de.downTarget = D, Ve(this.downPointer, y), this.interacting() || (ot(this.coords.start, this.coords.cur), ot(this.coords.prev, this.coords.cur), this.downEvent = k, this.pointerWasMoved = !1)), this._updateLatestPointer(y, k, D), this._scopeFire("interactions:update-pointer", { pointer: y, event: k, eventTarget: D, down: z, pointerInfo: de, pointerIndex: we, interaction: this }), we;
        } }, { key: "removePointer", value: function(y, k) {
          var D = this.getPointerIndex(y);
          if (D !== -1) {
            var z = this.pointers[D];
            this._scopeFire("interactions:remove-pointer", { pointer: y, event: k, eventTarget: null, pointerIndex: D, pointerInfo: z, interaction: this }), this.pointers.splice(D, 1), this.pointerIsDown = !1;
          }
        } }, { key: "_updateLatestPointer", value: function(y, k, D) {
          this._latestPointer.pointer = y, this._latestPointer.event = k, this._latestPointer.eventTarget = D;
        } }, { key: "destroy", value: function() {
          this._latestPointer.pointer = null, this._latestPointer.event = null, this._latestPointer.eventTarget = null;
        } }, { key: "_createPreparedEvent", value: function(y, k, D, z) {
          return new Ri(this, y, this.prepared.name, k, this.element, D, z);
        } }, { key: "_fireEvent", value: function(y) {
          var k;
          (k = this.interactable) == null || k.fire(y), (!this.prevEvent || y.timeStamp >= this.prevEvent.timeStamp) && (this.prevEvent = y);
        } }, { key: "_doPhase", value: function(y) {
          var k = y.event, D = y.phase, z = y.preEnd, V = y.type, X = this.rect;
          if (X && D === "move" && (Ke(this.edges, X, this.coords.delta[this.interactable.options.deltaSource]), X.width = X.right - X.left, X.height = X.bottom - X.top), this._scopeFire("interactions:before-action-".concat(D), y) === !1) return !1;
          var J = y.iEvent = this._createPreparedEvent(k, D, z, V);
          return this._scopeFire("interactions:action-".concat(D), y), D === "start" && (this.prevEvent = J), this._fireEvent(J), this._scopeFire("interactions:after-action-".concat(D), y), !0;
        } }, { key: "_now", value: function() {
          return Date.now();
        } }]), b;
      })();
      function Gs(b) {
        al(b.interaction);
      }
      function al(b) {
        if (!(function(k) {
          return !(!k.offset.pending.x && !k.offset.pending.y);
        })(b)) return !1;
        var y = b.offset.pending;
        return zi(b.coords.cur, y), zi(b.coords.delta, y), Ke(b.edges, b.rect, y), y.x = 0, y.y = 0, !0;
      }
      function dg(b) {
        var y = b.x, k = b.y;
        this.offset.pending.x += y, this.offset.pending.y += k, this.offset.total.x += y, this.offset.total.y += k;
      }
      function zi(b, y) {
        var k = b.page, D = b.client, z = y.x, V = y.y;
        k.x += z, k.y += V, D.x += z, D.y += V;
      }
      Ud.offsetBy = "";
      var fg = { id: "offset", before: ["modifiers", "pointer-events", "actions", "inertia"], install: function(b) {
        b.Interaction.prototype.offsetBy = dg;
      }, listeners: { "interactions:new": function(b) {
        b.interaction.offset = { total: { x: 0, y: 0 }, pending: { x: 0, y: 0 } };
      }, "interactions:update-pointer": function(b) {
        return (function(y) {
          y.pointerIsDown && (zi(y.coords.cur, y.offset.total), y.offset.pending.x = 0, y.offset.pending.y = 0);
        })(b.interaction);
      }, "interactions:before-action-start": Gs, "interactions:before-action-move": Gs, "interactions:before-action-end": function(b) {
        var y = b.interaction;
        if (al(y)) return y.move({ offset: !0 }), y.end(), !1;
      }, "interactions:stop": function(b) {
        var y = b.interaction;
        y.offset.total.x = 0, y.offset.total.y = 0, y.offset.pending.x = 0, y.offset.pending.y = 0;
      } } }, vc = fg, mc = (function() {
        function b(y) {
          i(this, b), 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 = y;
        }
        return l(b, [{ key: "start", value: function(y) {
          var k = this.interaction, D = ll(k);
          if (!D || !D.enabled) return !1;
          var z = k.coords.velocity.client, V = De(z.x, z.y), X = this.modification || (this.modification = new nr(k));
          if (X.copyFrom(k.modification), this.t0 = k._now(), this.allowResume = D.allowResume, this.v0 = V, this.currentOffset = { x: 0, y: 0 }, this.startCoords = k.coords.cur.page, this.modifierArg = X.fillArg({ pageCoords: this.startCoords, preEnd: !0, phase: "inertiastart" }), this.t0 - k.coords.cur.timeStamp < 50 && V > D.minSpeed && V > D.endSpeed) this.startInertia();
          else {
            if (X.result = X.setAll(this.modifierArg), !X.result.changed) return !1;
            this.startSmoothEnd();
          }
          return k.modification.result.rect = null, k.offsetBy(this.targetOffset), k._doPhase({ interaction: k, event: y, phase: "inertiastart" }), k.offsetBy({ x: -this.targetOffset.x, y: -this.targetOffset.y }), k.modification.result.rect = null, this.active = !0, k.simulation = this, !0;
        } }, { key: "startInertia", value: function() {
          var y = this, k = this.interaction.coords.velocity.client, D = ll(this.interaction), z = D.resistance, V = -Math.log(D.endSpeed / this.v0) / z;
          this.targetOffset = { x: (k.x - V) / z, y: (k.y - V) / z }, this.te = V, this.lambda_v0 = z / this.v0, this.one_ve_v0 = 1 - D.endSpeed / this.v0;
          var X = this.modification, J = this.modifierArg;
          J.pageCoords = { x: this.startCoords.x + this.targetOffset.x, y: this.startCoords.y + this.targetOffset.y }, X.result = X.setAll(J), X.result.changed && (this.isModified = !0, this.modifiedOffset = { x: this.targetOffset.x + X.result.delta.x, y: this.targetOffset.y + X.result.delta.y }), this.onNextFrame((function() {
            return y.inertiaTick();
          }));
        } }, { key: "startSmoothEnd", value: function() {
          var y = 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 y.smoothEndTick();
          }));
        } }, { key: "onNextFrame", value: function(y) {
          var k = this;
          this.timeout = Sn.request((function() {
            k.active && y();
          }));
        } }, { key: "inertiaTick", value: function() {
          var y, k, D, z, V, X, J, ue = this, we = this.interaction, de = ll(we).resistance, Oe = (we._now() - this.t0) / 1e3;
          if (Oe < this.te) {
            var _e, Ye = 1 - (Math.exp(-de * Oe) - this.lambda_v0) / this.one_ve_v0;
            this.isModified ? (y = 0, k = 0, D = this.targetOffset.x, z = this.targetOffset.y, V = this.modifiedOffset.x, X = this.modifiedOffset.y, _e = { x: pa(J = Ye, y, D, V), y: pa(J, k, z, X) }) : _e = { x: this.targetOffset.x * Ye, y: this.targetOffset.y * Ye };
            var Qe = { x: _e.x - this.currentOffset.x, y: _e.y - this.currentOffset.y };
            this.currentOffset.x += Qe.x, this.currentOffset.y += Qe.y, we.offsetBy(Qe), we.move(), this.onNextFrame((function() {
              return ue.inertiaTick();
            }));
          } else we.offsetBy({ x: this.modifiedOffset.x - this.currentOffset.x, y: this.modifiedOffset.y - this.currentOffset.y }), this.end();
        } }, { key: "smoothEndTick", value: function() {
          var y = this, k = this.interaction, D = k._now() - this.t0, z = ll(k).smoothEndDuration;
          if (D < z) {
            var V = { x: ha(D, 0, this.targetOffset.x, z), y: ha(D, 0, this.targetOffset.y, z) }, X = { x: V.x - this.currentOffset.x, y: V.y - this.currentOffset.y };
            this.currentOffset.x += X.x, this.currentOffset.y += X.y, k.offsetBy(X), k.move({ skipModifiers: this.modifierCount }), this.onNextFrame((function() {
              return y.smoothEndTick();
            }));
          } else k.offsetBy({ x: this.targetOffset.x - this.currentOffset.x, y: this.targetOffset.y - this.currentOffset.y }), this.end();
        } }, { key: "resume", value: function(y) {
          var k = y.pointer, D = y.event, z = y.eventTarget, V = this.interaction;
          V.offsetBy({ x: -this.currentOffset.x, y: -this.currentOffset.y }), V.updatePointer(k, D, z, !0), V._doPhase({ interaction: V, event: D, phase: "resume" }), ot(V.coords.prev, V.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, Sn.cancel(this.timeout);
        } }]), b;
      })();
      function ll(b) {
        var y = b.interactable, k = b.prepared;
        return y && y.options && k.name && y.options[k.name].inertia;
      }
      var bc = { id: "inertia", before: ["modifiers", "actions"], install: function(b) {
        var y = b.defaults;
        b.usePlugin(vc), b.usePlugin(ol), b.actions.phases.inertiastart = !0, b.actions.phases.resume = !0, y.perAction.inertia = { enabled: !1, resistance: 10, minSpeed: 100, endSpeed: 10, allowResume: !0, smoothEndDuration: 300 };
      }, listeners: { "interactions:new": function(b) {
        var y = b.interaction;
        y.inertia = new mc(y);
      }, "interactions:before-action-end": function(b) {
        var y = b.interaction, k = b.event;
        return (!y._interacting || y.simulation || !y.inertia.start(k)) && null;
      }, "interactions:down": function(b) {
        var y = b.interaction, k = b.eventTarget, D = y.inertia;
        if (D.active) for (var z = k; w.element(z); ) {
          if (z === y.element) {
            D.resume(b);
            break;
          }
          z = W(z);
        }
      }, "interactions:stop": function(b) {
        var y = b.interaction.inertia;
        y.active && y.stop();
      }, "interactions:before-action-resume": function(b) {
        var y = b.interaction.modification;
        y.stop(b), y.start(b, b.interaction.coords.cur.page), y.applyToInteraction(b);
      }, "interactions:before-action-inertiastart": function(b) {
        return b.interaction.modification.setAndApply(b);
      }, "interactions:action-resume": Fo, "interactions:action-inertiastart": Fo, "interactions:after-action-inertiastart": function(b) {
        return b.interaction.modification.restoreInteractionCoords(b);
      }, "interactions:after-action-resume": function(b) {
        return b.interaction.modification.restoreInteractionCoords(b);
      } } };
      function pa(b, y, k, D) {
        var z = 1 - b;
        return z * z * y + 2 * z * b * k + b * b * D;
      }
      function ha(b, y, k, D) {
        return -k * (b /= D) * (b - 2) + y;
      }
      var Xd = bc;
      function yc(b, y) {
        for (var k = 0; k < y.length; k++) {
          var D = y[k];
          if (b.immediatePropagationStopped) break;
          D(b);
        }
      }
      var ga = (function() {
        function b(y) {
          i(this, b), this.options = void 0, this.types = {}, this.propagationStopped = !1, this.immediatePropagationStopped = !1, this.global = void 0, this.options = ce({}, y || {});
        }
        return l(b, [{ key: "fire", value: function(y) {
          var k, D = this.global;
          (k = this.types[y.type]) && yc(y, k), !y.propagationStopped && D && (k = D[y.type]) && yc(y, k);
        } }, { key: "on", value: function(y, k) {
          var D = Ne(y, k);
          for (y in D) this.types[y] = at(this.types[y] || [], D[y]);
        } }, { key: "off", value: function(y, k) {
          var D = Ne(y, k);
          for (y in D) {
            var z = this.types[y];
            if (z && z.length) for (var V = 0, X = D[y]; V < X.length; V++) {
              var J = X[V], ue = z.indexOf(J);
              ue !== -1 && z.splice(ue, 1);
            }
          }
        } }, { key: "getRect", value: function(y) {
          return null;
        } }]), b;
      })(), sl = (function() {
        function b(y) {
          i(this, b), this.currentTarget = void 0, this.originalEvent = void 0, this.type = void 0, this.originalEvent = y, Ve(this, y);
        }
        return l(b, [{ key: "preventOriginalDefault", value: function() {
          this.originalEvent.preventDefault();
        } }, { key: "stopPropagation", value: function() {
          this.originalEvent.stopPropagation();
        } }, { key: "stopImmediatePropagation", value: function() {
          this.originalEvent.stopImmediatePropagation();
        } }]), b;
      })();
      function ul(b) {
        return w.object(b) ? { capture: !!b.capture, passive: !!b.passive } : { capture: !!b, passive: !1 };
      }
      function ql(b, y) {
        return b === y || (typeof b == "boolean" ? !!y.capture === b && !y.passive : !!b.capture == !!y.capture && !!b.passive == !!y.passive);
      }
      var qn = { id: "events", install: function(b) {
        var y, k = [], D = {}, z = [], V = { add: X, remove: J, addDelegate: function(de, Oe, _e, Ye, Qe) {
          var Ze = ul(Qe);
          if (!D[_e]) {
            D[_e] = [];
            for (var lt = 0; lt < z.length; lt++) {
              var st = z[lt];
              X(st, _e, ue), X(st, _e, we, !0);
            }
          }
          var xt = D[_e], Rt = Ct(xt, (function(Gt) {
            return Gt.selector === de && Gt.context === Oe;
          }));
          Rt || (Rt = { selector: de, context: Oe, listeners: [] }, xt.push(Rt)), Rt.listeners.push({ func: Ye, options: Ze });
        }, removeDelegate: function(de, Oe, _e, Ye, Qe) {
          var Ze, lt = ul(Qe), st = D[_e], xt = !1;
          if (st)
            for (Ze = st.length - 1; Ze >= 0; Ze--) {
              var Rt = st[Ze];
              if (Rt.selector === de && Rt.context === Oe) {
                for (var Gt = Rt.listeners, _t = Gt.length - 1; _t >= 0; _t--) {
                  var jt = Gt[_t];
                  if (jt.func === Ye && ql(jt.options, lt)) {
                    Gt.splice(_t, 1), Gt.length || (st.splice(Ze, 1), J(Oe, _e, ue), J(Oe, _e, we, !0)), xt = !0;
                    break;
                  }
                }
                if (xt) break;
              }
            }
        }, delegateListener: ue, delegateUseCapture: we, delegatedEvents: D, documents: z, targets: k, supportsOptions: !1, supportsPassive: !1 };
        function X(de, Oe, _e, Ye) {
          if (de.addEventListener) {
            var Qe = ul(Ye), Ze = Ct(k, (function(lt) {
              return lt.eventTarget === de;
            }));
            Ze || (Ze = { eventTarget: de, events: {} }, k.push(Ze)), Ze.events[Oe] || (Ze.events[Oe] = []), Ct(Ze.events[Oe], (function(lt) {
              return lt.func === _e && ql(lt.options, Qe);
            })) || (de.addEventListener(Oe, _e, V.supportsOptions ? Qe : Qe.capture), Ze.events[Oe].push({ func: _e, options: Qe }));
          }
        }
        function J(de, Oe, _e, Ye) {
          if (de.addEventListener && de.removeEventListener) {
            var Qe = wt(k, (function(Nn) {
              return Nn.eventTarget === de;
            })), Ze = k[Qe];
            if (Ze && Ze.events) if (Oe !== "all") {
              var lt = !1, st = Ze.events[Oe];
              if (st) {
                if (_e === "all") {
                  for (var xt = st.length - 1; xt >= 0; xt--) {
                    var Rt = st[xt];
                    J(de, Oe, Rt.func, Rt.options);
                  }
                  return;
                }
                for (var Gt = ul(Ye), _t = 0; _t < st.length; _t++) {
                  var jt = st[_t];
                  if (jt.func === _e && ql(jt.options, Gt)) {
                    de.removeEventListener(Oe, _e, V.supportsOptions ? Gt : Gt.capture), st.splice(_t, 1), st.length === 0 && (delete Ze.events[Oe], lt = !0);
                    break;
                  }
                }
              }
              lt && !Object.keys(Ze.events).length && k.splice(Qe, 1);
            } else for (Oe in Ze.events) Ze.events.hasOwnProperty(Oe) && J(de, Oe, "all");
          }
        }
        function ue(de, Oe) {
          for (var _e = ul(Oe), Ye = new sl(de), Qe = D[de.type], Ze = rt(de)[0], lt = Ze; w.element(lt); ) {
            for (var st = 0; st < Qe.length; st++) {
              var xt = Qe[st], Rt = xt.selector, Gt = xt.context;
              if (K(lt, Rt) && j(Gt, Ze) && j(Gt, lt)) {
                var _t = xt.listeners;
                Ye.currentTarget = lt;
                for (var jt = 0; jt < _t.length; jt++) {
                  var Nn = _t[jt];
                  ql(Nn.options, _e) && Nn.func(Ye);
                }
              }
            }
            lt = W(lt);
          }
        }
        function we(de) {
          return ue(de, !0);
        }
        return (y = b.document) == null || y.createElement("div").addEventListener("test", null, { get capture() {
          return V.supportsOptions = !0;
        }, get passive() {
          return V.supportsPassive = !0;
        } }), b.events = V, V;
      } }, Hn = { methodOrder: ["simulationResume", "mouseOrPen", "hasPointer", "idle"], search: function(b) {
        for (var y = 0, k = Hn.methodOrder; y < k.length; y++) {
          var D = k[y], z = Hn[D](b);
          if (z) return z;
        }
        return null;
      }, simulationResume: function(b) {
        var y = b.pointerType, k = b.eventType, D = b.eventTarget, z = b.scope;
        if (!/down|start/i.test(k)) return null;
        for (var V = 0, X = z.interactions.list; V < X.length; V++) {
          var J = X[V], ue = D;
          if (J.simulation && J.simulation.allowResume && J.pointerType === y) for (; ue; ) {
            if (ue === J.element) return J;
            ue = W(ue);
          }
        }
        return null;
      }, mouseOrPen: function(b) {
        var y, k = b.pointerId, D = b.pointerType, z = b.eventType, V = b.scope;
        if (D !== "mouse" && D !== "pen") return null;
        for (var X = 0, J = V.interactions.list; X < J.length; X++) {
          var ue = J[X];
          if (ue.pointerType === D) {
            if (ue.simulation && !si(ue, k)) continue;
            if (ue.interacting()) return ue;
            y || (y = ue);
          }
        }
        if (y) return y;
        for (var we = 0, de = V.interactions.list; we < de.length; we++) {
          var Oe = de[we];
          if (!(Oe.pointerType !== D || /down/i.test(z) && Oe.simulation)) return Oe;
        }
        return null;
      }, hasPointer: function(b) {
        for (var y = b.pointerId, k = 0, D = b.scope.interactions.list; k < D.length; k++) {
          var z = D[k];
          if (si(z, y)) return z;
        }
        return null;
      }, idle: function(b) {
        for (var y = b.pointerType, k = 0, D = b.scope.interactions.list; k < D.length; k++) {
          var z = D[k];
          if (z.pointers.length === 1) {
            var V = z.interactable;
            if (V && (!V.options.gesture || !V.options.gesture.enabled)) continue;
          } else if (z.pointers.length >= 2) continue;
          if (!z.interacting() && y === z.pointerType) return z;
        }
        return null;
      } };
      function si(b, y) {
        return b.pointers.some((function(k) {
          return k.id === y;
        }));
      }
      var Po = Hn, ho = ["pointerDown", "pointerMove", "pointerUp", "updatePointer", "removePointer", "windowBlur"];
      function mo(b, y) {
        return function(k) {
          var D = y.interactions.list, z = Be(k), V = rt(k), X = V[0], J = V[1], ue = [];
          if (/^touch/.test(k.type)) {
            y.prevTouchTime = y.now();
            for (var we = 0, de = k.changedTouches; we < de.length; we++) {
              var Oe = de[we], _e = { pointer: Oe, pointerId: Ce(Oe), pointerType: z, eventType: k.type, eventTarget: X, curEventTarget: J, scope: y }, Ye = Vn(_e);
              ue.push([_e.pointer, _e.eventTarget, _e.curEventTarget, Ye]);
            }
          } else {
            var Qe = !1;
            if (!G.supportsPointerEvent && /mouse/.test(k.type)) {
              for (var Ze = 0; Ze < D.length && !Qe; Ze++) Qe = D[Ze].pointerType !== "mouse" && D[Ze].pointerIsDown;
              Qe = Qe || y.now() - y.prevTouchTime < 500 || k.timeStamp === 0;
            }
            if (!Qe) {
              var lt = { pointer: k, pointerId: Ce(k), pointerType: z, eventType: k.type, curEventTarget: J, eventTarget: X, scope: y }, st = Vn(lt);
              ue.push([lt.pointer, lt.eventTarget, lt.curEventTarget, st]);
            }
          }
          for (var xt = 0; xt < ue.length; xt++) {
            var Rt = ue[xt], Gt = Rt[0], _t = Rt[1], jt = Rt[2];
            Rt[3][b](Gt, k, _t, jt);
          }
        };
      }
      function Vn(b) {
        var y = b.pointerType, k = b.scope, D = { interaction: Po.search(b), searchDetails: b };
        return k.fire("interactions:find", D), D.interaction || k.interactions.new({ pointerType: y });
      }
      function Fi(b, y) {
        var k = b.doc, D = b.scope, z = b.options, V = D.interactions.docEvents, X = D.events, J = X[y];
        for (var ue in D.browser.isIOS && !z.events && (z.events = { passive: !1 }), X.delegatedEvents) J(k, ue, X.delegateListener), J(k, ue, X.delegateUseCapture, !0);
        for (var we = z && z.events, de = 0; de < V.length; de++) {
          var Oe = V[de];
          J(k, Oe.type, Oe.listener, we);
        }
      }
      var Us = { id: "core/interactions", install: function(b) {
        for (var y = {}, k = 0; k < ho.length; k++) {
          var D = ho[k];
          y[D] = mo(D, b);
        }
        var z, V = G.pEventTypes;
        function X() {
          for (var J = 0, ue = b.interactions.list; J < ue.length; J++) {
            var we = ue[J];
            if (we.pointerIsDown && we.pointerType === "touch" && !we._interacting) for (var de = function() {
              var Ye = _e[Oe];
              b.documents.some((function(Qe) {
                return j(Qe.doc, Ye.downTarget);
              })) || we.removePointer(Ye.pointer, Ye.event);
            }, Oe = 0, _e = we.pointers; Oe < _e.length; Oe++) de();
          }
        }
        (z = F.PointerEvent ? [{ type: V.down, listener: X }, { type: V.down, listener: y.pointerDown }, { type: V.move, listener: y.pointerMove }, { type: V.up, listener: y.pointerUp }, { type: V.cancel, listener: y.pointerUp }] : [{ type: "mousedown", listener: y.pointerDown }, { type: "mousemove", listener: y.pointerMove }, { type: "mouseup", listener: y.pointerUp }, { type: "touchstart", listener: X }, { type: "touchstart", listener: y.pointerDown }, { type: "touchmove", listener: y.pointerMove }, { type: "touchend", listener: y.pointerUp }, { type: "touchcancel", listener: y.pointerUp }]).push({ type: "blur", listener: function(J) {
          for (var ue = 0, we = b.interactions.list; ue < we.length; ue++)
            we[ue].documentBlur(J);
        } }), b.prevTouchTime = 0, b.Interaction = (function(J) {
          u(we, J);
          var ue = p(we);
          function we() {
            return i(this, we), ue.apply(this, arguments);
          }
          return l(we, [{ key: "pointerMoveTolerance", get: function() {
            return b.interactions.pointerMoveTolerance;
          }, set: function(de) {
            b.interactions.pointerMoveTolerance = de;
          } }, { key: "_now", value: function() {
            return b.now();
          } }]), we;
        })(Ys), b.interactions = { list: [], new: function(J) {
          J.scopeFire = function(we, de) {
            return b.fire(we, de);
          };
          var ue = new b.Interaction(J);
          return b.interactions.list.push(ue), ue;
        }, listeners: y, docEvents: z, pointerMoveTolerance: 1 }, b.usePlugin(el);
      }, listeners: { "scope:add-document": function(b) {
        return Fi(b, "add");
      }, "scope:remove-document": function(b) {
        return Fi(b, "remove");
      }, "interactable:unset": function(b, y) {
        for (var k = b.interactable, D = y.interactions.list.length - 1; D >= 0; D--) {
          var z = y.interactions.list[D];
          z.interactable === k && (z.stop(), y.fire("interactions:destroy", { interaction: z }), z.destroy(), y.interactions.list.length > 2 && y.interactions.list.splice(D, 1));
        }
      } }, onDocSignal: Fi, doOnInteractions: mo, methodNames: ho }, pg = Us, Wo = (function(b) {
        return b[b.On = 0] = "On", b[b.Off = 1] = "Off", b;
      })(Wo || {}), Lr = (function() {
        function b(y, k, D, z) {
          i(this, b), this.target = void 0, this.options = void 0, this._actions = void 0, this.events = new ga(), this._context = void 0, this._win = void 0, this._doc = void 0, this._scopeEvents = void 0, this._actions = k.actions, this.target = y, this._context = k.context || D, this._win = P(ve(y) ? this._context : y), this._doc = this._win.document, this._scopeEvents = z, this.set(k);
        }
        return l(b, [{ key: "_defaults", get: function() {
          return { base: {}, perAction: {}, actions: {} };
        } }, { key: "setOnEvents", value: function(y, k) {
          return w.func(k.onstart) && this.on("".concat(y, "start"), k.onstart), w.func(k.onmove) && this.on("".concat(y, "move"), k.onmove), w.func(k.onend) && this.on("".concat(y, "end"), k.onend), w.func(k.oninertiastart) && this.on("".concat(y, "inertiastart"), k.oninertiastart), this;
        } }, { key: "updatePerActionListeners", value: function(y, k, D) {
          var z, V = this, X = (z = this._actions.map[y]) == null ? void 0 : z.filterEventType, J = function(ue) {
            return (X == null || X(ue)) && tl(ue, V._actions);
          };
          (w.array(k) || w.object(k)) && this._onOff(Wo.Off, y, k, void 0, J), (w.array(D) || w.object(D)) && this._onOff(Wo.On, y, D, void 0, J);
        } }, { key: "setPerAction", value: function(y, k) {
          var D = this._defaults;
          for (var z in k) {
            var V = z, X = this.options[y], J = k[V];
            V === "listeners" && this.updatePerActionListeners(y, X.listeners, J), w.array(J) ? X[V] = ft(J) : w.plainObject(J) ? (X[V] = ce(X[V] || {}, ro(J)), w.object(D.perAction[V]) && "enabled" in D.perAction[V] && (X[V].enabled = J.enabled !== !1)) : w.bool(J) && w.object(D.perAction[V]) ? X[V].enabled = J : X[V] = J;
          }
        } }, { key: "getRect", value: function(y) {
          return y = y || (w.element(this.target) ? this.target : null), w.string(this.target) && (y = y || this._context.querySelector(this.target)), re(y);
        } }, { key: "rectChecker", value: function(y) {
          var k = this;
          return w.func(y) ? (this.getRect = function(D) {
            var z = ce({}, y.apply(k, D));
            return "width" in z || (z.width = z.right - z.left, z.height = z.bottom - z.top), z;
          }, this) : y === null ? (delete this.getRect, this) : this.getRect;
        } }, { key: "_backCompatOption", value: function(y, k) {
          if (ve(k) || w.object(k)) {
            for (var D in this.options[y] = k, this._actions.map) this.options[D][y] = k;
            return this;
          }
          return this.options[y];
        } }, { key: "origin", value: function(y) {
          return this._backCompatOption("origin", y);
        } }, { key: "deltaSource", value: function(y) {
          return y === "page" || y === "client" ? (this.options.deltaSource = y, this) : this.options.deltaSource;
        } }, { key: "getAllElements", value: function() {
          var y = this.target;
          return w.string(y) ? Array.from(this._context.querySelectorAll(y)) : w.func(y) && y.getAllElements ? y.getAllElements() : w.element(y) ? [y] : [];
        } }, { key: "context", value: function() {
          return this._context;
        } }, { key: "inContext", value: function(y) {
          return this._context === y.ownerDocument || j(this._context, y);
        } }, { key: "testIgnoreAllow", value: function(y, k, D) {
          return !this.testIgnore(y.ignoreFrom, k, D) && this.testAllow(y.allowFrom, k, D);
        } }, { key: "testAllow", value: function(y, k, D) {
          return !y || !!w.element(D) && (w.string(y) ? ae(D, y, k) : !!w.element(y) && j(y, D));
        } }, { key: "testIgnore", value: function(y, k, D) {
          return !(!y || !w.element(D)) && (w.string(y) ? ae(D, y, k) : !!w.element(y) && j(y, D));
        } }, { key: "fire", value: function(y) {
          return this.events.fire(y), this;
        } }, { key: "_onOff", value: function(y, k, D, z, V) {
          w.object(k) && !w.array(k) && (z = D, D = null);
          var X = Ne(k, D, V);
          for (var J in X) {
            J === "wheel" && (J = G.wheelEvent);
            for (var ue = 0, we = X[J]; ue < we.length; ue++) {
              var de = we[ue];
              tl(J, this._actions) ? this.events[y === Wo.On ? "on" : "off"](J, de) : w.string(this.target) ? this._scopeEvents[y === Wo.On ? "addDelegate" : "removeDelegate"](this.target, this._context, J, de, z) : this._scopeEvents[y === Wo.On ? "add" : "remove"](this.target, J, de, z);
            }
          }
          return this;
        } }, { key: "on", value: function(y, k, D) {
          return this._onOff(Wo.On, y, k, D);
        } }, { key: "off", value: function(y, k, D) {
          return this._onOff(Wo.Off, y, k, D);
        } }, { key: "set", value: function(y) {
          var k = this._defaults;
          for (var D in w.object(y) || (y = {}), this.options = ro(k.base), this._actions.methodDict) {
            var z = D, V = this._actions.methodDict[z];
            this.options[z] = {}, this.setPerAction(z, ce(ce({}, k.perAction), k.actions[z])), this[V](y[z]);
          }
          for (var X in y) X !== "getRect" ? w.func(this[X]) && this[X](y[X]) : this.rectChecker(y.getRect);
          return this;
        } }, { key: "unset", value: function() {
          if (w.string(this.target)) for (var y in this._scopeEvents.delegatedEvents) for (var k = this._scopeEvents.delegatedEvents[y], D = k.length - 1; D >= 0; D--) {
            var z = k[D], V = z.selector, X = z.context, J = z.listeners;
            V === this.target && X === this._context && k.splice(D, 1);
            for (var ue = J.length - 1; ue >= 0; ue--) this._scopeEvents.removeDelegate(this.target, this._context, y, J[ue][0], J[ue][1]);
          }
          else this._scopeEvents.remove(this.target, "all");
        } }]), b;
      })(), hg = (function() {
        function b(y) {
          var k = this;
          i(this, b), this.list = [], this.selectorMap = {}, this.scope = void 0, this.scope = y, y.addListeners({ "interactable:unset": function(D) {
            var z = D.interactable, V = z.target, X = w.string(V) ? k.selectorMap[V] : V[k.scope.id], J = wt(X, (function(ue) {
              return ue === z;
            }));
            X.splice(J, 1);
          } });
        }
        return l(b, [{ key: "new", value: function(y, k) {
          k = ce(k || {}, { actions: this.scope.actions });
          var D = new this.scope.Interactable(y, k, this.scope.document, this.scope.events);
          return this.scope.addDocument(D._doc), this.list.push(D), w.string(y) ? (this.selectorMap[y] || (this.selectorMap[y] = []), this.selectorMap[y].push(D)) : (D.target[this.scope.id] || Object.defineProperty(y, this.scope.id, { value: [], configurable: !0 }), y[this.scope.id].push(D)), this.scope.fire("interactable:new", { target: y, options: k, interactable: D, win: this.scope._win }), D;
        } }, { key: "getExisting", value: function(y, k) {
          var D = k && k.context || this.scope.document, z = w.string(y), V = z ? this.selectorMap[y] : y[this.scope.id];
          if (V) return Ct(V, (function(X) {
            return X._context === D && (z || X.inContext(y));
          }));
        } }, { key: "forEachMatch", value: function(y, k) {
          for (var D = 0, z = this.list; D < z.length; D++) {
            var V = z[D], X = void 0;
            if ((w.string(V.target) ? w.element(y) && K(y, V.target) : y === V.target) && V.inContext(y) && (X = k(V)), X !== void 0) return X;
          }
        } }]), b;
      })(), gg = (function() {
        function b() {
          var y = this;
          i(this, b), this.id = "__interact_scope_".concat(Math.floor(100 * Math.random())), this.isInitialized = !1, this.listenerMaps = [], this.browser = G, this.defaults = ro(rl), this.Eventable = ga, this.actions = { map: {}, phases: { start: !0, move: !0, end: !0 }, methodDict: {}, phaselessTypes: {} }, this.interactStatic = (function(D) {
            var z = function V(X, J) {
              var ue = D.interactables.getExisting(X, J);
              return ue || ((ue = D.interactables.new(X, J)).events.global = V.globalEvents), ue;
            };
            return z.getPointerAverage = We, z.getTouchBBox = tt, z.getTouchDistance = Ee, z.getTouchAngle = Re, z.getElementRect = re, z.getElementClientRect = ie, z.matchesSelector = K, z.closest = Z, z.globalEvents = {}, z.version = "1.10.27", z.scope = D, z.use = function(V, X) {
              return this.scope.usePlugin(V, X), this;
            }, z.isSet = function(V, X) {
              return !!this.scope.interactables.get(V, X && X.context);
            }, z.on = cn((function(V, X, J) {
              if (w.string(V) && V.search(" ") !== -1 && (V = V.trim().split(/ +/)), w.array(V)) {
                for (var ue = 0, we = V; ue < we.length; ue++) {
                  var de = we[ue];
                  this.on(de, X, J);
                }
                return this;
              }
              if (w.object(V)) {
                for (var Oe in V) this.on(Oe, V[Oe], X);
                return this;
              }
              return tl(V, this.scope.actions) ? this.globalEvents[V] ? this.globalEvents[V].push(X) : this.globalEvents[V] = [X] : this.scope.events.add(this.scope.document, V, X, { options: J }), this;
            }), "The interact.on() method is being deprecated"), z.off = cn((function(V, X, J) {
              if (w.string(V) && V.search(" ") !== -1 && (V = V.trim().split(/ +/)), w.array(V)) {
                for (var ue = 0, we = V; ue < we.length; ue++) {
                  var de = we[ue];
                  this.off(de, X, J);
                }
                return this;
              }
              if (w.object(V)) {
                for (var Oe in V) this.off(Oe, V[Oe], X);
                return this;
              }
              var _e;
              return tl(V, this.scope.actions) ? V in this.globalEvents && (_e = this.globalEvents[V].indexOf(X)) !== -1 && this.globalEvents[V].splice(_e, 1) : this.scope.events.remove(this.scope.document, V, X, J), this;
            }), "The interact.off() method is being deprecated"), z.debug = function() {
              return this.scope;
            }, z.supportsTouch = function() {
              return G.supportsTouch;
            }, z.supportsPointerEvent = function() {
              return G.supportsPointerEvent;
            }, z.stop = function() {
              for (var V = 0, X = this.scope.interactions.list; V < X.length; V++) X[V].stop();
              return this;
            }, z.pointerMoveTolerance = function(V) {
              return w.number(V) ? (this.scope.interactions.pointerMoveTolerance = V, this) : this.scope.interactions.pointerMoveTolerance;
            }, z.addDocument = function(V, X) {
              this.scope.addDocument(V, X);
            }, z.removeDocument = function(V) {
              this.scope.removeDocument(V);
            }, z;
          })(this), this.InteractEvent = Ri, this.Interactable = void 0, this.interactables = new hg(this), this._win = void 0, this.document = void 0, this.window = void 0, this.documents = [], this._plugins = { list: [], map: {} }, this.onWindowUnload = function(D) {
            return y.removeDocument(D.target);
          };
          var k = this;
          this.Interactable = (function(D) {
            u(V, D);
            var z = p(V);
            function V() {
              return i(this, V), z.apply(this, arguments);
            }
            return l(V, [{ key: "_defaults", get: function() {
              return k.defaults;
            } }, { key: "set", value: function(X) {
              return v(c(V.prototype), "set", this).call(this, X), k.fire("interactable:set", { options: X, interactable: this }), this;
            } }, { key: "unset", value: function() {
              v(c(V.prototype), "unset", this).call(this);
              var X = k.interactables.list.indexOf(this);
              X < 0 || (k.interactables.list.splice(X, 1), k.fire("interactable:unset", { interactable: this }));
            } }]), V;
          })(Lr);
        }
        return l(b, [{ key: "addListeners", value: function(y, k) {
          this.listenerMaps.push({ id: k, map: y });
        } }, { key: "fire", value: function(y, k) {
          for (var D = 0, z = this.listenerMaps; D < z.length; D++) {
            var V = z[D].map[y];
            if (V && V(k, this, y) === !1) return !1;
          }
        } }, { key: "init", value: function(y) {
          return this.isInitialized ? this : (function(k, D) {
            return k.isInitialized = !0, w.window(D) && C(D), F.init(D), G.init(D), Sn.init(D), k.window = D, k.document = D.document, k.usePlugin(pg), k.usePlugin(qn), k;
          })(this, y);
        } }, { key: "pluginIsInstalled", value: function(y) {
          var k = y.id;
          return k ? !!this._plugins.map[k] : this._plugins.list.indexOf(y) !== -1;
        } }, { key: "usePlugin", value: function(y, k) {
          if (!this.isInitialized) return this;
          if (this.pluginIsInstalled(y)) return this;
          if (y.id && (this._plugins.map[y.id] = y), this._plugins.list.push(y), y.install && y.install(this, k), y.listeners && y.before) {
            for (var D = 0, z = this.listenerMaps.length, V = y.before.reduce((function(J, ue) {
              return J[ue] = !0, J[Qd(ue)] = !0, J;
            }), {}); D < z; D++) {
              var X = this.listenerMaps[D].id;
              if (X && (V[X] || V[Qd(X)])) break;
            }
            this.listenerMaps.splice(D, 0, { id: y.id, map: y.listeners });
          } else y.listeners && this.listenerMaps.push({ id: y.id, map: y.listeners });
          return this;
        } }, { key: "addDocument", value: function(y, k) {
          if (this.getDocIndex(y) !== -1) return !1;
          var D = P(y);
          k = k ? ce({}, k) : {}, this.documents.push({ doc: y, options: k }), this.events.documents.push(y), y !== this.document && this.events.add(D, "unload", this.onWindowUnload), this.fire("scope:add-document", { doc: y, window: D, scope: this, options: k });
        } }, { key: "removeDocument", value: function(y) {
          var k = this.getDocIndex(y), D = P(y), z = this.documents[k].options;
          this.events.remove(D, "unload", this.onWindowUnload), this.documents.splice(k, 1), this.events.documents.splice(k, 1), this.fire("scope:remove-document", { doc: y, window: D, scope: this, options: z });
        } }, { key: "getDocIndex", value: function(y) {
          for (var k = 0; k < this.documents.length; k++) if (this.documents[k].doc === y) return k;
          return -1;
        } }, { key: "getDocOptions", value: function(y) {
          var k = this.getDocIndex(y);
          return k === -1 ? null : this.documents[k].options;
        } }, { key: "now", value: function() {
          return (this.window.Date || Date).now();
        } }]), b;
      })();
      function Qd(b) {
        return b && b.replace(/\/.*$/, "");
      }
      var Zd = new gg(), eo = Zd.interactStatic, Bi = typeof globalThis < "u" ? globalThis : window;
      Zd.init(Bi);
      var va = Object.freeze({ __proto__: null, edgeTarget: function() {
      }, elements: function() {
      }, grid: function(b) {
        var y = [["x", "y"], ["left", "top"], ["right", "bottom"], ["width", "height"]].filter((function(D) {
          var z = D[0], V = D[1];
          return z in b || V in b;
        })), k = function(D, z) {
          for (var V = b.range, X = b.limits, J = X === void 0 ? { left: -1 / 0, right: 1 / 0, top: -1 / 0, bottom: 1 / 0 } : X, ue = b.offset, we = ue === void 0 ? { x: 0, y: 0 } : ue, de = { range: V, grid: b, x: null, y: null }, Oe = 0; Oe < y.length; Oe++) {
            var _e = y[Oe], Ye = _e[0], Qe = _e[1], Ze = Math.round((D - we.x) / b[Ye]), lt = Math.round((z - we.y) / b[Qe]);
            de[Ye] = Math.max(J.left, Math.min(J.right, Ze * b[Ye] + we.x)), de[Qe] = Math.max(J.top, Math.min(J.bottom, lt * b[Qe] + we.y));
          }
          return de;
        };
        return k.grid = b, k.coordFields = y, k;
      } }), cl = { id: "snappers", install: function(b) {
        var y = b.interactStatic;
        y.snappers = ce(y.snappers || {}, va), y.createSnapGrid = y.snappers.grid;
      } }, vg = cl, Hr = { start: function(b) {
        var y = b.state, k = b.rect, D = b.edges, z = b.pageCoords, V = y.options, X = V.ratio, J = V.enabled, ue = y.options, we = ue.equalDelta, de = ue.modifiers;
        X === "preserve" && (X = k.width / k.height), y.startCoords = ce({}, z), y.startRect = ce({}, k), y.ratio = X, y.equalDelta = we;
        var Oe = y.linkedEdges = { top: D.top || D.left && !D.bottom, left: D.left || D.top && !D.right, bottom: D.bottom || D.right && !D.top, right: D.right || D.bottom && !D.left };
        if (y.xIsPrimaryAxis = !(!D.left && !D.right), y.equalDelta) {
          var _e = (Oe.left ? 1 : -1) * (Oe.top ? 1 : -1);
          y.edgeSign = { x: _e, y: _e };
        } else y.edgeSign = { x: Oe.left ? -1 : 1, y: Oe.top ? -1 : 1 };
        if (J !== !1 && ce(D, Oe), de != null && de.length) {
          var Ye = new nr(b.interaction);
          Ye.copyFrom(b.interaction.modification), Ye.prepareStates(de), y.subModification = Ye, Ye.startAll(o({}, b));
        }
      }, set: function(b) {
        var y = b.state, k = b.rect, D = b.coords, z = y.linkedEdges, V = ce({}, D), X = y.equalDelta ? mg : Jd;
        if (ce(b.edges, z), X(y, y.xIsPrimaryAxis, D, k), !y.subModification) return null;
        var J = ce({}, k);
        Ke(z, J, { x: D.x - V.x, y: D.y - V.y });
        var ue = y.subModification.setAll(o(o({}, b), {}, { rect: J, edges: z, pageCoords: D, prevCoords: D, prevRect: J })), we = ue.delta;
        return ue.changed && (X(y, Math.abs(we.x) > Math.abs(we.y), ue.coords, ue.rect), ce(D, ue.coords)), ue.eventProps;
      }, defaults: { ratio: "preserve", equalDelta: !1, modifiers: [], enabled: !1 } };
      function mg(b, y, k) {
        var D = b.startCoords, z = b.edgeSign;
        y ? k.y = D.y + (k.x - D.x) * z.y : k.x = D.x + (k.y - D.y) * z.x;
      }
      function Jd(b, y, k, D) {
        var z = b.startRect, V = b.startCoords, X = b.ratio, J = b.edgeSign;
        if (y) {
          var ue = D.width / X;
          k.y = V.y + (ue - z.height) * J.y;
        } else {
          var we = D.height * X;
          k.x = V.x + (we - z.width) * J.x;
        }
      }
      var ef = or(Hr, "aspectRatio"), dl = function() {
      };
      dl._defaults = {};
      var Li = dl;
      function ma(b, y, k) {
        return w.func(b) ? ge(b, y.interactable, y.element, [k.x, k.y, y]) : ge(b, y.interactable, y.element);
      }
      var fl = { start: function(b) {
        var y = b.rect, k = b.startOffset, D = b.state, z = b.interaction, V = b.pageCoords, X = D.options, J = X.elementRect, ue = ce({ left: 0, top: 0, right: 0, bottom: 0 }, X.offset || {});
        if (y && J) {
          var we = ma(X.restriction, z, V);
          if (we) {
            var de = we.right - we.left - y.width, Oe = we.bottom - we.top - y.height;
            de < 0 && (ue.left += de, ue.right += de), Oe < 0 && (ue.top += Oe, ue.bottom += Oe);
          }
          ue.left += k.left - y.width * J.left, ue.top += k.top - y.height * J.top, ue.right += k.right - y.width * (1 - J.right), ue.bottom += k.bottom - y.height * (1 - J.bottom);
        }
        D.offset = ue;
      }, set: function(b) {
        var y = b.coords, k = b.interaction, D = b.state, z = D.options, V = D.offset, X = ma(z.restriction, k, y);
        if (X) {
          var J = (function(ue) {
            return !ue || "left" in ue && "top" in ue || ((ue = ce({}, ue)).left = ue.x || 0, ue.top = ue.y || 0, ue.right = ue.right || ue.left + ue.width, ue.bottom = ue.bottom || ue.top + ue.height), ue;
          })(X);
          y.x = Math.max(Math.min(J.right - V.right, y.x), J.left + V.left), y.y = Math.max(Math.min(J.bottom - V.bottom, y.y), J.top + V.top);
        }
      }, defaults: { restriction: null, elementRect: null, offset: null, endOnly: !1, enabled: !1 } }, bg = or(fl, "restrict"), Hi = { top: 1 / 0, left: 1 / 0, bottom: -1 / 0, right: -1 / 0 }, ui = { top: -1 / 0, left: -1 / 0, bottom: 1 / 0, right: 1 / 0 };
      function pl(b, y) {
        for (var k = 0, D = ["top", "left", "bottom", "right"]; k < D.length; k++) {
          var z = D[k];
          z in b || (b[z] = y[z]);
        }
        return b;
      }
      var hl = { noInner: Hi, noOuter: ui, start: function(b) {
        var y, k = b.interaction, D = b.startOffset, z = b.state, V = z.options;
        V && (y = Te(ma(V.offset, k, k.coords.start.page))), y = y || { x: 0, y: 0 }, z.offset = { top: y.y + D.top, left: y.x + D.left, bottom: y.y - D.bottom, right: y.x - D.right };
      }, set: function(b) {
        var y = b.coords, k = b.edges, D = b.interaction, z = b.state, V = z.offset, X = z.options;
        if (k) {
          var J = ce({}, y), ue = ma(X.inner, D, J) || {}, we = ma(X.outer, D, J) || {};
          pl(ue, Hi), pl(we, ui), k.top ? y.y = Math.min(Math.max(we.top + V.top, J.y), ue.top + V.top) : k.bottom && (y.y = Math.max(Math.min(we.bottom + V.bottom, J.y), ue.bottom + V.bottom)), k.left ? y.x = Math.min(Math.max(we.left + V.left, J.x), ue.left + V.left) : k.right && (y.x = Math.max(Math.min(we.right + V.right, J.x), ue.right + V.right));
        }
      }, defaults: { inner: null, outer: null, offset: null, endOnly: !1, enabled: !1 } }, xc = or(hl, "restrictEdges"), wc = ce({ get elementRect() {
        return { top: 0, left: 0, bottom: 1, right: 1 };
      }, set elementRect(b) {
      } }, fl.defaults), Xs = or({ start: fl.start, set: fl.set, defaults: wc }, "restrictRect"), tf = { width: -1 / 0, height: -1 / 0 }, nf = { width: 1 / 0, height: 1 / 0 }, of = or({ start: function(b) {
        return hl.start(b);
      }, set: function(b) {
        var y = b.interaction, k = b.state, D = b.rect, z = b.edges, V = k.options;
        if (z) {
          var X = ze(ma(V.min, y, b.coords)) || tf, J = ze(ma(V.max, y, b.coords)) || nf;
          k.options = { endOnly: V.endOnly, inner: ce({}, hl.noInner), outer: ce({}, hl.noOuter) }, z.top ? (k.options.inner.top = D.bottom - X.height, k.options.outer.top = D.bottom - J.height) : z.bottom && (k.options.inner.bottom = D.top + X.height, k.options.outer.bottom = D.top + J.height), z.left ? (k.options.inner.left = D.right - X.width, k.options.outer.left = D.right - J.width) : z.right && (k.options.inner.right = D.left + X.width, k.options.outer.right = D.left + J.width), hl.set(b), k.options = V;
        }
      }, defaults: { min: null, max: null, endOnly: !1, enabled: !1 } }, "restrictSize"), Qs = { start: function(b) {
        var y, k = b.interaction, D = b.interactable, z = b.element, V = b.rect, X = b.state, J = b.startOffset, ue = X.options, we = ue.offsetWithOrigin ? (function(_e) {
          var Ye = _e.interaction.element, Qe = Te(ge(_e.state.options.origin, null, null, [Ye])), Ze = Qe || He(_e.interactable, Ye, _e.interaction.prepared.name);
          return Ze;
        })(b) : { x: 0, y: 0 };
        if (ue.offset === "startCoords") y = { x: k.coords.start.page.x, y: k.coords.start.page.y };
        else {
          var de = ge(ue.offset, D, z, [k]);
          (y = Te(de) || { x: 0, y: 0 }).x += we.x, y.y += we.y;
        }
        var Oe = ue.relativePoints;
        X.offsets = V && Oe && Oe.length ? Oe.map((function(_e, Ye) {
          return { index: Ye, relativePoint: _e, x: J.left - V.width * _e.x + y.x, y: J.top - V.height * _e.y + y.y };
        })) : [{ index: 0, relativePoint: null, x: y.x, y: y.y }];
      }, set: function(b) {
        var y = b.interaction, k = b.coords, D = b.state, z = D.options, V = D.offsets, X = He(y.interactable, y.element, y.prepared.name), J = ce({}, k), ue = [];
        z.offsetWithOrigin || (J.x -= X.x, J.y -= X.y);
        for (var we = 0, de = V; we < de.length; we++) for (var Oe = de[we], _e = J.x - Oe.x, Ye = J.y - Oe.y, Qe = 0, Ze = z.targets.length; Qe < Ze; Qe++) {
          var lt = z.targets[Qe], st = void 0;
          (st = w.func(lt) ? lt(_e, Ye, y._proxy, Oe, Qe) : lt) && ue.push({ x: (w.number(st.x) ? st.x : _e) + Oe.x, y: (w.number(st.y) ? st.y : Ye) + Oe.y, range: w.number(st.range) ? st.range : z.range, source: lt, index: Qe, offset: Oe });
        }
        for (var xt = { target: null, inRange: !1, distance: 0, range: 0, delta: { x: 0, y: 0 } }, Rt = 0; Rt < ue.length; Rt++) {
          var Gt = ue[Rt], _t = Gt.range, jt = Gt.x - J.x, Nn = Gt.y - J.y, xn = De(jt, Nn), Bn = xn <= _t;
          _t === 1 / 0 && xt.inRange && xt.range !== 1 / 0 && (Bn = !1), xt.target && !(Bn ? xt.inRange && _t !== 1 / 0 ? xn / _t < xt.distance / xt.range : _t === 1 / 0 && xt.range !== 1 / 0 || xn < xt.distance : !xt.inRange && xn < xt.distance) || (xt.target = Gt, xt.distance = xn, xt.range = _t, xt.inRange = Bn, xt.delta.x = jt, xt.delta.y = Nn);
        }
        return xt.inRange && (k.x = xt.target.x, k.y = xt.target.y), D.closest = xt, xt;
      }, defaults: { range: 1 / 0, targets: null, offset: null, offsetWithOrigin: !0, origin: null, relativePoints: null, endOnly: !1, enabled: !1 } }, rf = or(Qs, "snap"), Yl = { start: function(b) {
        var y = b.state, k = b.edges, D = y.options;
        if (!k) return null;
        b.state = { options: { targets: null, relativePoints: [{ x: k.left ? 0 : 1, y: k.top ? 0 : 1 }], offset: D.offset || "self", origin: { x: 0, y: 0 }, range: D.range } }, y.targetFields = y.targetFields || [["width", "height"], ["x", "y"]], Qs.start(b), y.offsets = b.state.offsets, b.state = y;
      }, set: function(b) {
        var y = b.interaction, k = b.state, D = b.coords, z = k.options, V = k.offsets, X = { x: D.x - V[0].x, y: D.y - V[0].y };
        k.options = ce({}, z), k.options.targets = [];
        for (var J = 0, ue = z.targets || []; J < ue.length; J++) {
          var we = ue[J], de = void 0;
          if (de = w.func(we) ? we(X.x, X.y, y) : we) {
            for (var Oe = 0, _e = k.targetFields; Oe < _e.length; Oe++) {
              var Ye = _e[Oe], Qe = Ye[0], Ze = Ye[1];
              if (Qe in de || Ze in de) {
                de.x = de[Qe], de.y = de[Ze];
                break;
              }
            }
            k.options.targets.push(de);
          }
        }
        var lt = Qs.set(b);
        return k.options = z, lt;
      }, defaults: { range: 1 / 0, targets: null, offset: null, endOnly: !1, enabled: !1 } }, yg = or(Yl, "snapSize"), Zs = { aspectRatio: ef, restrictEdges: xc, restrict: bg, restrictRect: Xs, restrictSize: of, snapEdges: or({ start: function(b) {
        var y = b.edges;
        return y ? (b.state.targetFields = b.state.targetFields || [[y.left ? "left" : "right", y.top ? "top" : "bottom"]], Yl.start(b)) : null;
      }, set: Yl.set, defaults: ce(ro(Yl.defaults), { targets: void 0, range: void 0, offset: { x: 0, y: 0 } }) }, "snapEdges"), snap: rf, snapSize: yg, spring: Li, avoid: Li, transform: Li, rubberband: Li }, af = { id: "modifiers", install: function(b) {
        var y = b.interactStatic;
        for (var k in b.usePlugin(ol), b.usePlugin(vg), y.modifiers = Zs, Zs) {
          var D = Zs[k], z = D._defaults, V = D._methods;
          z._methods = V, b.defaults.perAction[k] = z;
        }
      } }, gl = af, Gl = (function(b) {
        u(k, b);
        var y = p(k);
        function k(D, z, V, X, J, ue) {
          var we;
          if (i(this, k), Ve(f(we = y.call(this, J)), V), V !== z && Ve(f(we), z), we.timeStamp = ue, we.originalEvent = V, we.type = D, we.pointerId = Ce(z), we.pointerType = Be(z), we.target = X, we.currentTarget = null, D === "tap") {
            var de = J.getPointerIndex(z);
            we.dt = we.timeStamp - J.pointers[de].downTime;
            var Oe = we.timeStamp - J.tapTime;
            we.double = !!J.prevTap && J.prevTap.type !== "doubletap" && J.prevTap.target === we.target && Oe < 500;
          } else D === "doubletap" && (we.dt = z.timeStamp - J.tapTime, we.double = !0);
          return we;
        }
        return l(k, [{ key: "_subtractOrigin", value: function(D) {
          var z = D.x, V = D.y;
          return this.pageX -= z, this.pageY -= V, this.clientX -= z, this.clientY -= V, this;
        } }, { key: "_addOrigin", value: function(D) {
          var z = D.x, V = D.y;
          return this.pageX += z, this.pageY += V, this.clientX += z, this.clientY += V, this;
        } }, { key: "preventDefault", value: function() {
          this.originalEvent.preventDefault();
        } }]), k;
      })(pt), io = { id: "pointer-events/base", before: ["inertia", "modifiers", "auto-start", "actions"], install: function(b) {
        b.pointerEvents = io, b.defaults.actions.pointerEvents = io.defaults, ce(b.actions.phaselessTypes, io.types);
      }, listeners: { "interactions:new": function(b) {
        var y = b.interaction;
        y.prevTap = null, y.tapTime = 0;
      }, "interactions:update-pointer": function(b) {
        var y = b.down, k = b.pointerInfo;
        !y && k.hold || (k.hold = { duration: 1 / 0, timeout: null });
      }, "interactions:move": function(b, y) {
        var k = b.interaction, D = b.pointer, z = b.event, V = b.eventTarget;
        b.duplicate || k.pointerIsDown && !k.pointerWasMoved || (k.pointerIsDown && Js(b), ci({ interaction: k, pointer: D, event: z, eventTarget: V, type: "move" }, y));
      }, "interactions:down": function(b, y) {
        (function(k, D) {
          for (var z = k.interaction, V = k.pointer, X = k.event, J = k.eventTarget, ue = k.pointerIndex, we = z.pointers[ue].hold, de = te(J), Oe = { interaction: z, pointer: V, event: X, eventTarget: J, type: "hold", targets: [], path: de, node: null }, _e = 0; _e < de.length; _e++) {
            var Ye = de[_e];
            Oe.node = Ye, D.fire("pointerEvents:collect-targets", Oe);
          }
          if (Oe.targets.length) {
            for (var Qe = 1 / 0, Ze = 0, lt = Oe.targets; Ze < lt.length; Ze++) {
              var st = lt[Ze].eventable.options.holdDuration;
              st < Qe && (Qe = st);
            }
            we.duration = Qe, we.timeout = setTimeout((function() {
              ci({ interaction: z, eventTarget: J, pointer: V, event: X, type: "hold" }, D);
            }), Qe);
          }
        })(b, y), ci(b, y);
      }, "interactions:up": function(b, y) {
        Js(b), ci(b, y), (function(k, D) {
          var z = k.interaction, V = k.pointer, X = k.event, J = k.eventTarget;
          z.pointerWasMoved || ci({ interaction: z, eventTarget: J, pointer: V, event: X, type: "tap" }, D);
        })(b, y);
      }, "interactions:cancel": function(b, y) {
        Js(b), ci(b, y);
      } }, PointerEvent: Gl, fire: ci, collectEventTargets: uo, 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 ci(b, y) {
        var k = b.interaction, D = b.pointer, z = b.event, V = b.eventTarget, X = b.type, J = b.targets, ue = J === void 0 ? uo(b, y) : J, we = new Gl(X, D, z, V, k, y.now());
        y.fire("pointerEvents:new", { pointerEvent: we });
        for (var de = { interaction: k, pointer: D, event: z, eventTarget: V, targets: ue, type: X, pointerEvent: we }, Oe = 0; Oe < ue.length; Oe++) {
          var _e = ue[Oe];
          for (var Ye in _e.props || {}) we[Ye] = _e.props[Ye];
          var Qe = He(_e.eventable, _e.node);
          if (we._subtractOrigin(Qe), we.eventable = _e.eventable, we.currentTarget = _e.node, _e.eventable.fire(we), we._addOrigin(Qe), we.immediatePropagationStopped || we.propagationStopped && Oe + 1 < ue.length && ue[Oe + 1].node !== we.currentTarget) break;
        }
        if (y.fire("pointerEvents:fired", de), X === "tap") {
          var Ze = we.double ? ci({ interaction: k, pointer: D, event: z, eventTarget: V, type: "doubletap" }, y) : we;
          k.prevTap = Ze, k.tapTime = Ze.timeStamp;
        }
        return we;
      }
      function uo(b, y) {
        var k = b.interaction, D = b.pointer, z = b.event, V = b.eventTarget, X = b.type, J = k.getPointerIndex(D), ue = k.pointers[J];
        if (X === "tap" && (k.pointerWasMoved || !ue || ue.downTarget !== V)) return [];
        for (var we = te(V), de = { interaction: k, pointer: D, event: z, eventTarget: V, type: X, path: we, targets: [], node: null }, Oe = 0; Oe < we.length; Oe++) {
          var _e = we[Oe];
          de.node = _e, y.fire("pointerEvents:collect-targets", de);
        }
        return X === "hold" && (de.targets = de.targets.filter((function(Ye) {
          var Qe, Ze;
          return Ye.eventable.options.holdDuration === ((Qe = k.pointers[J]) == null || (Ze = Qe.hold) == null ? void 0 : Ze.duration);
        }))), de.targets;
      }
      function Js(b) {
        var y = b.interaction, k = b.pointerIndex, D = y.pointers[k].hold;
        D && D.timeout && (clearTimeout(D.timeout), D.timeout = null);
      }
      var Sc = Object.freeze({ __proto__: null, default: io });
      function Ul(b) {
        var y = b.interaction;
        y.holdIntervalHandle && (clearInterval(y.holdIntervalHandle), y.holdIntervalHandle = null);
      }
      var xg = { id: "pointer-events/holdRepeat", install: function(b) {
        b.usePlugin(io);
        var y = b.pointerEvents;
        y.defaults.holdRepeatInterval = 0, y.types.holdrepeat = b.actions.phaselessTypes.holdrepeat = !0;
      }, listeners: ["move", "up", "cancel", "endall"].reduce((function(b, y) {
        return b["pointerEvents:".concat(y)] = Ul, b;
      }), { "pointerEvents:new": function(b) {
        var y = b.pointerEvent;
        y.type === "hold" && (y.count = (y.count || 0) + 1);
      }, "pointerEvents:fired": function(b, y) {
        var k = b.interaction, D = b.pointerEvent, z = b.eventTarget, V = b.targets;
        if (D.type === "hold" && V.length) {
          var X = V[0].eventable.options.holdRepeatInterval;
          X <= 0 || (k.holdIntervalHandle = setTimeout((function() {
            y.pointerEvents.fire({ interaction: k, eventTarget: z, type: "hold", pointer: D, event: D }, y);
          }), X));
        }
      } }) }, wg = xg, Cc = { id: "pointer-events/interactableTargets", install: function(b) {
        var y = b.Interactable;
        y.prototype.pointerEvents = function(D) {
          return ce(this.events.options, D), this;
        };
        var k = y.prototype._backCompatOption;
        y.prototype._backCompatOption = function(D, z) {
          var V = k.call(this, D, z);
          return V === this && (this.events.options[D] = z), V;
        };
      }, listeners: { "pointerEvents:collect-targets": function(b, y) {
        var k = b.targets, D = b.node, z = b.type, V = b.eventTarget;
        y.interactables.forEachMatch(D, (function(X) {
          var J = X.events, ue = J.options;
          J.types[z] && J.types[z].length && X.testIgnoreAllow(ue, D, V) && k.push({ node: D, eventable: J, props: { interactable: X } });
        }));
      }, "interactable:new": function(b) {
        var y = b.interactable;
        y.events.getRect = function(k) {
          return y.getRect(k);
        };
      }, "interactable:set": function(b, y) {
        var k = b.interactable, D = b.options;
        ce(k.events.options, y.pointerEvents.defaults), ce(k.events.options, D.pointerEvents || {});
      } } }, Y = Cc, ee = { id: "pointer-events", install: function(b) {
        b.usePlugin(Sc), b.usePlugin(wg), b.usePlugin(Y);
      } }, me = ee, ye = { id: "reflow", install: function(b) {
        var y = b.Interactable;
        b.actions.phases.reflow = !0, y.prototype.reflow = function(k) {
          return (function(D, z, V) {
            for (var X = D.getAllElements(), J = V.window.Promise, ue = J ? [] : null, we = function() {
              var Oe = X[de], _e = D.getRect(Oe);
              if (!_e) return 1;
              var Ye, Qe = Ct(V.interactions.list, (function(st) {
                return st.interacting() && st.interactable === D && st.element === Oe && st.prepared.name === z.name;
              }));
              if (Qe) Qe.move(), ue && (Ye = Qe._reflowPromise || new J((function(st) {
                Qe._reflowResolve = st;
              })));
              else {
                var Ze = ze(_e), lt = /* @__PURE__ */ (function(st) {
                  return { coords: st, 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: Ze.x, y: Ze.y }, client: { x: Ze.x, y: Ze.y }, timeStamp: V.now() });
                Ye = (function(st, xt, Rt, Gt, _t) {
                  var jt = st.interactions.new({ pointerType: "reflow" }), Nn = { interaction: jt, event: _t, pointer: _t, eventTarget: Rt, phase: "reflow" };
                  jt.interactable = xt, jt.element = Rt, jt.prevEvent = _t, jt.updatePointer(_t, _t, Rt, !0), je(jt.coords.delta), An(jt.prepared, Gt), jt._doPhase(Nn);
                  var xn = st.window, Bn = xn.Promise, Yn = Bn ? new Bn((function(co) {
                    jt._reflowResolve = co;
                  })) : void 0;
                  return jt._reflowPromise = Yn, jt.start(Gt, xt, Rt), jt._interacting ? (jt.move(Nn), jt.end(_t)) : (jt.stop(), jt._reflowResolve()), jt.removePointer(_t, _t), Yn;
                })(V, D, Oe, z, lt);
              }
              ue && ue.push(Ye);
            }, de = 0; de < X.length && !we(); de++) ;
            return ue && J.all(ue).then((function() {
              return D;
            }));
          })(this, k, b);
        };
      }, listeners: { "interactions:stop": function(b, y) {
        var k = b.interaction;
        k.pointerType === "reflow" && (k._reflowResolve && k._reflowResolve(), (function(D, z) {
          D.splice(D.indexOf(z), 1);
        })(y.interactions.list, k));
      } } }, ke = ye;
      if (eo.use(el), eo.use(vc), eo.use(me), eo.use(Xd), eo.use(gl), eo.use(Ja), eo.use(Qn), eo.use(Dn), eo.use(ke), eo.default = eo, r(e) === "object" && e) try {
        e.exports = eo;
      } catch {
      }
      return eo.default = eo, eo;
    }));
  })(jc, jc.exports)), jc.exports;
}
var _ee = /* @__PURE__ */ Tee();
const G$ = /* @__PURE__ */ xz(_ee), U$ = /* @__PURE__ */ be({
  __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, r = n, i = zt(X2), a = zt(Q2);
    if (!i)
      throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");
    const l = $e(null), s = $n({
      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, v = NaN, g = -1, m = -1, x = -1, S = -1, C = o.x, P = o.y, $ = o.w, I = o.h;
    const w = le(), T = $n({
      i: Kt(o, "i"),
      state: s,
      wrapper: w,
      calcXY: ge
    });
    function M(Pe) {
      Ne(Pe);
    }
    function R() {
      Xe();
    }
    function N(Pe) {
      Ir(o.isDraggable) && (s.draggable = Pe);
    }
    function H(Pe) {
      Ir(o.isResizable) && (s.resizable = Pe);
    }
    function L(Pe) {
      Ir(o.isBounded) && (s.bounded = Pe);
    }
    function F(Pe) {
      s.transformScale = Pe;
    }
    function A(Pe) {
      s.rowHeight = Pe;
    }
    function G(Pe) {
      s.maxRows = Pe;
    }
    function j() {
      s.rtl = q$() === "rtl", Xe();
    }
    function Z(Pe) {
      s.cols = Math.floor(Pe);
    }
    i.increaseItem(T), nh(() => {
      s.rtl = q$() === "rtl";
    }), At(() => {
      i.responsive && i.lastBreakpoint ? s.cols = nE(i.lastBreakpoint, i.cols) : s.cols = i.colNum, s.rowHeight = i.rowHeight, s.containerWidth = i.width !== null ? i.width : 100, s.margin = i.margin !== void 0 ? i.margin.map(Number) : [10, 10], s.maxRows = i.maxRows, Ir(o.isDraggable) ? s.draggable = i.isDraggable : s.draggable = o.isDraggable, Ir(o.isResizable) ? s.resizable = i.isResizable : s.resizable = o.isResizable, Ir(o.isBounded) ? s.bounded = i.isBounded : s.bounded = o.isBounded, s.transformScale = i.transformScale, s.useCssTransforms = i.useCssTransforms, s.useStyleCursor = i.useStyleCursor, It(() => {
        C = o.x, P = o.y, I = o.h, $ = o.w, rr(re);
      }), a.on("updateWidth", M), a.on("compact", R), a.on("setDraggable", N), a.on("setResizable", H), a.on("setBounded", L), a.on("setTransformScale", F), a.on("setRowHeight", A), a.on("setMaxRows", G), a.on("directionchange", j), a.on("setColNum", Z);
    }), qt(() => {
      a.off("updateWidth", M), a.off("compact", R), a.off("setDraggable", N), a.off("setResizable", H), a.off("setBounded", L), a.off("setTransformScale", F), a.off("setRowHeight", A), a.off("setMaxRows", G), a.off("directionchange", j), a.off("setColNum", Z), l.value && (l.value.unset(), l.value = null), i.decreaseItem(T);
    }), t({ state: s, wrapper: w });
    const W = typeof navigator < "u" ? navigator.userAgent.toLowerCase().includes("android") : !1, K = E(() => s.resizable && !o.static), q = E(() => i.isMirrored ? !s.rtl : s.rtl), U = E(() => (s.draggable || s.resizable) && !o.static), ae = wee("item"), se = E(() => ({
      [ae.b()]: !0,
      [ae.bm("resizable")]: K.value,
      [ae.bm("static")]: o.static,
      [ae.bm("resizing")]: s.isResizing,
      [ae.bm("dragging")]: s.isDragging,
      [ae.bm("transform")]: s.useCssTransforms,
      [ae.bm("rtl")]: q.value,
      [ae.bm("no-touch")]: W && U.value
    })), ie = E(() => [ae.be("resizer"), q.value && ae.bem("resizer", "rtl")].filter(Boolean));
    Ie(
      () => o.isDraggable,
      (Pe) => {
        s.draggable = Pe;
      }
    ), Ie(
      () => o.static,
      () => {
        rr(Ve), rr(je);
      }
    ), Ie(
      () => s.draggable,
      () => {
        rr(Ve);
      }
    ), Ie(
      () => o.isResizable,
      (Pe) => {
        s.resizable = Pe;
      }
    ), Ie(
      () => o.isBounded,
      (Pe) => {
        s.bounded = Pe;
      }
    ), Ie(
      () => s.resizable,
      () => {
        rr(je);
      }
    ), Ie(
      () => s.rowHeight,
      () => {
        rr(re), rr(te);
      }
    ), Ie([() => s.cols, () => s.containerWidth], () => {
      rr(je), rr(re), rr(te);
    }), Ie([() => o.minH, () => o.maxH, () => o.minW, () => o.maxW], () => {
      rr(je);
    }), Ie(q, () => {
      rr(je), rr(re);
    }), Ie([() => i.margin, () => i.margin[0], () => i.margin[1]], () => {
      const Pe = i.margin;
      !Pe || Pe[0] === s.margin[0] && Pe[1] === s.margin[1] || (s.margin = Pe.map(Number), rr(re), rr(te));
    });
    function re() {
      o.x + o.w > s.cols ? (C = 0, $ = o.w > s.cols ? s.cols : o.w) : (C = o.x, $ = o.w);
      const Pe = fe(C, P, $, I);
      s.isDragging && (Pe.top = s.dragging.top, q.value ? Pe.right = s.dragging.left : Pe.left = s.dragging.left), s.isResizing && (Pe.width = s.resizing.width, Pe.height = s.resizing.height);
      let Ge;
      s.useCssTransforms ? q.value ? Ge = mee(Pe.top, Pe.right, Pe.width, Pe.height) : Ge = vee(Pe.top, Pe.left, Pe.width, Pe.height) : q.value ? Ge = yee(Pe.top, Pe.right, Pe.width, Pe.height) : Ge = bee(Pe.top, Pe.left, Pe.width, Pe.height), s.style = Ge;
    }
    function te() {
      const Pe = {};
      for (const Ge of ["width", "height"]) {
        const Se = s.style[Ge].match(/^(\d+)px$/);
        if (!Se)
          return;
        Pe[Ge] = Se[1];
      }
      r("container-resized", o.i, o.h, o.w, Pe.height, Pe.width);
    }
    function ve(Pe) {
      if (o.static) return;
      const Ge = Pe.type;
      if (Ge === "resizestart" && s.isResizing || Ge !== "resizestart" && !s.isResizing)
        return;
      const Se = W$(Pe);
      if (Ir(Se)) return;
      const { x: Ce, y: Ae } = Se, qe = { width: 0, height: 0 };
      let We;
      switch (Ge) {
        case "resizestart": {
          je(), g = $, m = I, We = fe(C, P, $, I), qe.width = We.width, qe.height = We.height, s.resizing = qe, s.isResizing = !0;
          break;
        }
        case "resizemove": {
          !Pe.edges.right && !Pe.edges.left && (p = Ce), !Pe.edges.top && !Pe.edges.bottom && (v = Ae);
          const tt = K$(p, v, Ce, Ae);
          q.value ? qe.width = s.resizing.width - tt.deltaX / s.transformScale : qe.width = s.resizing.width + tt.deltaX / s.transformScale, qe.height = s.resizing.height + tt.deltaY / s.transformScale, s.resizing = qe;
          break;
        }
        case "resizeend": {
          We = fe(C, P, $, I), qe.width = We.width, qe.height = We.height, s.resizing = { width: -1, height: -1 }, s.isResizing = !1;
          break;
        }
      }
      We = He(qe.height, qe.width), We.w < o.minW && (We.w = o.minW), We.w > o.maxW && (We.w = o.maxW), We.h < o.minH && (We.h = o.minH), We.h > o.maxH && (We.h = o.maxH), We.h < 1 && (We.h = 1), We.w < 1 && (We.w = 1), p = Ce, v = Ae, ($ !== We.w || I !== We.h) && r("resize", o.i, We.h, We.w, qe.height, qe.width), Pe.type === "resizeend" && (g !== $ || m !== I) && r("resized", o.i, We.h, We.w, qe.height, qe.width), a.emit("resizeEvent", Pe.type, o.i, C, P, We.h, We.w);
    }
    function ce(Pe) {
      if (o.static || s.isResizing) return;
      const Ge = Pe.type;
      if (Ge === "dragstart" && s.isDragging || Ge !== "dragstart" && !s.isDragging)
        return;
      const Se = W$(Pe);
      if (Ir(Se)) return;
      const { x: Ce, y: Ae } = Se, qe = Pe.target;
      if (!qe.offsetParent) return;
      const We = { top: 0, left: 0 };
      switch (Ge) {
        case "dragstart": {
          x = C, S = P;
          const Ee = qe.offsetParent.getBoundingClientRect(), Re = qe.getBoundingClientRect(), Be = Re.left / s.transformScale, rt = Ee.left / s.transformScale, pt = Re.right / s.transformScale, at = Ee.right / s.transformScale, ft = Re.top / s.transformScale, wt = Ee.top / s.transformScale;
          q.value ? We.left = (pt - at) * -1 : We.left = Be - rt, We.top = ft - wt, s.dragging = We, s.isDragging = !0;
          break;
        }
        case "dragmove": {
          const Ee = K$(d, f, Ce, Ae);
          if (q.value ? We.left = s.dragging.left - Ee.deltaX / s.transformScale : We.left = s.dragging.left + Ee.deltaX / s.transformScale, We.top = s.dragging.top + Ee.deltaY / s.transformScale, s.bounded) {
            const Re = qe.offsetParent.clientHeight - ze(o.h, s.rowHeight, s.margin[1]);
            We.top = Ke(We.top, 0, Re);
            const Be = Te(), rt = s.containerWidth - ze(o.w, Be, s.margin[0]);
            We.left = Ke(We.left, 0, rt);
          }
          s.dragging = We;
          break;
        }
        case "dragend": {
          const Ee = qe.offsetParent.getBoundingClientRect(), Re = qe.getBoundingClientRect(), Be = Re.left / s.transformScale, rt = Ee.left / s.transformScale, pt = Re.right / s.transformScale, at = Ee.right / s.transformScale, ft = Re.top / s.transformScale, wt = Ee.top / s.transformScale;
          q.value ? We.left = (pt - at) * -1 : We.left = Be - rt, We.top = ft - wt, s.dragging = { top: -1, left: -1 }, s.isDragging = !1;
          break;
        }
      }
      let tt;
      q.value, tt = ge(We.top, We.left), d = Ce, f = Ae, (C !== tt.x || P !== tt.y) && r("move", o.i, tt.x, tt.y), Pe.type === "dragend" && (x !== C || S !== P) && r("moved", o.i, tt.x, tt.y), a.emit("dragEvent", Pe.type, o.i, tt.x, tt.y, I, $);
    }
    function fe(Pe, Ge, Se, Ce) {
      const Ae = Te();
      let qe;
      return q.value ? qe = {
        right: Math.round(Ae * Pe + (Pe + 1) * s.margin[0]),
        top: Math.round(s.rowHeight * Ge + (Ge + 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: Se === 1 / 0 ? Se : Math.round(Ae * Se + Math.max(0, Se - 1) * s.margin[0]),
        height: Ce === 1 / 0 ? Ce : Math.round(s.rowHeight * Ce + Math.max(0, Ce - 1) * s.margin[1])
      } : qe = {
        left: Math.round(Ae * Pe + (Pe + 1) * s.margin[0]),
        top: Math.round(s.rowHeight * Ge + (Ge + 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: Se === 1 / 0 ? Se : Math.round(Ae * Se + Math.max(0, Se - 1) * s.margin[0]),
        height: Ce === 1 / 0 ? Ce : Math.round(s.rowHeight * Ce + Math.max(0, Ce - 1) * s.margin[1])
      }, qe;
    }
    function ge(Pe, Ge) {
      const Se = Te();
      let Ce = Math.round((Ge - s.margin[0]) / (Se + s.margin[0])), Ae = Math.round((Pe - s.margin[1]) / (s.rowHeight + s.margin[1]));
      return Ce = Math.max(Math.min(Ce, s.cols - $), 0), Ae = Math.max(Math.min(Ae, s.maxRows - I), 0), { x: Ce, y: Ae };
    }
    function Te() {
      return (s.containerWidth - s.margin[0] * (s.cols + 1)) / s.cols;
    }
    function ze(Pe, Ge, Se) {
      return Number.isFinite(Pe) ? Math.round(Ge * Pe + Math.max(0, Pe - 1) * Se) : Pe;
    }
    function Ke(Pe, Ge, Se) {
      return Math.max(Math.min(Pe, Se), Ge);
    }
    function He(Pe, Ge, Se = !1) {
      const Ce = Te();
      let Ae = Math.round((Ge + s.margin[0]) / (Ce + s.margin[0])), qe = 0;
      return Se ? qe = Math.ceil((Pe + s.margin[1]) / (s.rowHeight + s.margin[1])) : qe = Math.round((Pe + s.margin[1]) / (s.rowHeight + s.margin[1])), Ae = Math.max(Math.min(Ae, s.cols - C), 0), qe = Math.max(Math.min(qe, s.maxRows - P), 0), { w: Ae, h: qe };
    }
    function Ne(Pe, Ge) {
      s.containerWidth = Pe;
    }
    function Xe() {
      re();
    }
    function De() {
      !l.value && w.value && (l.value = G$(w.value), s.useStyleCursor || l.value.styleCursor(!1));
    }
    const Fe = H$(ce);
    function Ve() {
      if (De(), !!l.value)
        if (s.draggable && !o.static) {
          const Pe = {
            ignoreFrom: o.dragIgnoreFrom,
            allowFrom: o.dragAllowFrom,
            ...o.dragOption
          };
          l.value.draggable(Pe), u || (u = !0, l.value.on("dragstart dragmove dragend", (Ge) => {
            Ge.type === "dragmove" ? Fe(Ge) : ce(Ge);
          }));
        } else
          l.value.draggable({ enabled: !1 });
    }
    const ot = H$(ve);
    function je() {
      if (De(), !!l.value)
        if (s.resizable && !o.static) {
          const Pe = fe(0, 0, o.maxW, o.maxH), Ge = fe(0, 0, o.minW, o.minH), Se = {
            edges: {
              left: q.value ? `.${ie.value[0]}` : !1,
              right: q.value ? !1 : `.${ie.value[0]}`,
              bottom: `.${ie.value[0]}`,
              top: !1
            },
            ignoreFrom: o.resizeIgnoreFrom,
            restrictSize: {
              min: {
                height: Ge.height * s.transformScale,
                width: Ge.width * s.transformScale
              },
              max: {
                height: Pe.height * s.transformScale,
                width: Pe.width * s.transformScale
              }
            },
            ...o.resizeOption
          };
          o.preserveAspectRatio && (Se.modifiers = [G$.modifiers.aspectRatio({ ratio: "preserve" })]), l.value.resizable(Se), c || (c = !0, l.value.on("resizestart resizemove resizeend", (Ce) => {
            Ce.type === "resizemove" ? ot(Ce) : ve(Ce);
          }));
        } else
          l.value.resizable({ enabled: !1 });
    }
    return (Pe, Ge) => (ne(), xe("section", {
      ref_key: "wrapper",
      ref: w,
      class: Pt(se.value),
      style: Ht(s.style)
    }, [
      lr(Pe.$slots, "default"),
      K.value ? (ne(), xe("span", {
        key: 0,
        class: Pt(ie.value)
      }, null, 2)) : nt("", !0)
    ], 6));
  }
}), Ws = typeof window < "u";
var X$;
Ws && (X$ = window?.navigator) != null && X$.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent);
function Q$(e) {
  return e != null;
}
function Z$() {
}
const Mee = 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(Mee)));
const Eee = Ws && ("ontouchstart" in window || Dee() > 0), J$ = Eee ? "pointerdown" : "click";
function Dee() {
  return typeof navigator < "u" && (navigator.maxTouchPoints || navigator.msMaxTouchPoints) || 0;
}
function Aee(e, t, n = window.Event) {
  const { type: o, bubbles: r = !1, cancelable: i = !1, ...a } = t;
  if (!Q$(o) || o === "") return !1;
  let l;
  return Q$(n) ? l = new n(o, { bubbles: r, cancelable: i }) : (l = document.createEvent("HTMLEvents"), l.initEvent(o, r, i)), Object.assign(l, a), e.dispatchEvent(l);
}
const Nee = "clickoutside", Ree = /* @__PURE__ */ new Set();
let jv = null;
function zee(e, t) {
  return e instanceof Node ? t === e || t.contains(e) || !!t.__transferElement && (t.__transferElement === e || t.__transferElement.contains(e)) : !1;
}
Ws && (J$ === "click" && document.addEventListener(
  "pointerdown",
  (e) => {
    jv = e.target;
  },
  !0
), document.addEventListener(
  J$,
  (e) => {
    const t = jv;
    jv = null, Ree.forEach((n) => {
      if (t && zee(t, n))
        return;
      const o = e.target, r = e.composedPath && e.composedPath();
      n !== o && (r ? !r.includes(n) : !n.contains(o)) && (!n.__transferElement || n.__transferElement !== o && !n.__transferElement.contains(o)) && Aee(n, { type: Nee });
    });
  },
  !0
));
const Fee = [
  [
    "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 mp;
if (Ws) {
  for (const e of Fee)
    if (e[1] in document) {
      mp = e;
      break;
    }
}
E(() => !1);
const Bee = /* @__PURE__ */ new Set(), Lee = /* @__PURE__ */ new WeakMap();
if (Ws && mp) {
  const e = mp[2], t = mp[4];
  document.addEventListener(
    t,
    () => {
      if (Bee.forEach((n) => {
        n.value = !1;
      }), document[e]) {
        const n = Lee.get(document[e]);
        n && (n.value = !0);
      }
    },
    !1
  );
}
const rE = /* @__PURE__ */ new Map();
rE.set("x", 0);
rE.set("y", 0);
var Ps = [], Hee = function() {
  return Ps.some(function(e) {
    return e.activeTargets.length > 0;
  });
}, Vee = function() {
  return Ps.some(function(e) {
    return e.skippedTargets.length > 0;
  });
}, eP = "ResizeObserver loop completed with undelivered notifications.", jee = function() {
  var e;
  typeof ErrorEvent == "function" ? e = new ErrorEvent("error", {
    message: eP
  }) : (e = document.createEvent("Event"), e.initEvent("error", !1, !1), e.message = eP), window.dispatchEvent(e);
}, Pd;
(function(e) {
  e.BORDER_BOX = "border-box", e.CONTENT_BOX = "content-box", e.DEVICE_PIXEL_CONTENT_BOX = "device-pixel-content-box";
})(Pd || (Pd = {}));
var Os = function(e) {
  return Object.freeze(e);
}, Wee = /* @__PURE__ */ (function() {
  function e(t, n) {
    this.inlineSize = t, this.blockSize = n, Os(this);
  }
  return e;
})(), iE = (function() {
  function e(t, n, o, r) {
    return this.x = t, this.y = n, this.width = o, this.height = r, this.top = this.y, this.left = this.x, this.bottom = this.top + this.height, this.right = this.left + this.width, Os(this);
  }
  return e.prototype.toJSON = function() {
    var t = this, n = t.x, o = t.y, r = t.top, i = t.right, a = t.bottom, l = t.left, s = t.width, u = t.height;
    return { x: n, y: o, top: r, right: i, bottom: a, left: l, width: s, height: u };
  }, e.fromRect = function(t) {
    return new e(t.x, t.y, t.width, t.height);
  }, e;
})(), Rx = function(e) {
  return e instanceof SVGElement && "getBBox" in e;
}, aE = function(e) {
  if (Rx(e)) {
    var t = e.getBBox(), n = t.width, o = t.height;
    return !n && !o;
  }
  var r = e, i = r.offsetWidth, a = r.offsetHeight;
  return !(i || a || e.getClientRects().length);
}, tP = 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);
}, Kee = 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;
}, ad = typeof window < "u" ? window : {}, Ff = /* @__PURE__ */ new WeakMap(), nP = /auto|scroll/, qee = /^tb|vertical/, Yee = /msie|trident/i.test(ad.navigator && ad.navigator.userAgent), ji = function(e) {
  return parseFloat(e || "0");
}, zu = function(e, t, n) {
  return e === void 0 && (e = 0), t === void 0 && (t = 0), n === void 0 && (n = !1), new Wee((n ? t : e) || 0, (n ? e : t) || 0);
}, oP = Os({
  devicePixelContentBoxSize: zu(),
  borderBoxSize: zu(),
  contentBoxSize: zu(),
  contentRect: new iE(0, 0, 0, 0)
}), lE = function(e, t) {
  if (t === void 0 && (t = !1), Ff.has(e) && !t)
    return Ff.get(e);
  if (aE(e))
    return Ff.set(e, oP), oP;
  var n = getComputedStyle(e), o = Rx(e) && e.ownerSVGElement && e.getBBox(), r = !Yee && n.boxSizing === "border-box", i = qee.test(n.writingMode || ""), a = !o && nP.test(n.overflowY || ""), l = !o && nP.test(n.overflowX || ""), s = o ? 0 : ji(n.paddingTop), u = o ? 0 : ji(n.paddingRight), c = o ? 0 : ji(n.paddingBottom), d = o ? 0 : ji(n.paddingLeft), f = o ? 0 : ji(n.borderTopWidth), p = o ? 0 : ji(n.borderRightWidth), v = o ? 0 : ji(n.borderBottomWidth), g = o ? 0 : ji(n.borderLeftWidth), m = d + u, x = s + c, S = g + p, C = f + v, P = l ? e.offsetHeight - C - e.clientHeight : 0, $ = a ? e.offsetWidth - S - e.clientWidth : 0, I = r ? m + S : 0, w = r ? x + C : 0, T = o ? o.width : ji(n.width) - I - $, M = o ? o.height : ji(n.height) - w - P, R = T + m + $ + S, N = M + x + P + C, H = Os({
    devicePixelContentBoxSize: zu(Math.round(T * devicePixelRatio), Math.round(M * devicePixelRatio), i),
    borderBoxSize: zu(R, N, i),
    contentBoxSize: zu(T, M, i),
    contentRect: new iE(d, s, T, M)
  });
  return Ff.set(e, H), H;
}, sE = function(e, t, n) {
  var o = lE(e, n), r = o.borderBoxSize, i = o.contentBoxSize, a = o.devicePixelContentBoxSize;
  switch (t) {
    case Pd.DEVICE_PIXEL_CONTENT_BOX:
      return a;
    case Pd.BORDER_BOX:
      return r;
    default:
      return i;
  }
}, Gee = /* @__PURE__ */ (function() {
  function e(t) {
    var n = lE(t);
    this.target = t, this.contentRect = n.contentRect, this.borderBoxSize = Os([n.borderBoxSize]), this.contentBoxSize = Os([n.contentBoxSize]), this.devicePixelContentBoxSize = Os([n.devicePixelContentBoxSize]);
  }
  return e;
})(), uE = function(e) {
  if (aE(e))
    return 1 / 0;
  for (var t = 0, n = e.parentNode; n; )
    t += 1, n = n.parentNode;
  return t;
}, Uee = function() {
  var e = 1 / 0, t = [];
  Ps.forEach(function(i) {
    if (i.activeTargets.length !== 0) {
      var a = [];
      i.activeTargets.forEach(function(l) {
        var s = new Gee(l.target), u = uE(l.target);
        a.push(s), l.lastReportedSize = sE(l.target, l.observedBox), u < e && (e = u);
      }), t.push(function() {
        i.callback.call(i.observer, a, i.observer);
      }), i.activeTargets.splice(0, i.activeTargets.length);
    }
  });
  for (var n = 0, o = t; n < o.length; n++) {
    var r = o[n];
    r();
  }
  return e;
}, rP = function(e) {
  Ps.forEach(function(t) {
    t.activeTargets.splice(0, t.activeTargets.length), t.skippedTargets.splice(0, t.skippedTargets.length), t.observationTargets.forEach(function(n) {
      n.isActive() && (uE(n.target) > e ? t.activeTargets.push(n) : t.skippedTargets.push(n));
    });
  });
}, Xee = function() {
  var e = 0;
  for (rP(e); Hee(); )
    e = Uee(), rP(e);
  return Vee() && jee(), e > 0;
}, Wv, cE = [], Qee = function() {
  return cE.splice(0).forEach(function(e) {
    return e();
  });
}, Zee = function(e) {
  if (!Wv) {
    var t = 0, n = document.createTextNode(""), o = { characterData: !0 };
    new MutationObserver(function() {
      return Qee();
    }).observe(n, o), Wv = function() {
      n.textContent = "".concat(t ? t-- : t++);
    };
  }
  cE.push(e), Wv();
}, Jee = function(e) {
  Zee(function() {
    requestAnimationFrame(e);
  });
}, bp = 0, ete = function() {
  return !!bp;
}, tte = 250, nte = { attributes: !0, characterData: !0, childList: !0, subtree: !0 }, iP = [
  "resize",
  "load",
  "transitionend",
  "animationend",
  "animationstart",
  "animationiteration",
  "keyup",
  "keydown",
  "mouseup",
  "mousedown",
  "mouseover",
  "mouseout",
  "blur",
  "focus"
], aP = function(e) {
  return e === void 0 && (e = 0), Date.now() + e;
}, Kv = !1, ote = (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 = tte), !Kv) {
      Kv = !0;
      var o = aP(t);
      Jee(function() {
        var r = !1;
        try {
          r = Xee();
        } finally {
          if (Kv = !1, t = o - aP(), !ete())
            return;
          r ? 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, nte);
    };
    document.body ? n() : ad.addEventListener("DOMContentLoaded", n);
  }, e.prototype.start = function() {
    var t = this;
    this.stopped && (this.stopped = !1, this.observer = new MutationObserver(this.listener), this.observe(), iP.forEach(function(n) {
      return ad.addEventListener(n, t.listener, !0);
    }));
  }, e.prototype.stop = function() {
    var t = this;
    this.stopped || (this.observer && this.observer.disconnect(), iP.forEach(function(n) {
      return ad.removeEventListener(n, t.listener, !0);
    }), this.stopped = !0);
  }, e;
})(), Xb = new ote(), lP = function(e) {
  !bp && e > 0 && Xb.start(), bp += e, !bp && Xb.stop();
}, rte = function(e) {
  return !Rx(e) && !Kee(e) && getComputedStyle(e).display === "inline";
}, ite = (function() {
  function e(t, n) {
    this.target = t, this.observedBox = n || Pd.CONTENT_BOX, this.lastReportedSize = {
      inlineSize: 0,
      blockSize: 0
    };
  }
  return e.prototype.isActive = function() {
    var t = sE(this.target, this.observedBox, !0);
    return rte(this.target) && (this.lastReportedSize = t), this.lastReportedSize.inlineSize !== t.inlineSize || this.lastReportedSize.blockSize !== t.blockSize;
  }, e;
})(), ate = /* @__PURE__ */ (function() {
  function e(t, n) {
    this.activeTargets = [], this.skippedTargets = [], this.observationTargets = [], this.observer = t, this.callback = n;
  }
  return e;
})(), Bf = /* @__PURE__ */ new WeakMap(), sP = function(e, t) {
  for (var n = 0; n < e.length; n += 1)
    if (e[n].target === t)
      return n;
  return -1;
}, Lf = (function() {
  function e() {
  }
  return e.connect = function(t, n) {
    var o = new ate(t, n);
    Bf.set(t, o);
  }, e.observe = function(t, n, o) {
    var r = Bf.get(t), i = r.observationTargets.length === 0;
    sP(r.observationTargets, n) < 0 && (i && Ps.push(r), r.observationTargets.push(new ite(n, o && o.box)), lP(1), Xb.schedule());
  }, e.unobserve = function(t, n) {
    var o = Bf.get(t), r = sP(o.observationTargets, n), i = o.observationTargets.length === 1;
    r >= 0 && (i && Ps.splice(Ps.indexOf(o), 1), o.observationTargets.splice(r, 1), lP(-1));
  }, e.disconnect = function(t) {
    var n = this, o = Bf.get(t);
    o.observationTargets.slice().forEach(function(r) {
      return n.unobserve(t, r.target);
    }), o.activeTargets.splice(0, o.activeTargets.length);
  }, e;
})(), lte = (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.");
    Lf.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 (!tP(t))
      throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");
    Lf.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 (!tP(t))
      throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");
    Lf.unobserve(this, t);
  }, e.prototype.disconnect = function() {
    Lf.disconnect(this);
  }, e.toString = function() {
    return "function ResizeObserver () { [polyfill code] }";
  }, e;
})();
const eh = /* @__PURE__ */ new WeakMap();
function ste(e) {
  var t;
  for (let n = 0, o = e.length; n < o; ++n) {
    const r = e[n], i = eh.get(r.target);
    if (typeof i == "function") {
      const { inlineSize: a, blockSize: l } = ((t = r.borderBoxSize) == null ? void 0 : t[0]) ?? {}, { offsetWidth: s, offsetHeight: u } = r.target;
      i(
        Object.assign(r, {
          offsetWidth: s,
          offsetHeight: u,
          width: a ?? s,
          height: l ?? u
        })
      );
    }
  }
}
const dE = new (Ws && window.ResizeObserver || lte)(
  ste
);
function uP(e, t) {
  eh.set(e, t), dE.observe(e);
}
function cP(e) {
  eh.has(e) && (dE.unobserve(e), eh.delete(e));
}
function ute(e = {}) {
  let t = Z$;
  const n = Ie(
    () => _(e.target),
    (r) => {
      t(), !(!r || typeof e.onResize != "function") && (uP(r, e.onResize), t = () => {
        cP(r), t = Z$;
      });
    },
    { immediate: !0 }
  ), o = () => {
    n(), t();
  };
  return AP() && NP(o), {
    /**
     * @deprecated Will be removed in next major version, please directly use `observeResize` from imports.
     */
    observeResize: uP,
    /**
     * @deprecated Will be removed in next major version, please directly use `unobserveResize` from imports.
     */
    unobserveResize: cP,
    unobserve: o
  };
}
const cte = le(!1);
E(() => cte.value);
const dP = "__theme_style__", qv = "__theme_observer__", fP = $n(/* @__PURE__ */ new Map()), pP = /* @__PURE__ */ new Map();
Ie(fP, () => {
  if (!Ws) return;
  pP.clear();
  const e = document.head.querySelector(`#${dP}`);
  e && document.head.removeChild(e);
  const t = document.createElement("style");
  let n = `.${qv} { width: 1px }`, o = 1;
  for (const [r, [i, a]] of fP.entries())
    n += ` html.${i} .${qv}, .${a} .${qv} { width: ${++o}px }`, pP.set(o, r);
  t.textContent = n, t.id = dP, document.head.appendChild(t);
});
const dte = /* @__PURE__ */ be({
  __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, r = n, i = $n({
      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 } = ute(), d = uee();
    d.on("resizeEvent", f), d.on("dragEvent", p), nh(() => {
      r("layout-before-mount", l.value);
    }), At(() => {
      r("layout-mounted", l.value), Yt(() => {
        xee(l.value), i.originalLayout = l.value, Yt(() => {
          M(), s.value && u(s.value, cee(C, 16)), bu(l.value, o.verticalCompact), r("layout-updated", l.value), S(), C();
        });
      });
    }), qt(() => {
      d.clearAll(), s.value && c(s.value);
    });
    function f(N, H, L, F, A, G) {
      w(N, H, L, F, A, G);
    }
    function p(N, H, L, F, A, G) {
      I(N, H, L, F, A, G);
    }
    Ie(
      () => i.width,
      (N, H) => {
        Yt(() => {
          d.emit("updateWidth", N), H === -1 && Yt(() => {
            r("layout-ready", l.value);
          }), S();
        });
      }
    ), Ie(
      () => [o.layout, o.layout.length],
      () => {
        l.value = o.layout, x();
      }
    ), Ie(
      () => o.colNum,
      (N) => {
        d.emit("setColNum", N);
      }
    ), Ie(
      () => o.rowHeight,
      (N) => {
        d.emit("setRowHeight", N);
      }
    ), Ie(
      () => o.isDraggable,
      (N) => {
        d.emit("setDraggable", N);
      }
    ), Ie(
      () => o.isResizable,
      (N) => {
        d.emit("setResizable", N);
      }
    ), Ie(
      () => o.isBounded,
      (N) => {
        d.emit("setBounded", N);
      }
    ), Ie(
      () => o.transformScale,
      (N) => {
        d.emit("setTransformScale", N);
      }
    ), Ie(
      () => o.responsive,
      (N) => {
        N || (r("update:layout", i.originalLayout), d.emit("setColNum", o.colNum)), C();
      }
    ), Ie(
      () => o.maxRows,
      (N) => {
        d.emit("setMaxRows", N);
      }
    ), Ie([() => o.margin, () => o.margin[1]], S), Bt(
      X2,
      $n({
        ...ys(o),
        ...ys(i),
        increaseItem: v,
        decreaseItem: g
      })
    ), Bt(Q2, d), t({ state: i, getItem: m, resizeEvent: w, dragEvent: I, layoutUpdate: x });
    function v(N) {
      a.set(N.i, N);
    }
    function g(N) {
      a.delete(N.i);
    }
    function m(N) {
      return a.get(N);
    }
    function x() {
      if (!Ir(l.value) && !Ir(i.originalLayout)) {
        if (l.value.length !== i.originalLayout.length) {
          const N = R(l.value, i.originalLayout);
          if (N.length > 0)
            if (l.value.length > i.originalLayout.length)
              i.originalLayout = i.originalLayout.concat(N);
            else {
              const H = new Set(N.map((L) => L.i));
              i.originalLayout = i.originalLayout.filter((L) => !H.has(L.i));
            }
          i.lastLayoutLength = l.value.length, M();
        }
        bu(l.value, o.verticalCompact), d.emit("updateWidth", i.width), S(), r("layout-updated", l.value);
      }
    }
    function S() {
      i.mergedStyle = {
        height: P()
      };
    }
    function C() {
      s.value && (i.width = s.value.offsetWidth), d.emit("resizeEvent");
    }
    function P() {
      if (!o.autoSize) return;
      const N = parseFloat(o.margin[1]);
      return fee(l.value) * (o.rowHeight + N) + N + "px";
    }
    let $;
    function I(N, H, L, F, A, G) {
      let j = V$(l.value, H);
      Ir(j) && (j = { h: 0, w: 0, x: 0, y: 0, i: "" }), N === "dragstart" && !o.verticalCompact && ($ = l.value.reduce(
        (Z, { i: W, x: K, y: q }) => ({
          ...Z,
          [W]: { x: K, y: q }
        }),
        {}
      )), N === "dragmove" || N === "dragstart" ? (i.placeholder.i = H, i.placeholder.x = j.x, i.placeholder.y = j.y, i.placeholder.w = G, i.placeholder.h = A, Yt(() => {
        i.isDragging = !0;
      }), d.emit("updateWidth", i.width)) : Yt(() => {
        i.isDragging = !1;
      }), l.value = Ub(l.value, j, L, F, !0, o.preventCollision), o.restoreOnDrag ? (j.static = !0, bu(l.value, o.verticalCompact, $), j.static = !1) : bu(l.value, o.verticalCompact), d.emit("compact"), S(), N === "dragend" && ($ = void 0, r("layout-updated", l.value));
    }
    function w(N, H, L, F, A, G) {
      let j = V$(l.value, H);
      Ir(j) && (j = { h: 0, w: 0, x: 0, y: 0, i: "" });
      let Z;
      if (o.preventCollision) {
        const W = J2(l.value, { ...j, w: G, h: A }).filter(
          (K) => K.i !== j.i
        );
        if (Z = W.length > 0, Z) {
          let K = 1 / 0, q = 1 / 0;
          W.forEach((U) => {
            U.x > j.x && (K = Math.min(K, U.x)), U.y > j.y && (q = Math.min(q, U.y));
          }), Number.isFinite(K) && (j.w = K - j.x), Number.isFinite(q) && (j.h = q - j.y);
        }
      }
      Z || (j.w = G, j.h = A), N === "resizestart" || N === "resizemove" ? (i.placeholder.i = H, i.placeholder.x = L, i.placeholder.y = F, i.placeholder.w = j.w, i.placeholder.h = j.h, Yt(() => {
        i.isDragging = !0;
      }), d.emit("updateWidth", i.width)) : N && Yt(() => {
        i.isDragging = !1;
      }), o.responsive && T(), bu(l.value, o.verticalCompact), d.emit("compact"), S(), N === "resizeend" && r("layout-updated", l.value);
    }
    function T() {
      const N = $ee(o.breakpoints, i.width);
      if (N === i.lastBreakpoint)
        return;
      const H = nE(N, o.cols);
      !Ir(i.lastBreakpoint) && !i.layouts[i.lastBreakpoint] && (i.layouts[i.lastBreakpoint] = Gb(l.value));
      const L = Pee(
        i.originalLayout,
        i.layouts,
        o.breakpoints,
        N,
        i.lastBreakpoint,
        H,
        o.verticalCompact
      );
      i.layouts[N] = L, i.lastBreakpoint !== N && r("breakpoint-changed", N, L), l.value = L, r("update:layout", L), i.lastBreakpoint = N, d.emit("setColNum", H);
    }
    function M() {
      i.layouts = Object.assign({}, o.responsiveLayouts);
    }
    function R(N, H) {
      const L = new Set(H.map((j) => j.i)), F = new Set(N.map((j) => j.i)), A = N.filter((j) => !L.has(j.i)), G = H.filter((j) => !F.has(j.i));
      return A.concat(G);
    }
    return (N, H) => (ne(), xe("div", {
      ref_key: "wrapper",
      ref: s,
      class: "vgl-layout",
      style: Ht(i.mergedStyle)
    }, [
      N.$slots.default ? lr(N.$slots, "default", { key: 0 }) : (ne(!0), xe(Je, { key: 1 }, Ut(l.value, (L) => (ne(), dt(U$, NE({
        key: L.i,
        ref_for: !0
      }, L), {
        default: he(() => [
          lr(N.$slots, "item", { item: L })
        ]),
        _: 2
      }, 1040))), 128)),
      ti(h(U$, {
        class: "vgl-item--placeholder",
        x: i.placeholder.x,
        y: i.placeholder.y,
        w: i.placeholder.w,
        h: i.placeholder.h,
        i: i.placeholder.i
      }, null, 8, ["x", "y", "w", "h", "i"]), [
        [Oi, i.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 fte = {
  class: "px-12px py-15px",
  style: { "border-bottom": "1px solid var(--ant-color-border-secondary)" }
}, pte = {
  class: "flex items-center justify-between px-4 py-3 w-full",
  style: { "border-top": "1px solid var(--ant-color-border-secondary)" }
}, zx = /* @__PURE__ */ be({
  __name: "AppOverlay",
  props: {
    open: { type: Boolean },
    title: {},
    mode: { default: "modal" },
    width: { default: 520 },
    bodyHeight: {},
    footer: { type: Boolean, default: !0 },
    headerBorder: { type: Boolean, default: !0 },
    footerBorder: { type: Boolean, default: !0 },
    destroyOnClose: { type: Boolean, default: !1 },
    mask: { type: Boolean, default: !0 }
  },
  emits: ["close"],
  setup(e, { emit: t }) {
    const n = e, o = t, r = ta(), i = E(() => r.isDark ? "#141414" : "#ffffff"), a = E(() => r.isDark ? "#303030" : "#e8e8e8");
    function l() {
      let f = 0;
      return document.querySelectorAll("div").forEach((p) => {
        const v = window.getComputedStyle(p);
        if (v.position === "static")
          return;
        const g = Number.parseInt(v.zIndex);
        !Number.isNaN(g) && g > f && (f = g);
      }), f;
    }
    const s = le(1e3);
    Ie(() => n.open, (f) => {
      f && (s.value = Math.max(l(), 1e3));
    });
    const u = E(() => ({
      wrapper: { padding: 0 },
      content: { padding: 0, background: i.value },
      header: {
        padding: "10px 16px",
        margin: 0,
        background: i.value,
        ...n.headerBorder ? { borderBottom: `1px solid ${a.value}` } : {}
      },
      body: {
        padding: 0,
        background: i.value,
        display: "flex",
        flexDirection: "column",
        ...n.bodyHeight != null ? { height: n.bodyHeight } : {}
      },
      footer: {
        margin: 0,
        padding: "10px 16px",
        ...n.footerBorder ? { borderTop: `1px solid ${a.value}` } : {}
      }
    })), c = le();
    function d() {
      return c.value ?? document.body;
    }
    return (f, p) => e.mode === "modal" ? (ne(), dt(_(Go), {
      key: 0,
      "mask-style": { background: "rgba(0, 0, 0, 0.2" },
      open: e.open,
      width: e.width,
      "z-index": s.value,
      styles: u.value,
      "destroy-on-close": e.destroyOnClose,
      footer: e.footer ? void 0 : null,
      class: "no-content-padding-modal",
      "body-style": { padding: 0, display: "flex", height: e.bodyHeight, flexDirection: "column" },
      onCancel: p[0] || (p[0] = (v) => o("close"))
    }, Bx({
      default: he(() => [
        B("div", {
          ref_key: "popupContainerRef",
          ref: c,
          style: { position: "relative", flex: "1", "min-height": "0", display: "flex", "flex-direction": "column" }
        }, [
          h(_(Fa), { "get-popup-container": d }, {
            default: he(() => [
              lr(f.$slots, "default")
            ]),
            _: 3
          })
        ], 512)
      ]),
      _: 2
    }, [
      f.$slots.title || e.title ? {
        name: "title",
        fn: he(() => [
          B("div", fte, [
            lr(f.$slots, "title", {}, () => [
              Le(oe(e.title) + " " + oe(e.footer), 1)
            ])
          ])
        ]),
        key: "0"
      } : void 0,
      f.$slots.footer ? {
        name: "footer",
        fn: he(() => [
          B("div", pte, [
            lr(f.$slots, "footer")
          ])
        ]),
        key: "1"
      } : void 0
    ]), 1032, ["open", "width", "z-index", "styles", "destroy-on-close", "footer", "body-style"])) : (ne(), dt(_(gU), {
      key: 1,
      open: e.open,
      title: e.title,
      width: e.width,
      "z-index": s.value,
      mask: e.mask,
      "root-style": { zIndex: s.value },
      placement: "right",
      "mask-style": { background: "rgba(0, 0, 0, 0.2)" },
      "body-style": { padding: 0, background: i.value, display: "flex", flexDirection: "column", flex: 1, minHeight: 0 },
      "header-style": { padding: "10px 16px", background: i.value, ...e.headerBorder ? { borderBottom: `1px solid ${a.value}` } : {} },
      "footer-style": { padding: "10px 16px", ...e.footerBorder ? { borderTop: `1px solid ${a.value}` } : {} },
      "destroy-on-close": e.destroyOnClose,
      onClose: p[1] || (p[1] = (v) => o("close"))
    }, Bx({
      default: he(() => [
        B("div", {
          ref_key: "popupContainerRef",
          ref: c,
          style: { position: "relative", flex: "1", "min-height": "0", display: "flex", "flex-direction": "column" }
        }, [
          h(_(Fa), { "get-popup-container": d }, {
            default: he(() => [
              lr(f.$slots, "default")
            ]),
            _: 3
          })
        ], 512)
      ]),
      _: 2
    }, [
      f.$slots.title ? {
        name: "title",
        fn: he(() => [
          lr(f.$slots, "title")
        ]),
        key: "0"
      } : void 0,
      f.$slots.footer && e.footer ? {
        name: "footer",
        fn: he(() => [
          lr(f.$slots, "footer")
        ]),
        key: "1"
      } : void 0
    ]), 1032, ["open", "title", "width", "z-index", "mask", "root-style", "body-style", "header-style", "footer-style", "destroy-on-close"]));
  }
});
function fE(e, t, n = 1e3, o) {
  const r = le(null), i = le(!1), a = le(null), { config: l } = tc(), s = Is(), u = E(() => s.resolveAll()), c = E(() => {
    const v = e();
    return [
      JSON.stringify(v.map((g) => g.dataSource)),
      JSON.stringify(u.value),
      o?.() ?? 0
    ].join("|");
  });
  let d = !1;
  async function f() {
    const v = e().filter((P) => P.enabled !== !1);
    if (v.length === 0) {
      r.value = null, i.value = !1;
      return;
    }
    const g = t(), m = Math.max(
      Math.ceil((g.to - g.from) / n),
      1e3
    ), x = { from: g.from, to: g.to }, S = l.value.datasourceConfig ?? [], C = new Map(S.map((P) => [P.uid, P]));
    d = !1, i.value = !0, a.value = null;
    try {
      const P = [];
      for (const $ of v) {
        const I = $.dataSource, w = Pp(I.type);
        if (!w)
          continue;
        const T = "datasourceId" in I ? C.get(I.datasourceId ?? "") : void 0, M = await w.query({
          requestId: $.id,
          range: x,
          intervalMs: m,
          maxDataPoints: n,
          targets: [I],
          scopedVars: u.value,
          _dsCfg: T,
          _variableStates: s.variables
        });
        P.push(...M.data);
      }
      d || (r.value = { data: P, state: "Done" }, a.value = null);
    } catch (P) {
      d || (a.value = P?.message ?? String(P));
    } finally {
      d || (i.value = !1);
    }
  }
  Ie(c, f, { immediate: !0 }), Ie(
    () => {
      const v = t();
      return `${v.from}|${v.to}`;
    },
    f
  );
  function p() {
    d = !0;
  }
  return { response: r, loading: i, error: a, abort: p };
}
const pE = Symbol("panelEditor");
function hte(e) {
  Bt(pE, e);
}
function gc() {
  const e = zt(pE);
  if (!e)
    throw new Error("usePanelEditor must be used within a PanelEditorProvider");
  return e;
}
function gte(e, t, { signal: n, edges: o } = {}) {
  let r, i = null;
  const a = o != null && o.includes("leading"), l = o == null || o.includes("trailing"), s = () => {
    i !== null && (e.apply(r, i), r = void 0, i = 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(), r = void 0, i = null;
  }, v = () => {
    s();
  }, g = function(...m) {
    if (n?.aborted)
      return;
    r = this, i = m;
    const x = c == null;
    d(), a && x && s();
  };
  return g.schedule = d, g.cancel = p, g.flush = v, n?.addEventListener("abort", p, { once: !0 }), g;
}
function vte() {
}
function mi(e, t, n) {
  return n == null ? Math.min(e, t) : Math.min(Math.max(e, t), n);
}
function hP(e) {
  return Object.getOwnPropertySymbols(e).filter((t) => Object.prototype.propertyIsEnumerable.call(e, t));
}
function gP(e) {
  return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e);
}
const mte = "[object RegExp]", bte = "[object String]", yte = "[object Number]", xte = "[object Boolean]", vP = "[object Arguments]", wte = "[object Symbol]", Ste = "[object Date]", Cte = "[object Map]", $te = "[object Set]", Pte = "[object Array]", Ote = "[object Function]", kte = "[object ArrayBuffer]", Yv = "[object Object]", Ite = "[object Error]", Tte = "[object DataView]", _te = "[object Uint8Array]", Mte = "[object Uint8ClampedArray]", Ete = "[object Uint16Array]", Dte = "[object Uint32Array]", Ate = "[object BigUint64Array]", Nte = "[object Int8Array]", Rte = "[object Int16Array]", zte = "[object Int32Array]", Fte = "[object BigInt64Array]", Bte = "[object Float32Array]", Lte = "[object Float64Array]";
function mP(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 Hte(e, t) {
  return e === t || Number.isNaN(e) && Number.isNaN(t);
}
function Vte(e, t, n) {
  return Wc(e, t, void 0, void 0, void 0, void 0, n);
}
function Wc(e, t, n, o, r, i, a) {
  const l = a(e, t, n, o, r, i);
  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 ld(e, t, i, a);
    }
  return ld(e, t, i, a);
}
function ld(e, t, n, o) {
  if (Object.is(e, t))
    return !0;
  let r = gP(e), i = gP(t);
  if (r === vP && (r = Yv), i === vP && (i = Yv), r !== i)
    return !1;
  switch (r) {
    case bte:
      return e.toString() === t.toString();
    case yte: {
      const s = e.valueOf(), u = t.valueOf();
      return Hte(s, u);
    }
    case xte:
    case Ste:
    case wte:
      return Object.is(e.valueOf(), t.valueOf());
    case mte:
      return e.source === t.source && e.flags === t.flags;
    case Ote:
      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 (r) {
      case Cte: {
        if (e.size !== t.size)
          return !1;
        for (const [s, u] of e.entries())
          if (!t.has(s) || !Wc(u, t.get(s), s, e, t, n, o))
            return !1;
        return !0;
      }
      case $te: {
        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) => Wc(d, p, void 0, e, t, n, o));
          if (f === -1)
            return !1;
          u.splice(f, 1);
        }
        return !0;
      }
      case Pte:
      case _te:
      case Mte:
      case Ete:
      case Dte:
      case Ate:
      case Nte:
      case Rte:
      case zte:
      case Fte:
      case Bte:
      case Lte: {
        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 (!Wc(e[s], t[s], s, e, t, n, o))
            return !1;
        return !0;
      }
      case kte:
        return e.byteLength !== t.byteLength ? !1 : ld(new Uint8Array(e), new Uint8Array(t), n, o);
      case Tte:
        return e.byteLength !== t.byteLength || e.byteOffset !== t.byteOffset ? !1 : ld(new Uint8Array(e), new Uint8Array(t), n, o);
      case Ite:
        return e.name === t.name && e.message === t.message;
      case Yv: {
        if (!(ld(e.constructor, t.constructor, n, o) || mP(e) && mP(t)))
          return !1;
        const s = [...Object.keys(e), ...hP(e)], u = [...Object.keys(t), ...hP(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 (!Wc(f, p, d, e, t, n, o))
            return !1;
        }
        return !0;
      }
      default:
        return !1;
    }
  } finally {
    n.delete(e), n.delete(t);
  }
}
function jte(e, t) {
  return Vte(e, t, vte);
}
const Wte = "_splitView_pzp7c_6", Kte = "_sashContainer_pzp7c_13", qte = "_sash_pzp7c_13", Yte = "_splitViewContainer_pzp7c_24", Gte = "_splitViewView_pzp7c_31", Ute = "_vertical_pzp7c_37", Xte = "_horizontal_pzp7c_41", Qte = "_separatorBorder_pzp7c_45", xl = {
  splitView: Wte,
  sashContainer: Kte,
  sash: qte,
  splitViewContainer: Yte,
  splitViewView: Gte,
  vertical: Ute,
  horizontal: Xte,
  separatorBorder: Qte
};
let hE = !1, gE = !1, Ac;
typeof navigator == "object" && (Ac = navigator.userAgent, gE = Ac.includes("Macintosh"), hE = (Ac.includes("Macintosh") || Ac.includes("iPad") || Ac.includes("iPhone")) && !!navigator.maxTouchPoints && navigator.maxTouchPoints > 0);
const vE = hE, Zte = gE;
class Jte {
  _size;
  getSize() {
    return this._size;
  }
  setSize(t) {
    this._size = t;
  }
}
function Hf(e, t) {
  const n = e.length, o = n - t.length;
  return o >= 0 && e.slice(o, n) === t;
}
function ene(e) {
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
var bP = { exports: {} }, yP;
function tne() {
  return yP || (yP = 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 r(s, u, c) {
      this.fn = s, this.context = u, this.once = c || !1;
    }
    function i(s, u, c, d, f) {
      if (typeof c != "function")
        throw new TypeError("The listener must be a function");
      var p = new r(c, d || s, f), v = n ? n + u : u;
      return s._events[v] ? s._events[v].fn ? s._events[v] = [s._events[v], p] : s._events[v].push(p) : (s._events[v] = 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 v = n ? n + s : s;
      if (!this._events[v]) return !1;
      var g = this._events[v], m = arguments.length, x, S;
      if (g.fn) {
        switch (g.once && this.removeListener(s, g.fn, void 0, !0), m) {
          case 1:
            return g.fn.call(g.context), !0;
          case 2:
            return g.fn.call(g.context, u), !0;
          case 3:
            return g.fn.call(g.context, u, c), !0;
          case 4:
            return g.fn.call(g.context, u, c, d), !0;
          case 5:
            return g.fn.call(g.context, u, c, d, f), !0;
          case 6:
            return g.fn.call(g.context, u, c, d, f, p), !0;
        }
        for (S = 1, x = new Array(m - 1); S < m; S++)
          x[S - 1] = arguments[S];
        g.fn.apply(g.context, x);
      } else {
        var C = g.length, P;
        for (S = 0; S < C; S++)
          switch (g[S].once && this.removeListener(s, g[S].fn, void 0, !0), m) {
            case 1:
              g[S].fn.call(g[S].context);
              break;
            case 2:
              g[S].fn.call(g[S].context, u);
              break;
            case 3:
              g[S].fn.call(g[S].context, u, c);
              break;
            case 4:
              g[S].fn.call(g[S].context, u, c, d);
              break;
            default:
              if (!x) for (P = 1, x = new Array(m - 1); P < m; P++)
                x[P - 1] = arguments[P];
              g[S].fn.apply(g[S].context, x);
          }
      }
      return !0;
    }, l.prototype.on = function(s, u, c) {
      return i(this, s, u, c, !1);
    }, l.prototype.once = function(s, u, c) {
      return i(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 v = 0, g = [], m = p.length; v < m; v++)
          (p[v].fn !== u || d && !p[v].once || c && p[v].context !== c) && g.push(p[v]);
        g.length ? this._events[f] = g.length === 1 ? g[0] : g : 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;
  })(bP)), bP.exports;
}
var nne = tne();
const Fx = /* @__PURE__ */ ene(nne);
function xP(e, t) {
  const n = e.indexOf(t);
  n !== -1 && (e.splice(n, 1), e.unshift(t));
}
function Gv(e, t) {
  const n = e.indexOf(t);
  n !== -1 && (e.splice(n, 1), e.push(t));
}
function qr(e, t, n = 1) {
  const o = Math.max(0, Math.ceil((t - e) / n)), r = Array.from({ length: o });
  let i = -1;
  for (; ++i < o; )
    r[i] = e + i * n;
  return r;
}
const one = "_sash_j5cmb_7", rne = "_disabled_j5cmb_15", ine = "_mac_j5cmb_19", ane = "_vertical_j5cmb_19", lne = "_minimum_j5cmb_23", sne = "_maximum_j5cmb_27", une = "_horizontal_j5cmb_31", cne = "_hover_j5cmb_126", dne = "_active_j5cmb_127", ir = {
  sash: one,
  disabled: rne,
  mac: ine,
  vertical: ane,
  minimum: lne,
  maximum: sne,
  horizontal: une,
  hover: cne,
  active: dne
};
var yi = /* @__PURE__ */ ((e) => (e[e.Vertical = 0] = "Vertical", e[e.Horizontal = 1] = "Horizontal", e))(yi || {}), ss = /* @__PURE__ */ ((e) => (e[e.Disabled = 0] = "Disabled", e[e.Minimum = 1] = "Minimum", e[e.Maximum = 2] = "Maximum", e[e.Enabled = 3] = "Enabled", e))(ss || {});
let mE = vE ? 20 : 8;
const bE = new Fx();
function fne(e) {
  mE = e, bE.emit("onDidChangeGlobalSize", e);
}
class wP extends Fx {
  el;
  layoutProvider;
  orientation;
  size;
  hoverDelay = 300;
  hoverDelayerFunc = (t) => t.classList.add("sash-hover", ir.hover);
  hoverDelayer = gte(
    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(
      ir.disabled,
      t === 0
      /* Disabled */
    ), this.el.classList.toggle(
      "sash-disabled",
      t === 0
      /* Disabled */
    ), this.el.classList.toggle(
      ir.minimum,
      t === 1
      /* Minimum */
    ), this.el.classList.toggle(
      "sash-minimum",
      t === 1
      /* Minimum */
    ), this.el.classList.toggle(
      ir.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", ir.sash), this.el.dataset.testid = "sash", t.append(this.el), Zte && this.el.classList.add("sash-mac", ir.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 = mE, bE.on("onDidChangeGlobalSize", (r) => {
      this.size = r, this.layout();
    })), this.layoutProvider = n, this.orientation = o.orientation ?? 0, this.orientation === 1 ? (this.el.classList.add("sash-horizontal", ir.horizontal), this.el.classList.remove("sash-vertical", ir.vertical)) : (this.el.classList.remove("sash-horizontal", ir.horizontal), this.el.classList.add("sash-vertical", ir.vertical)), o.skipInitialLayout || this.layout();
  }
  onPointerStart = (t) => {
    const n = t.pageX, o = t.pageY, r = {
      startX: n,
      currentX: n,
      startY: o,
      currentY: o
    };
    this.el.classList.add("sash-active", ir.active), this.emit("start", r), this.el.setPointerCapture(t.pointerId);
    const i = (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", ir.active), this.hoverDelayer.cancel(), this.emit("end"), this.el.releasePointerCapture(l.pointerId), globalThis.removeEventListener("pointermove", i), globalThis.removeEventListener("pointerup", a);
    };
    globalThis.addEventListener("pointermove", i), globalThis.addEventListener("pointerup", a);
  };
  onPointerDoublePress = () => {
    this.emit("reset");
  };
  onMouseEnter = () => {
    this.el.classList.contains(ir.active) ? (this.hoverDelayer.cancel(), this.el.classList.add("sash-hover", ir.hover)) : this.hoverDelayer(this.el);
  };
  onMouseLeave = () => {
    this.hoverDelayer.cancel(), this.el.classList.remove("sash-hover", ir.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 yE = {
  /**
   * 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 th = /* @__PURE__ */ ((e) => (e[e.Normal = 0] = "Normal", e[e.Low = 1] = "Low", e[e.High = 2] = "High", e))(th || {});
class xE {
  container;
  view;
  _size;
  _cachedVisibleSize = void 0;
  constructor(t, n, o) {
    this.container = t, this.view = n, this.container.classList.add("split-view-view", xl.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 = mi(
      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 pne extends xE {
  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 hne extends xE {
  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 gne extends Fx {
  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, r, i) {
    if (super(), this._orientation = n.orientation ?? yi.Vertical, this._proportionalLayout = n.proportionalLayout ?? !0, this.getSashOrthogonalSize = n.getSashOrthogonalSize, o && (this.onDidChange = o), r && (this.onDidDragStart = r), i && (this.onDidDragEnd = i), this.sashContainer = document.createElement("div"), this.sashContainer.classList.add("sash-container", xl.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, r = this.viewItems.length, i) {
    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 === yi.Vertical ? new pne(t, n, a) : new hne(t, n, a);
    if (this.viewItems.splice(r, 0, l), this.viewItems.length > 1) {
      const s = this.orientation === yi.Vertical ? new wP(
        this.sashContainer,
        {
          getHorizontalSashTop: (d) => this.getSashPosition(d),
          getHorizontalSashWidth: this.getSashOrthogonalSize
        },
        { orientation: yi.Horizontal }
      ) : new wP(
        this.sashContainer,
        {
          getVerticalSashLeft: (d) => this.getSashPosition(d),
          getVerticalSashHeight: this.getSashOrthogonalSize
        },
        { orientation: yi.Vertical }
      ), u = this.orientation === yi.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((v) => v.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((m) => m.sash === s);
        if (d === -1) {
          const m = s.el;
          m && (d = this.sashItems.findIndex((x) => x.sash.el === m));
        }
        const f = qr(d, -1, -1), p = qr(d + 1, this.viewItems.length), v = this.findFirstSnapIndex(f), g = this.findFirstSnapIndex(p);
        typeof v == "number" && !this.viewItems[v].visible || typeof g == "number" && !this.viewItems[g].visible || this.emit("sashreset", d);
      });
      const c = { sash: s };
      this.sashItems.splice(r - 1, 0, c);
    }
    i || this.relayout(), !i && 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 r = Math.max(t - 1, 0);
      this.sashItems.splice(r, 1)[0].sash.dispose();
    }
    return this.relayout(), n && n.type === "distribute" && this.distributeViewSizes(), o;
  }
  moveView(t, n, o) {
    const r = this.getViewCachedVisibleSize(n), i = r === void 0 ? this.getViewSize(n) : yE.Invisible(r), a = this.removeView(n);
    this.addView(t, a, i, 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 r = this.viewItems[o];
        r && this.proportions[o] !== void 0 && (r.size = mi(
          Math.round(this.proportions[o] * t),
          r.minimumSize,
          r.maximumSize
        ));
      }
    else {
      const o = qr(0, this.viewItems.length), r = o.filter(
        (a) => this.viewItems[a] && this.viewItems[a].priority === 1
        /* Low */
      ), i = o.filter(
        (a) => this.viewItems[a] && this.viewItems[a].priority === 2
        /* High */
      );
      this.resize(
        this.viewItems.length - 1,
        t - n,
        void 0,
        r,
        i
      );
    }
    this.distributeEmptySpace(), this.layoutViews();
  }
  resizeView(t, n) {
    if (t < 0 || t >= this.viewItems.length)
      return;
    const o = qr(0, this.viewItems.length).filter((l) => l !== t), r = [
      ...o.filter(
        (l) => this.viewItems[l].priority === 1
        /* Low */
      ),
      t
    ], i = o.filter(
      (l) => this.viewItems[l].priority === 2
      /* High */
    ), a = this.viewItems[t];
    n = Math.round(n), n = mi(n, a.minimumSize, Math.min(a.maximumSize, this.size)), a.size = n, this.relayout(r, i);
  }
  resizeViews(t) {
    for (let [n, o] of t.entries()) {
      const r = this.viewItems[n];
      o = Math.round(o), o = mi(
        o,
        r.minimumSize,
        Math.min(r.maximumSize, this.size)
      ), r.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 = mi(o, l.minimumSize, l.maximumSize);
    const r = qr(0, this.viewItems.length), i = r.filter(
      (l) => this.viewItems[l].priority === 1
      /* Low */
    ), a = r.filter(
      (l) => this.viewItems[l].priority === 2
      /* High */
    );
    this.relayout(i, 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 r = this.sashItems.findIndex((v) => v.sash === t);
    if (r === -1) {
      const v = t.el;
      v && (r = this.sashItems.findIndex((g) => g.sash.el === v));
    }
    const i = this.viewItems.map((v) => v.size), a = qr(r, -1, -1), l = qr(r + 1, this.viewItems.length), s = this.getMinDelta(a, l, i), u = this.getMaxDelta(a, l, i);
    let c, d;
    const f = this.findFirstSnapIndex(a), p = this.findFirstSnapIndex(l);
    if (typeof f == "number") {
      const v = this.viewItems[f], g = Math.floor(v.minimumSize / 2);
      c = {
        index: f,
        limitDelta: v.visible ? s - g : s + g,
        size: v.size
      };
    }
    if (typeof p == "number") {
      const v = this.viewItems[p], g = Math.floor(v.minimumSize / 2);
      d = {
        index: p,
        limitDelta: v.visible ? u + g : u - g,
        size: v.size
      };
    }
    this.sashDragState = {
      index: r,
      start: n,
      current: o,
      sizes: i,
      minDelta: s,
      maxDelta: u,
      snapBefore: c,
      snapAfter: d
    };
  }
  onSashChange({ current: t }) {
    const { index: n, start: o, sizes: r, minDelta: i, maxDelta: a, snapBefore: l, snapAfter: s } = this.sashDragState, u = t - o;
    this.resize(n, u, r, void 0, void 0, i, 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 r = t.reduce(
      (a, l) => a + (this.viewItems[l].minimumSize - o[l]),
      0
    ), i = n.reduce(
      (a, l) => a + (o[l] - this.viewItems[l].maximumSize),
      0
    );
    return Math.max(r, i);
  }
  getMaxDelta(t, n, o) {
    const r = t.reduce(
      (a, l) => a + (this.viewItems[l].maximumSize - o[l]),
      0
    ), i = n.reduce(
      (a, l) => a + (o[l] - this.viewItems[l].minimumSize),
      0
    );
    return Math.min(i, r);
  }
  resize(t, n, o, r, i, 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 = qr(t, -1, -1), d = qr(t + 1, this.viewItems.length);
    if (i)
      for (const T of i)
        xP(c, T), xP(d, T);
    if (r)
      for (const T of r)
        Gv(c, T), Gv(d, T);
    const f = o ?? this.viewItems.map((T) => T?.size || 0), p = c.map((T) => this.viewItems[T]), v = c.map((T) => f[T]), g = d.map((T) => this.viewItems[T]), m = d.map((T) => f[T]), x = c.reduce(
      (T, M) => T + (this.viewItems[M].minimumSize - f[M]),
      0
    ), S = c.reduce(
      (T, M) => T + (this.viewItems[M].maximumSize - f[M]),
      0
    ), C = d.length === 0 ? Number.POSITIVE_INFINITY : d.reduce(
      (T, M) => T + (f[M] - this.viewItems[M].minimumSize),
      0
    ), P = d.length === 0 ? Number.NEGATIVE_INFINITY : d.reduce(
      (T, M) => T + (f[M] - this.viewItems[M].maximumSize),
      0
    ), $ = Math.max(x, P, a), I = Math.min(C, S, l);
    let w = !1;
    if (s) {
      const T = this.viewItems[s.index], M = n >= s.limitDelta;
      w = M !== T.visible, T.setVisible(M, s.size);
    }
    if (!w && u) {
      const T = this.viewItems[u.index], M = n < u.limitDelta;
      w = M !== T.visible, T.setVisible(M, u.size);
    }
    if (w)
      return this.resize(
        t,
        n,
        o,
        r,
        i,
        a,
        l
      );
    n = mi(n, $, I);
    for (let T = 0, M = n; T < p.length; T++) {
      const R = p[T];
      if (!R)
        continue;
      const N = mi(
        v[T] + M,
        R.minimumSize,
        R.maximumSize
      ), H = N - v[T];
      M -= H, R.size = N;
    }
    for (let T = 0, M = n; T < g.length; T++) {
      const R = g[T];
      if (!R)
        continue;
      const N = mi(
        m[T] - M,
        R.minimumSize,
        R.maximumSize
      ), H = N - m[T];
      M += H, R.size = N;
    }
    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 r = qr(0, this.viewItems.length), i = [], a = r.filter(
      (u) => this.viewItems[u].priority === 1
      /* Low */
    ), l = r.filter(
      (u) => this.viewItems[u].priority === 0
      /* Normal */
    ), s = r.filter(
      (u) => this.viewItems[u].priority === 2
      /* High */
    );
    i.push(
      ...s,
      ...l,
      ...a
    ), typeof t == "number" && Gv(i, t);
    for (let u = 0; o !== 0 && u < i.length; u++) {
      const c = this.viewItems[i[u]];
      if (!c)
        continue;
      const d = mi(
        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((r, i) => r + i.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 r = 0; r < this.sashItems.length; r++)
      if (this.sashItems[r].sash === t) {
        n = r;
        break;
      }
    if (n === -1) {
      const r = t.el || t;
      if (r) {
        for (let i = 0; i < this.sashItems.length; i++)
          if ((this.sashItems[i].sash.el || this.sashItems[i].sash) === r) {
            n = i;
            break;
          }
      }
    }
    if (n === -1)
      return 0;
    let o = 0;
    for (let r = 0; r <= n; r++)
      this.viewItems[r] && (o += this.viewItems[r].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
    ), r = [...this.viewItems].toReversed();
    t = !1;
    const i = r.map((s) => t = s.size - s.minimumSize > 0 || t).toReversed();
    t = !1;
    const a = r.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] && i[s + 1]);
      if (d && f) {
        const p = qr(s, -1, -1), v = qr(s + 1, this.viewItems.length), g = this.findFirstSnapIndex(p), m = this.findFirstSnapIndex(v), x = typeof g == "number" && !this.viewItems[g].visible, S = typeof m == "number" && !this.viewItems[m].visible;
        x && i[s] && (l > 0 || this.startSnappingEnabled) ? u.state = ss.Minimum : S && n[s] && (l < this.contentSize || this.endSnappingEnabled) ? u.state = ss.Maximum : u.state = ss.Disabled;
      } else d && !f ? u.state = ss.Minimum : !d && f ? u.state = ss.Maximum : u.state = ss.Enabled;
    }
  }
}
class du {
  size;
  constructor(t) {
    this.size = t;
  }
  getPreferredSize() {
    return this.size;
  }
}
class SP {
  proportion;
  layoutService;
  constructor(t, n) {
    this.proportion = t, this.layoutService = n;
  }
  getPreferredSize() {
    return this.proportion * this.layoutService.getSize();
  }
}
class Vf {
  getPreferredSize() {
  }
}
class CP {
  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 du(t);
    else if (typeof t == "string") {
      const n = t.trim();
      if (Hf(n, "%")) {
        const o = Number(n.slice(0, -1)) / 100;
        this.layoutStrategy = new SP(
          o,
          this.layoutService
        );
      } else if (Hf(n, "px")) {
        const o = Number(n.slice(0, -2));
        this.layoutStrategy = new du(o);
      } else if (typeof Number.parseFloat(n) == "number") {
        const o = Number.parseFloat(n);
        this.layoutStrategy = new du(o);
      } else
        this.layoutStrategy = new Vf();
    } else
      this.layoutStrategy = new Vf();
  }
  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 du(n.preferredSize);
    else if (typeof n.preferredSize == "string") {
      const o = n.preferredSize.trim();
      if (Hf(o, "%")) {
        const r = Number(o.slice(0, -1)) / 100;
        this.layoutStrategy = new SP(
          r,
          this.layoutService
        );
      } else if (Hf(o, "px")) {
        const r = Number(o.slice(0, -2));
        this.layoutStrategy = new du(r);
      } else if (typeof Number.parseFloat(o) == "number") {
        const r = Number.parseFloat(o);
        this.layoutStrategy = new du(r);
      } else
        this.layoutStrategy = new Vf();
    } else
      this.layoutStrategy = new Vf();
    this.priority = n.priority ?? th.Normal;
  }
  layout(t) {
  }
}
function vne(e) {
  const t = mi(e, 4, 20), n = mi(e, 1, 8);
  document.documentElement.style.setProperty("--sash-size", `${t}px`), document.documentElement.style.setProperty(
    "--sash-hover-size",
    `${n}px`
  ), fne(t);
}
const mne = ["id"], bne = /* @__PURE__ */ be({
  __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, r = n, i = le(), a = le(), l = le(!1), s = le(null), u = $n(/* @__PURE__ */ new Map()), c = $n(/* @__PURE__ */ new Map()), d = le(new Jte()), f = le([]), p = le([]), v = le(null), g = RE();
    Bt("allotment", {
      registerPane: (w, T, M) => {
        u.set(w, T), c.set(w, M), l.value && Yt(() => {
          $();
        });
      },
      unregisterPane: (w) => {
        u.delete(w), c.delete(w);
      },
      registerNonPane: (w, T) => {
        u.set(w, T), c.set(w, {});
      }
    });
    const m = E(() => {
      const w = g.default?.({}) || [], T = (M) => {
        const R = [];
        for (const N of M)
          Array.isArray(N.children) ? R.push(...T(N.children)) : N.type && R.push(N);
        return R;
      };
      return T(w);
    });
    function x(w) {
      const T = f.value?.[w];
      return typeof T?.preferredSize != "number" ? !1 : (s.value?.resizeView(w, Math.round(T.preferredSize)), !0);
    }
    function S() {
      if (r("reset"), !!s.value) {
        s.value.distributeViewSizes();
        for (let w = 0; w < f.value.length; w++)
          x(w);
      }
    }
    function C(w) {
      s.value?.resizeViews(w);
    }
    t({
      reset: S,
      resize: C
    });
    function P() {
      if (!i.value)
        return;
      let w = !0;
      o.defaultSizes && u.size !== o.defaultSizes.length && (w = !1, console.warn(
        `Expected ${o.defaultSizes.length} children based on defaultSizes but found ${u.size}`
      ));
      const T = o.vertical ? i.value.clientHeight : i.value.clientWidth;
      d.value.setSize(T);
      let M = o.defaultSizes;
      if (!o.defaultSizes && u.size > 0) {
        const N = Math.floor(T / u.size);
        M = Array.from({ length: u.size }, () => N), M[M.length - 1] += T - N * u.size, w = !0, p.value = m.value.map(
          (H) => H.key
        );
      } else if (o.defaultSizes) {
        const N = o.defaultSizes.reduce((H, L) => H + L, 0);
        if (T > 0 && N > 0 && Math.abs(T - N) > 1) {
          const H = T / N;
          M = o.defaultSizes.map((L) => Math.round(L * H));
        }
        p.value = m.value.map(
          (H) => H.key
        );
      }
      f.value = [];
      const R = {
        orientation: o.vertical ? yi.Vertical : yi.Horizontal,
        proportionalLayout: o.proportionalLayout,
        ...w && M && {
          descriptor: {
            size: M.reduce((N, H) => N + H, 0),
            views: M.map((N, H) => {
              const L = [...u.keys()][H], F = c.get(L), A = new CP(d.value, {
                element: document.createElement("div"),
                minimumSize: F?.minSize ?? o.minSize,
                maximumSize: F?.maxSize ?? o.maxSize,
                priority: F?.priority ?? th.Normal,
                ...F?.preferredSize && {
                  preferredSize: F?.preferredSize
                },
                snap: F?.snap ?? o.snap
              });
              return f.value.push(A), {
                container: [...u.values()][H],
                size: N,
                view: A
              };
            })
          }
        }
      };
      if (s.value = new gne(
        i.value,
        R,
        (N) => r("change", N),
        (N) => r("dragStart", N),
        (N) => r("dragEnd", N)
      ), s.value.on("sashDragStart", () => {
        i.value?.classList.add("split-view-sash-dragging");
      }), s.value.on("sashDragEnd", () => {
        i.value?.classList.remove("split-view-sash-dragging");
      }), s.value.on("sashchange", (N) => {
        if (s.value) {
          const H = m.value.map((L) => L.key);
          for (const [L, F] of H.entries()) {
            const A = c.get(F);
            A?.visible !== void 0 && A.visible !== s.value.isViewVisible(L) && r("visibleChange", L, s.value.isViewVisible(L));
          }
        }
      }), s.value?.on("sashreset", (N) => {
        r("reset"), !x(N) && (x(N + 1) || s.value?.distributeViewSizes());
      }), T > 0) {
        s.value.layout(T);
        for (let N = 0; N < f.value.length; N++)
          x(N);
      }
    }
    function $() {
      if (!l.value || !s.value)
        return;
      const w = m.value.map((H) => H.key), T = [...p.value], M = w.filter((H) => !p.value.includes(H)), R = w.filter((H) => p.value.includes(H)), N = p.value.map((H, L) => ({ key: H, index: L, shouldExit: !w.includes(H) }));
      for (let H = N.length - 1; H >= 0; H--)
        N[H].shouldExit && (s.value.removeView(N[H].index), T.splice(N[H].index, 1), f.value.splice(N[H].index, 1));
      for (const H of M) {
        const L = c.get(H), F = new CP(d.value, {
          element: document.createElement("div"),
          minimumSize: L?.minSize ?? o.minSize,
          maximumSize: L?.maxSize ?? o.maxSize,
          priority: L?.priority ?? th.Normal,
          ...L?.preferredSize && {
            preferredSize: L?.preferredSize
          },
          snap: L?.snap ?? o.snap
        }), A = w.indexOf(H);
        s.value.addView(
          u.get(H),
          F,
          yE.Distribute,
          A
        ), T.splice(A, 0, H), f.value.splice(A, 0, F);
      }
      for (; !jte(w, T); )
        for (const [H, L] of w.entries()) {
          const F = T.indexOf(L);
          if (F !== H) {
            s.value.moveView(
              u.get(L),
              F,
              H
            );
            const A = T[F];
            T.splice(F, 1), T.splice(H, 0, A);
            const G = f.value[F];
            f.value.splice(F, 1), f.value.splice(H, 0, G);
            break;
          }
        }
      for (const H of [...M, ...R]) {
        const L = c.get(H), F = w.indexOf(H);
        if (L) {
          L.visible !== void 0 && s.value.isViewVisible(F) !== L.visible && s.value.setViewVisible(F, L.visible), L.preferredSize !== void 0 && f.value[F].preferredSize !== L.preferredSize && (f.value[F].preferredSize = L.preferredSize, x(F));
          let A = !1;
          L.minSize !== void 0 && f.value[F].minimumSize !== L.minSize && (f.value[F].minimumSize = L.minSize, A = !0), L.maxSize !== void 0 && f.value[F].maximumSize !== L.maxSize && (f.value[F].maximumSize = L.maxSize, A = !0), A && s.value.layout();
        }
      }
      (M.length > 0 || N.some((H) => H.shouldExit)) && (p.value = w);
    }
    function I() {
      i.value && (v.value = new ResizeObserver(() => {
        if (i.value) {
          const w = o.vertical ? i.value.clientHeight : i.value.clientWidth;
          w > 0 && (s.value?.layout(w), d.value.setSize(w), l.value || (l.value = !0));
        }
      }), v.value.observe(i.value));
    }
    return At(() => {
      vE && vne(20), Yt(() => {
        P(), I(), setTimeout(() => {
          if (i.value && s.value) {
            const w = o.vertical ? i.value.clientHeight : i.value.clientWidth;
            w > 0 && s.value.layout(w);
          }
        }, 50);
      });
    }), Ie(m, () => {
      Yt(() => {
        $();
      });
    }, { deep: !0 }), Ie(() => o.vertical, (w) => {
      s.value && (s.value.orientation = w ? yi.Vertical : yi.Horizontal, s.value.layout());
    }), Ie(() => o.proportionalLayout, (w) => {
      s.value && (s.value.proportionalLayout = w);
    }), Vo(() => {
      v.value?.disconnect(), s.value?.dispose();
    }), (w, T) => (ne(), xe("div", {
      id: w.id,
      ref_key: "containerRef",
      ref: i,
      class: Pt(["split-view", [
        w.vertical ? "split-view-vertical" : "split-view-horizontal",
        { "split-view-separator-border": w.separator },
        _(xl).splitView,
        w.vertical ? _(xl).vertical : _(xl).horizontal,
        { [_(xl).separatorBorder]: w.separator },
        w.className
      ]])
    }, [
      B("div", {
        ref_key: "splitViewContainerRef",
        ref: a,
        class: Pt(["split-view-container", [_(xl).splitViewContainer]])
      }, [
        lr(w.$slots, "default", {}, void 0, !0)
      ], 2)
    ], 10, mne));
  }
}), yne = (e, t) => {
  const n = e.__vccOpts || e;
  for (const [o, r] of t)
    n[o] = r;
  return n;
}, $P = /* @__PURE__ */ yne(bne, [["__scopeId", "data-v-e77a1ca4"]]), jf = /* @__PURE__ */ be({
  __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(), r = pr(), i = zt("allotment");
    function a() {
      return r?.vnode.key || `pane-${Math.random().toString(36).slice(2, 11)}`;
    }
    const l = a();
    return At(() => {
      i && o.value && i.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) => {
      i && o.value && i.registerPane(l, o.value, {
        minSize: s.minSize,
        maxSize: s.maxSize,
        preferredSize: s.preferredSize,
        priority: s.priority,
        snap: s.snap,
        visible: s.visible
      });
    }, { deep: !0 }), Vo(() => {
      i && i.unregisterPane(l);
    }), t({
      element: o
    }), (s, u) => (ne(), xe("div", {
      ref_key: "paneRef",
      ref: o,
      class: Pt(["split-view-view", [
        s.visible && "split-view-view-visible",
        _(xl).splitViewView,
        s.className
      ]])
    }, [
      lr(s.$slots, "default")
    ], 2));
  }
}), xne = { class: "flex flex-col gap-3" }, wne = { class: "text-xs text-secondary mb-1" }, Sne = { class: "text-xs text-secondary mb-1" }, Cne = { class: "text-xs text-secondary mb-1" }, $ne = { class: "text-xs text-secondary mb-1" }, Pne = { class: "text-xs text-secondary mb-1" }, One = { class: "text-xs text-secondary mb-1" }, kne = ["value"], Ine = { class: "text-xs text-secondary mb-1" }, Tne = { class: "text-xs text-secondary mb-1" }, _ne = { class: "text-xs text-secondary mb-1" }, Mne = { class: "text-xs text-secondary mb-1" }, Ene = { class: "text-xs text-secondary mb-1" }, Dne = { class: "text-xs text-secondary mb-1" }, Ane = ["value"], Nne = { class: "text-xs text-secondary mb-1" }, Rne = { class: "text-xs text-secondary mb-1" }, zne = { key: 0 }, Fne = { class: "text-xs text-secondary mb-1" }, Bne = ["value"], Lne = { class: "text-xs text-secondary mb-1" }, Hne = /* @__PURE__ */ be({
  __name: "AxesSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const { t } = sn();
    return (n, o) => {
      const r = yn("a-radio-button"), i = yn("a-radio-group"), a = yn("a-switch");
      return ne(), xe("div", xne, [
        B("div", null, [
          B("div", wne, oe(_(t)("config.field.axisPlacement")), 1),
          h(i, {
            size: "small",
            value: e.panel.axisPlacement ?? "left",
            onChange: o[0] || (o[0] = (l) => e.onChange({ axisPlacement: l.target.value }))
          }, {
            default: he(() => [
              h(r, { value: "left" }, {
                default: he(() => [
                  Le(oe(_(t)("config.axis.placement.left")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "right" }, {
                default: he(() => [
                  Le(oe(_(t)("config.axis.placement.right")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "hidden" }, {
                default: he(() => [
                  Le(oe(_(t)("config.axis.placement.hidden")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        B("div", null, [
          B("div", Sne, oe(_(t)("config.field.axisLabel")), 1),
          h(_(kt), {
            size: "small",
            value: e.panel.axisLabel ?? "",
            placeholder: _(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", Cne, oe(_(t)("config.field.axisName")), 1),
          h(_(kt), {
            size: "small",
            value: e.panel.axisName ?? "",
            placeholder: _(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", $ne, oe(_(t)("config.field.axisWidth")), 1),
          h(_(_o), {
            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", Pne, oe(_(t)("config.field.showGridLines")), 1),
          h(i, {
            size: "small",
            value: e.panel.showGridLines ?? "all",
            onChange: o[4] || (o[4] = (l) => e.onChange({ showGridLines: l.target.value }))
          }, {
            default: he(() => [
              h(r, { value: "all" }, {
                default: he(() => [
                  Le(oe(_(t)("config.axis.grid.all")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "x" }, {
                default: he(() => [
                  Le(oe(_(t)("config.axis.grid.x")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "y" }, {
                default: he(() => [
                  Le(oe(_(t)("config.axis.grid.y")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "hidden" }, {
                default: he(() => [
                  Le(oe(_(t)("config.axis.grid.hidden")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        B("div", null, [
          B("div", One, oe(_(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, kne)
        ]),
        B("div", null, [
          B("div", Ine, oe(_(t)("config.field.scaleDistribution")), 1),
          h(i, {
            size: "small",
            value: e.panel.scaleDistribution ?? "linear",
            onChange: o[6] || (o[6] = (l) => e.onChange({ scaleDistribution: l.target.value }))
          }, {
            default: he(() => [
              h(r, { value: "linear" }, {
                default: he(() => [
                  Le(oe(_(t)("config.axis.scale.linear")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "logarithmic" }, {
                default: he(() => [
                  Le(oe(_(t)("config.axis.scale.logarithmic")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        B("div", null, [
          B("div", Tne, oe(_(t)("config.field.softMin")), 1),
          h(_(_o), {
            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", _ne, oe(_(t)("config.field.softMax")), 1),
          h(_(_o), {
            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", Mne, oe(_(t)("config.field.centeredZero")), 1),
          h(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", Ene, oe(_(t)("config.field.axisLine")), 1),
          h(i, {
            size: "small",
            value: e.panel.axisLabel ?? "all",
            onChange: o[10] || (o[10] = (l) => e.onChange({ axisLabel: l.target.value }))
          }, {
            default: he(() => [
              h(r, { value: "all" }, {
                default: he(() => [
                  Le(oe(_(t)("config.axis.grid.all")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "x" }, {
                default: he(() => [...o[16] || (o[16] = [
                  Le(" X ", -1)
                ])]),
                _: 1
              }),
              h(r, { value: "y" }, {
                default: he(() => [...o[17] || (o[17] = [
                  Le(" Y ", -1)
                ])]),
                _: 1
              }),
              h(r, { value: "hidden" }, {
                default: he(() => [
                  Le(oe(_(t)("config.axis.grid.hidden")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        B("div", null, [
          B("div", Dne, oe(_(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, Ane)
        ]),
        B("div", null, [
          B("div", Nne, oe(_(t)("config.field.axisTickShow")), 1),
          h(i, {
            size: "small",
            value: e.panel.axisTick ?? "hidden",
            onChange: o[12] || (o[12] = (l) => e.onChange({ axisTick: l.target.value }))
          }, {
            default: he(() => [
              h(r, { value: "all" }, {
                default: he(() => [
                  Le(oe(_(t)("config.axis.grid.all")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "x" }, {
                default: he(() => [...o[18] || (o[18] = [
                  Le(" X ", -1)
                ])]),
                _: 1
              }),
              h(r, { value: "y" }, {
                default: he(() => [...o[19] || (o[19] = [
                  Le(" Y ", -1)
                ])]),
                _: 1
              }),
              h(r, { value: "hidden" }, {
                default: he(() => [
                  Le(oe(_(t)("config.axis.grid.hidden")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        B("div", null, [
          B("div", Rne, oe(_(t)("config.field.axisBorder")), 1),
          h(i, {
            size: "small",
            value: e.panel.axisBorder ?? "hidden",
            onChange: o[13] || (o[13] = (l) => e.onChange({ axisBorder: l.target.value }))
          }, {
            default: he(() => [
              h(r, { value: "all" }, {
                default: he(() => [
                  Le(oe(_(t)("config.axis.grid.all")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "x" }, {
                default: he(() => [...o[20] || (o[20] = [
                  Le(" X ", -1)
                ])]),
                _: 1
              }),
              h(r, { value: "y" }, {
                default: he(() => [...o[21] || (o[21] = [
                  Le(" Y ", -1)
                ])]),
                _: 1
              }),
              h(r, { value: "hidden" }, {
                default: he(() => [
                  Le(oe(_(t)("config.axis.grid.hidden")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        e.panel.axisBorder && e.panel.axisBorder !== "hidden" ? (ne(), xe("div", zne, [
          B("div", Fne, oe(_(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, Bne)
        ])) : nt("", !0),
        B("div", null, [
          B("div", Lne, oe(_(t)("config.field.logScale")), 1),
          h(a, {
            size: "small",
            checked: e.panel.scaleDistribution === "logarithmic",
            onChange: o[15] || (o[15] = (l) => e.onChange({ scaleDistribution: l ? "logarithmic" : "linear" }))
          }, null, 8, ["checked"])
        ])
      ]);
    };
  }
}), Vne = { class: "flex flex-col gap-3" }, jne = { class: "text-xs text-secondary mb-1" }, Wne = { class: "text-xs text-secondary mb-1" }, Kne = { class: "text-xs text-secondary mb-1" }, qne = { class: "text-xs text-secondary mb-1" }, Yne = { class: "text-xs text-secondary mb-1" }, Gne = { class: "text-xs text-secondary mb-1" }, Une = { class: "text-xs text-secondary mb-1" }, Xne = /* @__PURE__ */ be({
  __name: "BarStyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const { t } = sn();
    return (n, o) => {
      const r = yn("a-radio-button"), i = yn("a-radio-group"), a = yn("a-switch"), l = yn("a-input-number");
      return ne(), xe("div", Vne, [
        B("div", null, [
          B("div", jne, oe(_(t)("config.field.barShowValues")), 1),
          h(i, {
            size: "small",
            value: e.panel.barShowValues ?? "auto",
            onChange: o[0] || (o[0] = (s) => e.onChange({ barShowValues: s.target.value }))
          }, {
            default: he(() => [
              h(r, { value: "auto" }, {
                default: he(() => [
                  Le(oe(_(t)("config.showValues.auto")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "always" }, {
                default: he(() => [
                  Le(oe(_(t)("config.showValues.always")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "never" }, {
                default: he(() => [
                  Le(oe(_(t)("config.showValues.never")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        B("div", null, [
          B("div", Wne, oe(_(t)("config.field.barGroupWidth")), 1),
          h(_(yr), {
            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", Kne, oe(_(t)("config.field.barWidth")), 1),
          h(_(yr), {
            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", qne, oe(_(t)("config.field.stacked")), 1),
          h(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", Yne, oe(_(t)("config.field.lineWidth")), 1),
          h(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", Gne, oe(_(t)("config.field.fillOpacity")), 1),
          h(_(yr), {
            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", Une, oe(_(t)("config.field.xTickRotation")), 1),
          h(a, {
            size: "small",
            checked: e.panel.barXTickRotation ?? !1,
            onChange: o[6] || (o[6] = (s) => e.onChange({ barXTickRotation: s }))
          }, null, 8, ["checked"])
        ])
      ]);
    };
  }
}), Qne = { class: "flex flex-col gap-3" }, Zne = { class: "text-xs text-secondary mb-1" }, Jne = { class: "text-xs text-secondary mb-1" }, eoe = { class: "text-xs text-secondary mb-1" }, toe = ["value"], noe = { class: "text-xs text-secondary mb-1" }, ooe = { class: "text-xs text-secondary mb-1" }, roe = { class: "text-xs text-secondary mb-1" }, ioe = { class: "text-xs text-secondary mb-1" }, aoe = { class: "text-xs text-secondary mb-1" }, loe = { key: 0 }, soe = { class: "text-xs text-secondary mb-1" }, uoe = ["value"], coe = { class: "text-xs text-secondary mb-1" }, doe = { class: "text-xs text-secondary mb-1" }, foe = { class: "text-xs text-secondary mb-1" }, poe = { class: "text-xs text-secondary mb-1" }, hoe = { class: "text-xs text-secondary mb-1" }, goe = { class: "text-xs text-secondary mb-1" }, voe = /* @__PURE__ */ be({
  __name: "GaugeStyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const { t } = sn();
    return (n, o) => {
      const r = yn("a-switch"), i = yn("a-radio-button"), a = yn("a-radio-group");
      return ne(), xe("div", Qne, [
        B("div", null, [
          B("div", Zne, oe(_(t)("config.gauge.fillWidth")), 1),
          h(_(yr), {
            min: 1,
            max: 100,
            value: e.panel.gaugeFillWidth ?? _(Gn).fillWidth,
            onChange: o[0] || (o[0] = (l) => e.onChange({ gaugeFillWidth: l }))
          }, null, 8, ["value"])
        ]),
        B("div", null, [
          B("div", Jne, oe(_(t)("config.gauge.trackWidth")), 1),
          h(_(yr), {
            min: 1,
            max: 100,
            value: e.panel.gaugeTrackWidth ?? _(Gn).trackWidth,
            onChange: o[1] || (o[1] = (l) => e.onChange({ gaugeTrackWidth: l }))
          }, null, 8, ["value"])
        ]),
        B("div", null, [
          B("div", eoe, oe(_(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, toe)
        ]),
        B("div", null, [
          B("div", noe, oe(_(t)("config.gauge.arcSweep")), 1),
          h(_(yr), {
            min: 30,
            max: 360,
            value: e.panel.sweepAngle ?? _(Gn).sweepAngle,
            onChange: o[3] || (o[3] = (l) => e.onChange({ sweepAngle: l }))
          }, null, 8, ["value"])
        ]),
        B("div", null, [
          B("div", ooe, oe(_(t)("config.gauge.paddingX")), 1),
          h(_(yr), {
            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", roe, oe(_(t)("config.gauge.paddingY")), 1),
          h(_(yr), {
            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", ioe, oe(_(t)("config.gauge.capRound")), 1),
          h(r, {
            size: "small",
            checked: e.panel.gaugeCapRound ?? _(Gn).capRound,
            onChange: o[6] || (o[6] = (l) => e.onChange({ gaugeCapRound: l }))
          }, null, 8, ["checked"])
        ]),
        B("div", null, [
          B("div", aoe, oe(_(t)("config.gauge.valueVisible")), 1),
          h(r, {
            size: "small",
            checked: e.panel.gaugeValueVisible ?? _(Gn).valueVisible,
            onChange: o[7] || (o[7] = (l) => e.onChange({ gaugeValueVisible: l }))
          }, null, 8, ["checked"])
        ]),
        e.panel.gaugeValueVisible !== !1 ? (ne(), xe("div", loe, [
          B("div", soe, oe(_(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, uoe)
        ])) : nt("", !0),
        B("div", null, [
          B("div", coe, oe(_(t)("config.gauge.valueSize")), 1),
          h(_(_o), {
            size: "small",
            min: 8,
            max: 80,
            value: e.panel.gaugeValueSize ?? _(Gn).valueSize,
            suffix: "px",
            style: { width: "100%" },
            onChange: o[9] || (o[9] = (l) => e.onChange({ gaugeValueSize: l ?? _(Gn).valueSize }))
          }, null, 8, ["value"])
        ]),
        B("div", null, [
          B("div", doe, oe(_(t)("config.gauge.valueOffsetY")), 1),
          h(_(_o), {
            size: "small",
            min: -50,
            max: 50,
            value: e.panel.gaugeValueOffsetY ?? _(Gn).valueOffsetY,
            suffix: "px",
            style: { width: "100%" },
            onChange: o[10] || (o[10] = (l) => e.onChange({ gaugeValueOffsetY: l ?? _(Gn).valueOffsetY }))
          }, null, 8, ["value"])
        ]),
        B("div", null, [
          B("div", foe, oe(_(t)("config.gauge.colorFromScheme")), 1),
          h(r, {
            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", poe, oe(_(t)("config.gauge.thresholdDisplay")), 1),
          h(a, {
            size: "small",
            value: e.panel.gaugeThresholdDisplay ?? _(Gn).thresholdDisplay,
            onChange: o[12] || (o[12] = (l) => e.onChange({ gaugeThresholdDisplay: l.target.value }))
          }, {
            default: he(() => [
              h(i, { value: "none" }, {
                default: he(() => [
                  Le(oe(_(t)("config.gauge.thresholdDisplayNone")), 1)
                ]),
                _: 1
              }),
              h(i, { value: "marker" }, {
                default: he(() => [
                  Le(oe(_(t)("config.gauge.thresholdDisplayMarker")), 1)
                ]),
                _: 1
              }),
              h(i, { value: "track" }, {
                default: he(() => [
                  Le(oe(_(t)("config.gauge.thresholdDisplayTrack")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        B("div", null, [
          B("div", hoe, oe(_(t)("config.gauge.thresholdLabelDisplay")), 1),
          h(a, {
            size: "small",
            value: e.panel.gaugeThresholdLabelDisplay ?? "none",
            onChange: o[13] || (o[13] = (l) => e.onChange({ gaugeThresholdLabelDisplay: l.target.value }))
          }, {
            default: he(() => [
              h(i, { value: "none" }, {
                default: he(() => [
                  Le(oe(_(t)("config.gauge.thresholdLabelNone")), 1)
                ]),
                _: 1
              }),
              h(i, { value: "label" }, {
                default: he(() => [
                  Le(oe(_(t)("config.gauge.thresholdLabelLabel")), 1)
                ]),
                _: 1
              }),
              h(i, { value: "value" }, {
                default: he(() => [
                  Le(oe(_(t)("config.gauge.thresholdLabelValue")), 1)
                ]),
                _: 1
              }),
              h(i, { value: "both" }, {
                default: he(() => [
                  Le(oe(_(t)("config.gauge.thresholdLabelBoth")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        B("div", null, [
          B("div", goe, oe(_(t)("config.gauge.orientation")), 1),
          h(a, {
            size: "small",
            value: e.panel.gaugeOrientation ?? _(Gn).orientation,
            onChange: o[14] || (o[14] = (l) => e.onChange({ gaugeOrientation: l.target.value }))
          }, {
            default: he(() => [
              h(i, { value: "auto" }, {
                default: he(() => [
                  Le(oe(_(t)("config.gauge.orientationAuto")), 1)
                ]),
                _: 1
              }),
              h(i, { value: "horizontal" }, {
                default: he(() => [
                  Le(oe(_(t)("config.gauge.orientationHorizontal")), 1)
                ]),
                _: 1
              }),
              h(i, { value: "vertical" }, {
                default: he(() => [
                  Le(oe(_(t)("config.gauge.orientationVertical")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ])
      ]);
    };
  }
}), bt = {
  // 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"
}, moe = { class: "inline-flex gap-0.5 items-center" }, boe = /* @__PURE__ */ be({
  __name: "PaletteSwatches",
  props: {
    colors: {}
  },
  setup(e) {
    return (t, n) => (ne(), xe("span", moe, [
      (ne(!0), xe(Je, null, Ut(e.colors, (o, r) => (ne(), xe("span", {
        key: `${o}-${r}`,
        class: "inline-block rounded-sm flex-shrink-0",
        style: Ht({ width: "12px", height: "12px", background: o })
      }, null, 4))), 128))
    ]));
  }
}), yoe = [
  { value: "classic", colors: Il.slice(0, 8) },
  { value: "tableau10", colors: Yr.tableau10.slice(0, 8) },
  { value: "grafana-classic", colors: Yr["grafana-classic"].slice(0, 8) },
  { value: "green-yellow-red", colors: Yr["green-yellow-red"] },
  { value: "red-yellow-green", colors: Yr["red-yellow-green"] },
  { value: "blue-yellow-red", colors: Yr["blue-yellow-red"] },
  { value: "blue-purple", colors: Yr["blue-purple"] },
  { value: "yellow-blue", colors: Yr["yellow-blue"] },
  { value: "blues", colors: Yr.blues },
  { value: "reds", colors: Yr.reds },
  { value: "GrYlRd", colors: Yr.GrYlRd },
  { value: "purple-orange", colors: Yr["purple-orange"] },
  { value: "fixed", colors: [] },
  { value: "thresholds", colors: [] }
], xoe = { class: "flex flex-col gap-3" }, woe = { class: "text-xs text-secondary mb-1" }, Soe = { class: "text-xs text-secondary mb-1" }, Coe = { class: "text-xs text-secondary mb-1" }, $oe = { class: "inline-flex items-center gap-1.5" }, Poe = { key: 0 }, Ooe = { class: "text-xs text-secondary mb-1" }, koe = ["value"], Ioe = { key: 1 }, Toe = { class: "text-xs text-secondary mb-1" }, _oe = { class: "text-xs text-secondary mb-1" }, Moe = { class: "flex gap-1 items-center" }, Eoe = { class: "flex items-center gap-1" }, Doe = { class: "text-xs text-secondary" }, PP = /* @__PURE__ */ be({
  __name: "GeneralSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = sn(), o = yoe.map((l) => ({
      value: l.value,
      label: n(`config.scheme.${l.value}`),
      colors: l.colors
    }));
    function r() {
      const l = [...t.panel.links ?? [], { title: "", url: "", newTab: !0 }];
      t.onChange({ links: l });
    }
    function i(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 = yn("a-switch");
      return ne(), xe("div", xoe, [
        B("div", null, [
          B("div", woe, oe(_(n)("config.field.title")), 1),
          h(_(kt), {
            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", Soe, oe(_(n)("config.field.description")), 1),
          h(_(kt), {
            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", Coe, oe(_(n)("config.field.colorScheme")), 1),
          h(_(Et), {
            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: he(() => [
              (ne(!0), xe(Je, null, Ut(_(o), (c) => (ne(), dt(_(Et).Option, {
                key: c.value,
                value: c.value
              }, {
                default: he(() => [
                  B("span", $oe, [
                    c.colors.length ? (ne(), dt(boe, {
                      key: 0,
                      colors: c.colors
                    }, null, 8, ["colors"])) : nt("", !0),
                    B("span", null, oe(c.label), 1)
                  ])
                ]),
                _: 2
              }, 1032, ["value"]))), 128))
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        e.panel.colorScheme === "fixed" ? (ne(), xe("div", Poe, [
          B("div", Ooe, oe(_(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, koe)
        ])) : nt("", !0),
        e.panel.colorScheme && e.panel.colorScheme !== "fixed" && e.panel.colorScheme !== "thresholds" ? (ne(), xe("div", Ioe, [
          B("div", Toe, oe(_(n)("config.field.colorDistribution")), 1),
          h(_(Et), {
            size: "small",
            value: e.panel.colorDistribution ?? "sequential",
            options: [
              { value: "sequential", label: _(n)("config.colorDist.sequential") },
              { value: "distributed", label: _(n)("config.colorDist.distributed") }
            ],
            style: { width: "100%" },
            onChange: s[4] || (s[4] = (c) => e.onChange({ colorDistribution: c }))
          }, null, 8, ["value", "options"])
        ])) : nt("", !0),
        B("div", null, [
          B("div", _oe, oe(_(n)("config.section.links", { n: (e.panel.links ?? []).length })), 1),
          (ne(!0), xe(Je, null, Ut(e.panel.links ?? [], (c, d) => (ne(), xe("div", {
            key: d,
            class: "mb-2 flex flex-col gap-1"
          }, [
            B("div", Moe, [
              h(_(kt), {
                size: "small",
                value: c.title,
                placeholder: "Title",
                style: { flex: "1" },
                onChange: (f) => a(d, { title: f.target.value })
              }, null, 8, ["value", "onChange"]),
              h(_(Ft), {
                type: "text",
                danger: "",
                size: "small",
                onClick: (f) => i(d)
              }, {
                default: he(() => [
                  B("span", {
                    class: Pt(_(bt).delete)
                  }, null, 2)
                ]),
                _: 1
              }, 8, ["onClick"])
            ]),
            h(_(kt), {
              size: "small",
              value: c.url,
              placeholder: "https://",
              onChange: (f) => a(d, { url: f.target.value })
            }, null, 8, ["value", "onChange"]),
            B("div", Eoe, [
              h(u, {
                size: "small",
                checked: c.newTab,
                onChange: (f) => a(d, { newTab: f })
              }, null, 8, ["checked", "onChange"]),
              B("span", Doe, oe(_(n)("config.link.newTab")), 1)
            ])
          ]))), 128)),
          h(_(Ft), {
            type: "dashed",
            size: "small",
            block: "",
            onClick: r
          }, {
            default: he(() => [
              B("span", {
                class: Pt([_(bt).plus, "mr-1"])
              }, null, 2),
              Le(oe(_(n)("config.link.add")), 1)
            ]),
            _: 1
          })
        ])
      ]);
    };
  }
}), Aoe = { class: "flex flex-col gap-3" }, Noe = { class: "text-xs text-secondary mb-1" }, Roe = { class: "text-xs text-secondary mb-1" }, zoe = { class: "text-xs text-secondary mb-1" }, Foe = { class: "text-xs text-secondary mb-1" }, Boe = { class: "text-xs text-secondary mb-1" }, Loe = { class: "text-xs text-secondary mb-1" }, Hoe = /* @__PURE__ */ be({
  __name: "HistogramStyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const { t } = sn();
    return (n, o) => {
      const r = yn("a-input-number"), i = yn("a-switch");
      return ne(), xe("div", Aoe, [
        B("div", null, [
          B("div", Noe, oe(_(t)("config.field.histBucketCount")), 1),
          h(r, {
            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", Roe, oe(_(t)("config.field.histBucketSize")), 1),
          h(r, {
            size: "small",
            min: 0,
            value: e.panel.histBucketSize,
            placeholder: _(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", zoe, oe(_(t)("config.field.histBucketOffset")), 1),
          h(r, {
            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", Foe, oe(_(t)("config.field.histCombineSeries")), 1),
          h(i, {
            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", Boe, oe(_(t)("config.field.lineWidth")), 1),
          h(r, {
            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", Loe, oe(_(t)("config.field.fillOpacity")), 1),
          h(_(yr), {
            min: 0,
            max: 100,
            value: e.panel.fillOpacity,
            onChange: o[5] || (o[5] = (a) => e.onChange({ fillOpacity: a }))
          }, null, 8, ["value"])
        ])
      ]);
    };
  }
}), Voe = { class: "flex flex-col gap-3" }, joe = { class: "override-rule-header" }, Woe = { class: "override-props" }, Koe = /* @__PURE__ */ be({
  __name: "OverridesSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = sn(), o = [
      { value: "byName", label: "Field name" },
      { value: "byType", label: "Field type" },
      { value: "byRegexp", label: "Field name by regex" }
    ], r = [
      { 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" }
    ], i = E(() => t.panel.fieldConfigOverrides ?? []);
    function a() {
      const f = {
        id: crypto.randomUUID(),
        matcher: { id: "byName", options: "" },
        properties: []
      };
      t.onChange({ fieldConfigOverrides: [...i.value, f] });
    }
    function l(f) {
      t.onChange({
        fieldConfigOverrides: i.value.filter((p) => p.id !== f)
      });
    }
    function s(f, p) {
      t.onChange({
        fieldConfigOverrides: i.value.map(
          (v) => v.id === f ? { ...v, matcher: { ...v.matcher, ...p } } : v
        )
      });
    }
    function u(f) {
      t.onChange({
        fieldConfigOverrides: i.value.map(
          (p) => p.id === f ? { ...p, properties: [...p.properties, { id: "displayName", value: "" }] } : p
        )
      });
    }
    function c(f, p, v) {
      t.onChange({
        fieldConfigOverrides: i.value.map(
          (g) => g.id === f ? {
            ...g,
            properties: g.properties.map(
              (m, x) => x === p ? { ...m, ...v } : m
            )
          } : g
        )
      });
    }
    function d(f, p) {
      t.onChange({
        fieldConfigOverrides: i.value.map(
          (v) => v.id === f ? { ...v, properties: v.properties.filter((g, m) => m !== p) } : v
        )
      });
    }
    return (f, p) => (ne(), xe("div", Voe, [
      (ne(!0), xe(Je, null, Ut(i.value, (v) => (ne(), xe("div", {
        key: v.id,
        class: "override-rule"
      }, [
        B("div", joe, [
          h(_(Et), {
            size: "small",
            value: v.matcher.id,
            options: o,
            style: { flex: "1" },
            onChange: (g) => s(v.id, { id: g })
          }, null, 8, ["value", "onChange"]),
          h(_(kt), {
            size: "small",
            value: v.matcher.options ?? "",
            placeholder: _(n)("editor.overrides.matcherValue"),
            style: { flex: "1" },
            onChange: (g) => s(v.id, { options: g.target.value })
          }, null, 8, ["value", "placeholder", "onChange"]),
          h(_(Ft), {
            type: "text",
            danger: "",
            size: "small",
            onClick: (g) => l(v.id)
          }, {
            default: he(() => [
              B("span", {
                class: Pt(_(bt).delete)
              }, null, 2)
            ]),
            _: 1
          }, 8, ["onClick"])
        ]),
        B("div", Woe, [
          (ne(!0), xe(Je, null, Ut(v.properties, (g, m) => (ne(), xe("div", {
            key: m,
            class: "override-prop-row"
          }, [
            h(_(Et), {
              size: "small",
              value: g.id,
              options: r,
              style: { width: "140px" },
              onChange: (x) => c(v.id, m, { id: x })
            }, null, 8, ["value", "onChange"]),
            h(_(kt), {
              size: "small",
              value: String(g.value ?? ""),
              placeholder: _(n)("editor.overrides.propValue"),
              style: { flex: "1" },
              onChange: (x) => c(v.id, m, { value: x.target.value })
            }, null, 8, ["value", "placeholder", "onChange"]),
            h(_(Ft), {
              type: "text",
              danger: "",
              size: "small",
              onClick: (x) => d(v.id, m)
            }, {
              default: he(() => [
                B("span", {
                  class: Pt(_(bt).closeCircle)
                }, null, 2)
              ]),
              _: 1
            }, 8, ["onClick"])
          ]))), 128)),
          h(_(Ft), {
            type: "dashed",
            size: "small",
            style: { width: "100%", "margin-top": "4px" },
            onClick: (g) => u(v.id)
          }, {
            default: he(() => [
              B("span", {
                class: Pt([_(bt).plus, "mr-1"])
              }, null, 2),
              Le(" " + oe(_(n)("editor.overrides.addProperty")), 1)
            ]),
            _: 1
          }, 8, ["onClick"])
        ])
      ]))), 128)),
      h(_(Ft), {
        type: "dashed",
        size: "small",
        style: { width: "100%" },
        onClick: a
      }, {
        default: he(() => [
          B("span", {
            class: Pt([_(bt).plus, "mr-1"])
          }, null, 2),
          Le(" " + oe(_(n)("editor.overrides.addOverride")), 1)
        ]),
        _: 1
      })
    ]));
  }
}), Sr = (e, t) => {
  const n = e.__vccOpts || e;
  for (const [o, r] of t)
    n[o] = r;
  return n;
}, OP = /* @__PURE__ */ Sr(Koe, [["__scopeId", "data-v-2396374b"]]), qoe = { class: "flex flex-col gap-3" }, Yoe = { class: "text-xs text-secondary mb-1" }, Goe = { class: "text-xs text-secondary mb-1" }, Uoe = { class: "text-xs text-secondary mb-1" }, Xoe = { class: "flex flex-col gap-1" }, Qoe = { class: "text-xs" }, Zoe = { class: "text-xs text-secondary mb-1" }, Joe = { key: 0 }, ere = { class: "text-xs text-secondary mb-1" }, tre = { class: "text-xs text-secondary mb-1" }, nre = { class: "text-xs text-secondary mb-1" }, ore = { class: "flex flex-col gap-1" }, rre = { class: "text-xs" }, ire = /* @__PURE__ */ be({
  __name: "PieStyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = sn(), o = E(() => t.panel.pieLabels ?? []), r = E(() => t.panel.legendValues ?? []);
    function i(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 ? [...r.value, l] : r.value.filter((c) => c !== l);
      t.onChange({ legendValues: u });
    }
    return (l, s) => {
      const u = yn("a-radio-button"), c = yn("a-radio-group"), d = yn("a-checkbox");
      return ne(), xe("div", qoe, [
        B("div", null, [
          B("div", Yoe, oe(_(n)("config.field.pieType")), 1),
          h(c, {
            size: "small",
            value: e.panel.pieType ?? "pie",
            onChange: s[0] || (s[0] = (f) => e.onChange({ pieType: f.target.value }))
          }, {
            default: he(() => [
              h(u, { value: "pie" }, {
                default: he(() => [
                  Le(oe(_(n)("config.pieType.pie")), 1)
                ]),
                _: 1
              }),
              h(u, { value: "donut" }, {
                default: he(() => [
                  Le(oe(_(n)("config.pieType.donut")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        B("div", null, [
          B("div", Goe, oe(_(n)("config.field.pieSliceSorting")), 1),
          h(c, {
            size: "small",
            value: e.panel.pieSliceSorting ?? "desc",
            onChange: s[1] || (s[1] = (f) => e.onChange({ pieSliceSorting: f.target.value }))
          }, {
            default: he(() => [
              h(u, { value: "desc" }, {
                default: he(() => [
                  Le(oe(_(n)("config.sort.desc")), 1)
                ]),
                _: 1
              }),
              h(u, { value: "asc" }, {
                default: he(() => [
                  Le(oe(_(n)("config.sort.asc")), 1)
                ]),
                _: 1
              }),
              h(u, { value: "none" }, {
                default: he(() => [
                  Le(oe(_(n)("config.sort.none")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        B("div", null, [
          B("div", Uoe, oe(_(n)("config.field.pieLabels")), 1),
          B("div", Xoe, [
            (ne(), xe(Je, null, Ut(["name", "percent", "value"], (f) => B("label", {
              key: f,
              class: "flex items-center gap-1"
            }, [
              h(d, {
                checked: o.value.includes(f),
                onChange: (p) => i(f, p.target.checked)
              }, null, 8, ["checked", "onChange"]),
              B("span", Qoe, oe(_(n)(`config.pieLabel.${f}`)), 1)
            ])), 64))
          ])
        ]),
        B("div", null, [
          B("div", Zoe, oe(_(n)("config.field.pieShow")), 1),
          h(c, {
            size: "small",
            value: e.panel.pieShow ?? "calculate",
            onChange: s[2] || (s[2] = (f) => e.onChange({ pieShow: f.target.value }))
          }, {
            default: he(() => [
              h(u, { value: "calculate" }, {
                default: he(() => [
                  Le(oe(_(n)("config.pieShow.calculate")), 1)
                ]),
                _: 1
              }),
              h(u, { value: "all" }, {
                default: he(() => [
                  Le(oe(_(n)("config.pieShow.all")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        (e.panel.pieShow ?? "calculate") === "calculate" ? (ne(), xe("div", Joe, [
          B("div", ere, oe(_(n)("config.field.reducer")), 1),
          h(_(Et), {
            size: "small",
            value: e.panel.pieCalculation ?? "lastNotNull",
            options: [
              { value: "lastNotNull", label: _(n)("config.reducer.lastNotNull") },
              { value: "last", label: _(n)("config.reducer.last") },
              { 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") }
            ],
            style: { width: "100%" },
            onChange: s[3] || (s[3] = (f) => e.onChange({ pieCalculation: f }))
          }, null, 8, ["value", "options"])
        ])) : nt("", !0),
        B("div", null, [
          B("div", tre, oe(_(n)("config.field.legendMode")), 1),
          h(c, {
            size: "small",
            value: e.panel.legendMode ?? "list",
            onChange: s[4] || (s[4] = (f) => e.onChange({ legendMode: f.target.value }))
          }, {
            default: he(() => [
              h(u, { value: "list" }, {
                default: he(() => [
                  Le(oe(_(n)("config.legendMode.list")), 1)
                ]),
                _: 1
              }),
              h(u, { value: "table" }, {
                default: he(() => [
                  Le(oe(_(n)("config.legendMode.table")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        B("div", null, [
          B("div", nre, oe(_(n)("config.field.legendValues")), 1),
          B("div", ore, [
            (ne(), xe(Je, null, Ut(["min", "max", "mean", "sum", "last"], (f) => B("label", {
              key: f,
              class: "flex items-center gap-1"
            }, [
              h(d, {
                checked: r.value.includes(f),
                onChange: (p) => a(f, p.target.checked)
              }, null, 8, ["checked", "onChange"]),
              B("span", rre, oe(_(n)(`config.legendValue.${f}`)), 1)
            ])), 64))
          ])
        ])
      ]);
    };
  }
}), are = { class: "flex flex-col gap-3" }, lre = { class: "text-xs text-secondary mb-1" }, sre = { class: "text-xs text-secondary mb-1" }, ure = { class: "text-xs text-secondary mb-1" }, cre = { class: "text-xs text-secondary mb-1" }, dre = /* @__PURE__ */ be({
  __name: "StatStyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const { t } = sn();
    return (n, o) => {
      const r = yn("a-switch");
      return ne(), xe("div", are, [
        B("div", null, [
          B("div", lre, oe(_(t)("config.field.orientation")), 1),
          h(_(Et), {
            size: "small",
            value: e.panel.statOrientation ?? "vertical",
            options: [
              { value: "vertical", label: _(t)("config.orientation.vertical") },
              { value: "horizontal", label: _(t)("config.orientation.horizontal") }
            ],
            style: { width: "100%" },
            onChange: o[0] || (o[0] = (i) => e.onChange({ statOrientation: i }))
          }, null, 8, ["value", "options"])
        ]),
        B("div", null, [
          B("div", sre, oe(_(t)("config.field.textMode")), 1),
          h(_(Et), {
            size: "small",
            value: e.panel.statTextMode ?? "value_and_name",
            options: [
              { value: "value_and_name", label: _(t)("config.textMode.valueAndName") },
              { value: "value", label: _(t)("config.textMode.value") },
              { value: "name", label: _(t)("config.textMode.name") },
              { value: "none", label: _(t)("config.textMode.none") }
            ],
            style: { width: "100%" },
            onChange: o[1] || (o[1] = (i) => e.onChange({ statTextMode: i }))
          }, null, 8, ["value", "options"])
        ]),
        B("div", null, [
          B("div", ure, oe(_(t)("config.field.colorMode")), 1),
          h(_(Et), {
            size: "small",
            value: e.panel.statColorMode ?? "value",
            options: [
              { value: "value", label: _(t)("config.colorMode.value") },
              { value: "background_solid", label: _(t)("config.colorMode.backgroundSolid") },
              { value: "background", label: _(t)("config.colorMode.background") }
            ],
            style: { width: "100%" },
            onChange: o[2] || (o[2] = (i) => e.onChange({ statColorMode: i }))
          }, null, 8, ["value", "options"])
        ]),
        B("div", null, [
          B("div", cre, oe(_(t)("config.field.percentChange")), 1),
          h(r, {
            size: "small",
            checked: e.panel.showPercentChange ?? !1,
            onChange: o[3] || (o[3] = (i) => e.onChange({ showPercentChange: i }))
          }, null, 8, ["checked"])
        ])
      ]);
    };
  }
}), fre = { class: "flex flex-col gap-3" }, pre = { key: 0 }, hre = { class: "text-xs text-secondary mb-1" }, gre = { key: 1 }, vre = { class: "text-xs text-secondary mb-1" }, mre = { key: 2 }, bre = { class: "text-xs text-secondary mb-1" }, yre = { key: 3 }, xre = { class: "text-xs text-secondary mb-1" }, wre = { class: "text-xs text-secondary mb-1" }, Sre = { class: "text-xs text-secondary mb-1" }, Cre = { class: "text-xs text-secondary mb-1" }, $re = { class: "flex items-center gap-2" }, Pre = { class: "text-xs text-secondary mb-1" }, Ore = { class: "flex items-center gap-2" }, kre = { key: 5 }, Ire = { class: "text-xs text-secondary mb-1" }, Tre = { key: 6 }, _re = { class: "text-xs text-secondary mb-1" }, Mre = { class: "text-xs text-secondary mb-1" }, Ere = { key: 7 }, Dre = { class: "text-xs text-secondary mb-1" }, Are = /* @__PURE__ */ be({
  __name: "StyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = sn(), o = t.panel.type === "timeseries", r = t.panel.drawStyle ?? "lines", i = r === "lines", a = r === "points", l = t.panel.showPointsMode ?? "auto", s = t.panel.spanNulls ?? !1, u = t.panel.insertNulls ?? !1;
    return (c, d) => {
      const f = yn("a-radio-button"), p = yn("a-radio-group"), v = yn("a-input-number"), g = yn("a-switch");
      return ne(), xe("div", fre, [
        o ? (ne(), xe("div", pre, [
          B("div", hre, oe(_(n)("config.field.drawStyle")), 1),
          h(p, {
            size: "small",
            value: e.panel.drawStyle ?? "lines",
            onChange: d[0] || (d[0] = (m) => e.onChange({ drawStyle: m.target.value }))
          }, {
            default: he(() => [
              h(f, { value: "lines" }, {
                default: he(() => [
                  Le(oe(_(n)("config.drawStyle.lines")), 1)
                ]),
                _: 1
              }),
              h(f, { value: "bars" }, {
                default: he(() => [
                  Le(oe(_(n)("config.drawStyle.bars")), 1)
                ]),
                _: 1
              }),
              h(f, { value: "points" }, {
                default: he(() => [
                  Le(oe(_(n)("config.drawStyle.points")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ])) : nt("", !0),
        a ? nt("", !0) : (ne(), xe("div", gre, [
          B("div", vre, oe(_(n)("config.field.lineWidth")), 1),
          h(_(yr), {
            min: 0.5,
            max: 4,
            step: 0.5,
            value: e.panel.lineWidth,
            onChange: d[1] || (d[1] = (m) => e.onChange({ lineWidth: m }))
          }, null, 8, ["value"])
        ])),
        a ? nt("", !0) : (ne(), xe("div", mre, [
          B("div", bre, oe(_(n)("config.field.fillOpacity")), 1),
          h(_(yr), {
            min: 0,
            max: 100,
            value: e.panel.fillOpacity,
            onChange: d[2] || (d[2] = (m) => e.onChange({ fillOpacity: m }))
          }, null, 8, ["value"])
        ])),
        a ? nt("", !0) : (ne(), xe("div", yre, [
          B("div", xre, oe(_(n)("config.field.gradientMode")), 1),
          h(p, {
            size: "small",
            value: e.panel.gradientMode ?? "none",
            onChange: d[3] || (d[3] = (m) => e.onChange({ gradientMode: m.target.value }))
          }, {
            default: he(() => [
              h(f, { value: "none" }, {
                default: he(() => [
                  Le(oe(_(n)("config.gradient.none")), 1)
                ]),
                _: 1
              }),
              h(f, { value: "opacity" }, {
                default: he(() => [
                  Le(oe(_(n)("config.gradient.opacity")), 1)
                ]),
                _: 1
              }),
              h(f, { value: "hue" }, {
                default: he(() => [
                  Le(oe(_(n)("config.gradient.hue")), 1)
                ]),
                _: 1
              }),
              h(f, { value: "scheme" }, {
                default: he(() => [
                  Le(oe(_(n)("config.gradient.scheme")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ])),
        o && i ? (ne(), xe(Je, { key: 4 }, [
          B("div", null, [
            B("div", wre, oe(_(n)("config.field.interpolation")), 1),
            h(p, {
              size: "small",
              value: e.panel.lineInterpolation,
              onChange: d[4] || (d[4] = (m) => e.onChange({ lineInterpolation: m.target.value }))
            }, {
              default: he(() => [
                h(f, { value: "linear" }, {
                  default: he(() => [
                    Le(oe(_(n)("config.interp.linear")), 1)
                  ]),
                  _: 1
                }),
                h(f, { value: "smooth" }, {
                  default: he(() => [
                    Le(oe(_(n)("config.interp.smooth")), 1)
                  ]),
                  _: 1
                }),
                h(f, { value: "step" }, {
                  default: he(() => [
                    Le(oe(_(n)("config.interp.step")), 1)
                  ]),
                  _: 1
                })
              ]),
              _: 1
            }, 8, ["value"])
          ]),
          B("div", null, [
            B("div", Sre, oe(_(n)("config.field.lineStyle")), 1),
            h(p, {
              size: "small",
              value: e.panel.lineStyle,
              onChange: d[5] || (d[5] = (m) => e.onChange({ lineStyle: m.target.value }))
            }, {
              default: he(() => [
                h(f, { value: "solid" }, {
                  default: he(() => [
                    Le(oe(_(n)("config.linestyle.solid")), 1)
                  ]),
                  _: 1
                }),
                h(f, { value: "dashed" }, {
                  default: he(() => [
                    Le(oe(_(n)("config.linestyle.dashed")), 1)
                  ]),
                  _: 1
                }),
                h(f, { value: "dotted" }, {
                  default: he(() => [
                    Le(oe(_(n)("config.linestyle.dotted")), 1)
                  ]),
                  _: 1
                })
              ]),
              _: 1
            }, 8, ["value"])
          ]),
          B("div", null, [
            B("div", Cre, oe(_(n)("config.field.spanNulls")), 1),
            B("div", $re, [
              h(p, {
                size: "small",
                value: _(s) === !0 ? "always" : typeof _(s) == "number" ? "threshold" : "never",
                onChange: d[6] || (d[6] = (m) => {
                  m.target.value === "never" ? e.onChange({ spanNulls: !1 }) : m.target.value === "always" ? e.onChange({ spanNulls: !0 }) : e.onChange({ spanNulls: 3600 });
                })
              }, {
                default: he(() => [
                  h(f, { value: "never" }, {
                    default: he(() => [
                      Le(oe(_(n)("config.nulls.never")), 1)
                    ]),
                    _: 1
                  }),
                  h(f, { value: "always" }, {
                    default: he(() => [
                      Le(oe(_(n)("config.nulls.always")), 1)
                    ]),
                    _: 1
                  }),
                  h(f, { value: "threshold" }, {
                    default: he(() => [
                      Le(oe(_(n)("config.nulls.threshold")), 1)
                    ]),
                    _: 1
                  })
                ]),
                _: 1
              }, 8, ["value"]),
              typeof _(s) == "number" ? (ne(), dt(v, {
                key: 0,
                size: "small",
                min: 1,
                value: _(s),
                suffix: "s",
                style: { width: "90px" },
                onChange: d[7] || (d[7] = (m) => e.onChange({ spanNulls: m ?? 3600 }))
              }, null, 8, ["value"])) : nt("", !0)
            ])
          ]),
          B("div", null, [
            B("div", Pre, oe(_(n)("config.field.insertNulls")), 1),
            B("div", Ore, [
              h(p, {
                size: "small",
                value: typeof _(u) == "number" ? "threshold" : "never",
                onChange: d[8] || (d[8] = (m) => {
                  m.target.value === "never" ? e.onChange({ insertNulls: !1 }) : e.onChange({ insertNulls: 3600 });
                })
              }, {
                default: he(() => [
                  h(f, { value: "never" }, {
                    default: he(() => [
                      Le(oe(_(n)("config.nulls.never")), 1)
                    ]),
                    _: 1
                  }),
                  h(f, { value: "threshold" }, {
                    default: he(() => [
                      Le(oe(_(n)("config.nulls.threshold")), 1)
                    ]),
                    _: 1
                  })
                ]),
                _: 1
              }, 8, ["value"]),
              typeof _(u) == "number" ? (ne(), dt(v, {
                key: 0,
                size: "small",
                min: 1,
                value: _(u),
                suffix: "s",
                style: { width: "90px" },
                onChange: d[9] || (d[9] = (m) => e.onChange({ insertNulls: m ?? 3600 }))
              }, null, 8, ["value"])) : nt("", !0)
            ])
          ])
        ], 64)) : nt("", !0),
        o && !a ? (ne(), xe("div", kre, [
          B("div", Ire, oe(_(n)("config.field.showPoints")), 1),
          h(p, {
            size: "small",
            value: _(l),
            onChange: d[10] || (d[10] = (m) => e.onChange({ showPointsMode: m.target.value, showPoints: m.target.value === "always" }))
          }, {
            default: he(() => [
              h(f, { value: "auto" }, {
                default: he(() => [
                  Le(oe(_(n)("config.points.auto")), 1)
                ]),
                _: 1
              }),
              h(f, { value: "always" }, {
                default: he(() => [
                  Le(oe(_(n)("config.points.always")), 1)
                ]),
                _: 1
              }),
              h(f, { value: "never" }, {
                default: he(() => [
                  Le(oe(_(n)("config.points.never")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ])) : nt("", !0),
        o ? (ne(), xe("div", Tre, [
          B("div", _re, oe(_(n)("config.field.stackSeries")), 1),
          h(p, {
            size: "small",
            value: e.panel.stackingMode ?? "none",
            onChange: d[11] || (d[11] = (m) => e.onChange({ stackingMode: m.target.value }))
          }, {
            default: he(() => [
              h(f, { value: "none" }, {
                default: he(() => [
                  Le(oe(_(n)("config.stack.none")), 1)
                ]),
                _: 1
              }),
              h(f, { value: "normal" }, {
                default: he(() => [
                  Le(oe(_(n)("config.stack.normal")), 1)
                ]),
                _: 1
              }),
              h(f, { value: "percent" }, {
                default: he(() => [
                  Le(oe(_(n)("config.stack.percent")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ])) : nt("", !0),
        B("div", null, [
          B("div", Mre, oe(_(n)("config.field.legendPosition")), 1),
          h(p, {
            size: "small",
            value: e.panel.legendPosition,
            onChange: d[12] || (d[12] = (m) => e.onChange({ legendPosition: m.target.value }))
          }, {
            default: he(() => [
              h(f, { value: "bottom" }, {
                default: he(() => [
                  Le(oe(_(n)("config.legend.bottom")), 1)
                ]),
                _: 1
              }),
              h(f, { value: "right" }, {
                default: he(() => [
                  Le(oe(_(n)("config.legend.right")), 1)
                ]),
                _: 1
              }),
              h(f, { value: "hidden" }, {
                default: he(() => [
                  Le(oe(_(n)("config.legend.hidden")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        e.panel.type === "bar" ? (ne(), xe("div", Ere, [
          B("div", Dre, oe(_(n)("config.field.stacked")), 1),
          h(g, {
            size: "small",
            checked: e.panel.stacked,
            onChange: d[13] || (d[13] = (m) => e.onChange({ stacked: m }))
          }, null, 8, ["checked"])
        ])) : nt("", !0)
      ]);
    };
  }
}), Nre = { class: "flex flex-col gap-3" }, Rre = { class: "text-xs text-secondary mb-1" }, zre = { class: "text-xs text-secondary mb-1" }, Fre = { class: "text-xs text-secondary mb-1" }, Bre = { class: "text-xs text-secondary mb-1" }, Lre = { class: "text-xs text-secondary mb-1" }, Hre = { class: "text-xs text-secondary mb-1" }, Vre = { key: 0 }, jre = { class: "text-xs text-secondary mb-1" }, Wre = { class: "text-xs text-secondary mb-1" }, Kre = { key: 1 }, qre = { class: "text-xs text-secondary mb-1" }, Yre = { key: 2 }, Gre = { class: "text-xs text-secondary mb-1" }, Ure = /* @__PURE__ */ be({
  __name: "TableStyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = sn();
    function o(r) {
      t.onChange({ tableFooterReducers: r ? [r] : [] });
    }
    return (r, i) => {
      const a = yn("a-switch"), l = yn("a-radio-button"), s = yn("a-radio-group");
      return ne(), xe("div", Nre, [
        B("div", null, [
          B("div", Rre, oe(_(n)("config.field.tableShowHeader")), 1),
          h(a, {
            size: "small",
            checked: e.panel.tableShowHeader ?? !0,
            onChange: i[0] || (i[0] = (u) => e.onChange({ tableShowHeader: u }))
          }, null, 8, ["checked"])
        ]),
        B("div", null, [
          B("div", zre, oe(_(n)("config.field.tableCellHeight")), 1),
          h(s, {
            size: "small",
            value: e.panel.tableCellHeight ?? "medium",
            onChange: i[1] || (i[1] = (u) => e.onChange({ tableCellHeight: u.target.value }))
          }, {
            default: he(() => [
              h(l, { value: "small" }, {
                default: he(() => [
                  Le(oe(_(n)("config.tableHeight.small")), 1)
                ]),
                _: 1
              }),
              h(l, { value: "medium" }, {
                default: he(() => [
                  Le(oe(_(n)("config.tableHeight.medium")), 1)
                ]),
                _: 1
              }),
              h(l, { value: "large" }, {
                default: he(() => [
                  Le(oe(_(n)("config.tableHeight.large")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        B("div", null, [
          B("div", Fre, oe(_(n)("config.field.tableFrozenColumns")), 1),
          h(_(_o), {
            size: "small",
            min: 0,
            max: 10,
            value: e.panel.tableFrozenColumns ?? 0,
            style: { width: "100%" },
            onChange: i[2] || (i[2] = (u) => e.onChange({ tableFrozenColumns: u ?? 0 }))
          }, null, 8, ["value"])
        ]),
        B("div", null, [
          B("div", Bre, oe(_(n)("config.field.tableColumnFilter")), 1),
          h(a, {
            size: "small",
            checked: e.panel.tableColumnFilter ?? !1,
            onChange: i[3] || (i[3] = (u) => e.onChange({ tableColumnFilter: u }))
          }, null, 8, ["checked"])
        ]),
        B("div", null, [
          B("div", Lre, oe(_(n)("config.field.tableWrapText")), 1),
          h(a, {
            size: "small",
            checked: e.panel.tableWrapText ?? !1,
            onChange: i[4] || (i[4] = (u) => e.onChange({ tableWrapText: u }))
          }, null, 8, ["checked"])
        ]),
        B("div", null, [
          B("div", Hre, oe(_(n)("config.field.tableEnablePagination")), 1),
          h(a, {
            size: "small",
            checked: e.panel.tableEnablePagination ?? !1,
            onChange: i[5] || (i[5] = (u) => e.onChange({ tableEnablePagination: u }))
          }, null, 8, ["checked"])
        ]),
        e.panel.tableEnablePagination ? (ne(), xe("div", Vre, [
          B("div", jre, oe(_(n)("config.field.tablePageSize")), 1),
          h(_(_o), {
            size: "small",
            min: 5,
            max: 500,
            value: e.panel.tablePageSize ?? 20,
            style: { width: "100%" },
            onChange: i[6] || (i[6] = (u) => e.onChange({ tablePageSize: u ?? 20 }))
          }, null, 8, ["value"])
        ])) : nt("", !0),
        B("div", null, [
          B("div", Wre, oe(_(n)("config.field.tableFooterEnabled")), 1),
          h(a, {
            size: "small",
            checked: e.panel.tableFooterEnabled ?? !1,
            onChange: i[7] || (i[7] = (u) => e.onChange({ tableFooterEnabled: u }))
          }, null, 8, ["checked"])
        ]),
        e.panel.tableFooterEnabled ? (ne(), xe("div", Kre, [
          B("div", qre, oe(_(n)("config.field.tableFooterReducers")), 1),
          h(_(Et), {
            size: "small",
            value: e.panel.tableFooterReducers?.[0],
            options: [
              { value: "min", label: _(n)("config.reducer.min") },
              { value: "max", label: _(n)("config.reducer.max") },
              { value: "mean", label: _(n)("config.reducer.mean") },
              { value: "sum", label: _(n)("config.reducer.sum") },
              { value: "count", label: _(n)("config.reducer.count") }
            ],
            "allow-clear": "",
            style: { width: "100%" },
            onChange: i[8] || (i[8] = (u) => o(u))
          }, null, 8, ["value", "options"])
        ])) : nt("", !0),
        e.panel.tableFooterEnabled && e.panel.tableFooterReducers?.[0] ? (ne(), xe("div", Yre, [
          B("div", Gre, oe(_(n)("config.field.tableFooterFields")), 1),
          h(_(Et), {
            size: "small",
            mode: "multiple",
            "allow-clear": "",
            placeholder: _(n)("config.field.tableFooterFieldsPlaceholder"),
            value: e.panel.tableFooterFields ?? [],
            options: (e.numericFieldNames ?? []).map((u) => ({ value: u, label: u })),
            style: { width: "100%" },
            onChange: i[9] || (i[9] = (u) => e.onChange({ tableFooterFields: u.length > 0 ? u : void 0 }))
          }, null, 8, ["placeholder", "value", "options"])
        ])) : nt("", !0)
      ]);
    };
  }
}), Xre = { class: "flex flex-col gap-1" }, Qre = { class: "mb-2" }, Zre = { class: "text-xs text-secondary mb-1" }, Jre = ["value", "onInput"], eie = { class: "flex items-center gap-1.5 mb-1" }, tie = ["value"], nie = { class: "text-xs text-secondary flex-1" }, oie = /* @__PURE__ */ be({
  __name: "ThresholdsEditor",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = sn(), o = ["#52c41a", "#faad14", "#ff4d4f", "#1677ff", "#722ed1", "#13c2c2", "#fa8c16"], r = le(t.panel.thresholdMode ?? "absolute"), i = E(() => r.value === "percentage"), a = E(() => [...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((m) => m.value)) : 0, v = { value: i.value ? Math.min(100, f + 20) : f + 10, color: l(), label: "" }, g = [...t.panel.thresholds, v].sort((m, x) => m.value - x.value);
      t.onChange({ thresholds: g });
    }
    function u(f) {
      t.onChange({ thresholds: t.panel.thresholds.filter((p) => p.value !== f) });
    }
    function c(f, p) {
      const v = t.panel.thresholds.map((g) => g.value === f ? { ...g, ...p } : g).sort((g, m) => g.value - m.value);
      t.onChange({ thresholds: v });
    }
    function d(f) {
      r.value = f, t.onChange({ thresholdMode: f });
    }
    return (f, p) => {
      const v = yn("a-input");
      return ne(), xe("div", Xre, [
        B("div", Qre, [
          B("div", Zre, oe(_(n)("config.threshold.mode")), 1),
          h(_(To).Group, {
            size: "small",
            value: r.value,
            onChange: p[0] || (p[0] = (g) => d(g.target.value))
          }, {
            default: he(() => [
              h(_(To).Button, { value: "absolute" }, {
                default: he(() => [
                  Le(oe(_(n)("config.threshold.modeAbsolute")), 1)
                ]),
                _: 1
              }),
              h(_(To).Button, { value: "percentage" }, {
                default: he(() => [
                  Le(oe(_(n)("config.threshold.modePercentage")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        (ne(!0), xe(Je, null, Ut(a.value, (g) => (ne(), xe("div", {
          key: g.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: g.color,
            onInput: (m) => c(g.value, { color: m.target.value })
          }, null, 40, Jre),
          h(_(_o), {
            size: "small",
            value: g.value,
            min: i.value ? 0 : void 0,
            max: i.value ? 100 : void 0,
            style: { width: "80px" },
            onChange: (m) => c(g.value, { value: m ?? 0 })
          }, null, 8, ["value", "min", "max", "onChange"]),
          h(v, {
            size: "small",
            value: g.label,
            placeholder: "Label",
            style: { flex: "1" },
            onChange: (m) => c(g.value, { label: m.target.value })
          }, null, 8, ["value", "onChange"]),
          h(_(Ft), {
            type: "text",
            danger: "",
            size: "small",
            onClick: (m) => u(g.value)
          }, {
            default: he(() => [
              B("span", {
                class: Pt(_(bt).delete)
              }, null, 2)
            ]),
            _: 1
          }, 8, ["onClick"])
        ]))), 128)),
        B("div", eie, [
          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] = (g) => e.onChange({ thresholdBaseColor: g.target.value }))
          }, null, 40, tie),
          B("span", nie, oe(_(n)("config.threshold.base")), 1)
        ]),
        h(_(Ft), {
          type: "dashed",
          size: "small",
          block: "",
          onClick: s
        }, {
          default: he(() => [
            B("span", {
              class: Pt([_(bt).plus, "mr-1"])
            }, null, 2),
            Le(" " + oe(_(n)("config.threshold.add")), 1)
          ]),
          _: 1
        })
      ]);
    };
  }
}), rie = { class: "flex flex-col gap-3" }, iie = { class: "text-xs text-secondary mb-1" }, aie = { key: 0 }, lie = { class: "text-xs text-secondary mb-1" }, sie = { key: 1 }, uie = { class: "text-xs text-secondary mb-1" }, cie = { class: "text-xs text-secondary mb-1" }, die = /* @__PURE__ */ be({
  __name: "TooltipSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const { t } = sn();
    return (n, o) => {
      const r = yn("a-radio-button"), i = yn("a-radio-group"), a = yn("a-switch");
      return ne(), xe("div", rie, [
        B("div", null, [
          B("div", iie, oe(_(t)("config.field.tooltipMode")), 1),
          h(i, {
            size: "small",
            value: e.panel.tooltipMode ?? "multi",
            onChange: o[0] || (o[0] = (l) => e.onChange({ tooltipMode: l.target.value }))
          }, {
            default: he(() => [
              h(r, { value: "single" }, {
                default: he(() => [
                  Le(oe(_(t)("config.tooltip.single")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "multi" }, {
                default: he(() => [
                  Le(oe(_(t)("config.tooltip.multi")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "none" }, {
                default: he(() => [
                  Le(oe(_(t)("config.tooltip.none")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        (e.panel.tooltipMode ?? "multi") === "multi" ? (ne(), xe("div", aie, [
          B("div", lie, oe(_(t)("config.field.tooltipSort")), 1),
          h(i, {
            size: "small",
            value: e.panel.tooltipSort ?? "none",
            onChange: o[1] || (o[1] = (l) => e.onChange({ tooltipSort: l.target.value }))
          }, {
            default: he(() => [
              h(r, { value: "none" }, {
                default: he(() => [
                  Le(oe(_(t)("config.tooltip.sortNone")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "asc" }, {
                default: he(() => [
                  Le(oe(_(t)("config.tooltip.sortAsc")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "desc" }, {
                default: he(() => [
                  Le(oe(_(t)("config.tooltip.sortDesc")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ])) : nt("", !0),
        (e.panel.tooltipMode ?? "multi") === "multi" ? (ne(), xe("div", sie, [
          B("div", uie, oe(_(t)("config.field.tooltipMaxHeight")), 1),
          h(_(_o), {
            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"])
        ])) : nt("", !0),
        B("div", null, [
          B("div", cie, oe(_(t)("config.field.axisPointer")), 1),
          h(a, {
            size: "small",
            checked: e.panel.showAxisPointer ?? !0,
            onChange: o[3] || (o[3] = (l) => e.onChange({ showAxisPointer: l }))
          }, null, 8, ["checked"])
        ])
      ]);
    };
  }
}), fie = { class: "flex items-center gap-2" }, pie = /* @__PURE__ */ be({
  __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: r } = sn();
    function i(p) {
      return Math.min(n.max, Math.max(n.min, p));
    }
    const a = E(() => n.value ?? n.min), l = E(() => n.placeholder ?? r("common.auto")), s = E(() => {
      const p = n.value !== void 0 ? n.unit ? `${n.value}${n.unit}` : String(n.value) : l.value;
      try {
        const v = document.createElement("canvas").getContext("2d");
        return v ? (v.font = "14px system-ui, -apple-system, sans-serif", `${Math.ceil(v.measureText(p).width) + 24}px`) : "6ch";
      } catch {
        return "6ch";
      }
    });
    function u(p) {
      typeof p == "number" && o("change", i(p));
    }
    function c(p) {
      p != null && o("change", i(Number(p)));
    }
    function d() {
      o("change", void 0);
    }
    function f(p) {
      const v = p.shiftKey, g = n.step * (v ? n.shiftMultiplier : 1);
      p.key === "ArrowRight" || p.key === "ArrowUp" ? (p.preventDefault(), o("change", i(a.value + g))) : (p.key === "ArrowLeft" || p.key === "ArrowDown") && (p.preventDefault(), o("change", i(a.value - g)));
    }
    return (p, v) => (ne(), xe("div", fie, [
      h(_(yr), {
        min: e.min,
        max: e.max,
        step: e.step,
        value: a.value,
        style: { flex: "1" },
        "tooltip-formatter": e.unit ? ((g) => `${g}${e.unit}`) : void 0,
        onChange: u
      }, null, 8, ["min", "max", "step", "value", "tooltip-formatter"]),
      h(_(Ji).Compact, { size: "small" }, {
        default: he(() => [
          h(_(_o), {
            size: "small",
            controls: !1,
            min: e.min,
            max: e.max,
            step: e.step,
            value: e.value ?? void 0,
            placeholder: l.value,
            style: Ht({ 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 ? (ne(), dt(_(Ft), {
            key: 0,
            onClick: d
          }, {
            default: he(() => [
              B("span", {
                class: Pt([_(bt).closeCircle, "text-xs text-gray-400 cursor-pointer"])
              }, null, 2)
            ]),
            _: 1
          })) : nt("", !0)
        ]),
        _: 1
      })
    ]));
  }
}), hie = { class: "flex flex-col gap-3" }, gie = { key: 0 }, vie = { class: "text-xs text-secondary mb-1" }, mie = { class: "text-xs text-secondary mb-1" }, bie = { class: "text-xs text-secondary mb-1" }, yie = { key: 1 }, xie = { class: "text-xs text-secondary mb-1" }, wie = { key: 2 }, Sie = { class: "text-xs text-secondary mb-1" }, Cie = /* @__PURE__ */ be({
  __name: "ValueSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = sn(), r = ["", "ms", "s", "bytes", "percent", "percentunit", "reqps", "ops", "bps", "Bps"].map((s) => ({
      value: s,
      label: n(s ? `config.unit.${s}` : "config.unit.none")
    })), i = [
      { 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) => (ne(), xe("div", hie, [
      l ? (ne(), xe("div", gie, [
        B("div", vie, oe(_(n)("config.field.reducer")), 1),
        h(_(Et), {
          size: "small",
          value: e.panel.statReducer ?? "lastNotNull",
          options: i,
          style: { width: "100%" },
          onChange: u[0] || (u[0] = (c) => e.onChange({ statReducer: c }))
        }, null, 8, ["value"])
      ])) : nt("", !0),
      B("div", null, [
        B("div", mie, oe(_(n)("config.field.unit")), 1),
        h(_(Et), {
          size: "small",
          value: e.panel.unit || "",
          options: _(r),
          style: { width: "100%" },
          onChange: u[1] || (u[1] = (c) => e.onChange({ unit: c }))
        }, null, 8, ["value", "options"])
      ]),
      B("div", null, [
        B("div", bie, oe(_(n)("config.field.decimals")), 1),
        h(pie, {
          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 ? (ne(), xe("div", yie, [
        B("div", xie, oe(_(n)("config.field.min")), 1),
        h(_(_o), {
          size: "small",
          value: e.panel.min,
          style: { width: "100%" },
          onChange: u[3] || (u[3] = (c) => e.onChange({ min: c ?? 0 }))
        }, null, 8, ["value"])
      ])) : nt("", !0),
      a ? (ne(), xe("div", wie, [
        B("div", Sie, oe(_(n)("config.field.max")), 1),
        h(_(_o), {
          size: "small",
          value: e.panel.max,
          style: { width: "100%" },
          onChange: u[4] || (u[4] = (c) => e.onChange({ max: c ?? 100 }))
        }, null, 8, ["value"])
      ])) : nt("", !0)
    ]));
  }
}), $ie = { class: "h-full flex flex-col overflow-hidden" }, Pie = {
  class: "flex-shrink-0 px-2 bg-primary/10 py-1",
  style: { "border-bottom": "1px solid #eee" }
}, Oie = { class: "flex-1 overflow-y-auto" }, kie = /* @__PURE__ */ be({
  __name: "OptionsPane",
  setup(e) {
    const t = [
      "timeseries",
      "bar",
      "histogram",
      "stat",
      "gauge",
      "table",
      "pie"
    ], { t: n } = sn(), { panel: o, onChange: r, numericFieldNames: i, allFieldNames: a } = gc(), l = E(
      () => t.map((p) => ({
        value: p,
        label: n(`config.type.${p}`)
      }))
    ), s = le(""), u = {
      general: PP,
      style: Are,
      tooltip: die,
      axes: Hne,
      value: Cie,
      // timeseries / bar / histogram
      "bar-style": Xne,
      "histogram-style": Hoe,
      // stat
      "stat-style": dre,
      // gauge
      "gauge-style": voe,
      // pie
      "pie-style": ire,
      // table
      "table-style": Ure,
      // overrides
      overrides: OP
    }, c = E(() => {
      const v = (Zz(o.value.type)?.optionCategories ?? []).map((g) => ({
        key: g.key,
        label: n(g.labelKey),
        component: u[g.key] ?? PP
      }));
      return v.push({
        key: "thresholds",
        label: n("config.section.thresholds", { n: o.value.thresholds.length }),
        component: oie
      }), v.push({
        key: "overrides",
        label: n("config.section.overrides"),
        component: OP
      }), v;
    }), d = E(() => {
      if (!s.value.trim())
        return c.value;
      const p = s.value.toLowerCase();
      return c.value.filter(
        (v) => typeof v.label == "string" && v.label.toLowerCase().includes(p)
      );
    }), f = le(["general"]);
    return (p, v) => (ne(), xe("div", $ie, [
      B("div", Pie, [
        h(_(Et), {
          class: "text-primary",
          bordered: !1,
          value: _(o).type,
          size: "small",
          variant: "filled",
          options: l.value,
          "onUpdate:value": v[0] || (v[0] = (g) => _(r)({ type: g }))
        }, null, 8, ["value", "options"])
      ]),
      B("div", Oie, [
        h(_(Tl), {
          "active-key": f.value,
          "onUpdate:activeKey": v[1] || (v[1] = (g) => f.value = g),
          bordered: !1,
          accordion: "",
          size: "small"
        }, {
          default: he(() => [
            (ne(!0), xe(Je, null, Ut(d.value, (g) => (ne(), dt(_(Tl).Panel, {
              key: g.key,
              header: g.label
            }, {
              default: he(() => [
                (ne(), dt(zP(g.component), {
                  panel: _(o),
                  "on-change": _(r),
                  "numeric-field-names": _(i),
                  "all-field-names": _(a)
                }, null, 40, ["panel", "on-change", "numeric-field-names", "all-field-names"]))
              ]),
              _: 2
            }, 1032, ["header"]))), 128))
          ]),
          _: 1
        }, 8, ["active-key"])
      ])
    ]));
  }
}), wE = /* @__PURE__ */ be({
  __name: "PanelLinksIcon",
  props: {
    links: {},
    iconColor: {}
  },
  setup(e) {
    const t = e;
    function n(r) {
      r.url && window.open(r.url, r.newTab ? "_blank" : "_self", "noopener,noreferrer");
    }
    const o = E(() => t.links.filter((r) => r.url));
    return (r, i) => o.value.length === 0 ? (ne(), xe(Je, { key: 0 }, [], 64)) : o.value.length === 1 ? (ne(), dt(_(Lo), {
      key: 1,
      title: o.value[0].title || o.value[0].url,
      placement: "bottom"
    }, {
      default: he(() => [
        B("span", {
          class: Pt([_(bt).link, "flex-shrink-0 cursor-pointer text-xs"]),
          style: Ht({ color: e.iconColor }),
          onClick: i[0] || (i[0] = cr((a) => n(o.value[0]), ["stop"]))
        }, null, 6)
      ]),
      _: 1
    }, 8, ["title"])) : (ne(), dt(_(Er), {
      key: 2,
      trigger: ["hover", "click"],
      placement: "bottomLeft"
    }, {
      overlay: he(() => [
        h(_(fo), null, {
          default: he(() => [
            (ne(!0), xe(Je, null, Ut(o.value, (a, l) => (ne(), dt(_(fo).Item, {
              key: l,
              onClick: (s) => n(a)
            }, {
              default: he(() => [
                Le(oe(a.title || a.url), 1)
              ]),
              _: 2
            }, 1032, ["onClick"]))), 128))
          ]),
          _: 1
        })
      ]),
      default: he(() => [
        B("span", {
          class: Pt([_(bt).link, "flex-shrink-0 cursor-pointer text-xs"]),
          style: Ht({ color: e.iconColor }),
          onClick: i[1] || (i[1] = cr(() => {
          }, ["stop"]))
        }, null, 6)
      ]),
      _: 1
    }));
  }
}), Iie = {
  key: 0,
  class: "legend-search-container"
}, Tie = ["value"], _ie = { class: "legend-table-wrap" }, Mie = { class: "legend-table" }, Eie = ["data-legend-item-id"], Die = { class: "legend-table-td legend-table-name-col" }, Aie = ["data-legend-tooltip"], Nie = { class: "legend-label" }, Rie = {
  key: 0,
  class: "legend-search-container"
}, zie = ["value"], Fie = {
  key: 1,
  class: "legend-empty-state"
}, Bie = { class: "virtuoso-grid-list" }, Lie = ["data-legend-item-id"], Hie = ["data-legend-tooltip"], Vie = { class: "legend-label" }, jie = {
  key: 0,
  class: "legend-item-values"
}, Wie = { class: "legend-item-value-key" }, Kie = { class: "legend-item-value-num" }, qie = ["data-legend-tooltip", "onClick"], Yie = {
  key: 0,
  width: "12",
  height: "12",
  viewBox: "0 0 24 24",
  fill: "none",
  stroke: "currentColor",
  "stroke-width": "2"
}, Gie = {
  key: 1,
  width: "12",
  height: "12",
  viewBox: "0 0 24 24",
  fill: "none",
  stroke: "currentColor",
  "stroke-width": "2"
}, Uie = /* @__PURE__ */ be({
  __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(""), r = le(null), i = le(!1), a = le(), l = le({});
    function s(M) {
      const R = {};
      M.series.forEach((N, H) => {
        H !== 0 && (R[H] = N.show ?? !0);
      }), l.value = { ...R };
    }
    function u(M, R, N) {
      !R || typeof N.show != "boolean" || (l.value = { ...l.value, [R]: N.show });
    }
    Ie(
      () => t.uPlotInstance,
      (M, R) => {
        if (R && (R.hooks.setSeries = (R.hooks.setSeries ?? []).filter(
          (N) => N.__legendSync !== !0
        )), M) {
          s(M);
          const N = (H, L, F) => u(H, L, F);
          N.__legendSync = !0, M.hooks.setSeries = [...M.hooks.setSeries ?? [], N];
        } else
          l.value = {};
      },
      { immediate: !0 }
    );
    const c = {
      last: "Last *",
      first: "First *",
      min: "Min",
      max: "Max",
      mean: "Avg",
      sum: "Sum"
    };
    function d(M) {
      const R = M.filter(
        (H) => H != null && !Number.isNaN(H)
      );
      if (R.length === 0)
        return { last: null, first: null, min: null, max: null, mean: null, sum: null };
      const N = R.reduce((H, L) => H + L, 0);
      return {
        last: R[R.length - 1],
        first: R[0],
        min: Math.min(...R),
        max: Math.max(...R),
        mean: N / R.length,
        sum: N
      };
    }
    function f(M, R) {
      return M === null ? "—" : Math.abs(M) >= 1e6 ? R !== void 0 ? `${(M / 1e6).toFixed(R)}M` : `${M / 1e6}M` : Math.abs(M) >= 1e3 ? R !== void 0 ? `${(M / 1e3).toFixed(R)}K` : `${M / 1e3}K` : R !== void 0 ? M.toFixed(R) : String(M);
    }
    const p = E(
      () => Object.values(t.items).map((M) => ({
        ...M,
        show: l.value[M.seriesIndex] ?? M.show ?? !0
      }))
    ), v = E(() => {
      if (t.position !== "right" || !o.value.trim())
        return p.value;
      const M = o.value.trim().toLowerCase();
      return p.value.filter((R) => R.label?.toLowerCase().includes(M));
    }), g = E(() => t.position !== "right" || !o.value.trim() ? !1 : v.value.length === 0), m = E(() => {
      if (!t.data || t.values.length === 0)
        return {};
      const M = {};
      return p.value.forEach((R) => {
        const N = t.data[R.seriesIndex];
        M[R.seriesIndex] = d(N ?? []);
      }), M;
    }), { onToggleSeriesOnOff: x, onToggleSeriesVisibility: S } = {
      onToggleSeriesOnOff(M) {
        const R = t.uPlotInstance;
        if (!R)
          return;
        const N = R.series[M];
        N && R.setSeries(M, { show: !N.show });
      },
      onToggleSeriesVisibility(M) {
        const R = t.uPlotInstance;
        if (!R)
          return;
        const N = n.value === M;
        R.series.forEach((H, L) => {
          L !== 0 && R.setSeries(L, { show: N || L === M });
        }), n.value = N ? null : M;
      }
    };
    function C(M) {
      const R = M.target.closest("[data-legend-item-id]");
      if (!R)
        return null;
      const N = Number(R.dataset.legendItemId);
      return Number.isNaN(N) ? null : N;
    }
    function P(M) {
      const R = C(M);
      if (R === null)
        return;
      if (!!M.target.dataset.isLegendMarker) {
        x(R);
        return;
      }
      S(R);
    }
    async function $(M, R) {
      try {
        await navigator.clipboard.writeText(R), r.value = M, setTimeout(() => {
          r.value = null;
        }, 2e3);
      } catch {
      }
    }
    function I(M) {
      const R = M.target;
      o.value = R.value;
    }
    function w() {
      if (!a.value || t.position !== "bottom") {
        i.value = !1;
        return;
      }
      const R = a.value.clientWidth;
      if (R === 0)
        return;
      const N = p.value.length * (t.averageLegendWidth + 16);
      i.value = Math.ceil(N / R) <= 1;
    }
    let T = null;
    return At(() => {
      w(), a.value && t.position === "bottom" && (T = new ResizeObserver(w), T.observe(a.value));
    }), Vo(() => {
      T && T.disconnect();
    }), Ie([() => t.averageLegendWidth, () => p.value.length, () => t.position], () => {
      w();
    }), (M, R) => e.mode === "table" && e.values.length > 0 ? (ne(), xe("div", {
      key: 0,
      ref_key: "legendContainerRef",
      ref: a,
      class: "legend-container legend-table-mode",
      onClick: P
    }, [
      e.position === "right" ? (ne(), xe("div", Iie, [
        B("input", {
          type: "text",
          placeholder: "Search...",
          value: o.value,
          class: "legend-search-input",
          onInput: I
        }, null, 40, Tie)
      ])) : nt("", !0),
      B("div", _ie, [
        B("table", Mie, [
          B("thead", null, [
            B("tr", null, [
              R[0] || (R[0] = B("th", { class: "legend-table-th legend-table-name-col" }, " Name ", -1)),
              (ne(!0), xe(Je, null, Ut(e.values, (N) => (ne(), xe("th", {
                key: N,
                class: "legend-table-th legend-table-val-col"
              }, oe(c[N]), 1))), 128))
            ])
          ]),
          B("tbody", null, [
            (ne(!0), xe(Je, null, Ut(v.value, (N) => (ne(), xe("tr", {
              key: N.seriesIndex,
              "data-legend-item-id": N.seriesIndex,
              class: Pt(["legend-table-row", [
                N.show ? "" : "legend-item-off",
                n.value === N.seriesIndex ? "legend-item-focused" : ""
              ]])
            }, [
              B("td", Die, [
                B("div", {
                  class: "legend-item-label-trigger",
                  "data-legend-tooltip": N.label
                }, [
                  B("div", {
                    class: "legend-marker",
                    style: Ht({ borderColor: N.color }),
                    "data-is-legend-marker": !0
                  }, null, 4),
                  B("span", Nie, oe(N.label), 1)
                ], 8, Aie)
              ]),
              (ne(!0), xe(Je, null, Ut(e.values, (H) => (ne(), xe("td", {
                key: H,
                class: "legend-table-td legend-table-val-col"
              }, oe(m.value[N.seriesIndex] ? f(m.value[N.seriesIndex][H], e.decimals) : "—"), 1))), 128))
            ], 10, Eie))), 128))
          ])
        ])
      ])
    ], 512)) : (ne(), xe("div", {
      key: 1,
      ref_key: "legendContainerRef",
      ref: a,
      class: Pt(["legend-container", [e.position === "bottom" ? "legend-container-bottom" : ""]]),
      style: Ht({ "--legend-average-width": `${e.averageLegendWidth + 16}px` }),
      onClick: P
    }, [
      e.position === "right" ? (ne(), xe("div", Rie, [
        B("input", {
          type: "text",
          placeholder: "Search...",
          value: o.value,
          class: "legend-search-input",
          onInput: I
        }, null, 40, zie)
      ])) : nt("", !0),
      g.value ? (ne(), xe("div", Fie, ' No series found matching "' + oe(o.value) + '" ', 1)) : (ne(), xe("div", {
        key: 2,
        class: Pt(["legend-virtuoso-container", [
          `legend-virtuoso-container-${e.position}`,
          i.value ? "legend-virtuoso-container-single-row" : ""
        ]])
      }, [
        B("div", Bie, [
          (ne(!0), xe(Je, null, Ut(v.value, (N) => (ne(), xe("div", {
            key: N.seriesIndex,
            class: "virtuoso-grid-item"
          }, [
            B("div", {
              "data-legend-item-id": N.seriesIndex,
              class: Pt(["legend-item", [
                `legend-item-${e.position}`,
                N.show ? "" : "legend-item-off",
                n.value === N.seriesIndex ? "legend-item-focused" : ""
              ]])
            }, [
              B("div", {
                class: "legend-item-label-trigger",
                "data-legend-tooltip": N.label
              }, [
                B("div", {
                  class: "legend-marker",
                  style: Ht({ borderColor: N.color }),
                  "data-is-legend-marker": !0
                }, null, 4),
                B("span", Vie, oe(N.label), 1)
              ], 8, Hie),
              m.value[N.seriesIndex] && e.values.length > 0 ? (ne(), xe("span", jie, [
                (ne(!0), xe(Je, null, Ut(e.values, (H) => (ne(), xe("span", {
                  key: H,
                  class: "legend-item-value-badge"
                }, [
                  B("span", Wie, oe(c[H]) + ":", 1),
                  B("span", Kie, oe(f(m.value[N.seriesIndex][H], e.decimals)), 1)
                ]))), 128))
              ])) : nt("", !0),
              B("button", {
                type: "button",
                class: "legend-copy-button",
                "data-legend-tooltip": r.value === N.seriesIndex ? "Copied" : "Copy",
                onClick: cr((H) => $(N.seriesIndex, N.label ?? ""), ["stop"])
              }, [
                r.value === N.seriesIndex ? (ne(), xe("svg", Yie, [...R[1] || (R[1] = [
                  B("path", { d: "M20 6L9 17l-5-5" }, null, -1)
                ])])) : (ne(), xe("svg", Gie, [...R[2] || (R[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, qie)
            ], 10, Lie)
          ]))), 128))
        ])
      ], 2))
    ], 6));
  }
}), SE = /* @__PURE__ */ Sr(Uie, [["__scopeId", "data-v-85a1707f"]]), Xie = { class: "footer" }, Qie = {
  key: 0,
  class: "hint"
}, Zie = { class: "kbd active" }, Jie = {
  key: 1,
  class: "hint-list"
}, eae = {
  class: "hint",
  "data-active": "false"
}, tae = { class: "kbd" }, nae = /* @__PURE__ */ be({
  __name: "TooltipFooter",
  props: {
    isPinned: { type: Boolean },
    pinKey: { default: "P" }
  },
  emits: ["dismiss"],
  setup(e, { emit: t }) {
    const n = t;
    return (o, r) => (ne(), xe("div", Xie, [
      B("div", null, [
        e.isPinned ? (ne(), xe("div", Qie, [
          r[1] || (r[1] = B("span", null, "按", -1)),
          B("kbd", Zie, oe(e.pinKey), 1),
          r[2] || (r[2] = B("span", null, "或", -1)),
          r[3] || (r[3] = B("kbd", { class: "kbd active" }, "Esc", -1)),
          r[4] || (r[4] = B("span", null, "取消固定", -1))
        ])) : (ne(), xe("div", Jie, [
          B("div", eae, [
            r[5] || (r[5] = B("span", null, "按", -1)),
            B("kbd", tae, oe(e.pinKey), 1),
            r[6] || (r[6] = B("span", null, "固定提示框", -1))
          ])
        ]))
      ]),
      e.isPinned ? (ne(), xe("button", {
        key: 0,
        class: "unpin-btn",
        onClick: r[0] || (r[0] = (i) => n("dismiss"))
      }, [...r[7] || (r[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)
      ])])) : nt("", !0)
    ]));
  }
}), oae = /* @__PURE__ */ Sr(nae, [["__scopeId", "data-v-75c52e2f"]]), rae = ["data-is-active"], iae = { class: "tooltip-item-label" }, aae = /* @__PURE__ */ be({
  __name: "TooltipItem",
  props: {
    item: {},
    isItemActive: { type: Boolean }
  },
  setup(e) {
    return (t, n) => (ne(), xe("div", {
      class: "tooltip-item",
      "data-is-active": e.isItemActive
    }, [
      B("div", {
        class: "tooltip-item-marker",
        style: Ht({ borderColor: e.item.color })
      }, null, 4),
      B("div", {
        class: "tooltip-item-content",
        style: Ht({ color: e.item.color })
      }, [
        B("span", iae, oe(e.item.label), 1),
        B("span", {
          class: "tooltip-item-separator",
          style: Ht({ borderColor: e.item.color })
        }, null, 4),
        B("span", null, oe(e.item.tooltipValue), 1)
      ], 4)
    ], 8, rae));
  }
}), CE = /* @__PURE__ */ Sr(aae, [["__scopeId", "data-v-3b1d92d5"]]), lae = { class: "header-container" }, sae = {
  key: 0,
  class: "header-row"
}, uae = {
  key: 0,
  class: "header-status"
}, cae = {
  key: 1,
  class: "header-pinned-item"
}, dae = /* @__PURE__ */ be({
  __name: "TooltipHeader",
  props: {
    uPlotInstance: {},
    showTooltipHeader: { type: Boolean },
    isPinned: { type: Boolean },
    activeItem: {},
    headerTitle: {}
  },
  setup(e) {
    return (t, n) => (ne(), xe("div", lae, [
      e.showTooltipHeader && e.headerTitle ? (ne(), xe("div", sae, [
        B("span", null, oe(e.headerTitle), 1),
        e.isPinned ? (ne(), xe("div", uae, [...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)
        ])])) : nt("", !0)
      ])) : nt("", !0),
      e.activeItem ? (ne(), xe("div", cae, [
        h(CE, {
          item: e.activeItem,
          "is-item-active": !0
        }, null, 8, ["item"])
      ])) : nt("", !0)
    ]));
  }
}), fae = /* @__PURE__ */ Sr(dae, [["__scopeId", "data-v-efb4cf97"]]), pae = /* @__PURE__ */ be({
  __name: "TooltipList",
  props: {
    content: {},
    maxHeight: { default: 300 }
  },
  setup(e) {
    return (t, n) => (ne(), xe("div", {
      class: "tooltip-list",
      style: Ht({ maxHeight: `${e.maxHeight}px`, overflowY: "auto" })
    }, [
      (ne(!0), xe(Je, null, Ut(e.content, (o) => (ne(), dt(CE, {
        key: o.label,
        item: o,
        "is-item-active": !1
      }, null, 8, ["item"]))), 128))
    ], 4));
  }
}), hae = /* @__PURE__ */ Sr(pae, [["__scopeId", "data-v-fa17493a"]]), gae = {
  key: 1,
  class: "tooltip-divider"
}, vae = /* @__PURE__ */ be({
  __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, r = E(() => n.content.find((s) => s.isActive) ?? null), i = E(() => n.showTooltipHeader || r.value != null), a = E(() => n.content.length > 1), l = E(() => a.value && i.value);
    return (s, u) => (ne(), xe("div", {
      class: Pt(["tooltip-container", { pinned: e.isPinned }])
    }, [
      i.value ? (ne(), dt(fae, {
        key: 0,
        "u-plot-instance": e.uPlotInstance,
        "show-tooltip-header": e.showTooltipHeader,
        "is-pinned": e.isPinned,
        "active-item": r.value,
        "header-title": e.headerTitle
      }, null, 8, ["u-plot-instance", "show-tooltip-header", "is-pinned", "active-item", "header-title"])) : nt("", !0),
      l.value ? (ne(), xe("span", gae)) : nt("", !0),
      a.value ? (ne(), dt(hae, {
        key: 2,
        content: e.content,
        "max-height": e.tooltipMaxHeight
      }, null, 8, ["content", "max-height"])) : nt("", !0),
      e.canPinTooltip ? (ne(), dt(oae, {
        key: 3,
        "is-pinned": e.isPinned,
        style: Ht({ pointerEvents: e.isPinned ? "auto" : "none" }),
        onDismiss: u[0] || (u[0] = (c) => o("dismiss"))
      }, null, 8, ["is-pinned", "style"])) : nt("", !0)
    ], 2));
  }
}), mae = /* @__PURE__ */ Sr(vae, [["__scopeId", "data-v-4b92f289"]]), fu = 14, $E = /* @__PURE__ */ be({
  __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), r = le(!1), i = 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,
      // offset state with memory — mirrors React's horizontalOffset/verticalOffset
      horizontalOffset: 0,
      verticalOffset: 0,
      cursorDrivenBySync: !1
    };
    let s = null;
    function u() {
      s === null && (s = requestAnimationFrame(() => {
        s = null, S();
      }));
    }
    function c(A, G, j) {
      return typeof A == "function" ? String(A(G, j)) : typeof A == "string" ? A : "#cccccc";
    }
    function d(A, G, j) {
      const Z = j !== void 0 ? A.toFixed(j) : String(Math.round(A * 1e3) / 1e3);
      return G ? `${Z} ${G}` : Z;
    }
    function f(A) {
      if (t.tooltipMode === "none")
        return [];
      const G = A.cursor.idx, j = [];
      for (let Z = 1; Z < A.series.length; Z++) {
        const W = A.series[Z];
        if (!W?.show)
          continue;
        let K = l.seriesIndexes[Z] ?? null;
        if (t.tooltipMode === "single") {
          if (Z !== l.focusedSeriesIndex)
            continue;
          K = G ?? K;
        } else
          K = K ?? G ?? null;
        if (K === null)
          continue;
        const q = A.data[Z]?.[K];
        q == null || !Number.isFinite(q) || j.push({
          label: String(W.label ?? `Series ${Z}`),
          value: q,
          tooltipValue: d(q, t.unit, t.decimals),
          color: c(W.stroke, A, Z),
          isActive: Z === l.focusedSeriesIndex
        });
      }
      return t.tooltipSort === "asc" && j.sort((Z, W) => Z.value - W.value), t.tooltipSort === "desc" && j.sort((Z, W) => W.value - Z.value), j;
    }
    function p(A) {
      if (!t.showTooltipHeader)
        return "";
      const G = A.cursor.idx;
      if (G == null)
        return "";
      const j = A.data[0]?.[G];
      return j == null ? "" : A.scales.x?.time ? new Date(j * 1e3).toLocaleString() : String(j);
    }
    function v(A, G, j) {
      const Z = j + fu;
      return A !== 0 ? G + Z < l.windowWidth || G - Z < 0 ? 0 : A !== -Z ? -Z : A : G + Z > l.windowWidth && G - Z >= 0 ? -Z : 0;
    }
    function g(A, G, j) {
      const Z = j + fu;
      return A !== 0 ? G + Z < l.windowHeight || G - Z < 0 ? 0 : A !== -Z ? -Z : A : G + Z > l.windowHeight && G - Z >= 0 ? -Z : 0;
    }
    function m(A, G, j, Z) {
      const W = A + (j === 0 ? fu : -fu), K = G + (Z === 0 ? fu : -fu);
      return `translateX(${W}px) ${j === 0 ? "" : "translateX(-100%)"} translateY(${K}px) ${Z === 0 ? "" : "translateY(-100%)"}`;
    }
    function x(A) {
      if (l.cursorDrivenBySync = A.cursor.event == null, l.pinned || !l.hoverActive)
        return;
      const G = n.value, { left: j = -1, top: Z = -1 } = A.cursor;
      if (j < 0 || Z < 0)
        return;
      const W = A.rect.left + j, K = A.rect.top + Z, q = G ? G.offsetWidth : l.tooltipW, U = G ? G.offsetHeight : l.tooltipH;
      l.tooltipW = q, l.tooltipH = U, l.horizontalOffset = v(l.horizontalOffset, W, q), l.verticalOffset = g(l.verticalOffset, K, U);
      const ae = m(W, K, l.horizontalOffset, l.verticalOffset);
      G && (G.style.transform = ae);
    }
    function S() {
      const A = t.uPlotInstance;
      if (!A || !l.hoverActive && !l.pinned) {
        o.value = !1;
        return;
      }
      const G = f(A);
      if (G.length === 0) {
        l.pinned || (o.value = !1);
        return;
      }
      if (a.value = G, i.value = p(A), r.value = l.pinned, !l.pinned) {
        const j = n.value, { left: Z = -1, top: W = -1 } = A.cursor;
        if (j && Z >= 0 && W >= 0) {
          const K = A.rect.left + Z, q = A.rect.top + W;
          j.style.transform = m(K, q, l.horizontalOffset, l.verticalOffset);
        }
      }
      o.value = !0;
    }
    function C(A) {
      if (l.pinned)
        return;
      const G = A.cursor.idxs;
      if (!G)
        return;
      const j = l.cursorDrivenBySync;
      l.cursorDrivenBySync = A.cursor.event == null, l.seriesIndexes = [...G];
      const Z = l.seriesIndexes.some((q, U) => U > 0 && q != null), W = l.hoverActive;
      l.hoverActive = l.cursorDrivenBySync ? Z : l.focusedSeriesIndex != null, (l.hoverActive !== W || l.cursorDrivenBySync !== j) && u();
    }
    function P(A, G, j) {
      !("focus" in j) || l.pinned || (l.focusedSeriesIndex = G ?? null, l.cursorDrivenBySync = A.cursor.event == null, l.hoverActive = l.focusedSeriesIndex != null, u());
    }
    function $() {
      const A = t.uPlotInstance;
      !A || !l.hoverActive || (l.pinned = !0, A.cursor._lock = !0, r.value = !0, document.addEventListener("mousedown", w, !0));
    }
    function I() {
      const A = t.uPlotInstance;
      l.pinned = !1, l.hoverActive = !1, A && (A.cursor._lock = !1), r.value = !1, o.value = !1, document.removeEventListener("mousedown", w, !0);
    }
    function w(A) {
      n.value && !n.value.contains(A.target) && I();
    }
    function T(A) {
      if (A.key === "Escape") {
        l.pinned && I();
        return;
      }
      A.key.toLowerCase() === "p" && l.mouseWithinPlot && (l.pinned ? I() : $());
    }
    function M() {
      l.mouseWithinPlot = !0;
    }
    function R() {
      l.mouseWithinPlot = !1;
    }
    function N() {
      l.windowWidth = window.innerWidth - 16, l.windowHeight = window.innerHeight - 16, l.pinned || (l.hoverActive = !1);
    }
    let H = [];
    function L(A) {
      const G = (W) => C(W), j = (W, K, q) => P(W, K, q), Z = (W) => x(W);
      A.hooks.setLegend = [...A.hooks.setLegend ?? [], G], A.hooks.setSeries = [...A.hooks.setSeries ?? [], j], A.hooks.setCursor = [...A.hooks.setCursor ?? [], Z], A.root.addEventListener("mouseenter", M), A.root.addEventListener("mouseleave", R), H = [
        () => {
          A.hooks.setLegend = (A.hooks.setLegend ?? []).filter(
            (W) => W !== G
          ), A.hooks.setSeries = (A.hooks.setSeries ?? []).filter(
            (W) => W !== j
          ), A.hooks.setCursor = (A.hooks.setCursor ?? []).filter(
            (W) => W !== Z
          ), A.root.removeEventListener("mouseenter", M), A.root.removeEventListener("mouseleave", R);
        }
      ];
    }
    function F() {
      H.forEach((A) => A()), H = [], document.removeEventListener("mousedown", w, !0), l.hoverActive = !1, l.pinned = !1, l.focusedSeriesIndex = null, l.horizontalOffset = 0, l.verticalOffset = 0, l.cursorDrivenBySync = !1, o.value = !1, r.value = !1, s !== null && (cancelAnimationFrame(s), s = null);
    }
    return Ie(
      () => t.uPlotInstance,
      (A, G) => {
        G && F(), A && L(A);
      },
      { immediate: !0 }
    ), At(() => {
      document.addEventListener("keydown", T, !0), window.addEventListener("resize", N);
    }), Vo(() => {
      F(), document.removeEventListener("keydown", T, !0), window.removeEventListener("resize", N);
    }), (A, G) => (ne(), dt(oh, { to: "body" }, [
      ti(B("div", {
        ref_key: "containerRef",
        ref: n,
        style: { position: "fixed", top: "0", left: "0", "z-index": "1070", "pointer-events": "none" }
      }, [
        e.uPlotInstance ? (ne(), dt(mae, {
          key: 0,
          "u-plot-instance": e.uPlotInstance,
          content: a.value,
          "header-title": i.value,
          "is-pinned": r.value,
          "can-pin-tooltip": e.canPinTooltip,
          "show-tooltip-header": e.showTooltipHeader,
          "tooltip-max-height": e.tooltipMaxHeight,
          onDismiss: I
        }, null, 8, ["u-plot-instance", "content", "header-title", "is-pinned", "can-pin-tooltip", "show-tooltip-header", "tooltip-max-height"])) : nt("", !0)
      ], 512), [
        [Oi, o.value && e.tooltipMode !== "none"]
      ])
    ]));
  }
}), PE = Symbol("plotContext");
function bae() {
  const e = le(null), t = le(""), n = le(!1);
  let o;
  function r(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 i() {
    const c = e.value;
    if (!c || !t.value)
      return;
    const d = c.series.map((f) => ({
      label: f.label ?? "",
      show: f.show ?? !0
    }));
    b4(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, v) => {
        v !== 0 && d.setSeries(v, {
          show: f || v === c
        });
      }), t.value && n.value && i();
    });
  }
  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 && i());
  }
  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: r,
    onToggleSeriesVisibility: a,
    onToggleSeriesOnOff: l,
    onFocusSeries: s,
    syncSeriesVisibilityToLocalStorage: i
  };
  return Bt(PE, u), u;
}
function Ffe() {
  const e = zt(PE);
  if (!e)
    throw new Error("usePlotContext must be used within a PlotContextProvider");
  return e;
}
const yae = { style: { position: "relative", overflow: "hidden" } }, OE = /* @__PURE__ */ be({
  __name: "UPlotChart",
  props: {
    config: {},
    data: {},
    width: {},
    height: {},
    plotRef: {},
    onDestroy: {}
  },
  emits: ["plotReady"],
  setup(e, { expose: t, emit: n }) {
    const o = e, r = n, { setPlotContextInitialState: i } = bae(), 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, i({ uPlotInstance: null }), o.plotRef && o.plotRef(null));
    }
    function p($) {
      if ($ === null || typeof $ != "object")
        return $;
      const I = fr($);
      if (I instanceof Date)
        return new Date(I.getTime());
      if (I instanceof RegExp)
        return new RegExp(I.source, I.flags);
      if (typeof I == "function")
        return I;
      if (Array.isArray(I)) {
        const T = [];
        for (let M = 0; M < I.length; M++)
          T.push(p(fr(I[M])));
        return T;
      }
      const w = {};
      for (const T in I)
        Object.prototype.hasOwnProperty.call(I, T) && (w[T] = p(fr(I[T])));
      return w;
    }
    function v() {
      if (f(), !a.value || o.width === 0 || o.height === 0)
        return;
      const $ = o.config.getConfig(), w = p({
        ...$,
        width: Math.floor(o.width),
        height: Math.floor(o.height),
        series: $.series ?? []
      }), T = m(o.data, o.config), M = new xo(w, T, a.value);
      o.plotRef && o.plotRef(M), i({
        uPlotInstance: M,
        id: o.config.getId(),
        shouldSaveSelectionPreference: o.config.getShouldSaveSelectionPreference()
      }), l.value = M, r("plotReady", M), s.value = JSON.stringify(o.config.getConfig()), u.value = JSON.stringify(o.data), c.value = o.width, d.value = o.height;
    }
    function g($) {
      return JSON.parse(JSON.stringify($));
    }
    function m($, I) {
      const w = g($), T = I.getSeriesSpanGapsOptions();
      return T.length > 0 ? zF(w, T) : w;
    }
    function x() {
      return o.width === c.value && o.height === d.value;
    }
    function S() {
      return JSON.stringify(o.data) === u.value;
    }
    function C() {
      return JSON.stringify(o.config.getConfig()) === s.value;
    }
    const P = E(() => !!(o.data && o.data[0] && o.data[0].length === 0));
    return Ie(P, ($) => {
      $ && f();
    }), It(($) => {
      if ($(() => {
        f(), s.value = "", u.value = "", c.value = 0, d.value = 0;
      }), !a.value || o.width === 0 || o.height === 0)
        return;
      if (!s.value) {
        v();
        return;
      }
      const I = !!l.value && (!a.value || l.value.root.parentElement !== a.value);
      if (!x() && l.value && !I && l.value.setSize({
        width: Math.floor(o.width),
        height: Math.floor(o.height)
      }), !C() || I)
        v();
      else if (!S() && l.value) {
        const w = m(o.data, o.config);
        l.value.setData(w);
      }
    }), qt(() => {
      f();
    }), t({ plotInstance: l }), ($, I) => (ne(), xe("div", yae, [
      P.value ? (ne(), xe("div", {
        key: 0,
        class: "flex flex-col items-center justify-center not-found",
        style: Ht({
          width: `${e.width}px`,
          height: `${e.height}px`
        })
      }, [
        B("div", {
          class: Pt([_(bt).chartLine, "mb-2"]),
          style: { "font-size": "48px" }
        }, null, 2),
        I[0] || (I[0] = B("div", { class: "text-gray-400 text-sm" }, " No Data ", -1))
      ], 4)) : (ne(), xe("div", {
        key: 1,
        ref_key: "containerRef",
        ref: a,
        class: "w-full h-full"
      }, null, 512)),
      lr($.$slots, "default")
    ]));
  }
}), xae = {
  key: 0,
  class: "flex items-center justify-center h-full text-gray-400 select-none"
}, kE = /* @__PURE__ */ be({
  __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 r = null;
    function i(m) {
      r = new ResizeObserver((x) => {
        const S = x[0];
        if (S) {
          const { width: C, height: P } = S.contentRect;
          setTimeout(() => {
            o.value = { width: Math.floor(C), height: Math.floor(P) };
          }, 300);
        }
      }), r.observe(m), requestAnimationFrame(() => {
        const { width: x, height: S } = m.getBoundingClientRect();
        o.value = { width: Math.floor(x), height: Math.floor(S) };
      });
    }
    At(() => {
      n.value && i(n.value);
    }), Ie(n, (m) => {
      r?.disconnect(), m && i(m);
    }), qt(() => {
      r?.disconnect();
    });
    const a = E(() => {
      const m = new Mk({ id: t.panelId ?? "chart" }), x = t.scaleDistribution ?? "linear", S = t.stackingMode !== "none";
      m.addScale({ scaleKey: "x", time: t.xAxisTime }), m.addScale({
        scaleKey: "y",
        distribution: x === "logarithmic" ? ws.Logarithmic : x === "symlog" ? ws.Symlog : ws.Linear,
        softMin: S && t.stackingMode === "percent" ? 0 : t.softMin ?? void 0,
        softMax: S && t.stackingMode === "percent" ? 100 : t.softMax ?? void 0,
        ...t.centeredZero ? {
          range: (fe, ge, Te) => {
            const ze = Math.max(Math.abs(ge), Math.abs(Te));
            return [-ze, ze];
          }
        } : {}
      });
      const C = t.gridColor ?? "#E8E9EA", P = t.showGridLines === "all" || t.showGridLines === "x", $ = t.showGridLines === "all" || t.showGridLines === "y", I = t.axisLabel === "all" || t.axisLabel === "x", w = t.axisLabel === "all" || t.axisLabel === "y", T = I ? t.axisLabelColor ?? "#666666" : "transparent", M = w ? t.axisLabelColor ?? "#666666" : "transparent", R = t.axisTick === "all" || t.axisTick === "x", N = t.axisTick === "all" || t.axisTick === "y", H = R ? t.axisTickColor ?? "#666666" : "transparent", L = N ? t.axisTickColor ?? "#666666" : "transparent", F = t.axisBorder === "all" || t.axisBorder === "x", A = t.axisBorder === "all" || t.axisBorder === "y", G = t.axisBorderColor ?? "#666666";
      m.addAxis({
        scaleKey: "x",
        side: 2,
        size: 28,
        stroke: T,
        grid: { show: P, stroke: C },
        ticks: { show: R, stroke: H, width: 0.5 },
        border: { show: F, stroke: G }
      });
      const j = t.axisPlacement === "right" ? 1 : 3, Z = t.axisPlacement !== "hidden", W = (() => {
        if (t.axisWidth !== void 0 && t.axisWidth !== null)
          return t.axisWidth;
        const fe = t.data.series.reduce((He, Ne) => He.concat(Ne.values.filter((Xe) => Xe !== null && Number.isFinite(Xe))), []);
        if (fe.length === 0)
          return 56;
        const ge = fe.reduce((He, Ne) => Math.max(He, Math.abs(Ne)), 0), Te = t.decimals === void 0 || t.decimals === null ? void 0 : t.decimals <= 15 ? t.decimals : 15, Ke = ((He) => {
          if (Math.abs(He) >= 1e6) {
            const Xe = Te !== void 0 ? (He / 1e6).toFixed(Te) : String(He / 1e6);
            return t.unit ? `${Xe}M ${t.unit}` : `${Xe}M`;
          }
          if (Math.abs(He) >= 1e3) {
            const Xe = Te !== void 0 ? (He / 1e3).toFixed(Te) : String(He / 1e3);
            return t.unit ? `${Xe}K ${t.unit}` : `${Xe}K`;
          }
          const Ne = Te !== void 0 ? He.toFixed(Te) : String(Math.round(He * 100) / 100);
          return t.unit ? `${Ne} ${t.unit}` : Ne;
        })(ge);
        try {
          const He = document.createElement("canvas").getContext("2d");
          if (!He)
            return 56;
          He.font = "12px system-ui, sans-serif";
          const Ne = He.measureText(Ke).width;
          return Math.ceil(Ne) + 14;
        } catch {
          return 56;
        }
      })(), K = t.decimals === void 0 || t.decimals === null ? void 0 : t.decimals <= 15 ? t.decimals : 15;
      m.addAxis({
        scaleKey: "y",
        side: j,
        show: Z,
        label: t.axisName || void 0,
        size: W,
        stroke: M,
        grid: { show: $, stroke: C },
        ticks: { show: N, stroke: L, width: 0.5 },
        border: { show: A, stroke: G },
        isDarkMode: !0,
        yAxisUnit: t.unit,
        decimalPrecision: K,
        isLogScale: x === "logarithmic" || x === "symlog"
      });
      const q = HO(
        t.colorScheme,
        t.data.series.length,
        t.colorDistribution ?? "sequential",
        t.colorSingleValue
      ), U = t.drawStyle === "bars", ae = t.drawStyle === "points", se = t.data.series.length, ie = t.barGroupWidth ?? 0.7, re = t.barWidth ?? (t.stackingMode !== "none" ? 1 : 1 / Math.max(se, 1)), te = U ? ie * re : void 0, ve = ae || t.showPointsMode === "always" ? !0 : t.showPointsMode === "never" ? !1 : t.showPoints, ce = S ? "none" : t.fillOpacity > 0 ? t.gradientMode !== "none" ? "gradient" : "solid" : "none";
      if (t.data.series.forEach((fe, ge) => {
        const Te = q[ge] ?? Il[ge % Il.length];
        m.addSeries({
          scaleKey: "y",
          label: fe.label,
          drawStyle: U ? "bars" : ae ? "points" : "lines",
          lineColor: Te,
          lineWidth: t.lineWidth,
          lineInterpolation: t.lineInterpolation,
          lineStyle: t.lineStyle,
          fillColor: Te,
          fillOpacity: t.fillOpacity,
          fillMode: ce,
          showPoints: ve,
          pointSize: ve ? 4 : 0,
          spanGaps: t.spanNulls ?? !1,
          ...te !== void 0 ? { barWidthFactor: te } : {}
        });
      }), S && t.data.series.length > 0 && t.fillOpacity > 0) {
        const fe = q.length > 0 ? q : [...Il], ge = 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), Te = t.data.series.map((ze, Ke) => ({
          series: [Ke + 1, Ke],
          fill: `${fe[Ke % fe.length]}${ge}`
        }));
        Te.length > 0 && (Te[0] = { series: [1, 0], fill: `${fe[0]}${ge}` }), m.setBands(Te);
      }
      return t.syncKey && m.setCursor({ sync: { key: t.syncKey, setSeries: !0 } }), t.showAxisPointer || m.setCursor({ x: !1, y: !1 }), m.setCursor({
        drag: { setScale: !0 },
        points: {
          one: !0,
          size: (fe, ge) => (fe.series[ge]?.points?.size ?? 0) * 3,
          width: (fe, ge, Te) => Te / 4,
          stroke: (fe, ge) => {
            const Te = fe.series[ge]?.points, ze = typeof Te?.stroke == "function" ? Te.stroke : void 0;
            return `${ze !== void 0 ? ze(fe, ge) : typeof Te?.stroke == "string" ? Te.stroke : ""}90`;
          },
          fill: "#fff"
        },
        focus: {
          prox: 30
        },
        hover: {
          prox: 30,
          bias: 0
        }
      }), m;
    }), l = E(() => {
      const m = t.data?.timestamps ?? [], x = JSON.parse(JSON.stringify(m));
      if (x.length === 0 || !t.data)
        return [[]];
      const S = t.data.series.map((C) => JSON.parse(JSON.stringify(C.values.map((P) => P ?? 0))));
      if (t.stackingMode !== "none" && t.data.series.length > 0) {
        const C = x.length, P = Array.from({ length: C }, () => 0), $ = [];
        for (const I of t.data.series) {
          const w = Array.from({ length: C });
          for (let T = 0; T < C; T++) {
            if (t.stackingMode === "percent") {
              let M = 0;
              for (const R of t.data.series)
                M += R.values[T] ?? 0;
              P[T] = P[T] + (I.values[T] ?? 0) / (M || 1) * 100;
            } else
              P[T] = P[T] + (I.values[T] ?? 0);
            w[T] = P[T];
          }
          $.push(w);
        }
        return [x, ...$];
      }
      return [x, ...S];
    }), s = E(() => !t.data || t.data.timestamps.length === 0 || t.data.series.length === 0), u = le(null);
    function c(m) {
      u.value = m;
    }
    const d = E(() => t.decimals === void 0 || t.decimals === null ? void 0 : t.decimals <= 15 ? t.decimals : 15), f = E(() => t.legendPosition === "right"), p = E(() => t.legendPosition !== "hidden" && t.data.series.length > 0), v = E(() => f.value && p.value ? Math.max(o.value.width - 160, 100) : o.value.width), g = E(() => Math.max(o.value.height, 50));
    return (m, x) => (ne(), xe("div", {
      class: Pt(["w-full h-full flex overflow-hidden relative", f.value ? "flex-row" : "flex-col"])
    }, [
      s.value ? (ne(), xe("div", xae, [...x[0] || (x[0] = [
        B("span", { class: "text-xs" }, "No data", -1)
      ])])) : nt("", !0),
      B("div", {
        ref_key: "chartAreaRef",
        ref: n,
        class: "flex-1 min-h-0 min-w-0 relative overflow-hidden"
      }, [
        h(OE, {
          config: a.value,
          data: l.value,
          width: v.value,
          height: g.value,
          onPlotReady: c
        }, {
          default: he(() => [
            h($E, {
              "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 ? (ne(), xe("div", {
        key: 1,
        style: Ht(
          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" }
        )
      }, [
        h(SE, {
          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)) : nt("", !0)
    ], 2));
  }
}), wae = /* @__PURE__ */ be({
  __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) => (ne(), dt(kE, {
      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"]));
  }
}), Sae = {
  key: 0,
  style: { "text-align": "center", "font-size": "11px", color: "#888", padding: "2px 4px 4px", overflow: "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" }
}, Uv = 2, Cae = /* @__PURE__ */ be({
  __name: "GaugePanel",
  props: {
    series: {},
    value: { default: 0 },
    title: {},
    min: { default: Gn.min },
    max: { default: Gn.max },
    unit: {},
    thresholds: {},
    thresholdBaseColor: {},
    capRound: { type: Boolean, default: Gn.capRound },
    trackWidth: { default: Gn.trackWidth },
    fillWidth: { default: Gn.fillWidth },
    trackColor: { default: Gn.trackColor },
    sweepAngle: { default: Gn.sweepAngle },
    valueColor: { default: Gn.valueColor },
    valueSize: { default: Gn.valueSize },
    valueVisible: { type: Boolean, default: Gn.valueVisible },
    paddingX: { default: Gn.paddingX },
    paddingY: { default: Gn.paddingY },
    activeColorOverride: {},
    thresholdDisplay: { default: Gn.thresholdDisplay },
    thresholdLabelDisplay: { default: Gn.thresholdLabelDisplay },
    valueOffsetY: { default: Gn.valueOffsetY },
    orientation: { default: Gn.orientation }
  },
  setup(e) {
    const t = e, n = le(), o = le({ w: 0, h: 0 });
    let r = null;
    function i(S, C, P = 2) {
      const $ = S.toFixed(P);
      return C === "percent" ? `${$}%` : C === "bytes" ? S >= 1024 * 1024 ? `${(S / 1024 / 1024).toFixed(1)} MB` : S >= 1024 ? `${(S / 1024).toFixed(1)} KB` : `${S} B` : C ? `${$} ${C}` : $;
    }
    function a(S, C, P) {
      const $ = [...P].sort((w, T) => w.value - T.value);
      let I = C;
      for (const w of $)
        S >= w.value && (I = w.color);
      return I;
    }
    function l(S, C) {
      const P = S.match(/^#([0-9a-f]{6})([0-9a-f]{2})?$/i);
      if (P) {
        const I = Number.parseInt(P[1].slice(0, 2), 16), w = Number.parseInt(P[1].slice(2, 4), 16), T = Number.parseInt(P[1].slice(4, 6), 16);
        return `rgba(${I},${w},${T},${C})`;
      }
      const $ = S.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/i);
      return $ ? `rgba(${$[1]},${$[2]},${$[3]},${C})` : S;
    }
    function s(S, C, P, $, I, w, T, M, R, N, H, L, F, A, G, j, Z, W, K, q, U, ae) {
      const se = S.getContext("2d");
      if (!se)
        return;
      const ie = window.devicePixelRatio || 1, re = S.clientWidth, te = S.clientHeight;
      if (re === 0 || te === 0)
        return;
      S.width = re * ie, S.height = te * ie, se.scale(ie, ie), se.clearRect(0, 0, re, te);
      const ve = L * Math.PI / 180, ce = (L + F) * Math.PI / 180;
      let fe, ge, Te, ze;
      if (F >= 360)
        fe = -1, ge = 1, Te = -1, ze = 1;
      else {
        fe = Math.cos(ve), ge = Math.cos(ve), Te = Math.sin(ve), ze = Math.sin(ve);
        const yt = (Wt) => {
          fe = Math.min(fe, Math.cos(Wt)), ge = Math.max(ge, Math.cos(Wt)), Te = Math.min(Te, Math.sin(Wt)), ze = Math.max(ze, Math.sin(Wt));
        };
        yt(ce);
        const Ot = [0, 90, 180, 270, 360, 450, 540].map((Wt) => Wt * Math.PI / 180);
        for (const Wt of Ot) {
          const Xt = (En) => (En % (2 * Math.PI) + 2 * Math.PI) % (2 * Math.PI), ln = Xt(ve), pn = Xt(ce), gt = Xt(Wt);
          (ln <= pn ? gt >= ln && gt <= pn : gt >= ln || gt <= pn) && yt(Wt);
        }
      }
      const Ke = ge - fe, He = ze - Te, Ne = Math.min(re, te), Xe = Ne / 300, De = Z * Xe, Fe = W * Xe, Ve = Math.max(0, re - 2 * De), ot = Math.max(0, te - 2 * Fe), je = De, Pe = Fe, Ge = R * Xe, Se = N * Xe, Ce = q === "marker", Ae = q === "track", qe = Ce ? Math.max(2, Ne * 0.04) : 0, We = Ce ? Math.max(Ge, Se) / 2 + 2 + qe : Math.max(Ge, Se) / 2, tt = Math.min((Ve - We * 2) / Ke, (ot - We * 2) / He);
      if (tt < 10)
        return;
      const Ee = je + Ve / 2 - (fe + ge) / 2 * tt, Re = Pe + ot / 2 - (Te + ze) / 2 * tt, Be = $ - P || 1, rt = Math.max(P, Math.min($, C)), pt = (rt - P) / Be, at = ve + pt * (ce - ve), ft = K ?? a(rt, T, w), wt = M ? "round" : "butt";
      se.beginPath(), se.arc(Ee, Re, tt, ve, ce), se.strokeStyle = H, se.lineWidth = Ge, se.lineCap = wt, se.stroke();
      const Ct = [...w].sort((yt, Ot) => yt.value - Ot.value), St = [];
      if (Ct.length === 0)
        St.push({ from: P, to: $, color: T });
      else {
        St.push({ from: P, to: Ct[0].value, color: T });
        for (let yt = 0; yt < Ct.length; yt++)
          St.push({ from: Ct[yt].value, to: yt + 1 < Ct.length ? Ct[yt + 1].value : $, color: Ct[yt].color });
      }
      if (Ae) {
        const yt = (ce - ve) / (2 * Math.PI), Ot = se.createConicGradient(ve, Ee, Re);
        for (const Wt of St) {
          const Xt = Math.min(1, (Math.max(P, Wt.from) - P) / Be * yt), ln = Math.min(1, (Math.min($, Wt.to) - P) / Be * yt);
          Ot.addColorStop(Xt, l(Wt.color, 0.25)), Ot.addColorStop(ln, l(Wt.color, 0.25));
        }
        Ot.addColorStop(1, l(St[0].color, 0.25)), se.beginPath(), se.arc(Ee, Re, tt, ve, ce), se.strokeStyle = Ot, se.lineWidth = Ge, se.lineCap = wt, se.stroke();
      }
      if (pt > 0 && (se.beginPath(), se.arc(Ee, Re, tt, ve, at), se.strokeStyle = ft, se.lineWidth = Se, se.lineCap = wt, se.stroke()), Ce && St.length > 0) {
        const yt = tt + Math.max(Ge, Se) / 2 + qe / 2 + 2, Ot = (ce - ve) / (2 * Math.PI), Wt = se.createConicGradient(ve, Ee, Re);
        for (const Xt of St) {
          const ln = Math.min(1, (Math.max(P, Xt.from) - P) / Be * Ot), pn = Math.min(1, (Math.min($, Xt.to) - P) / Be * Ot);
          Wt.addColorStop(ln, Xt.color), Wt.addColorStop(pn, Xt.color);
        }
        Wt.addColorStop(1, St[0].color), se.beginPath(), se.arc(Ee, Re, yt, ve, ce), se.strokeStyle = Wt, se.lineWidth = qe, se.lineCap = wt, se.stroke();
      }
      if (ae !== "none" && w.length > 0) {
        const yt = Math.max(8, 11 * Xe), Ot = tt + Math.max(Ge, Se) / 2 + (Ce ? qe + 4 : 4) + yt * 0.6, Wt = $ - P || 1;
        se.font = `${yt}px system-ui, sans-serif`, se.textBaseline = "middle";
        for (const Xt of w) {
          const ln = (Xt.value - P) / Wt;
          if (ln < 0 || ln > 1)
            continue;
          const pn = ve + ln * (ce - ve), gt = Ee + Math.cos(pn) * Ot, En = Re + Math.sin(pn) * Ot, hn = gt - Ee;
          if (se.textAlign = hn > 1 ? "left" : hn < -1 ? "right" : "center", se.fillStyle = Xt.color, ae === "label" || ae === "both") {
            const Kn = Xt.label || String(Xt.value);
            ae === "both" ? (se.fillText(Kn, gt, En - yt * 0.6), se.fillText(i(Xt.value, I, 1), gt, En + yt * 0.6)) : se.fillText(Kn, gt, En);
          } else
            se.fillText(i(Xt.value, I, 1), gt, En);
        }
      }
      if (j) {
        const yt = Math.max(4, G * Xe), Ot = i(rt, I, 2), Wt = Re + Te * tt - Se / 2, Xt = Re + ze * tt + Se / 2, ln = (Wt + Xt) / 2;
        se.textAlign = "center", se.textBaseline = "middle", se.fillStyle = A, se.font = `600 ${yt}px system-ui, sans-serif`, se.fillText(Ot, Ee, ln + U * Xe);
      }
    }
    function u(S, C, P) {
      const $ = Math.ceil(Math.sqrt(P * S / C));
      return Math.floor($ * C / S) * $ < P ? C / Math.ceil($ * C / S) : S / $;
    }
    function c(S, C, P, $) {
      const I = Math.max(u(S, C, $), u(C, S, $));
      let w = Math.max(1, Math.floor(S / I));
      const T = Math.ceil($ / w);
      return w = Math.ceil($ / T), { xCount: w, yCount: T, cellW: S / w - P + P / w, cellH: C / T - P + P / T };
    }
    const d = E(
      () => t.series && t.series.length > 0 ? t.series : [{ label: t.title ?? "", value: t.value ?? 0, activeColorOverride: t.activeColorOverride }]
    ), f = E(() => d.value.length), p = E(() => t.thresholds && t.thresholds.length > 0 ? t.thresholds : []), v = E(() => t.thresholdBaseColor ?? "#52c41a"), g = E(() => {
      const S = o.value.w, C = o.value.h;
      return S <= 0 || C <= 0 ? { xCount: 1, yCount: 1, cellW: 0, cellH: 0 } : t.orientation === "horizontal" ? { xCount: f.value, yCount: 1, cellW: (S - Uv * (f.value - 1)) / f.value, cellH: C } : t.orientation === "vertical" ? { xCount: 1, yCount: f.value, cellW: S, cellH: (C - Uv * (f.value - 1)) / f.value } : c(S, C, Uv, f.value);
    });
    At(() => {
      n.value && (r = new ResizeObserver((S) => {
        const C = S[0].contentRect;
        o.value = { w: C.width, h: C.height };
      }), r.observe(n.value));
    }), Vo(() => {
      r?.disconnect();
    });
    const m = le({});
    function x() {
      Yt(() => {
        for (let S = 0; S < d.value.length; S++) {
          const C = m.value[S];
          if (!C)
            continue;
          const P = d.value[S];
          s(
            C,
            P.value,
            t.min,
            t.max,
            t.unit,
            p.value,
            v.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,
            P.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
    ], x, { deep: !0, immediate: !0 }), (S, C) => (ne(), xe("div", {
      ref_key: "containerRef",
      ref: n,
      style: Ht([{ width: "100%", height: "100%", display: "grid", gap: "2px" }, {
        gridTemplateColumns: `repeat(${g.value.xCount}, 1fr)`,
        gridTemplateRows: `repeat(${g.value.yCount}, 1fr)`
      }])
    }, [
      (ne(!0), xe(Je, null, Ut(d.value, (P, $) => (ne(), xe("div", {
        key: `${P.label}-${$}`,
        style: { width: "100%", height: "100%", display: "flex", "flex-direction": "column", overflow: "hidden" }
      }, [
        B("canvas", {
          ref_for: !0,
          ref: (I) => {
            I && (m.value[$] = I);
          },
          style: { flex: "1", width: "100%", height: "0", display: "block", "min-height": "0" }
        }, null, 512),
        f.value > 1 && P.label ? (ne(), xe("div", Sae, oe(P.label), 1)) : nt("", !0)
      ]))), 128))
    ], 4));
  }
}), $ae = { class: "w-full h-full flex flex-col overflow-hidden" }, Pae = {
  key: 0,
  style: { "flex-shrink": "0", padding: "2px 4px", overflow: "auto", "max-height": "140px" }
}, Oae = /* @__PURE__ */ be({
  __name: "HistogramPanel",
  props: {
    seriesValues: {},
    seriesLabels: {},
    bucketSize: {},
    bucketCount: {},
    bucketOffset: {},
    combineSeries: { type: Boolean, default: !1 },
    colorScheme: {},
    colorSingleValue: {},
    colorDistribution: {},
    lineWidth: { default: 1 },
    fillOpacity: { default: 80 },
    tooltipMode: { default: "multi" },
    tooltipSort: { default: "none" },
    unit: { default: "" }
  },
  setup(e) {
    const t = e;
    function n(f, p) {
      const v = f.filter((M) => Number.isFinite(M));
      if (v.length === 0)
        return { bucketStarts: [], counts: [] };
      const g = v.reduce((M, R) => Math.min(M, R), 1 / 0), m = v.reduce((M, R) => Math.max(M, R), -1 / 0), x = m - g || 1, S = p.bucketOffset ?? 0, C = p.bucketCount ?? 30, P = p.bucketSize ?? x / C, $ = Math.floor((g - S) / P) * P + S, I = [], w = [];
      let T = $;
      for (; T <= m; )
        I.push(T), w.push(0), T += P;
      for (const M of v) {
        const R = Math.floor((M - $) / P), N = Math.min(R, w.length - 1);
        N >= 0 && w[N]++;
      }
      return { bucketStarts: I, counts: w };
    }
    const o = E(() => {
      const f = { bucketSize: t.bucketSize, bucketCount: t.bucketCount, bucketOffset: t.bucketOffset };
      if (t.combineSeries || t.seriesValues.length === 0) {
        const { bucketStarts: m, counts: x } = n(t.seriesValues.flat(), f);
        return { bucketStarts: m, countSeries: [x], labels: ["combined"] };
      }
      const { bucketStarts: p } = n(t.seriesValues.flat(), f), v = p.length > 1 ? p[1] - p[0] : void 0, g = t.seriesValues.map((m) => {
        const { counts: x } = n(m, { ...f, bucketSize: v });
        return Array.from({ length: p.length }, (S, C) => x[C] ?? 0);
      });
      return { bucketStarts: p, countSeries: g, labels: t.seriesLabels };
    }), r = E(() => {
      const { countSeries: f, labels: p } = o.value, v = new Mk({ id: "histogram" });
      v.addScale({ scaleKey: "x", time: !1 }), v.addScale({ scaleKey: "y", auto: !0 }), v.addAxis({
        scaleKey: "x",
        side: 2,
        stroke: "#666",
        grid: { show: !1 },
        isTimeAxis: !1
      }), v.addAxis({
        scaleKey: "y",
        side: 3,
        stroke: "#666",
        grid: { show: !0, stroke: "rgba(128,128,128,0.15)", width: 1 },
        size: 50,
        isDarkMode: !0,
        yAxisUnit: t.unit
      });
      const g = HO(
        t.colorScheme,
        f.length,
        t.colorDistribution ?? "sequential",
        t.colorSingleValue
      ), m = {};
      p.forEach((S, C) => {
        m[S] = g[C % g.length];
      });
      const x = Math.round(t.fillOpacity / 100 * 255).toString(16).padStart(2, "0");
      return f.forEach((S, C) => {
        const P = g[C % g.length];
        v.addSeries({
          scaleKey: "y",
          label: p[C] ?? `series-${C + 1}`,
          drawStyle: Xi.Histogram,
          lineColor: P,
          lineWidth: t.lineWidth,
          fillColor: `${P}${x}`,
          fillOpacity: t.fillOpacity,
          fillMode: qc.Solid,
          colorMapping: m,
          isDarkMode: !0
        });
      }), v;
    }), i = E(() => {
      const { bucketStarts: f, countSeries: p } = o.value;
      return [f, ...p];
    }), a = le(), l = le({ width: 0, height: 0 }), s = le(null);
    let u = null;
    At(() => {
      const f = a.value;
      f && (u = new ResizeObserver((p) => {
        const { width: v, height: g } = p[0].contentRect;
        v > 0 && g > 0 && (l.value = { width: Math.floor(v), height: Math.floor(g) });
      }), u.observe(f), requestAnimationFrame(() => {
        const { width: p, height: v } = f.getBoundingClientRect();
        p > 0 && v > 0 && (l.value = { width: Math.floor(p), height: Math.floor(v) });
      }));
    }), qt(() => u?.disconnect());
    const c = E(
      () => !t.combineSeries && o.value.countSeries.length > 1
    ), d = E(() => Math.max(l.value.height, 50));
    return (f, p) => (ne(), xe("div", $ae, [
      B("div", {
        ref_key: "chartAreaRef",
        ref: a,
        class: "flex-1 min-h-0 min-w-0 relative overflow-hidden"
      }, [
        l.value.width > 0 && l.value.height > 0 ? (ne(), dt(OE, {
          key: 0,
          config: r.value,
          data: i.value,
          width: l.value.width,
          height: d.value,
          onPlotReady: p[0] || (p[0] = (v) => s.value = v)
        }, {
          default: he(() => [
            h($E, {
              "u-plot-instance": s.value,
              unit: e.unit,
              "can-pin-tooltip": !0,
              "tooltip-mode": e.tooltipMode,
              "tooltip-sort": e.tooltipSort
            }, null, 8, ["u-plot-instance", "unit", "tooltip-mode", "tooltip-sort"])
          ]),
          _: 1
        }, 8, ["config", "data", "width", "height"])) : nt("", !0)
      ], 512),
      c.value ? (ne(), xe("div", Pae, [
        h(SE, {
          items: r.value.getLegendItems(),
          "u-plot-instance": s.value,
          position: "bottom",
          mode: "list",
          values: [],
          data: i.value,
          unit: e.unit
        }, null, 8, ["items", "u-plot-instance", "data", "unit"])
      ])) : nt("", !0)
    ]));
  }
}), kae = ["width", "height"], Iae = ["d", "fill", "stroke", "opacity", "onMousemove"], Tae = ["x", "y"], _ae = ["onClick"], Mae = { style: { width: "100%", "border-collapse": "collapse" } }, Eae = ["onClick"], Dae = { class: "flex items-center gap-1" }, Aae = {
  class: "overflow-hidden text-ellipsis whitespace-nowrap",
  style: { "max-width": "80px" }
}, Nae = { class: "flex items-center gap-1.5" }, Rae = /* @__PURE__ */ be({
  __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 = ta(), o = le(), r = le({ width: 0, height: 0 });
    let i = null;
    At(() => {
      if (!o.value)
        return;
      i = new ResizeObserver((q) => {
        const { width: U, height: ae } = q[0].contentRect;
        r.value = { width: Math.floor(U), height: Math.floor(ae) };
      }), i.observe(o.value);
      const { width: W, height: K } = o.value.getBoundingClientRect();
      r.value = { width: Math.floor(W), height: Math.floor(K) };
    }), qt(() => {
      i?.disconnect();
    });
    const a = E(() => n.isDark), l = E(() => a.value ? "#d9d9d9" : "#141414"), s = E(() => a.value ? "#8c8c8c" : "#595959"), u = E(() => a.value ? "rgba(255,255,255,0.08)" : "rgba(0,0,0,0.08)"), c = E(() => a.value ? "rgba(0,0,0,0.6)" : "rgba(255,255,255,0.8)"), d = E(() => {
      const W = t.legendValues.length > 0;
      return t.legendMode === "table" ? W ? 120 + t.legendValues.length * 64 : 160 : 140;
    }), f = E(
      () => t.legendPosition === "bottom" ? t.legendMode === "table" ? Math.min(t.slices.length * 24 + 28, 120) : 28 : 0
    ), p = E(() => t.legendPosition === "right" ? d.value : 0), v = E(() => Math.max(r.value.width - p.value, 10)), g = E(() => Math.max(r.value.height - f.value, 10)), m = E(() => v.value / 2), x = E(() => g.value / 2), S = E(() => Math.min(m.value, x.value) * 0.85), C = E(() => t.pieType === "donut" ? S.value * 0.55 : 0), P = le(null), $ = le({ x: 0, y: 0 }), I = le(/* @__PURE__ */ new Set()), w = E(() => t.slices.filter((W) => !I.value.has(W.label))), T = E(() => w.value.reduce((W, K) => W + K.value, 0));
    function M(W, K, q, U) {
      const ae = (U - 90) * Math.PI / 180;
      return { x: W + q * Math.cos(ae), y: K + q * Math.sin(ae) };
    }
    function R(W, K, q, U, ae, se) {
      const ie = Math.min(se - ae, 359.9999), re = ie > 180 ? 1 : 0, te = M(W, K, q, ae), ve = M(W, K, q, ae + ie);
      if (U <= 0)
        return [
          `M ${W} ${K}`,
          `L ${te.x} ${te.y}`,
          `A ${q} ${q} 0 ${re} 1 ${ve.x} ${ve.y}`,
          "Z"
        ].join(" ");
      const ce = M(W, K, U, ae + ie), fe = M(W, K, U, ae);
      return [
        `M ${te.x} ${te.y}`,
        `A ${q} ${q} 0 ${re} 1 ${ve.x} ${ve.y}`,
        `L ${ce.x} ${ce.y}`,
        `A ${U} ${U} 0 ${re} 0 ${fe.x} ${fe.y}`,
        "Z"
      ].join(" ");
    }
    const N = E(() => {
      const W = T.value;
      if (W === 0 || r.value.width === 0)
        return [];
      let K = 0;
      return w.value.map((q) => {
        const U = q.value / W * 360, ae = q.value / W * 100, se = K;
        K += U;
        const ie = K, re = se + U / 2, te = (S.value + C.value) / 2 || S.value * 0.65, ve = M(m.value, x.value, te, re), ce = R(m.value, x.value, S.value, C.value, se, ie);
        return { ...q, angle: U, pct: ae, startAngle: se, endAngle: ie, midAngle: re, labelPos: ve, path: ce };
      });
    });
    function H(W) {
      const K = W.toFixed(t.decimals);
      return t.unit ? `${K} ${t.unit}` : K;
    }
    function L(W, K) {
      return W.rawValues && W.rawValues.length > 0 ? Rc(W.rawValues, K) : W.value;
    }
    function F(W) {
      const K = new Set(I.value);
      if (K.has(W))
        K.delete(W);
      else {
        if (t.slices.filter((U) => !K.has(U.label)).length <= 1)
          return;
        K.add(W);
      }
      I.value = K;
    }
    function A(W, K) {
      P.value = K;
      const q = o.value?.getBoundingClientRect();
      q && ($.value = { x: W.clientX - q.left, y: W.clientY - q.top });
    }
    function G() {
      P.value = null;
    }
    const j = E(() => {
      if (!P.value || t.tooltipMode === "none")
        return [];
      const W = T.value;
      if (t.tooltipMode === "single") {
        const q = w.value.find((U) => U.label === P.value);
        return q ? [{ ...q, percent: W > 0 ? q.value / W * 100 : 0 }] : [];
      }
      let K = w.value.map((q) => ({ ...q, percent: W > 0 ? q.value / W * 100 : 0 }));
      return t.tooltipSort === "desc" && (K = [...K].sort((q, U) => U.value - q.value)), t.tooltipSort === "asc" && (K = [...K].sort((q, U) => q.value - U.value)), K;
    }), Z = E(() => {
      const W = t.tooltipMode === "multi" ? 180 : 140, K = t.tooltipMode === "multi" ? j.value.length * 22 + 32 : 72, q = Math.min($.value.x + 14, r.value.width - W - 4), U = Math.min($.value.y - 8, r.value.height - K - 4);
      return { left: Math.max(4, q), top: Math.max(4, U) };
    });
    return (W, K) => (ne(), xe("div", {
      ref_key: "containerRef",
      ref: o,
      class: "w-full h-full relative overflow-hidden",
      style: Ht({
        display: "flex",
        flexDirection: e.legendPosition === "bottom" ? "column" : "row"
      })
    }, [
      r.value.width > 0 ? (ne(), xe("svg", {
        key: 0,
        width: v.value,
        height: g.value,
        style: { "flex-shrink": "0" }
      }, [
        (ne(!0), xe(Je, null, Ut(N.value, (q) => (ne(), xe("g", {
          key: q.label
        }, [
          q.angle > 0.3 ? (ne(), xe("path", {
            key: 0,
            d: q.path,
            fill: q.color,
            stroke: c.value,
            "stroke-width": "1.5",
            opacity: P.value && P.value !== q.label ? 0.6 : 1,
            style: { cursor: "pointer", transition: "opacity 0.15s" },
            onMousemove: (U) => A(U, q.label),
            onMouseleave: G
          }, null, 40, Iae)) : nt("", !0),
          e.pieLabels.length > 0 && q.angle > 20 ? (ne(), xe("text", {
            key: 1,
            x: q.labelPos.x,
            y: q.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)" }
          }, oe([
            e.pieLabels.includes("name") ? q.label : null,
            e.pieLabels.includes("percent") ? `${q.pct.toFixed(1)}%` : null,
            e.pieLabels.includes("value") ? H(q.value) : null
          ].filter(Boolean).join(" ")), 9, Tae)) : nt("", !0)
        ]))), 128))
      ], 8, kae)) : nt("", !0),
      e.legendPosition !== "hidden" && e.legendMode === "list" ? (ne(), xe("div", {
        key: 1,
        style: Ht({
          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
        })
      }, [
        (ne(!0), xe(Je, null, Ut(e.slices, (q) => (ne(), xe("div", {
          key: q.label,
          class: "flex items-center gap-1 text-xs whitespace-nowrap cursor-pointer select-none",
          style: Ht({
            color: l.value,
            opacity: I.value.has(q.label) ? 0.35 : 1,
            textDecoration: I.value.has(q.label) ? "line-through" : "none"
          }),
          onClick: (U) => F(q.label)
        }, [
          B("span", {
            class: "inline-block w-2 h-2 rounded-sm flex-shrink-0",
            style: Ht({ background: q.color })
          }, null, 4),
          B("span", null, oe(q.label), 1),
          e.legendValues.length > 0 ? (ne(), xe("span", {
            key: 0,
            class: "ml-1",
            style: Ht({ color: s.value })
          }, oe(e.legendValues.map((U) => H(L(q, U))).join(" / ")), 5)) : nt("", !0)
        ], 12, _ae))), 128))
      ], 4)) : nt("", !0),
      e.legendPosition !== "hidden" && e.legendMode === "table" ? (ne(), xe("div", {
        key: 2,
        style: Ht({
          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", Mae, [
          B("thead", null, [
            B("tr", null, [
              B("th", {
                style: Ht({ textAlign: "left", padding: "2px 6px", color: s.value, fontWeight: 500, borderBottom: `1px solid ${u.value}` })
              }, " Name ", 4),
              B("th", {
                style: Ht({ textAlign: "right", padding: "2px 6px", color: s.value, fontWeight: 500, borderBottom: `1px solid ${u.value}` })
              }, " Value ", 4),
              (ne(!0), xe(Je, null, Ut(e.legendValues, (q) => (ne(), xe("th", {
                key: q,
                style: Ht({ textAlign: "right", padding: "2px 6px", color: s.value, fontWeight: 500, borderBottom: `1px solid ${u.value}`, minWidth: "56px" })
              }, oe(q.charAt(0).toUpperCase() + q.slice(1)), 5))), 128))
            ])
          ]),
          B("tbody", null, [
            (ne(!0), xe(Je, null, Ut(e.slices, (q) => (ne(), xe("tr", {
              key: q.label,
              class: "cursor-pointer select-none",
              style: Ht({ opacity: I.value.has(q.label) ? 0.35 : 1 }),
              onClick: (U) => F(q.label)
            }, [
              B("td", {
                style: Ht({ padding: "2px 6px", color: l.value })
              }, [
                B("div", Dae, [
                  B("span", {
                    class: "inline-block w-2 h-2 rounded-sm flex-shrink-0",
                    style: Ht({ background: q.color })
                  }, null, 4),
                  B("span", Aae, oe(q.label), 1)
                ])
              ], 4),
              B("td", {
                style: Ht({ textAlign: "right", padding: "2px 6px", color: l.value, fontVariantNumeric: "tabular-nums" })
              }, oe(H(q.value)), 5),
              (ne(!0), xe(Je, null, Ut(e.legendValues, (U) => (ne(), xe("td", {
                key: U,
                style: Ht({ textAlign: "right", padding: "2px 6px", color: s.value, fontVariantNumeric: "tabular-nums" })
              }, oe(H(L(q, U))), 5))), 128))
            ], 12, Eae))), 128))
          ])
        ])
      ], 4)) : nt("", !0),
      P.value && e.tooltipMode !== "none" && j.value.length > 0 ? (ne(), xe("div", {
        key: 3,
        class: "absolute z-50 pointer-events-none rounded shadow-lg text-xs",
        style: Ht({
          left: `${Z.value.left}px`,
          top: `${Z.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: Ht({ color: a.value ? "#d9d9d9" : "#141414" })
        }, oe(e.tooltipMode === "multi" ? `${H(T.value)} total` : j.value[0]?.label), 5),
        B("div", {
          class: "border-t my-1",
          style: Ht({ borderColor: a.value ? "#333" : "#e8e8e8" })
        }, null, 4),
        (ne(!0), xe(Je, null, Ut(j.value, (q) => (ne(), xe("div", {
          key: q.label,
          class: "px-2 py-0.5 flex items-center justify-between gap-2"
        }, [
          B("div", Nae, [
            B("span", {
              class: "inline-block w-2 h-2 rounded-sm",
              style: Ht({ background: q.color })
            }, null, 4),
            B("span", {
              style: Ht({ color: a.value ? "#d9d9d9" : "#141414" })
            }, oe(e.tooltipMode === "multi" ? q.label : `${q.percent.toFixed(1)}%`), 5)
          ]),
          B("span", {
            class: "font-mono",
            style: Ht({ color: q.color })
          }, oe(H(q.value)), 5)
        ]))), 128))
      ], 4)) : nt("", !0)
    ], 4));
  }
}), Wf = 36, os = 1.2, kP = 1, zae = /* @__PURE__ */ be({
  __name: "StatPanel",
  props: {
    title: {},
    unit: {},
    series: {},
    trend: {},
    thresholds: {},
    thresholdBaseColor: {},
    orientation: {},
    textMode: {},
    colorMode: {}
  },
  setup(e) {
    const t = e, n = ta(), o = le(), r = le({ w: 0, h: 0 });
    let i = null;
    const a = ["#1677ff", "#52c41a", "#fa8c16", "#f5222d", "#722ed1", "#13c2c2", "#eb2f96", "#faad14"];
    function l(P) {
      return P >= 1e6 ? `${(P / 1e6).toFixed(1)}M` : P >= 1e3 ? `${(P / 1e3).toFixed(1)}K` : P % 1 === 0 ? String(P) : P.toFixed(1);
    }
    function s(P, $, I, w) {
      const T = I ?? w ?? a[0];
      if ($ && $.length > 0) {
        let M = T;
        for (const R of $)
          P >= R.value && (M = R.color);
        return M;
      }
      return T;
    }
    function u(P, $) {
      if (P.startsWith("rgb("))
        return P.replace("rgb(", "rgba(").replace(")", `, ${$})`);
      if (P.startsWith("rgba("))
        return P.replace(/,\s*[\d.]+\)$/, `, ${$})`);
      const I = P.replace("#", ""), w = I.length === 3 ? I.split("").map((N) => N + N).join("") : I.slice(0, 6), T = Number.parseInt(w.slice(0, 2), 16), M = Number.parseInt(w.slice(2, 4), 16), R = Number.parseInt(w.slice(4, 6), 16);
      return `rgba(${T}, ${M}, ${R}, ${$})`;
    }
    function c(P, $, I) {
      switch ($) {
        case "background_solid":
          return Dt(P).toString();
        case "background": {
          const w = I ? 1 : -0.7, T = Dt(P).darken(15 * w).spin(8).toRgbString(), M = Dt(P).darken(5 * w).spin(-8).toRgbString();
          return `linear-gradient(120deg, ${T}, ${M})`;
        }
        default:
          return "transparent";
      }
    }
    function d(P) {
      return Dt(P).isLight() ? "#1a1a1a" : "#ffffff";
    }
    function f(P, $, I) {
      if (P === 0 || $ === 0)
        return { isWide: !1, showSparkline: !1, valueFontSize: 24, titleFontSize: 12, chartHeight: 0, padding: 8 };
      const w = $ > 100 ? 12 : 8, T = P - w * 2, M = $ - w * 2, R = P / $ > 2.5, N = I && (R ? $ > 50 : $ > 100), H = Math.max(10, Math.min(13, M * (R ? 0.22 : 0.18)));
      let L, F = 0;
      if (R)
        L = N ? Math.min(M * 0.62, T * 0.42, Wf) : Math.min(M * 0.7, T * 0.38, Wf), N && (F = $ * 0.5);
      else {
        const A = H * os;
        L = Math.min(N ? (M - A) * 0.65 : (M - A) * 0.85, T * 0.9, Wf), N && (F = Math.max(0, Math.min($ - H * os - L * os - w, $ * 0.5)));
      }
      return {
        isWide: R,
        showSparkline: N,
        valueFontSize: Math.max(11, L),
        titleFontSize: H,
        chartHeight: F,
        padding: w
      };
    }
    function p(P, $, I) {
      const w = Math.ceil(Math.sqrt(I * P / $));
      return Math.floor(w * $ / P) * w < I ? $ / Math.ceil(w * $ / P) : P / w;
    }
    function v(P, $, I, w) {
      const T = Math.max(p(P, $, w), p($, P, w));
      let M = Math.max(1, Math.floor(P / T));
      const R = Math.ceil(w / M);
      return M = Math.ceil(w / R), {
        xCount: M,
        yCount: R,
        cellW: P / M - I + I / M,
        cellH: $ / R - I + I / R
      };
    }
    function g(P, $, I) {
      const w = P.getContext("2d");
      if (!w)
        return;
      const T = window.devicePixelRatio || 1, M = P.getBoundingClientRect();
      if (M.width === 0 || M.height === 0)
        return;
      P.width = M.width * T, P.height = M.height * T, w.scale(T, T);
      const R = M.width, N = M.height, H = $.reduce((j, Z) => Math.min(j, Z), 1 / 0), F = $.reduce((j, Z) => Math.max(j, Z), -1 / 0) - H || 1;
      w.clearRect(0, 0, R, N);
      const A = w.createLinearGradient(0, 0, 0, N);
      A.addColorStop(0, u(I, 0.25)), A.addColorStop(1, u(I, 0));
      const G = $.map((j, Z) => ({
        x: Z / ($.length - 1) * R,
        y: N - 2 - (j - H) / F * (N - 4)
      }));
      w.beginPath(), G.forEach(({ x: j, y: Z }, W) => W === 0 ? w.moveTo(j, Z) : w.lineTo(j, Z)), w.lineTo(R, N), w.lineTo(0, N), w.fillStyle = A, w.fill(), w.beginPath(), G.forEach(({ x: j, y: Z }, W) => W === 0 ? w.moveTo(j, Z) : w.lineTo(j, Z)), w.strokeStyle = I, w.lineWidth = 1.5, w.stroke();
    }
    const m = E(() => Math.max(t.series.length, 1)), x = E(() => {
      const P = r.value.w, $ = r.value.h;
      return P <= 0 || $ <= 0 ? { xCount: 1, yCount: 1, cellW: 0, cellH: 0 } : t.orientation === "horizontal" ? { xCount: 1, yCount: m.value, cellW: P, cellH: ($ - kP * (m.value - 1)) / m.value } : v(P, $, kP, m.value);
    }), S = E(() => n.isDark ? "#303030" : "#fff");
    At(() => {
      o.value && (i = new ResizeObserver((P) => {
        const $ = P[0].contentRect;
        (r.value.w !== $.width || r.value.h !== $.height) && (r.value = { w: $.width, h: $.height });
      }), i.observe(o.value));
    }), Vo(() => {
      i?.disconnect();
    });
    const C = be({
      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(P) {
        const $ = le(), I = ta();
        function w() {
          Yt(() => {
            $.value && P.sparkline && P.sparkline.length > 1 && g($.value, P.sparkline, P.color ?? "#1677ff");
          });
        }
        return Ie(() => [P.sparkline, P.color, P.width, P.height], w, { immediate: !0 }), () => {
          const T = P, M = I.isDark, R = T.sparkline != null && T.sparkline.length > 1, N = f(T.width ?? 0, T.height ?? 0, R), H = T.textMode === "value_and_name" || T.textMode === "name", L = T.textMode === "value_and_name" || T.textMode === "value", F = Math.max(10, N.valueFontSize * 0.44), A = T.colorMode === "background_solid" || T.colorMode === "background", G = A ? c(T.color ?? "#1677ff", T.colorMode ?? "value", M) : "transparent", j = A ? d(T.color ?? "#1677ff") : T.color ?? "#d9d9d9", Z = A ? j : "#888", W = A ? j : "#666", K = T.percentChange != null ? (T.percentChange > 0 ? "+" : "") + T.percentChange.toLocaleString(void 0, { style: "percent", minimumFractionDigits: 1, maximumFractionDigits: 2 }) : null, q = T.percentChange != null ? T.percentChange > 0 ? "#52c41a" : T.percentChange < 0 ? "#ff4d4f" : "#888" : "", U = T.percentChange != null ? T.percentChange > 0 ? "↑" : T.percentChange < 0 ? "↓" : "" : "", ae = T.mappedLabel ?? l(T.value ?? 0), se = [
            ko("span", {
              style: {
                color: j,
                fontSize: `${N.valueFontSize}px`,
                fontWeight: 500,
                fontFamily: "monospace",
                lineHeight: os
              }
            }, ae)
          ];
          T.mappedLabel || se.push(ko("span", {
            style: { color: W, fontSize: `${F}px`, lineHeight: os }
          }, T.unit)), K && se.push(ko("span", {
            style: { color: q, fontSize: `${F}px`, marginLeft: "2px", lineHeight: os }
          }, `${U}${K}`));
          const ie = H ? ko("div", {
            style: {
              color: Z,
              fontSize: `${N.titleFontSize}px`,
              lineHeight: os,
              ...N.isWide ? { whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" } : { marginBottom: "2px" }
            }
          }, T.label) : null, re = L ? ko("div", {
            style: {
              display: "flex",
              alignItems: "baseline",
              gap: N.isWide ? "3px" : "4px",
              flexWrap: "wrap"
            }
          }, se) : null, te = ko("div", {
            style: N.isWide ? { flex: 1, minWidth: 0, position: "relative", zIndex: 1 } : { position: "relative", zIndex: 1 }
          }, [ie, re]), ve = N.showSparkline ? ko("canvas", {
            ref: (fe) => {
              $.value = fe;
            },
            style: N.isWide ? { position: "absolute", right: 0, bottom: 0, left: 0, width: "100%", height: `${N.chartHeight}px`, opacity: 0.7 } : { position: "absolute", bottom: 0, left: 0, right: 0, width: "100%", height: `${N.chartHeight}px`, opacity: 0.6 }
          }) : null, ce = N.isWide ? {
            width: "100%",
            height: "100%",
            display: "flex",
            alignItems: "center",
            padding: `0 ${N.padding}px`,
            gap: "8px",
            overflow: "hidden",
            position: "relative",
            background: G
          } : {
            width: "100%",
            height: "100%",
            display: "flex",
            flexDirection: "column",
            justifyContent: "center",
            padding: `${N.padding}px`,
            overflow: "hidden",
            position: "relative",
            background: G
          };
          return ko("div", { style: ce }, N.isWide ? [ve, te] : [ve, te]);
        };
      }
    });
    return (P, $) => (ne(), xe("div", {
      ref_key: "containerRef",
      ref: o,
      style: Ht([{ width: "100%", height: "100%", display: "grid", gap: "1px" }, {
        gridTemplateColumns: e.orientation === "horizontal" ? "1fr" : `repeat(${x.value.xCount}, 1fr)`,
        gridTemplateRows: e.orientation === "horizontal" ? `repeat(${m.value}, 1fr)` : `repeat(${x.value.yCount}, 1fr)`,
        background: S.value
      }])
    }, [
      (ne(!0), xe(Je, null, Ut(e.series, (I, w) => (ne(), dt(_(C), {
        key: `${I.label}-${w}`,
        label: m.value === 1 ? e.title : I.label,
        value: I.displayValue ?? (I.values.length > 0 ? I.values[I.values.length - 1] ?? 0 : 0),
        unit: I.units ?? e.unit,
        "mapped-label": I.valueMap !== void 0 ? I.valueMap[String(I.displayValue ?? (I.values.length > 0 ? I.values[I.values.length - 1] ?? 0 : 0))] : void 0,
        sparkline: I.values.length > 1 ? I.values : void 0,
        "percent-change": I.percentChange,
        "text-mode": e.textMode,
        "color-mode": e.colorMode,
        color: s(
          I.displayValue ?? I.values[I.values.length - 1] ?? 0,
          e.thresholds,
          e.thresholdBaseColor,
          a[w % a.length]
        ),
        width: x.value.cellW,
        height: x.value.cellH
      }, null, 8, ["label", "value", "unit", "mapped-label", "sparkline", "percent-change", "text-mode", "color-mode", "color", "width", "height"]))), 128))
    ], 4));
  }
}), Fae = {
  key: 0,
  class: "flex-center h-full text-secondary"
}, Bae = {
  key: 1,
  class: "flex-center h-full"
}, Lae = {
  key: 2,
  class: "flex-center h-full text-red-500 text-xs"
}, Hae = {
  key: 3,
  class: "w-full h-full relative"
}, Vae = {
  key: 0,
  class: "absolute inset-0 z-10 flex items-center justify-center",
  style: { "backdrop-filter": "blur(1px)", "border-radius": "4px" }
}, jae = {
  key: 0,
  class: "w-full h-full"
}, Wae = {
  key: 0,
  class: "w-full h-full overflow-auto"
}, Qb = /* @__PURE__ */ be({
  __name: "PanelRenderer",
  props: {
    panelId: {},
    panelConfig: { default: void 0 }
  },
  setup(e) {
    const t = e, n = aa(), { t: o } = sn(), r = E(() => t.panelConfig ?? n.panels[t.panelId]);
    let i = null;
    const a = le(null), l = ["#1677ff", "#52c41a", "#fa8c16", "#f5222d", "#722ed1", "#13c2c2", "#eb2f96", "#faad14"];
    function s($, I) {
      u();
      const w = $.seriesCount ?? 1, T = LO(
        { from: I.from / 1e3, to: I.to / 1e3 },
        15,
        w,
        $.pattern,
        $.labels
      ), M = Array.from({ length: w }, (N, H) => 20 + (H * 37 + 13) % 60), R = Array.from({ length: w }, (N, H) => 10 + (H * 53 + 7) % 40);
      a.value = {
        timestamps: [...T.timestamps],
        seriesValues: T.series.map((N) => [...N.values])
      }, i = setInterval(() => {
        const N = a.value;
        if (!N)
          return;
        const H = Math.floor(Date.now() / 1e3), L = [...N.timestamps.slice(1), H], F = N.seriesValues.map((A, G) => {
          const j = A[A.length - 1], Z = qz(j, M[G], R[G] * 0.1, R[G] + M[G] * 1.8);
          return [...A.slice(1), Z];
        });
        a.value = { timestamps: L, seriesValues: F };
      }, 1e3);
    }
    function u() {
      i && (clearInterval(i), i = null), a.value = null;
    }
    Vo(u);
    const c = E(() => {
      const $ = r.value;
      return $ ? $.queries.some((I) => I.enabled !== !1 && I.dataSource?.type === "mock" && I.dataSource?.pattern === "live") : !1;
    });
    Ie([r, () => n.timeRange], () => {
      const $ = r.value;
      if (!$ || !c.value) {
        u();
        return;
      }
      const I = $.queries.find((w) => w.enabled !== !1 && w.dataSource?.type === "mock" && w.dataSource?.pattern === "live");
      I && s(I.dataSource, n.timeRange);
    }, { immediate: !0, deep: !0 });
    const d = E(() => {
      const $ = r.value;
      return $ ? $.queries.filter((I) => I.enabled !== !1 && !(I.dataSource?.type === "mock" && I.dataSource?.pattern === "live")) : [];
    }), { response: f, loading: p, error: v } = fE(
      () => d.value,
      () => n.timeRange,
      1e3,
      () => n.panelRefreshKeys[t.panelId]
    );
    function g($) {
      return typeof $?.toArray == "function" ? $.toArray() : Array.isArray($) ? $ : [];
    }
    function m($, I) {
      if (!$ || $.data.length === 0)
        return null;
      if (I.type === "timeseries" || I.type === "bar") {
        const w = g($.data[0].fields[0]?.values), T = $.data.flatMap(
          (M) => M.fields.filter((R) => R.type === "number").map((R) => ({
            label: R.config?.displayNameFromDS ?? R.name,
            values: g(R.values)
          }))
        );
        return { timestamps: w.map((M) => M / 1e3), series: T };
      }
      if (I.type === "histogram") {
        const w = $.data.flatMap(
          (M) => M.fields.filter((R) => R.type === "number").map((R) => g(R.values))
        ), T = $.data.flatMap(
          (M) => M.fields.filter((R) => R.type === "number").map((R) => R.config?.displayNameFromDS ?? R.name)
        );
        return { seriesValues: w, seriesLabels: T };
      }
      if (I.type === "stat" || I.type === "gauge") {
        const w = $.data.flatMap(
          (T) => T.fields.filter((M) => M.type === "number").map((M) => {
            const R = g(M.values);
            return {
              label: M.config?.displayNameFromDS ?? M.name,
              values: R,
              displayValue: Rc(R, I.statReducer ?? "lastNotNull"),
              percentChange: I.showPercentChange ? uf(R) : void 0
            };
          })
        );
        return {
          series: w,
          value: w[0]?.values[w[0].values.length - 1] ?? 0,
          values: w.map((T) => T.values[T.values.length - 1] ?? 0),
          unit: I.unit ?? I.statUnit ?? "",
          trend: I.statTrend ?? "flat",
          percentChange: I.showPercentChange ? uf(w[0]?.values ?? []) : void 0
        };
      }
      if (I.type === "pie")
        return $.data.flatMap(
          (w, T) => w.fields.filter((M) => M.type === "number").map((M, R) => ({
            label: M.config?.displayNameFromDS ?? M.name,
            value: Rc(g(M.values), I.statReducer ?? "lastNotNull"),
            color: l[(T + R) % l.length],
            rawValues: g(M.values)
          }))
        );
      if (I.type === "table") {
        const w = $.data[0], T = w.fields.map((N) => ({
          key: N.name,
          title: N.config?.displayNameFromDS ?? N.name,
          dataIndex: N.name
        })), M = g(w.fields[0]?.values).length, R = Array.from({ length: M }, (N, H) => {
          const L = { key: H };
          return w.fields.forEach((F) => {
            const A = g(F.values)[H];
            L[F.name] = F.type === "time" ? new Date(A).toLocaleString() : A;
          }), L;
        });
        return { columns: T, dataSource: R };
      }
      return null;
    }
    const x = E(() => {
      const $ = r.value;
      return $ ? m(f.value, $) : null;
    }), S = E(() => {
      const $ = a.value, I = r.value;
      return !$ || !I ? null : I.type === "timeseries" ? {
        timestamps: $.timestamps,
        series: $.seriesValues.map((w, T) => ({ label: `series-${T + 1}`, values: w }))
      } : I.type === "stat" || I.type === "gauge" ? {
        series: $.seriesValues.map((T, M) => ({
          label: `series-${M + 1}`,
          values: T,
          displayValue: Rc(T, I.statReducer ?? "lastNotNull"),
          percentChange: I.showPercentChange ? uf(T) : void 0
        })),
        value: $.seriesValues[0]?.[$.seriesValues[0].length - 1] ?? 0,
        values: $.seriesValues.map((T) => T[T.length - 1] ?? 0),
        unit: I.statUnit ?? "",
        trend: I.statTrend ?? "flat",
        percentChange: I.showPercentChange ? uf($.seriesValues[0] ?? []) : void 0
      } : I.type === "pie" ? $.seriesValues.map((w, T) => ({
        label: `series-${T + 1}`,
        value: Rc(w, I.statReducer ?? "lastNotNull"),
        color: l[T % l.length],
        rawValues: w
      })) : I.type === "histogram" ? {
        seriesValues: $.seriesValues,
        seriesLabels: $.seriesValues.map((w, T) => `series-${T + 1}`)
      } : null;
    }), C = E(() => S.value ?? x.value), P = be({
      name: "NoDataPlaceholder",
      setup() {
        const { t: $ } = sn();
        return () => ko("div", { class: "flex flex-col items-center justify-center h-full gap-1.5 text-gray-400 select-none" }, [
          ko("span", { class: [bt.databaseOff, "text-7", "opacity-50"] }),
          ko("span", { class: "text-xs" }, $("panel.noData"))
        ]);
      }
    });
    return ($, I) => r.value ? _(p) && !a.value ? (ne(), xe("div", Bae, [
      h(_(Xo))
    ])) : _(v) ? (ne(), xe("div", Lae, oe(_(v)), 1)) : (ne(), xe("div", Hae, [
      _(p) && a.value ? (ne(), xe("div", Vae, [
        h(_(Xo))
      ])) : nt("", !0),
      r.value.type === "timeseries" ? (ne(), xe(Je, { key: 1 }, [
        C.value && C.value.series?.length > 0 ? (ne(), xe("div", jae, [
          h(kE, {
            data: C.value,
            unit: r.value.unit,
            decimals: r.value.decimals,
            "color-scheme": r.value.colorScheme,
            "color-single-value": r.value.colorSingleValue,
            "color-distribution": r.value.colorDistribution,
            thresholds: r.value.thresholds,
            "threshold-base-color": r.value.thresholdBaseColor,
            "fill-opacity": r.value.fillOpacity,
            "line-width": r.value.lineWidth,
            "line-interpolation": r.value.lineInterpolation,
            "line-style": r.value.lineStyle,
            "draw-style": r.value.drawStyle,
            "gradient-mode": r.value.gradientMode,
            "span-nulls": r.value.spanNulls,
            "show-points": r.value.showPoints,
            "show-points-mode": r.value.showPointsMode,
            "stacking-mode": r.value.stackingMode,
            "legend-position": r.value.legendPosition,
            "legend-mode": r.value.legendMode,
            "legend-values": r.value.legendValues,
            "panel-id": r.value.id,
            "tooltip-mode": r.value.tooltipMode,
            "tooltip-sort": r.value.tooltipSort,
            "tooltip-max-height": r.value.tooltipMaxHeight,
            "show-axis-pointer": r.value.showAxisPointer,
            "soft-min": r.value.softMin,
            "soft-max": r.value.softMax,
            "axis-placement": r.value.axisPlacement,
            "axis-name": r.value.axisName,
            "axis-width": r.value.axisWidth,
            "show-grid-lines": r.value.showGridLines,
            "grid-color": r.value.gridColor,
            "axis-label": r.value.axisLabel,
            "axis-label-color": r.value.axisLabelColor,
            "axis-tick": r.value.axisTick,
            "axis-tick-color": r.value.axisTickColor,
            "axis-border": r.value.axisBorder,
            "axis-border-color": r.value.axisBorderColor,
            "scale-distribution": r.value.scaleDistribution,
            "centered-zero": r.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"])
        ])) : (ne(), dt(_(P), { key: 1 }))
      ], 64)) : r.value.type === "bar" ? (ne(), xe(Je, { key: 2 }, [
        C.value && C.value.series?.length > 0 ? (ne(), dt(wae, {
          key: 0,
          data: C.value,
          stacked: r.value.stacked,
          "bar-width": r.value.barWidth,
          "bar-group-width": r.value.barGroupWidth,
          "show-values": r.value.barShowValues,
          unit: r.value.unit,
          decimals: r.value.decimals,
          "color-scheme": r.value.colorScheme,
          "color-single-value": r.value.colorSingleValue,
          "color-distribution": r.value.colorDistribution,
          "legend-position": r.value.legendPosition,
          "legend-mode": r.value.legendMode,
          "legend-values": r.value.legendValues,
          "tooltip-mode": r.value.tooltipMode,
          "tooltip-sort": r.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"])) : (ne(), dt(_(P), { key: 1 }))
      ], 64)) : r.value.type === "stat" ? (ne(), xe(Je, { key: 3 }, [
        C.value ? (ne(), dt(zae, {
          key: 0,
          title: r.value.title,
          unit: C.value.unit,
          series: C.value.series,
          trend: C.value.trend,
          thresholds: r.value.thresholds,
          "threshold-base-color": r.value.thresholdBaseColor,
          orientation: r.value.statOrientation,
          "text-mode": r.value.statTextMode,
          "color-mode": r.value.statColorMode
        }, null, 8, ["title", "unit", "series", "trend", "thresholds", "threshold-base-color", "orientation", "text-mode", "color-mode"])) : (ne(), dt(_(P), { key: 1 }))
      ], 64)) : r.value.type === "gauge" ? (ne(), xe(Je, { key: 4 }, [
        C.value ? (ne(), dt(Cae, {
          key: 0,
          series: C.value.series?.map((w, T) => ({
            label: w.label,
            value: w.displayValue ?? w.values[w.values.length - 1] ?? 0,
            activeColorOverride: l[T % l.length]
          })),
          title: r.value.title,
          min: r.value.min ?? 0,
          max: r.value.max ?? 100,
          unit: r.value.unit,
          thresholds: r.value.thresholds,
          "threshold-base-color": r.value.thresholdBaseColor,
          "cap-round": r.value.gaugeCapRound,
          "track-width": r.value.gaugeTrackWidth,
          "fill-width": r.value.gaugeFillWidth,
          "track-color": r.value.gaugeTrackColor,
          "sweep-angle": r.value.sweepAngle,
          "value-color": r.value.gaugeValueColor,
          "value-size": r.value.gaugeValueSize,
          "value-visible": r.value.gaugeValueVisible,
          "padding-x": r.value.gaugePaddingX,
          "padding-y": r.value.gaugePaddingY,
          "threshold-display": r.value.gaugeThresholdDisplay,
          "threshold-label-display": r.value.gaugeThresholdLabelDisplay,
          "value-offset-y": r.value.gaugeValueOffsetY,
          orientation: r.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"])) : (ne(), dt(_(P), { key: 1 }))
      ], 64)) : r.value.type === "table" ? (ne(), xe(Je, { key: 5 }, [
        C.value ? (ne(), xe("div", Wae, [
          h(_(GJ), {
            columns: C.value.columns,
            "data-source": C.value.dataSource,
            pagination: { pageSize: r.value.tablePageSize ?? 20 },
            size: "small",
            scroll: { y: "100%" },
            "show-header": r.value.tableShowHeader !== !1
          }, null, 8, ["columns", "data-source", "pagination", "show-header"])
        ])) : (ne(), dt(_(P), { key: 1 }))
      ], 64)) : r.value.type === "pie" ? (ne(), xe(Je, { key: 6 }, [
        C.value && C.value.length > 0 ? (ne(), dt(Rae, {
          key: 0,
          slices: C.value,
          "pie-type": r.value.pieType,
          "pie-labels": r.value.pieLabels,
          unit: r.value.unit,
          decimals: r.value.decimals,
          "legend-position": r.value.legendPosition,
          "legend-mode": r.value.legendMode,
          "legend-values": r.value.legendValues,
          "tooltip-mode": r.value.tooltipMode,
          "tooltip-sort": r.value.tooltipSort
        }, null, 8, ["slices", "pie-type", "pie-labels", "unit", "decimals", "legend-position", "legend-mode", "legend-values", "tooltip-mode", "tooltip-sort"])) : (ne(), dt(_(P), { key: 1 }))
      ], 64)) : r.value.type === "histogram" ? (ne(), xe(Je, { key: 7 }, [
        C.value && C.value.seriesValues?.length > 0 ? (ne(), dt(Oae, {
          key: 0,
          "series-values": C.value.seriesValues,
          "series-labels": C.value.seriesLabels,
          "bucket-size": r.value.histBucketSize,
          "bucket-count": r.value.histBucketCount,
          "bucket-offset": r.value.histBucketOffset,
          "combine-series": r.value.histCombineSeries,
          "line-width": r.value.lineWidth,
          "fill-opacity": r.value.fillOpacity,
          unit: r.value.unit
        }, null, 8, ["series-values", "series-labels", "bucket-size", "bucket-count", "bucket-offset", "combine-series", "line-width", "fill-opacity", "unit"])) : (ne(), dt(_(P), { key: 1 }))
      ], 64)) : nt("", !0)
    ])) : (ne(), xe("div", Fae, oe(_(o)("panel.noData")), 1));
  }
}), Kae = { class: "w-full h-full flex flex-col" }, qae = { class: "flex-1 min-h-0" }, Yae = {
  key: 1,
  class: "flex-center h-full text-secondary text-sm"
}, Gae = /* @__PURE__ */ be({
  __name: "ChartPreview",
  setup(e) {
    const { panel: t } = gc(), n = E(() => {
      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, r) => (ne(), xe("div", Kae, [
      B("div", qae, [
        _(t).id ? (ne(), dt(Qb, {
          key: n.value,
          "panel-id": _(t).id,
          "panel-config": _(t)
        }, null, 8, ["panel-id", "panel-config"])) : (ne(), xe("div", Yae, " No preview available "))
      ])
    ]));
  }
}), Uae = { class: "w-full h-full flex flex-col" }, Xae = { class: "flex-1 min-h-0" }, Qae = /* @__PURE__ */ be({
  __name: "PanelChrome",
  setup(e) {
    const t = ta(), { panel: n } = gc(), o = E(() => t.isDark), r = E(() => o.value ? "#303030" : "#e8e8e8"), i = E(() => o.value ? "#d9d9d9" : "#141414"), a = E(() => o.value ? "#666" : "#bbb");
    return (l, s) => (ne(), xe("div", Uae, [
      B("div", {
        class: "flex items-center px-2.5 py-1.5 flex-shrink-0 gap-1.5 h-32px",
        style: Ht({ borderBottom: `1px solid ${r.value}` })
      }, [
        B("span", {
          class: "text-xs font-medium truncate",
          style: Ht({ color: i.value })
        }, oe(_(n).title || "—"), 5),
        _(n).description ? (ne(), dt(_(Lo), {
          key: 0,
          title: _(n).description,
          placement: "bottom"
        }, {
          default: he(() => [
            B("span", {
              class: Pt([_(bt).info, "text-xs"]),
              style: Ht({ color: a.value })
            }, null, 6)
          ]),
          _: 1
        }, 8, ["title"])) : nt("", !0),
        h(wE, {
          links: _(n).links ?? [],
          "icon-color": a.value
        }, null, 8, ["links", "icon-color"])
      ], 4),
      B("div", Xae, [
        h(Gae)
      ])
    ]));
  }
}), IE = /* @__PURE__ */ be({
  __name: "TimeRangePicker",
  setup(e) {
    const { RangePicker: t } = UG, n = aa(), 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 }
    ], r = [
      { label: "关闭", value: 0 },
      { label: "5 秒", value: 5 },
      { label: "10 秒", value: 10 },
      { label: "30 秒", value: 30 },
      { label: "1 分钟", value: 60 },
      { label: "5 分钟", value: 300 }
    ], i = 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 }), i.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) => (ne(), dt(_(Ji), null, {
      default: he(() => [
        h(_(Ji).Compact, null, {
          default: he(() => [
            i.value ? (ne(), dt(_(t), {
              key: 1,
              "show-time": "",
              "allow-clear": !1,
              style: { width: "320px" },
              value: [_(yo)(_(n).timeRange.from), _(yo)(_(n).timeRange.to)],
              onChange: d[1] || (d[1] = (f) => {
                f?.[0] && f?.[1] && _(n).setTimeRange({ from: f[0].valueOf(), to: f[1].valueOf() });
              })
            }, null, 8, ["value"])) : (ne(), dt(_(Et), {
              key: 0,
              value: _(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"])),
            h(_(Ft), {
              onClick: d[2] || (d[2] = (f) => i.value = !i.value)
            }, {
              default: he(() => [
                Le(oe(i.value ? "收起" : "自定义"), 1)
              ]),
              _: 1
            })
          ]),
          _: 1
        }),
        h(_(Ji).Compact, null, {
          default: he(() => [
            h(_(Ft), { onClick: u }, {
              default: he(() => [
                B("span", {
                  class: Pt([_(bt).refresh, "mr-1"])
                }, null, 2),
                d[4] || (d[4] = Le(" 刷新 ", -1))
              ]),
              _: 1
            }),
            h(_(Et), {
              value: _(n).autoRefresh,
              options: r,
              "popup-match-select-width": "false",
              onChange: d[3] || (d[3] = (f) => _(n).setAutoRefresh(f))
            }, null, 8, ["value"])
          ]),
          _: 1
        })
      ]),
      _: 1
    }));
  }
}), Zae = { class: "font-semibold mb-3" }, Jae = /* @__PURE__ */ be({
  __name: "ConstantOptionsSection",
  props: {
    config: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, { t: r } = sn(), i = E(() => n.config.constantValueType ?? "string"), a = E(() => !n.config.constantValue || i.value === "number" && Number.isNaN(Number(n.config.constantValue)) ? "error" : ""), l = E(() => n.config.constantValue ? i.value === "number" && Number.isNaN(Number(n.config.constantValue)) ? r("variable.constant.value.notNumber") : "" : r("variable.constant.value.required"));
    return (s, u) => {
      const c = yn("a-form-item");
      return ne(), xe("div", null, [
        B("div", Zae, oe(_(r)("variable.constant.title")), 1),
        h(c, {
          label: _(r)("variable.constant.valueType")
        }, {
          default: he(() => [
            h(_(M_), {
              value: i.value,
              onChange: u[0] || (u[0] = (d) => o("change", { constantValueType: d.target.value }))
            }, {
              default: he(() => [
                h(_(To), { value: "string" }, {
                  default: he(() => [
                    Le(oe(_(r)("variable.constant.valueType.string")), 1)
                  ]),
                  _: 1
                }),
                h(_(To), { value: "number" }, {
                  default: he(() => [
                    Le(oe(_(r)("variable.constant.valueType.number")), 1)
                  ]),
                  _: 1
                })
              ]),
              _: 1
            }, 8, ["value"])
          ]),
          _: 1
        }, 8, ["label"]),
        h(c, {
          label: _(r)("variable.constant.value"),
          required: "",
          "validate-status": a.value,
          help: l.value
        }, {
          default: he(() => [
            h(_(kt), {
              value: e.config.constantValue ?? "",
              placeholder: i.value === "number" ? "42" : _(r)("variable.constant.value"),
              onChange: u[1] || (u[1] = (d) => o("change", { constantValue: d.target.value }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label", "validate-status", "help"]),
        h(_(Eo), {
          checked: e.config.hideFromVariableList ?? !1,
          onChange: u[2] || (u[2] = (d) => o("change", { hideFromVariableList: d.target.checked }))
        }, {
          default: he(() => [
            Le(oe(_(r)("variable.constant.hideFromList")), 1)
          ]),
          _: 1
        }, 8, ["checked"])
      ]);
    };
  }
}), ele = { class: "font-semibold mb-3" }, tle = {
  class: "grid mb-1",
  style: { "grid-template-columns": "1fr 1fr 32px", gap: "4px 8px" }
}, nle = { class: "text-xs text-secondary" }, ole = { class: "text-xs text-secondary" }, rle = { class: "mt-3" }, ile = { class: "mt-1" }, ale = { class: "mt-1" }, lle = { class: "mt-1" }, sle = /* @__PURE__ */ be({
  __name: "CustomOptionsSection",
  props: {
    config: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, { t: r } = sn();
    function i(a, l, s) {
      const u = (n.config.customOptions ?? []).map(
        (c, d) => d === a ? { ...c, [l]: s } : c
      );
      o("change", { customOptions: u });
    }
    return (a, l) => {
      const s = yn("a-form-item");
      return ne(), xe("div", null, [
        B("div", ele, oe(_(r)("variable.custom.title")), 1),
        B("div", tle, [
          B("div", nle, oe(_(r)("variable.custom.col.text")), 1),
          B("div", ole, oe(_(r)("variable.custom.col.value")), 1),
          l[6] || (l[6] = B("div", null, null, -1)),
          (ne(!0), xe(Je, null, Ut(e.config.customOptions ?? [], (u, c) => (ne(), xe(Je, { key: c }, [
            h(_(kt), {
              size: "small",
              value: u.text,
              placeholder: _(r)("variable.custom.text.placeholder"),
              onChange: (d) => i(c, "text", d.target.value)
            }, null, 8, ["value", "placeholder", "onChange"]),
            h(_(kt), {
              size: "small",
              value: u.value,
              placeholder: _(r)("variable.custom.value.placeholder"),
              onChange: (d) => i(c, "value", d.target.value)
            }, null, 8, ["value", "placeholder", "onChange"]),
            h(_(Ft), {
              type: "text",
              danger: "",
              size: "small",
              onClick: (d) => o("change", { customOptions: (e.config.customOptions ?? []).filter((f, p) => p !== c) })
            }, {
              default: he(() => [
                B("span", {
                  class: Pt(_(bt).delete)
                }, null, 2)
              ]),
              _: 1
            }, 8, ["onClick"])
          ], 64))), 128))
        ]),
        h(_(Ft), {
          type: "dashed",
          size: "small",
          onClick: l[0] || (l[0] = (u) => o("change", { customOptions: [...e.config.customOptions ?? [], { text: "", value: "" }] }))
        }, {
          default: he(() => [
            B("span", {
              class: Pt([_(bt).plus, "mr-1"])
            }, null, 2),
            Le(" " + oe(_(r)("variable.custom.addOption")), 1)
          ]),
          _: 1
        }),
        B("div", rle, [
          h(_(Eo), {
            checked: e.config.multi,
            onChange: l[1] || (l[1] = (u) => o("change", { multi: u.target.checked }))
          }, {
            default: he(() => [
              Le(oe(_(r)("variable.custom.multi")), 1)
            ]),
            _: 1
          }, 8, ["checked"])
        ]),
        B("div", ile, [
          h(_(Eo), {
            checked: e.config.includeAll,
            onChange: l[2] || (l[2] = (u) => o("change", { includeAll: u.target.checked }))
          }, {
            default: he(() => [
              Le(oe(_(r)("variable.custom.includeAll")), 1)
            ]),
            _: 1
          }, 8, ["checked"])
        ]),
        e.config.includeAll ? (ne(), dt(s, {
          key: 0,
          label: _(r)("variable.custom.allValue"),
          class: "mt-3"
        }, {
          default: he(() => [
            h(_(kt), {
              value: e.config.allValue ?? "",
              placeholder: _(r)("variable.custom.allValue.placeholder"),
              onChange: l[3] || (l[3] = (u) => o("change", { allValue: u.target.value }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"])) : nt("", !0),
        B("div", ale, [
          h(_(Eo), {
            checked: e.config.allowCustomValue ?? !1,
            onChange: l[4] || (l[4] = (u) => o("change", { allowCustomValue: u.target.checked }))
          }, {
            default: he(() => [
              Le(oe(_(r)("variable.custom.allowCustomValue")), 1)
            ]),
            _: 1
          }, 8, ["checked"])
        ]),
        B("div", lle, [
          h(_(Eo), {
            checked: e.config.allowClear ?? !1,
            onChange: l[5] || (l[5] = (u) => o("change", { allowClear: u.target.checked }))
          }, {
            default: he(() => [
              Le(oe(_(r)("variable.custom.allowClear")), 1)
            ]),
            _: 1
          }, 8, ["checked"])
        ])
      ]);
    };
  }
}), ule = { class: "font-semibold mb-3" }, cle = /* @__PURE__ */ be({
  __name: "DataSourceOptionsSection",
  props: {
    config: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t, { t: o } = sn(), r = [
      { label: "Zabbix", value: "zabbix" },
      { label: "Prometheus", value: "prometheus" },
      { label: "MySQL", value: "mysql" }
    ];
    return (i, a) => {
      const l = yn("a-form-item");
      return ne(), xe("div", null, [
        B("div", ule, oe(_(o)("variable.ds.title")), 1),
        h(l, {
          label: _(o)("variable.ds.type")
        }, {
          default: he(() => [
            h(_(Et), {
              value: e.config.dsType,
              options: r,
              placeholder: _(o)("variable.ds.type.placeholder"),
              onChange: a[0] || (a[0] = (s) => n("change", { dsType: s }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"]),
        h(l, {
          label: _(o)("variable.ds.filterRegex")
        }, {
          default: he(() => [
            h(_(kt), {
              value: e.config.instanceFilterRegex ?? "",
              placeholder: "/regex/",
              onChange: a[1] || (a[1] = (s) => n("change", { instanceFilterRegex: s.target.value }))
            }, null, 8, ["value"])
          ]),
          _: 1
        }, 8, ["label"]),
        h(l, null, {
          default: he(() => [
            h(_(Eo), {
              checked: e.config.multi,
              onChange: a[2] || (a[2] = (s) => n("change", { multi: s.target.checked }))
            }, {
              default: he(() => [
                Le(oe(_(o)("variable.ds.multi")), 1)
              ]),
              _: 1
            }, 8, ["checked"])
          ]),
          _: 1
        }),
        h(l, null, {
          default: he(() => [
            h(_(Eo), {
              checked: e.config.includeAll,
              onChange: a[3] || (a[3] = (s) => n("change", { includeAll: s.target.checked }))
            }, {
              default: he(() => [
                Le(oe(_(o)("variable.ds.includeAll")), 1)
              ]),
              _: 1
            }, 8, ["checked"])
          ]),
          _: 1
        })
      ]);
    };
  }
}), dle = { class: "font-semibold mb-3" }, fle = { class: "grid grid-cols-2 gap-x-4" }, ple = /* @__PURE__ */ be({
  __name: "GeneralSection",
  props: {
    config: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t, { t: o } = sn(), r = [
      { 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.datasource"), value: "datasource" },
      { label: o("variable.type.constant"), value: "constant" }
    ], i = [
      { 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,
        dsType: void 0,
        instanceFilterRegex: void 0,
        targetDsUid: void 0,
        queryType: void 0,
        extractRegex: void 0,
        sortMode: void 0,
        customOptions: void 0,
        allValue: void 0,
        inputWidth: void 0,
        constantValue: void 0,
        hideFromVariableList: void 0
      });
    }
    return (l, s) => {
      const u = yn("a-form-item");
      return ne(), xe("div", null, [
        B("div", dle, oe(_(o)("variable.general.title")), 1),
        B("div", fle, [
          h(u, {
            label: _(o)("variable.general.type"),
            required: "",
            "validate-status": e.config.type ? "" : "error",
            help: e.config.type ? "" : _(o)("variable.general.type.required")
          }, {
            default: he(() => [
              h(_(Et), {
                value: e.config.type,
                options: r,
                style: { width: "100%" },
                onChange: a
              }, null, 8, ["value"])
            ]),
            _: 1
          }, 8, ["label", "validate-status", "help"]),
          h(u, {
            label: _(o)("variable.general.name"),
            required: "",
            "validate-status": e.config.name ? "" : "error",
            help: e.config.name ? "" : _(o)("variable.general.name.required")
          }, {
            default: he(() => [
              h(_(kt), {
                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", "validate-status", "help"]),
          h(u, {
            label: _(o)("variable.general.label")
          }, {
            default: he(() => [
              h(_(kt), {
                value: e.config.label,
                placeholder: _(o)("variable.general.label.placeholder"),
                onChange: s[1] || (s[1] = (c) => n("change", { label: c.target.value }))
              }, null, 8, ["value", "placeholder"])
            ]),
            _: 1
          }, 8, ["label"]),
          h(u, {
            label: _(o)("variable.general.showOn")
          }, {
            default: he(() => [
              h(_(Et), {
                value: e.config.showOnDashboard ?? "label-and-value",
                options: i,
                style: { width: "100%" },
                onChange: s[2] || (s[2] = (c) => n("change", { showOnDashboard: c }))
              }, null, 8, ["value"])
            ]),
            _: 1
          }, 8, ["label"])
        ]),
        h(u, {
          label: _(o)("variable.general.description")
        }, {
          default: he(() => [
            h(_(kt), {
              value: e.config.description ?? "",
              placeholder: _(o)("variable.general.description.placeholder"),
              onChange: s[3] || (s[3] = (c) => n("change", { description: c.target.value }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"])
      ]);
    };
  }
}), hle = { class: "font-semibold mb-3" }, gle = { class: "grid grid-cols-2 gap-x-4" }, vle = { class: "mb-2" }, mle = { class: "mb-2" }, ble = {
  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" }
}, yle = /* @__PURE__ */ be({
  __name: "QueryOptionsSection",
  props: {
    config: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t, { t: o } = sn(), r = [
      { 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" }
    ], i = [
      { 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 = yn("a-form-item");
      return ne(), xe("div", null, [
        B("div", hle, oe(_(o)("variable.query.title")), 1),
        h(u, {
          label: _(o)("variable.query.dsUid")
        }, {
          default: he(() => [
            h(_(kt), {
              size: "small",
              value: e.config.targetDsUid ?? "",
              placeholder: _(o)("variable.query.dsUid.placeholder"),
              onChange: s[0] || (s[0] = (c) => n("change", { targetDsUid: c.target.value }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"]),
        h(u, {
          label: _(o)("variable.query.queryType")
        }, {
          default: he(() => [
            h(_(Et), {
              size: "small",
              value: e.config.queryType,
              options: r,
              style: { width: "100%" },
              placeholder: _(o)("variable.query.queryType.placeholder"),
              onChange: s[1] || (s[1] = (c) => n("change", { queryType: c }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"]),
        h(u, {
          label: _(o)("variable.query.query")
        }, {
          default: he(() => [
            h(_(kt), {
              size: "small",
              value: e.config.query ?? "",
              placeholder: _(o)("variable.query.query.placeholder"),
              onChange: s[2] || (s[2] = (c) => n("change", { query: c.target.value }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"]),
        h(u, {
          label: _(o)("variable.query.regex")
        }, {
          default: he(() => [
            h(_(kt), {
              size: "small",
              value: e.config.extractRegex ?? "",
              placeholder: _(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", gle, [
          h(u, {
            label: _(o)("variable.query.sort")
          }, {
            default: he(() => [
              h(_(Et), {
                size: "small",
                value: e.config.sortMode ?? "disabled",
                options: i,
                style: { width: "100%" },
                onChange: s[4] || (s[4] = (c) => n("change", { sortMode: c }))
              }, null, 8, ["value"])
            ]),
            _: 1
          }, 8, ["label"]),
          h(u, {
            label: _(o)("variable.query.refresh")
          }, {
            default: he(() => [
              h(_(Et), {
                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", vle, [
          h(_(Eo), {
            checked: e.config.multi,
            onChange: s[6] || (s[6] = (c) => n("change", { multi: c.target.checked }))
          }, {
            default: he(() => [
              Le(oe(_(o)("variable.query.multi")), 1)
            ]),
            _: 1
          }, 8, ["checked"])
        ]),
        B("div", mle, [
          h(_(Eo), {
            checked: e.config.includeAll,
            onChange: s[7] || (s[7] = (c) => n("change", { includeAll: c.target.checked }))
          }, {
            default: he(() => [
              Le(oe(_(o)("variable.query.includeAll")), 1)
            ]),
            _: 1
          }, 8, ["checked"])
        ]),
        h(u, {
          label: _(o)("variable.query.preview")
        }, {
          default: he(() => [
            B("div", ble, oe(_(o)("variable.query.preview.placeholder")), 1)
          ]),
          _: 1
        }, 8, ["label"])
      ]);
    };
  }
}), xle = { class: "font-semibold mb-3" }, wle = /* @__PURE__ */ be({
  __name: "TextBoxOptionsSection",
  props: {
    config: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t, { t: o } = sn();
    return (r, i) => {
      const a = yn("a-form-item");
      return ne(), xe("div", null, [
        B("div", xle, oe(_(o)("variable.textbox.title")), 1),
        h(a, {
          label: _(o)("variable.textbox.default")
        }, {
          default: he(() => [
            h(_(kt), {
              value: e.config.defaultValue ?? "",
              placeholder: _(o)("variable.textbox.default.placeholder"),
              onChange: i[0] || (i[0] = (l) => n("change", { defaultValue: l.target.value }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"]),
        h(a, {
          label: _(o)("variable.textbox.width")
        }, {
          default: he(() => [
            h(_(_o), {
              value: e.config.inputWidth,
              min: 60,
              max: 800,
              placeholder: "e.g. 200",
              onChange: i[1] || (i[1] = (l) => n("change", { inputWidth: l ?? void 0 }))
            }, null, 8, ["value"])
          ]),
          _: 1
        }, 8, ["label"])
      ]);
    };
  }
}), Sle = /* @__PURE__ */ be({
  __name: "VariableForm",
  props: {
    draft: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t;
    sn();
    function o(r) {
      n("change", r);
    }
    return (r, i) => (ne(), dt(_(yl), {
      layout: "vertical",
      class: "px-5 py-4 overflow-y-auto flex-1"
    }, {
      default: he(() => [
        h(ple, {
          config: e.draft.config,
          onChange: o
        }, null, 8, ["config"]),
        i[0] || (i[0] = B("div", {
          class: "my-4",
          style: { "border-top": "1px solid var(--ant-color-border-secondary)" }
        }, null, -1)),
        e.draft.config.type === "query" ? (ne(), dt(yle, {
          key: 0,
          config: e.draft.config,
          onChange: o
        }, null, 8, ["config"])) : nt("", !0),
        e.draft.config.type === "datasource" ? (ne(), dt(cle, {
          key: 1,
          config: e.draft.config,
          onChange: o
        }, null, 8, ["config"])) : nt("", !0),
        e.draft.config.type === "custom" ? (ne(), dt(sle, {
          key: 2,
          config: e.draft.config,
          onChange: o
        }, null, 8, ["config"])) : nt("", !0),
        e.draft.config.type === "textbox" ? (ne(), dt(wle, {
          key: 3,
          config: e.draft.config,
          onChange: o
        }, null, 8, ["config"])) : nt("", !0),
        e.draft.config.type === "constant" ? (ne(), dt(Jae, {
          key: 4,
          config: e.draft.config,
          onChange: o
        }, null, 8, ["config"])) : nt("", !0)
      ]),
      _: 1
    }));
  }
}), Cle = {
  class: "w-45 flex flex-col h-full",
  style: { "border-right": "1px solid var(--ant-color-border-secondary)" }
}, $le = {
  class: "px-3 py-2 text-xs text-secondary",
  style: { "border-bottom": "1px solid var(--ant-color-border-secondary)" }
}, Ple = { class: "flex-1 overflow-y-auto" }, Ole = ["onClick"], kle = { key: 0 }, Ile = {
  key: 1,
  class: "text-secondary"
}, Tle = {
  class: "p-2",
  style: { "border-top": "1px solid var(--ant-color-border-secondary)" }
}, _le = /* @__PURE__ */ be({
  __name: "VariableNavList",
  props: {
    drafts: {},
    selectedId: {}
  },
  emits: ["select", "add"],
  setup(e, { emit: t }) {
    const n = t, { t: o } = sn();
    return (r, i) => (ne(), xe("div", Cle, [
      B("div", $le, oe(_(o)("variable.nav.count", { n: e.drafts.length })), 1),
      B("div", Ple, [
        (ne(!0), xe(Je, null, Ut(e.drafts, (a) => (ne(), xe("div", {
          key: a.id,
          class: Pt(["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 ? (ne(), xe("span", kle, oe(a.config.name), 1)) : (ne(), xe("span", Ile, oe(_(o)("variable.nav.unnamed")), 1))
        ], 10, Ole))), 128))
      ]),
      B("div", Tle, [
        h(_(Ft), {
          type: "dashed",
          block: "",
          onClick: i[0] || (i[0] = (a) => n("add"))
        }, {
          default: he(() => [
            B("span", {
              class: Pt([_(bt).plus, "mr-1"])
            }, null, 2),
            Le(" " + oe(_(o)("variable.modal.add")), 1)
          ]),
          _: 1
        })
      ])
    ]));
  }
}), Mle = { class: "flex flex-1 overflow-hidden" }, Ele = { class: "flex-1 overflow-hidden flex flex-col" }, Dle = {
  key: 1,
  class: "flex-1 flex-center text-secondary text-sm"
}, Ale = { class: "flex items-center justify-between w-full" }, Nle = { class: "flex gap-2" }, Rle = /* @__PURE__ */ be({
  __name: "VariableConfigModal",
  props: {
    open: { type: Boolean }
  },
  emits: ["close"],
  setup(e, { emit: t }) {
    const n = e, o = t, r = Is(), { t: i } = sn(), a = le([]), l = le(""), s = () => `new-${Date.now()}-${Math.random().toString(36).slice(2, 6)}`;
    function u(g) {
      return {
        id: "",
        name: g,
        label: "",
        type: "custom",
        hide: !1,
        refresh: "onLoad",
        multi: !1,
        includeAll: !1,
        showOnDashboard: "label-and-value"
      };
    }
    Ie(
      () => n.open,
      (g) => {
        if (g) {
          const m = Object.values(r.variables).map((x) => ({
            id: x.config.id,
            isNew: !1,
            config: JSON.parse(JSON.stringify(x.config))
          }));
          a.value = m, l.value = m[0]?.id ?? "";
        }
      }
    );
    const c = E(
      () => a.value.find((g) => g.id === l.value) ?? null
    );
    function d() {
      const m = `variable_${a.value.length + 1}`, x = s(), S = {
        id: x,
        isNew: !0,
        config: u(m)
      };
      a.value = [...a.value, S], l.value = x;
    }
    function f() {
      if (!c.value)
        return;
      const g = a.value.findIndex((m) => m.id === l.value);
      a.value = a.value.filter((m) => m.id !== l.value), a.value.length > 0 ? l.value = a.value[Math.min(g, a.value.length - 1)].id : l.value = "";
    }
    function p(g) {
      c.value && (a.value = a.value.map(
        (m) => m.id === l.value ? { ...m, config: { ...m.config, ...g } } : m
      ));
    }
    function v() {
      const g = r.variables, m = new Set(a.value.map((S) => S.id)), x = new Set(Object.keys(g));
      for (const S of x)
        m.has(S) || r.removeVariable(S);
      for (const S of a.value) {
        const C = { ...S.config, id: S.id };
        C.hide = C.showOnDashboard === "nothing" || !!C.hideFromVariableList, C.customOptions && (C.customValues = C.customOptions.map((P) => P.value).join(",")), S.isNew || !x.has(S.id) ? r.addVariable(C) : r.updateVariable(S.id, C);
      }
      o("close");
    }
    return (g, m) => (ne(), dt(zx, {
      mode: "modal",
      open: e.open,
      title: _(i)("variable.modal.title"),
      width: 780,
      "body-height": "480px",
      onClose: m[2] || (m[2] = (x) => o("close"))
    }, {
      footer: he(() => [
        B("div", Ale, [
          h(_(Ft), {
            danger: "",
            disabled: !c.value,
            onClick: f
          }, {
            default: he(() => [
              Le(oe(_(i)("variable.modal.delete")), 1)
            ]),
            _: 1
          }, 8, ["disabled"]),
          B("div", Nle, [
            h(_(Ft), {
              onClick: m[1] || (m[1] = (x) => o("close"))
            }, {
              default: he(() => [
                Le(oe(_(i)("variable.modal.cancel")), 1)
              ]),
              _: 1
            }),
            h(_(Ft), {
              type: "primary",
              onClick: v
            }, {
              default: he(() => [
                Le(oe(_(i)("variable.modal.save")), 1)
              ]),
              _: 1
            })
          ])
        ])
      ]),
      default: he(() => [
        B("div", Mle, [
          h(_le, {
            drafts: a.value,
            "selected-id": l.value,
            onSelect: m[0] || (m[0] = (x) => l.value = x),
            onAdd: d
          }, null, 8, ["drafts", "selected-id"]),
          B("div", Ele, [
            c.value ? (ne(), dt(Sle, {
              key: 0,
              draft: c.value,
              onChange: p
            }, null, 8, ["draft"])) : (ne(), xe("div", Dle, oe(_(i)("variable.modal.placeholder")), 1))
          ])
        ])
      ]),
      _: 1
    }, 8, ["open", "title"]));
  }
}), zle = {
  key: 0,
  class: "flex items-center gap-3 flex-wrap",
  style: { padding: "0 8px" }
}, Fle = {
  key: 0,
  class: "flex items-center gap-1"
}, Ble = {
  key: 1,
  class: "flex items-center gap-1"
}, Lle = {
  key: 2,
  class: "flex items-center gap-1"
}, TE = /* @__PURE__ */ be({
  __name: "VariableBar",
  setup(e) {
    const t = Is(), n = aa(), o = ta(), { t: r } = sn(), i = le(!1), a = E(
      () => Object.entries(t.variables).filter(([, u]) => !u.config.hide).map(([u, c]) => ({ id: u, state: c })).sort((u, c) => u.state.config.name.localeCompare(c.state.config.name))
    ), l = E(() => o.isDark ? "#888" : "#555");
    function s(u, c) {
      console.warn("var", c), t.setValue(u, c);
      const d = t.variables[u];
      if (d) {
        const f = t.getDependents(d.config.name);
        for (const p of f)
          for (const [v, g] of Object.entries(t.variables))
            if (g.config.name === p) {
              t.refreshVariable(v);
              break;
            }
      }
    }
    return (u, c) => a.value.length > 0 || _(n).isEditing ? (ne(), xe("div", zle, [
      (ne(!0), xe(Je, null, Ut(a.value, (d) => (ne(), xe(Je, {
        key: d.id
      }, [
        d.state.config.type === "textbox" ? (ne(), xe("div", Fle, [
          B("span", {
            class: "text-sm",
            style: Ht({ color: l.value, whiteSpace: "nowrap" })
          }, oe(d.state.config.label), 5),
          h(_(kt), {
            size: "small",
            style: { width: "160px" },
            value: Array.isArray(d.state.current) ? d.state.current[0] || "" : d.state.current,
            placeholder: "Enter value...",
            onChange: (f) => s(d.id, f.target.value)
          }, null, 8, ["value", "onChange"])
        ])) : d.state.config.type === "constant" ? (ne(), xe("div", Ble, [
          d.state.config.label ? (ne(), xe("span", {
            key: 0,
            class: "text-sm",
            style: Ht({ color: l.value, whiteSpace: "nowrap" })
          }, oe(d.state.config.label), 5)) : nt("", !0),
          h(_(Pi), { style: { margin: "0", "font-size": "12px" } }, {
            default: he(() => [
              Le(oe(d.state.config.constantValue ?? ""), 1)
            ]),
            _: 2
          }, 1024)
        ])) : (ne(), xe("div", Lle, [
          B("span", {
            class: "text-sm",
            style: Ht({ color: l.value, whiteSpace: "nowrap" })
          }, oe(d.state.config.label || d.state.config.name) + ": ", 5),
          h(_(Et), {
            value: d.state.current,
            mode: d.state.config.allowCustomValue ? d.state.config.multi ? "tags" : "SECRET_COMBOBOX_MODE_DO_NOT_USE" : d.state.config.multi ? "multiple" : void 0,
            loading: d.state.loading,
            style: { minWidth: "120px" },
            size: "small",
            "show-search": "",
            "allow-clear": d.state.config.allowClear ?? !1,
            "filter-option": (f, p) => (p?.label ?? "").toLowerCase().includes(f.toLowerCase()),
            placeholder: `Select ${d.state.config.label || d.state.config.name}`,
            onChange: (f) => s(d.id, f)
          }, {
            default: he(() => [
              (ne(!0), xe(Je, null, Ut(d.state.options, (f) => (ne(), dt(_(Cj), {
                key: f.value,
                value: f.value,
                label: f.label === "$__all" ? _(r)("common.all") : f.label
              }, {
                default: he(() => [
                  Le(oe(f.label === "$__all" ? _(r)("common.all") : f.label), 1)
                ]),
                _: 2
              }, 1032, ["value", "label"]))), 128))
            ]),
            _: 2
          }, 1032, ["value", "mode", "loading", "allow-clear", "filter-option", "placeholder", "onChange"]),
          d.state.error ? (ne(), dt(_(Pi), {
            key: 0,
            color: "red",
            style: { "font-size": "10px", margin: "0" }
          }, {
            default: he(() => [
              Le(oe(d.state.error), 1)
            ]),
            _: 2
          }, 1024)) : nt("", !0)
        ]))
      ], 64))), 128)),
      _(n).isEditing ? (ne(), dt(_(Ft), {
        key: 0,
        size: "small",
        type: "text",
        class: "ml-auto",
        onClick: c[0] || (c[0] = (d) => i.value = !0)
      }, {
        default: he(() => [
          B("span", {
            class: Pt([_(bt).settings, "text-base"])
          }, null, 2)
        ]),
        _: 1
      })) : nt("", !0),
      h(Rle, {
        open: i.value,
        onClose: c[1] || (c[1] = (d) => i.value = !1)
      }, null, 8, ["open"])
    ])) : nt("", !0);
  }
}), Hle = /* @__PURE__ */ be({
  __name: "DatasourceSelect",
  props: {
    value: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t, { config: o } = tc(), r = E(() => {
      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;
    }), i = E(
      () => r.value.map((l) => ({ value: l.value, label: l.label }))
    );
    function a(l) {
      const s = r.value.find((u) => u.value === l);
      s && n("change", s);
    }
    return (l, s) => (ne(), dt(_(Et), {
      size: "small",
      style: { "min-width": "140px" },
      value: e.value,
      options: i.value,
      onChange: a
    }, null, 8, ["value", "options"]));
  }
}), Vle = {
  key: 0,
  class: ""
}, jle = {
  key: 1,
  class: "pt-2 px-2 text-xs text-secondary"
}, Wle = /* @__PURE__ */ be({
  __name: "QueryEditorRow",
  props: {
    entry: {},
    index: {},
    isChart: { type: Boolean },
    canDelete: { type: Boolean }
  },
  emits: ["update", "remove"],
  setup(e, { emit: t }) {
    const n = e, o = t, r = E(() => "ABCDEFGHIJKLMNOPQRSTUVWXYZ"[n.index] ?? String(n.index + 1)), i = E(() => Pp(n.entry.dataSource.type)), a = E(() => i.value?.QueryEditor ?? null), l = E(() => {
      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 = Pp(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) => (ne(), dt(_(Tl), {
      size: "small",
      collapsible: "icon",
      bordered: !0,
      "default-active-key": [e.entry.id]
    }, {
      default: he(() => [
        (ne(), dt(_(Tl).Panel, {
          key: e.entry.id
        }, {
          header: he(() => [
            B("div", {
              class: "flex items-center gap-2",
              onClick: d[3] || (d[3] = cr(() => {
              }, ["stop"]))
            }, [
              h(_(Pi), {
                color: "blue",
                style: { "font-size": "12px", "font-weight": "600", margin: "0", "min-width": "24px", "text-align": "center", "line-height": "20px" }
              }, {
                default: he(() => [
                  Le(oe(r.value), 1)
                ]),
                _: 1
              }),
              h(_(Pa), {
                size: "small",
                checked: e.entry.enabled,
                onChange: d[0] || (d[0] = (f) => o("update", { enabled: f })),
                onClick: d[1] || (d[1] = cr(() => {
                }, ["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)),
              h(Hle, {
                value: l.value,
                onClick: d[2] || (d[2] = cr(() => {
                }, ["stop"])),
                onChange: s
              }, null, 8, ["value"])
            ])
          ]),
          extra: he(() => [
            e.canDelete ? (ne(), dt(_(Ft), {
              key: 0,
              type: "text",
              danger: "",
              size: "small",
              onClick: d[4] || (d[4] = cr((f) => o("remove"), ["stop"]))
            }, {
              default: he(() => [
                B("span", {
                  class: Pt(_(bt).delete)
                }, null, 2)
              ]),
              _: 1
            })) : nt("", !0)
          ]),
          default: he(() => [
            e.entry.enabled && a.value ? (ne(), xe("div", Vle, [
              (ne(), dt(zP(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 ? (ne(), xe("div", jle, " No query editor available for datasource type: " + oe(e.entry.dataSource.type), 1)) : nt("", !0)
          ]),
          _: 1
        }))
      ]),
      _: 1
    }, 8, ["default-active-key"]));
  }
}), Kle = {
  class: "px-4 py-3 flex flex-col gap-2",
  style: { "min-width": "300px" }
}, qle = { class: "flex items-center gap-2" }, Yle = {
  class: "text-xs text-secondary flex-shrink-0",
  style: { width: "120px" }
}, Gle = { class: "flex items-center gap-2" }, Ule = {
  class: "text-xs text-secondary flex-shrink-0",
  style: { width: "120px" }
}, Xle = { class: "flex items-center gap-2" }, Qle = {
  class: "text-xs text-secondary flex-shrink-0",
  style: { width: "120px" }
}, Zle = {
  class: "text-xs",
  style: { color: "var(--ant-color-text-quaternary)" }
}, Jle = { class: "flex items-center gap-2" }, ese = {
  class: "text-xs text-secondary flex-shrink-0",
  style: { width: "120px" }
}, tse = { class: "flex items-center gap-2" }, nse = {
  class: "text-xs text-secondary flex-shrink-0",
  style: { width: "120px" }
}, IP = 1e3, ose = /* @__PURE__ */ be({
  __name: "QueryOptionsPanel",
  setup(e) {
    const { t } = sn(), { panel: n, onChange: o } = gc(), r = aa();
    function i(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 = E(() => {
      const u = n.value.queryOptions?.maxDataPoints ?? IP, c = r.timeRange, d = c.to - c.from;
      return Math.max(Math.ceil(d / u), 1e3);
    }), s = E(() => {
      const u = n.value.queryOptions?.minIntervalMs;
      return u != null ? i(u) : "";
    });
    return (u, c) => (ne(), xe("div", Kle, [
      B("div", qle, [
        B("span", Yle, [
          h(_(Lo), {
            title: _(t)("qb.queryOptions.maxDataPoints")
          }, {
            default: he(() => [
              B("span", {
                class: Pt([_(bt).info, "mr-1 opacity-50 text-xs"])
              }, null, 2)
            ]),
            _: 1
          }, 8, ["title"]),
          Le(" " + oe(_(t)("qb.queryOptions.maxDataPoints")), 1)
        ]),
        h(_(_o), {
          size: "small",
          style: { width: "100px" },
          min: 1,
          value: _(n).queryOptions?.maxDataPoints,
          placeholder: String(IP),
          onChange: c[0] || (c[0] = (d) => _(o)({ queryOptions: { ..._(n).queryOptions, maxDataPoints: d ?? void 0 } }))
        }, null, 8, ["value", "placeholder"])
      ]),
      B("div", Gle, [
        B("span", Ule, [
          h(_(Lo), {
            title: _(t)("qb.queryOptions.minInterval")
          }, {
            default: he(() => [
              B("span", {
                class: Pt([_(bt).info, "mr-1 opacity-50 text-xs"])
              }, null, 2)
            ]),
            _: 1
          }, 8, ["title"]),
          Le(" " + oe(_(t)("qb.queryOptions.minInterval")), 1)
        ]),
        h(_(kt), {
          size: "small",
          style: { width: "100px" },
          value: s.value,
          placeholder: _(t)("qb.queryOptions.minIntervalPlaceholder"),
          onChange: c[1] || (c[1] = (d) => {
            const f = d.target.value.trim();
            if (!f) {
              _(o)({ queryOptions: { ..._(n).queryOptions, minIntervalMs: void 0 } });
              return;
            }
            const p = a(f);
            p !== void 0 && _(o)({ queryOptions: { ..._(n).queryOptions, minIntervalMs: p } });
          })
        }, null, 8, ["value", "placeholder"])
      ]),
      B("div", Xle, [
        B("span", Qle, [
          h(_(Lo), {
            title: _(t)("qb.queryOptions.interval")
          }, {
            default: he(() => [
              B("span", {
                class: Pt([_(bt).info, "mr-1 opacity-50 text-xs"])
              }, null, 2)
            ]),
            _: 1
          }, 8, ["title"]),
          Le(" " + oe(_(t)("qb.queryOptions.interval")), 1)
        ]),
        h(_(kt), {
          size: "small",
          style: { width: "100px" },
          value: i(l.value),
          readonly: ""
        }, null, 8, ["value"]),
        B("span", Zle, " = " + oe(_(t)("qb.queryOptions.intervalHint")), 1)
      ]),
      B("div", Jle, [
        B("span", ese, [
          h(_(Lo), {
            title: _(t)("qb.queryOptions.relativeTime")
          }, {
            default: he(() => [
              B("span", {
                class: Pt([_(bt).info, "mr-1 opacity-50 text-xs"])
              }, null, 2)
            ]),
            _: 1
          }, 8, ["title"]),
          Le(" " + oe(_(t)("qb.queryOptions.relativeTime")), 1)
        ]),
        h(_(kt), {
          size: "small",
          style: { width: "100px" },
          placeholder: "1h",
          value: _(n).queryOptions?.relativeTime ?? "",
          onChange: c[2] || (c[2] = (d) => _(o)({ queryOptions: { ..._(n).queryOptions, relativeTime: d.target.value || void 0 } }))
        }, null, 8, ["value"])
      ]),
      B("div", tse, [
        B("span", nse, [
          h(_(Lo), {
            title: _(t)("qb.queryOptions.timeShift")
          }, {
            default: he(() => [
              B("span", {
                class: Pt([_(bt).info, "mr-1 opacity-50 text-xs"])
              }, null, 2)
            ]),
            _: 1
          }, 8, ["title"]),
          Le(" " + oe(_(t)("qb.queryOptions.timeShift")), 1)
        ]),
        h(_(kt), {
          size: "small",
          style: { width: "100px" },
          placeholder: "1h",
          value: _(n).queryOptions?.timeShift ?? "",
          onChange: c[3] || (c[3] = (d) => _(o)({ queryOptions: { ..._(n).queryOptions, timeShift: d.target.value || void 0 } }))
        }, null, 8, ["value"])
      ])
    ]));
  }
}), rse = { class: "flex flex-col h-full" }, ise = {
  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)" }
}, ase = { class: "flex-1 overflow-y-auto px-3 py-2 flex flex-col gap-2" }, lse = {
  key: 0,
  class: "text-center text-secondary text-sm py-8"
}, sse = /* @__PURE__ */ be({
  __name: "QueryEditorPane",
  setup(e) {
    const { t } = sn(), { panel: n, onChange: o } = gc(), r = E(() => ["timeseries", "bar", "histogram"].includes(n.value.type)), i = E(() => n.value.queries ?? []), a = le(!1), l = le("mock");
    function s(d, f) {
      o({ queries: i.value.map((p, v) => v === d ? { ...p, ...f } : p) });
    }
    function u(d) {
      o({ queries: i.value.filter((f, p) => p !== d) });
    }
    function c() {
      if (i.value.length >= 26)
        return;
      const d = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"[i.value.length] ?? String(i.value.length + 1), [f, p = ""] = l.value.split(":"), v = Pp(f);
      if (!v?.defaultQuery)
        return;
      const g = {
        ...v.defaultQuery(),
        ...p ? { datasourceId: p } : {},
        // Non-chart types: each query = 1 series; seriesCount controlled by query count
        ...!r.value && "seriesCount" in v.defaultQuery() ? { seriesCount: 1 } : {}
      };
      o({
        queries: [...i.value, { id: d, enabled: !0, dataSource: g }]
      });
    }
    return (d, f) => (ne(), xe("div", rse, [
      B("div", ise, [
        h(TE),
        f[1] || (f[1] = B("div", { class: "flex-1" }, null, -1)),
        h(IE),
        h(_(eU), {
          type: "vertical",
          style: { margin: "0" }
        }),
        h(_(Ji).Compact, null, {
          default: he(() => [
            h(_(Ft), {
              type: "primary",
              disabled: i.value.length >= 26,
              onClick: c
            }, {
              default: he(() => [
                B("span", {
                  class: Pt([_(bt).plus, "mr-1"])
                }, null, 2),
                Le(" " + oe(_(t)("qb.addQuery")), 1)
              ]),
              _: 1
            }, 8, ["disabled"]),
            h(_(aW), {
              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: he(() => [
                h(ose)
              ]),
              default: he(() => [
                h(_(Ft), { class: "text-12px cursor-pointer hover:op-90 active:op-80 underline" }, {
                  default: he(() => [
                    Le(oe(_(t)("qb.queryOptions")) + " ", 1),
                    B("span", {
                      class: Pt([_(bt).chevronDown, ""])
                    }, null, 2)
                  ]),
                  _: 1
                })
              ]),
              _: 1
            }, 8, ["open"])
          ]),
          _: 1
        })
      ]),
      B("div", ase, [
        (ne(!0), xe(Je, null, Ut(i.value, (p, v) => (ne(), dt(Wle, {
          key: p.id,
          entry: p,
          index: v,
          "is-chart": r.value,
          "can-delete": i.value.length > 1,
          onUpdate: (g) => s(v, g),
          onRemove: () => u(v)
        }, null, 8, ["entry", "index", "is-chart", "can-delete", "onUpdate", "onRemove"]))), 128)),
        i.value.length === 0 ? (ne(), xe("div", lse, ' No queries. Click "' + oe(_(t)("qb.addQuery")) + '" to start. ', 1)) : nt("", !0)
      ])
    ]));
  }
}), use = { class: "w-full h-full" }, cse = { class: "w-full h-full" }, dse = /* @__PURE__ */ be({
  __name: "PanelEditorLayout",
  setup(e) {
    const n = ta().isDark ? "#303030" : "#e8e8e8";
    return (o, r) => (ne(), dt(_($P), { style: { height: "100%" } }, {
      default: he(() => [
        h(_(jf), { "min-size": 200 }, {
          default: he(() => [
            h(_($P), {
              vertical: "",
              "default-sizes": [100, 200]
            }, {
              default: he(() => [
                h(_(jf), { "min-size": 100 }, {
                  default: he(() => [
                    B("div", use, [
                      h(Qae)
                    ])
                  ]),
                  _: 1
                }),
                h(_(jf), { "min-size": 60 }, {
                  default: he(() => [
                    B("div", cse, [
                      h(sse)
                    ])
                  ]),
                  _: 1
                })
              ]),
              _: 1
            })
          ]),
          _: 1
        }),
        h(_(jf), {
          "preferred-size": "35%",
          "min-size": 200
        }, {
          default: he(() => [
            B("div", {
              class: "w-full h-full overflow-y-auto",
              style: Ht({ borderLeft: `1px solid ${_(n)}` })
            }, [
              h(kie)
            ], 4)
          ]),
          _: 1
        })
      ]),
      _: 1
    }));
  }
}), fse = { class: "font-medium text-sm" }, pse = { class: "flex justify-end gap-2 py-1" }, hse = /* @__PURE__ */ be({
  __name: "PanelEditorModal",
  setup(e) {
    const t = aa(), { t: n } = sn(), o = le(null), r = E(() => {
      const v = t.editingPanelId;
      return v ? t.panels[v] : null;
    }), i = E(() => o.value ?? r.value), { response: a } = fE(
      () => i.value?.queries ?? [],
      () => t.timeRange,
      800
    ), l = E(() => {
      const v = a.value?.data?.[0];
      return v ? v.fields.filter((g) => g.type === "number").map((g) => g.name) : [];
    }), s = E(() => {
      const v = a.value?.data?.[0];
      return v ? v.fields.map((g) => g.config?.displayNameFromDS ?? g.name) : [];
    });
    function u(v) {
      i.value && (o.value = { ...i.value, ...v });
    }
    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, (v) => {
      v || (o.value = null);
    });
    const f = E(() => !!t.editingPanelId && !!r.value), p = le(!1);
    return Ie(f, (v) => {
      v && !p.value && setTimeout(() => {
        p.value = !0;
      }, 0);
    }), hte({
      panel: E(() => i.value),
      onChange: u,
      previewData: a,
      numericFieldNames: l,
      allFieldNames: s
    }), (v, g) => (ne(), dt(zx, {
      mode: "drawer",
      open: f.value,
      width: "71vw",
      mask: !0,
      "destroy-on-close": !1,
      onClose: d
    }, {
      title: he(() => [
        B("span", fse, "Edit: " + oe(i.value?.title ?? ""), 1)
      ]),
      footer: he(() => [
        B("div", pse, [
          h(_(Ft), { onClick: d }, {
            default: he(() => [
              Le(oe(_(n)("dashboard.cancel")), 1)
            ]),
            _: 1
          }),
          h(_(Ft), {
            type: "primary",
            onClick: c
          }, {
            default: he(() => [
              Le(oe(_(n)("dashboard.save")), 1)
            ]),
            _: 1
          })
        ])
      ]),
      default: he(() => [
        i.value && p.value ? (ne(), dt(dse, { key: 0 })) : nt("", !0)
      ]),
      _: 1
    }, 8, ["open"]));
  }
}), gse = {
  key: 0,
  class: "panel-container w-full h-full flex flex-col rounded overflow-hidden bg-white dark:bg-[#1f1f1f] border border-[#e8e8e8] dark:border-[#303030]"
}, vse = { class: "flex items-center gap-2 min-w-0 lh-1 flex-1 text-[#666] dark:text-[#666]" }, mse = {
  key: 0,
  class: "drag-handle flex-shrink-0 cursor-grab"
}, bse = { class: "text-sm truncate text-[#141414] dark:text-[#d9d9d9]" }, yse = { class: "panel-actions flex items-center gap-10px lh-1 flex-shrink-0 text-[#444] dark:text-[#666]" }, xse = { class: "panel-content flex-1 overflow-hidden" }, wse = { class: "w-full h-full flex flex-col rounded-lg overflow-hidden bg-white dark:bg-[#1f1f1f]" }, Sse = { class: "panel-content flex-1 overflow-hidden" }, Cse = /* @__PURE__ */ be({
  __name: "PanelContainer",
  props: {
    panelId: {},
    menuMode: { default: "inline" }
  },
  setup(e) {
    const t = e, n = aa(), o = ta(), { t: r } = sn(), i = le(!1), a = le(!1), l = E(() => n.panels[t.panelId]), s = E(() => o.isDark), u = E(() => s.value ? "#666" : "#bbb"), c = E(() => {
      const v = (g) => ko("span", { class: g });
      return n.isEditing ? [
        { key: "edit", label: r("panel.menu.edit"), icon: () => v(bt.edit) },
        { key: "clone", label: r("panel.menu.clone"), icon: () => v(bt.clone) },
        { key: "fullscreen", label: r("panel.menu.fullscreen"), icon: () => v(bt.fullscreen) },
        { type: "divider" },
        { key: "remove", label: r("panel.menu.remove"), icon: () => v(bt.delete), danger: !0 }
      ] : [
        { key: "fullscreen", label: r("panel.menu.fullscreen"), icon: () => v(bt.fullscreen) }
      ];
    });
    function d(v) {
      switch (v) {
        case "edit":
          n.setEditingPanel(t.panelId);
          break;
        case "clone":
          n.clonePanel(t.panelId);
          break;
        case "remove":
          Go.confirm({
            title: r("panel.remove.title", { title: l.value?.title ?? "" }),
            content: r("panel.remove.content"),
            okText: r("panel.remove.ok"),
            cancelText: r("panel.remove.cancel"),
            maskStyle: { background: "rgba(0, 0, 0, 0.2)" },
            zIndex: 2001,
            okButtonProps: { danger: !0 },
            onOk: () => n.removePanel(t.panelId)
          });
          break;
        case "fullscreen":
          i.value = !0;
          break;
      }
    }
    function f(v) {
      a.value = !1, d(String(v.key));
    }
    function p(v) {
      v.stopPropagation(), n.refreshPanel(t.panelId);
    }
    return (v, g) => (ne(), xe(Je, null, [
      l.value && !i.value ? (ne(), xe("div", gse, [
        B("div", {
          class: "panel-header flex items-center px-3 py-2 flex-shrink-0 border-b border-[#e8e8e8] dark:border-[#303030]",
          onDblclick: g[6] || (g[6] = (m) => _(n).isEditing && _(n).setEditingPanel(t.panelId))
        }, [
          B("div", vse, [
            _(n).isEditing ? (ne(), xe("span", mse, [
              B("span", {
                class: Pt(_(bt).dragVertical)
              }, null, 2)
            ])) : nt("", !0),
            B("span", bse, oe(l.value.title), 1),
            l.value.description ? (ne(), dt(_(Lo), {
              key: 1,
              title: l.value.description,
              placement: "bottom"
            }, {
              default: he(() => [
                B("span", {
                  class: Pt([_(bt).info, "flex-shrink-0"])
                }, null, 2)
              ]),
              _: 1
            }, 8, ["title"])) : nt("", !0),
            h(wE, {
              links: l.value.links ?? [],
              "icon-color": u.value
            }, null, 8, ["links", "icon-color"])
          ]),
          B("div", yse, [
            h(_(Lo), {
              title: _(r)("panel.menu.refresh")
            }, {
              default: he(() => [
                B("span", {
                  class: Pt([_(bt).refresh, "panel-refresh-btn cursor-pointer"]),
                  onMousedown: g[0] || (g[0] = cr(() => {
                  }, ["stop"])),
                  onClick: p
                }, null, 34)
              ]),
              _: 1
            }, 8, ["title"]),
            t.menuMode === "inline" ? (ne(), xe(Je, { key: 0 }, [
              _(n).isEditing ? (ne(), dt(_(Lo), {
                key: 0,
                title: _(r)("panel.menu.edit")
              }, {
                default: he(() => [
                  B("span", {
                    class: Pt([_(bt).edit, "cursor-pointer"]),
                    onClick: g[1] || (g[1] = (m) => d("edit"))
                  }, null, 2)
                ]),
                _: 1
              }, 8, ["title"])) : nt("", !0),
              _(n).isEditing ? (ne(), dt(_(Lo), {
                key: 1,
                title: _(r)("panel.menu.clone")
              }, {
                default: he(() => [
                  B("span", {
                    class: Pt([_(bt).clone, "cursor-pointer"]),
                    onClick: g[2] || (g[2] = (m) => d("clone"))
                  }, null, 2)
                ]),
                _: 1
              }, 8, ["title"])) : nt("", !0),
              _(n).isEditing ? (ne(), dt(_(Lo), {
                key: 2,
                title: _(r)("panel.menu.remove")
              }, {
                default: he(() => [
                  B("span", {
                    class: Pt([_(bt).delete, "cursor-pointer text-red-500"]),
                    onClick: g[3] || (g[3] = (m) => d("remove"))
                  }, null, 2)
                ]),
                _: 1
              }, 8, ["title"])) : nt("", !0)
            ], 64)) : (ne(), dt(_(Er), {
              key: 1,
              open: a.value,
              "onUpdate:open": g[5] || (g[5] = (m) => a.value = m),
              trigger: "click"
            }, {
              overlay: he(() => [
                h(_(fo), {
                  items: c.value,
                  onClick: f
                }, null, 8, ["items"])
              ]),
              default: he(() => [
                B("span", {
                  class: "cursor-pointer p-[2px_4px]",
                  onClick: g[4] || (g[4] = cr(() => {
                  }, ["prevent"]))
                }, [
                  B("span", {
                    class: Pt(_(bt).dotsVertical)
                  }, null, 2)
                ])
              ]),
              _: 1
            }, 8, ["open"]))
          ])
        ], 32),
        B("div", xse, [
          lr(v.$slots, "default", {}, void 0, !0)
        ])
      ])) : nt("", !0),
      i.value ? (ne(), dt(_(Go), {
        key: 1,
        open: !0,
        title: l.value?.title,
        footer: null,
        width: "92vw",
        "body-style": { height: "82vh", padding: 0 },
        closable: !1,
        onCancel: g[7] || (g[7] = (m) => i.value = !1)
      }, {
        default: he(() => [
          B("div", wse, [
            B("div", Sse, [
              lr(v.$slots, "default", {}, void 0, !0)
            ])
          ])
        ]),
        _: 3
      }, 8, ["title"])) : nt("", !0)
    ], 64));
  }
}), TP = /* @__PURE__ */ Sr(Cse, [["__scopeId", "data-v-548b9131"]]), $se = { class: "font-medium text-sm" }, Pse = { class: "text-xs text-secondary mt-1" }, Ose = /* @__PURE__ */ be({
  __name: "AddPanelModal",
  setup(e) {
    const t = aa(), { t: n } = sn(), o = [
      { type: "timeseries", icon: bt.chartLine, descKey: "panel.type.desc.timeseries" },
      { type: "bar", icon: bt.chartBar, descKey: "panel.type.desc.bar" },
      { type: "histogram", icon: bt.chartArea, descKey: "panel.type.desc.histogram" },
      { type: "stat", icon: bt.stat, descKey: "panel.type.desc.stat" },
      { type: "gauge", icon: bt.gauge, descKey: "panel.type.desc.gauge" },
      { type: "table", icon: bt.table, descKey: "panel.type.desc.table" },
      { type: "pie", icon: bt.chartPie, descKey: "panel.type.desc.pie" }
    ];
    function r(i) {
      t.addPanel(i);
    }
    return (i, a) => (ne(), dt(zx, {
      open: _(t).addPanelModalOpen,
      title: _(n)("dashboard.addPanel"),
      footer: !1,
      onClose: a[0] || (a[0] = (l) => _(t).addPanelModalOpen = !1)
    }, {
      default: he(() => [
        h(_(aQ), {
          gutter: [16, 16],
          class: "mt-4 px-4 pb-4"
        }, {
          default: he(() => [
            (ne(), xe(Je, null, Ut(o, (l) => h(_(MY), {
              key: l.type,
              span: 8
            }, {
              default: he(() => [
                h(_(Du), {
                  hoverable: "",
                  class: "text-center cursor-pointer",
                  onClick: (s) => r(l.type)
                }, {
                  default: he(() => [
                    B("div", {
                      class: Pt(["text-2xl mb-2 text-blue", l.icon])
                    }, null, 2),
                    B("div", $se, oe(_(n)(`config.type.${l.type}`)), 1),
                    B("div", Pse, oe(_(n)(l.descKey)), 1)
                  ]),
                  _: 2
                }, 1032, ["onClick"])
              ]),
              _: 2
            }, 1024)), 64))
          ]),
          _: 1
        })
      ]),
      _: 1
    }, 8, ["open", "title"]));
  }
}), kse = { style: { display: "flex", "align-items": "center", "flex-wrap": "wrap", gap: "8px", padding: "0 4px" } }, Ise = { class: "" }, Tse = { style: { margin: "0" } }, _se = { style: { margin: "0" } }, Mse = /* @__PURE__ */ be({
  __name: "DashboardHeader",
  setup(e) {
    const t = aa(), { t: n } = sn(), { config: o } = tc(), { message: r } = od.useApp(), i = le(!1), a = le(!1), l = le(null);
    function s() {
      t.confirmSave(o.value.onSave);
    }
    function u() {
      t.isDirty ? i.value = !0 : t.discardChanges();
    }
    function c() {
      i.value = !1, t.discardChanges();
    }
    function d() {
      const S = t.exportJSON(), C = new Blob([S], { type: "application/json" }), P = URL.createObjectURL(C), $ = document.createElement("a");
      $.href = P, $.download = "dashboard.json", $.click(), URL.revokeObjectURL(P), r.success(n("dashboard.exportSuccess"));
    }
    function f() {
      l.value?.click();
    }
    function p(S) {
      const C = S.target.files?.[0];
      C && (C.text().then((P) => {
        t.importJSON(P) ? r.success(n("dashboard.importSuccess")) : r.error(n("dashboard.importError"));
      }), S.target.value = "");
    }
    function v(S) {
      t.importJSON(S) ? r.success(n("dashboard.importSuccess")) : r.error(n("dashboard.importError"));
    }
    const g = E(() => {
      const S = Qz(), C = (o.value.presets ?? []).map((P) => ({ label: P.label, value: P.config }));
      return [{ label: "内置模板", value: S }, ...C];
    }), m = E(() => [
      { key: "export", label: n("dashboard.export"), icon: bt.export },
      { key: "import", label: n("dashboard.import"), icon: bt.import },
      { type: "divider" },
      { key: "clear", label: n("dashboard.clearPanels"), icon: bt.delete, danger: !0 }
    ]);
    function x(S) {
      S === "export" ? d() : S === "import" ? f() : S === "clear" && (a.value = !0);
    }
    return (S, C) => (ne(), xe("div", kse, [
      _(t).isEditing ? (ne(), xe(Je, { key: 0 }, [
        h(_(Ji).Compact, null, {
          default: he(() => [
            h(_(Ft), {
              onClick: C[0] || (C[0] = (P) => _(t).addPanelModalOpen = !0)
            }, {
              default: he(() => [
                B("span", {
                  class: Pt([_(bt).plus, "mr-1"])
                }, null, 2),
                Le(" " + oe(_(n)("dashboard.addPanel")), 1)
              ]),
              _: 1
            }),
            h(_(Et), {
              placeholder: "预设",
              "popup-match-select-width": !1,
              options: g.value,
              style: { "min-width": "80px" },
              onSelect: C[1] || (C[1] = (P) => v(P))
            }, null, 8, ["options"]),
            B("input", {
              ref_key: "fileInputRef",
              ref: l,
              type: "file",
              accept: ".json",
              style: { display: "none" },
              onChange: p
            }, null, 544),
            h(_(Er), { trigger: ["click"] }, {
              overlay: he(() => [
                h(_(fo), {
                  onClick: C[2] || (C[2] = ({ key: P }) => x(P))
                }, {
                  default: he(() => [
                    (ne(!0), xe(Je, null, Ut(m.value, (P) => (ne(), xe(Je, {
                      key: P.key ?? P.type
                    }, [
                      P.type === "divider" ? (ne(), dt(_(fo).Divider, { key: 0 })) : (ne(), dt(_(fo).Item, {
                        key: P.key,
                        danger: P.danger
                      }, {
                        default: he(() => [
                          B("span", {
                            class: Pt([P.icon, "mr-1"])
                          }, null, 2),
                          Le(oe(P.label), 1)
                        ]),
                        _: 2
                      }, 1032, ["danger"]))
                    ], 64))), 128))
                  ]),
                  _: 1
                })
              ]),
              default: he(() => [
                h(_(Ft), null, {
                  default: he(() => [
                    B("span", {
                      class: Pt(_(bt).dotsVertical)
                    }, null, 2)
                  ]),
                  _: 1
                })
              ]),
              _: 1
            })
          ]),
          _: 1
        }),
        h(_(Ft), {
          type: "primary",
          ghost: "",
          onClick: s
        }, {
          default: he(() => [
            B("span", {
              class: Pt([_(bt).save, "mr-1"])
            }, null, 2),
            Le(" " + oe(_(n)("dashboard.save")), 1)
          ]),
          _: 1
        }),
        h(_(Ft), {
          danger: _(t).isDirty,
          onClick: u
        }, {
          default: he(() => [
            B("span", {
              class: Pt([_(bt).cancel, "mr-1"])
            }, null, 2),
            Le(" " + oe(_(n)("dashboard.cancel")), 1)
          ]),
          _: 1
        }, 8, ["danger"])
      ], 64)) : (ne(), dt(_(Ft), {
        key: 1,
        onClick: _(t).startEditing
      }, {
        default: he(() => [
          B("span", {
            class: Pt([_(bt).edit, "mr-1"])
          }, null, 2),
          B("span", Ise, oe(_(n)("dashboard.edit")), 1)
        ]),
        _: 1
      }, 8, ["onClick"])),
      h(_(Go), {
        open: i.value,
        "onUpdate:open": C[3] || (C[3] = (P) => i.value = P),
        title: _(n)("dashboard.cancelConfirmTitle"),
        "ok-text": _(n)("dashboard.cancelConfirmOk"),
        "cancel-text": _(n)("dashboard.cancelConfirmCancel"),
        "ok-button-props": { danger: !0 },
        onOk: c,
        onCancel: C[4] || (C[4] = (P) => i.value = !1)
      }, {
        default: he(() => [
          B("p", Tse, oe(_(n)("dashboard.cancelConfirmTitle")), 1)
        ]),
        _: 1
      }, 8, ["open", "title", "ok-text", "cancel-text"]),
      h(_(Go), {
        open: a.value,
        "onUpdate:open": C[5] || (C[5] = (P) => a.value = P),
        title: _(n)("dashboard.clearConfirmTitle"),
        "ok-text": _(n)("dashboard.clearConfirmOk"),
        "ok-button-props": { danger: !0 },
        onOk: C[6] || (C[6] = () => {
          _(t).clearPanels(), a.value = !1;
        }),
        onCancel: C[7] || (C[7] = (P) => a.value = !1)
      }, {
        default: he(() => [
          B("p", _se, oe(_(n)("dashboard.clearConfirmTitle")), 1)
        ]),
        _: 1
      }, 8, ["open", "title", "ok-text"])
    ]));
  }
}), Ese = { class: "w-full h-full flex flex-col" }, Dse = {
  key: 1,
  class: "dashboad-content h-full"
}, Ase = {
  key: 1,
  class: "flex-center h-full"
}, Nse = { class: "text-center text-gray-400" }, Rse = { class: "text-14px" }, zse = { class: "mt-2 text-12px text-blue/90" }, Fse = 30, Xv = 8, Bse = 768, Lse = /* @__PURE__ */ be({
  __name: "DashboardPage",
  setup(e) {
    const { t } = sn(), n = aa(), o = ta(), { config: r } = tc(), i = E(() => r.value.canEdit !== !1), a = $e([...n.layouts]);
    Ie(
      () => n.layouts,
      (g) => {
        const m = a.value;
        m.length === g.length && m.every(
          (x, S) => x.i === g[S].i && x.x === g[S].x && x.y === g[S].y && x.w === g[S].w && x.h === g[S].h
        ) || (a.value = [...g]);
      }
    );
    function l(g) {
      a.value = g, n.setLayouts(g);
    }
    const s = le(), u = le(0), c = E(() => u.value > 0 && u.value < Bse);
    let d = null;
    At(() => {
      s.value && (d = new ResizeObserver((g) => {
        u.value = g[0].contentRect.width;
      }), d.observe(s.value), u.value = s.value.getBoundingClientRect().width);
    }), Vo(() => {
      d?.disconnect();
    });
    let f = null;
    function p() {
      v(), n.autoRefresh > 0 && (f = setInterval(() => {
        n.refresh();
      }, n.autoRefresh * 1e3));
    }
    function v() {
      f && (clearInterval(f), f = null);
    }
    return Ie(() => n.autoRefresh, p), (g, m) => (ne(), xe("div", Ese, [
      B("div", {
        class: "flex items-center gap-2 flex-wrap px-2 sticky top-0 z-10",
        style: Ht({
          background: _(o).isDark ? "#1a1a1a" : "#f5f5f5",
          border: `1px solid ${_(o).isDark ? "#303030" : "#e8e8e8"}`,
          height: "42px"
        })
      }, [
        h(TE),
        m[0] || (m[0] = B("div", { class: "flex-1" }, null, -1)),
        h(IE),
        i.value ? (ne(), dt(Mse, { key: 0 })) : nt("", !0)
      ], 4),
      B("div", {
        ref_key: "containerRef",
        ref: s,
        class: "flex-1 overflow-auto"
      }, [
        c.value ? (ne(), xe("div", {
          key: 0,
          class: "flex flex-col",
          style: Ht({ gap: `${Xv}px`, padding: "8px" })
        }, [
          (ne(!0), xe(Je, null, Ut(Object.keys(_(n).panels), (x) => (ne(), xe("div", { key: x }, [
            h(TP, { "panel-id": x }, {
              default: he(() => [
                h(Qb, { "panel-id": x }, null, 8, ["panel-id"])
              ]),
              _: 2
            }, 1032, ["panel-id"])
          ]))), 128))
        ], 4)) : (ne(), xe("div", Dse, [
          u.value > 0 ? (ne(), dt(_(dte), {
            key: 0,
            layout: a.value,
            "col-num": 12,
            "row-height": Fse,
            margin: [Xv, Xv],
            "is-draggable": i.value && _(n).isEditing,
            "is-resizable": i.value && _(n).isEditing,
            "vertical-compact": !0,
            onLayoutUpdated: l
          }, {
            item: he(({ item: x }) => [
              h(TP, {
                "panel-id": String(x.i)
              }, {
                default: he(() => [
                  h(Qb, {
                    "panel-id": String(x.i)
                  }, null, 8, ["panel-id"])
                ]),
                _: 2
              }, 1032, ["panel-id"])
            ]),
            _: 1
          }, 8, ["layout", "margin", "is-draggable", "is-resizable"])) : nt("", !0),
          Object.keys(_(n).panels).length === 0 ? (ne(), xe("div", Ase, [
            B("div", Nse, [
              m[1] || (m[1] = B("div", { class: "text-4xl mb-4" }, [
                B("div", { class: "i-carbon:chart-combo-stacked" })
              ], -1)),
              B("div", Rse, oe(_(t)("dashboard.empty")), 1),
              B("div", zse, oe(_(t)("dashboard.emptyHint")), 1)
            ])
          ])) : nt("", !0)
        ]))
      ], 512),
      h(Ose),
      h(hse)
    ]));
  }
}), Hse = { class: "flex justify-between items-center gap-2" }, Vse = { style: { "font-size": "12px" } }, jse = { style: { "font-size": "10px", color: "var(--ant-color-text-quaternary)" } }, Qv = /* @__PURE__ */ be({
  __name: "ArgusGroupBy",
  props: {
    groupBy: {},
    cfg: {},
    signal: {},
    metricName: {},
    disabled: { type: Boolean, default: !1 }
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, r = le(""), i = le([]), a = le(!1), l = le(!1);
    let s = null;
    Ie(
      [r, 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((v) => v.name)), p = await oD(n.cfg, {
              signal: n.signal,
              metricName: n.metricName,
              search: r.value
            });
            i.value = p.filter((v) => !f.has(v.name));
          } catch {
            i.value = [];
          } finally {
            a.value = !1;
          }
        }, 300));
      }
    );
    const u = E(() => n.groupBy.map((f) => f.name));
    function c(f) {
      const v = (Array.isArray(f) ? f : [f]).map((g) => {
        const m = i.value.find((S) => S.name === g), x = n.groupBy.find((S) => S.name === g);
        return m ?? x ?? { name: g, fieldDataType: "string", fieldContext: "tag" };
      });
      o("change", v);
    }
    const d = E(() => a.value ? ko(Xo, { size: "small" }) : null);
    return (f, p) => (ne(), dt(_(Et), {
      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] = (v) => r.value = v),
      onFocus: p[1] || (p[1] = () => l.value = !0),
      onBlur: p[2] || (p[2] = () => {
        l.value = !1, r.value = "";
      }),
      onChange: c
    }, {
      default: he(() => [
        (ne(!0), xe(Je, null, Ut(i.value, (v) => (ne(), dt(_(Et).Option, {
          key: v.name,
          value: v.name
        }, {
          default: he(() => [
            B("div", Hse, [
              B("span", Vse, oe(v.name), 1),
              B("span", jse, oe([v.fieldContext, v.fieldDataType].filter(Boolean).join(" · ")), 1)
            ])
          ]),
          _: 2
        }, 1032, ["value"]))), 128))
      ]),
      _: 1
    }, 8, ["value", "disabled", "not-found-content"]));
  }
}), Wse = { class: "flex flex-wrap gap-1 items-center" }, Kse = { class: "font-medium" }, _P = /* @__PURE__ */ be({
  __name: "ArgusQueryFunctions",
  props: {
    functions: {},
    signal: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, r = [
      { 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" }
    ], i = [{ 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 = E(
      () => n.signal === "logs" || n.signal === "traces" ? i : r
    );
    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, v) => v === d ? { ...p, args: [{ value: f }] } : p));
    }
    return (d, f) => (ne(), xe("div", Wse, [
      (ne(!0), xe(Je, null, Ut(e.functions, (p, v) => (ne(), xe("div", {
        key: v,
        class: "inline-flex items-center gap-1 rounded px-1.5",
        style: { background: "#eee", "font-size": "12px" }
      }, [
        B("span", Kse, oe(p.name) + "(", 1),
        a[p.name]?.showInput ? (ne(), dt(_(kt), {
          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: (g) => c(v, g.target.value)
        }, null, 8, ["placeholder", "value", "onChange"])) : nt("", !0),
        f[1] || (f[1] = B("span", null, ")", -1)),
        h(_(Ft), {
          class: "p-0!",
          type: "link",
          size: "small",
          danger: "",
          onClick: (g) => u(v)
        }, {
          default: he(() => [
            B("span", {
              class: Pt(_(bt).delete)
            }, null, 2)
          ]),
          _: 1
        }, 8, ["onClick"])
      ]))), 128)),
      h(_(Er), { trigger: "click" }, {
        overlay: he(() => [
          h(_(fo), {
            onClick: f[0] || (f[0] = ({ key: p }) => s(String(p)))
          }, {
            default: he(() => [
              (ne(!0), xe(Je, null, Ut(l.value, (p) => (ne(), dt(_(fo).Item, {
                key: p.value
              }, {
                default: he(() => [
                  Le(oe(p.label), 1)
                ]),
                _: 2
              }, 1024))), 128))
            ]),
            _: 1
          })
        ]),
        default: he(() => [
          h(_(Ft), {
            size: "small",
            type: "dashed"
          }, {
            default: he(() => [
              B("span", {
                class: Pt([_(bt).plus, "mr-0.5"])
              }, null, 2),
              f[2] || (f[2] = Le("函数 ", -1))
            ]),
            _: 1
          })
        ]),
        _: 1
      })
    ]));
  }
}), qse = {
  class: "bg-white p-2",
  style: { border: "1px solid #eee", "border-radius": "6px", "margin-bottom": "6px" }
}, Yse = { class: "flex items-center gap-1 select-none" }, Gse = { class: "flex gap-2 ml-1" }, Use = {
  key: 0,
  style: { "border-top": "1px solid var(--ant-color-border)" }
}, Xse = {
  key: 0,
  class: "flex flex-col gap-2 p-2"
}, Qse = { class: "flex flex-col gap-0.5" }, Zse = { class: "flex items-center gap-1.5" }, Jse = { class: "flex flex-col gap-0.5" }, eue = {
  class: "grid gap-2",
  style: { "grid-template-columns": "1fr 1fr" }
}, tue = { class: "flex flex-col gap-0.5" }, nue = { class: "flex flex-col gap-0.5" }, oue = { class: "flex flex-col gap-0.5" }, rue = {
  class: "grid gap-2",
  style: { "grid-template-columns": "1fr 1fr" }
}, iue = { class: "flex flex-col gap-0.5" }, aue = { class: "flex items-center gap-1" }, lue = { class: "flex flex-col gap-0.5" }, sue = { class: "flex items-center gap-1" }, uue = {
  class: "grid gap-2",
  style: { "grid-template-columns": "1fr auto" }
}, cue = { class: "flex flex-col gap-0.5" }, due = { class: "flex flex-col gap-0.5" }, fue = {
  class: "grid gap-2",
  style: { "grid-template-columns": "1fr 1fr" }
}, pue = { class: "flex flex-col gap-0.5" }, hue = { class: "flex flex-col gap-0.5" }, gue = {
  key: 1,
  class: "flex flex-col gap-2 p-2"
}, vue = { class: "flex flex-col gap-0.5" }, mue = { class: "flex flex-col gap-0.5" }, bue = { class: "flex flex-col gap-1" }, yue = { class: "flex flex-col gap-0.5" }, xue = {
  class: "grid gap-2",
  style: { "grid-template-columns": "1fr auto" }
}, wue = { class: "flex flex-col gap-0.5" }, Sue = { class: "flex flex-col gap-0.5" }, Cue = { class: "flex flex-col gap-0.5" }, $ue = {
  key: 2,
  class: "flex flex-col gap-1.5 p-2"
}, Pue = { class: "flex items-center gap-1.5" }, Oue = {
  key: 3,
  class: "flex flex-col gap-2 p-2"
}, kue = { class: "flex flex-col gap-0.5" }, Iue = {
  class: "grid gap-2",
  style: { "grid-template-columns": "1fr auto" }
}, Tue = { class: "flex flex-col gap-0.5" }, _ue = { class: "flex flex-col gap-0.5" }, Mue = /* @__PURE__ */ be({
  __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, r = E(() => n.item.type === "builder_formula"), i = E(() => n.item.spec.disabled), a = E(() => 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(L) {
      o("change", L);
    }
    function d(L) {
      if (n.item.type !== "builder_query")
        return;
      const F = L === "metrics" ? [{ metricName: "", metricType: "", timeAggregation: "rate", spaceAggregation: "sum" }] : [{ expression: "count()" }];
      c({ ...n.item, spec: { ...n.item.spec, signal: L, aggregations: F } });
    }
    function f(L) {
      n.item.type === "builder_query" && (l.value = L, c({ ...n.item, queryType: L }));
    }
    const p = le([]), v = le(!1);
    Ie(
      [() => n.cfg?.url, () => n.cfg?.token],
      async ([L, F]) => {
        v.value = !0;
        try {
          p.value = await nD({ url: L ?? "", token: F ?? "" });
        } catch {
          p.value = [];
        } finally {
          v.value = !1;
        }
      },
      { immediate: !0 }
    );
    const g = E(
      () => n.item.type === "builder_query" ? n.item.spec : null
    ), m = E(
      () => g.value?.aggregations?.[0] ?? { metricName: "", metricType: "", timeAggregation: "rate", spaceAggregation: "sum" }
    ), x = E(
      () => m.value.metricType === "histogram" || m.value.metricType === "exponential_histogram"
    ), S = E(
      () => x.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" }]
    ), C = E(() => x.value ? [] : m.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 P(L, F) {
      g.value && c({ ...n.item, spec: { ...g.value, [L]: F } });
    }
    function $(L) {
      g.value && P("aggregations", [{ ...m.value, ...L }]);
    }
    function I(L) {
      const A = p.value.find((G) => G.metricName === L)?.type ?? "";
      $({
        metricName: L,
        metricType: A,
        timeAggregation: A === "" ? "" : A === "gauge" ? "latest" : "rate",
        spaceAggregation: A === "histogram" || A === "exponential_histogram" ? "p99" : "sum"
      });
    }
    const w = E(
      () => g.value?.aggregations ?? []
    );
    function T() {
      g.value && P("aggregations", [...w.value, { expression: "count()" }]);
    }
    function M(L) {
      g.value && P("aggregations", w.value.filter((F, A) => A !== L));
    }
    function R(L, F) {
      g.value && P("aggregations", w.value.map((A, G) => G === L ? { expression: F } : A));
    }
    function N(L) {
      if (!L) {
        P("order", []);
        return;
      }
      const F = L.split(" "), A = F[F.length - 1], j = { key: { name: F.slice(0, -1).join(" ") }, direction: A };
      P("order", [j]);
    }
    function H(L) {
      n.item.type === "builder_formula" && o("change", { ...n.item, spec: { ...n.item.spec, ...L } });
    }
    return (L, F) => (ne(), xe("div", qse, [
      B("div", Yse, [
        B("span", {
          class: "flex items-center gap-1.5 flex-1 cursor-pointer",
          onClick: F[2] || (F[2] = (A) => o("toggleCollapse"))
        }, [
          B("span", {
            class: Pt([e.collapsed ? _(bt).chevronRight : _(bt).chevronDown, "text-16px"])
          }, null, 2),
          h(_(Pi), {
            color: r.value ? "purple" : "cyan",
            style: { margin: "0", "font-weight": "600", "font-size": "12px", "line-height": "18px", padding: "0 6px" }
          }, {
            default: he(() => [
              Le(oe(a.value), 1)
            ]),
            _: 1
          }, 8, ["color"]),
          r.value ? nt("", !0) : (ne(), xe(Je, { key: 0 }, [
            B("div", Gse, [
              (ne(), xe(Je, null, Ut(s, (A) => h(_(Ft), {
                key: A.value,
                size: "small",
                type: l.value === A.value ? "primary" : "default",
                style: { "font-size": "12px", height: "22px" },
                onClick: cr((G) => f(A.value), ["stop"])
              }, {
                default: he(() => [
                  Le(oe(A.label), 1)
                ]),
                _: 2
              }, 1032, ["type", "onClick"])), 64))
            ]),
            l.value === "builder" ? (ne(), dt(_(Et), {
              key: 0,
              size: "small",
              style: { width: "80px" },
              value: e.item.spec.signal,
              options: u,
              onClick: F[0] || (F[0] = cr(() => {
              }, ["stop"])),
              onChange: F[1] || (F[1] = (A) => d(A))
            }, null, 8, ["value"])) : nt("", !0),
            F[32] || (F[32] = B("div", { class: "flex-1" }, null, -1))
          ], 64))
        ]),
        h(_(Ft), {
          class: "p-0!",
          size: "small",
          type: "link",
          onClick: F[3] || (F[3] = cr((A) => o("toggleDisabled"), ["stop"]))
        }, {
          default: he(() => [
            B("span", {
              class: Pt(i.value ? _(bt).viewOff : _(bt).view)
            }, null, 2)
          ]),
          _: 1
        }),
        h(_(Ft), {
          class: "p-0!",
          size: "small",
          type: "link",
          danger: "",
          disabled: !e.canDelete,
          onClick: F[4] || (F[4] = (A) => o("delete"))
        }, {
          default: he(() => [
            B("span", {
              class: Pt(_(bt).delete)
            }, null, 2)
          ]),
          _: 1
        }, 8, ["disabled"])
      ]),
      e.collapsed ? nt("", !0) : (ne(), xe("div", Use, [
        e.item.type === "builder_query" && l.value === "builder" && e.item.spec.signal === "metrics" && g.value ? (ne(), xe("div", Xse, [
          B("div", Qse, [
            F[33] || (F[33] = B("span", { class: "text-xs text-secondary" }, "指标名称", -1)),
            B("div", Zse, [
              Le(oe(v.value) + " ", 1),
              h(_(Et), {
                "show-search": "",
                "allow-clear": "",
                loading: v.value,
                size: "small",
                style: { flex: "1" },
                placeholder: "指标名称",
                value: m.value.metricName || void 0,
                options: p.value.map((A) => ({
                  value: A.metricName,
                  label: A.metricName
                })),
                "filter-option": (A, G) => String(G?.value ?? "").toLowerCase().includes(A.toLowerCase()),
                onChange: F[5] || (F[5] = (A) => I(A)),
                onClear: F[6] || (F[6] = () => $({
                  metricName: "",
                  metricType: "",
                  timeAggregation: "rate",
                  spaceAggregation: "sum"
                }))
              }, null, 8, ["loading", "value", "options", "filter-option"]),
              m.value.metricType ? (ne(), dt(_(Pi), {
                key: 0,
                style: { "font-size": "10px", margin: "0" }
              }, {
                default: he(() => [
                  Le(oe(m.value.metricType), 1)
                ]),
                _: 1
              })) : nt("", !0)
            ])
          ]),
          B("div", Jse, [
            F[34] || (F[34] = B("span", { class: "text-xs text-secondary" }, "源数据筛选", -1)),
            h(_(kt), {
              size: "small",
              placeholder: "如 host.name = 'my-host'",
              value: g.value.filter.expression,
              onChange: F[7] || (F[7] = (A) => P("filter", { expression: A.target.value }))
            }, null, 8, ["value"])
          ]),
          x.value ? (ne(), xe(Je, { key: 0 }, [
            B("div", eue, [
              B("div", tue, [
                F[35] || (F[35] = B("span", { class: "text-xs text-secondary" }, "跨时序聚合", -1)),
                h(_(Et), {
                  size: "small",
                  value: m.value.spaceAggregation || void 0,
                  options: S.value,
                  disabled: !m.value.metricType,
                  onChange: F[8] || (F[8] = (A) => $({ spaceAggregation: A }))
                }, null, 8, ["value", "options", "disabled"])
              ]),
              B("div", nue, [
                F[36] || (F[36] = B("span", { class: "text-xs text-secondary" }, "分组", -1)),
                h(Qv, {
                  "group-by": g.value.groupBy,
                  cfg: e.cfg,
                  signal: "metrics",
                  "metric-name": m.value.metricName,
                  disabled: !m.value.metricName,
                  onChange: F[9] || (F[9] = (A) => P("groupBy", A))
                }, null, 8, ["group-by", "cfg", "metric-name", "disabled"])
              ])
            ]),
            B("div", oue, [
              F[37] || (F[37] = B("span", { class: "text-xs text-secondary" }, "步长（秒）", -1)),
              h(_(_o), {
                size: "small",
                style: { width: "100%" },
                placeholder: "自动",
                value: g.value.stepInterval ?? void 0,
                min: 1,
                onChange: F[10] || (F[10] = (A) => P("stepInterval", A ?? null))
              }, null, 8, ["value"])
            ])
          ], 64)) : (ne(), xe(Je, { key: 1 }, [
            B("div", rue, [
              B("div", iue, [
                F[40] || (F[40] = B("span", { class: "text-xs text-secondary" }, "时序内聚合", -1)),
                B("div", aue, [
                  h(_(Et), {
                    size: "small",
                    style: { flex: "1" },
                    value: m.value.timeAggregation || void 0,
                    options: C.value,
                    disabled: !m.value.metricType,
                    onChange: F[11] || (F[11] = (A) => $({ timeAggregation: A }))
                  }, null, 8, ["value", "options", "disabled"]),
                  F[38] || (F[38] = B("span", { class: "text-xs text-secondary whitespace-nowrap" }, "每隔", -1)),
                  h(_(_o), {
                    size: "small",
                    style: { width: "60px" },
                    placeholder: "自动",
                    value: g.value.stepInterval ?? void 0,
                    min: 1,
                    onChange: F[12] || (F[12] = (A) => P("stepInterval", A ?? null))
                  }, null, 8, ["value"]),
                  F[39] || (F[39] = B("span", { class: "text-xs text-secondary" }, "秒", -1))
                ])
              ]),
              B("div", lue, [
                F[41] || (F[41] = B("span", { class: "text-xs text-secondary" }, "跨时序聚合", -1)),
                B("div", sue, [
                  h(_(Et), {
                    size: "small",
                    style: { width: "80px" },
                    value: m.value.spaceAggregation || void 0,
                    options: S.value,
                    disabled: !m.value.metricType,
                    onChange: F[13] || (F[13] = (A) => $({ spaceAggregation: A }))
                  }, null, 8, ["value", "options", "disabled"]),
                  h(Qv, {
                    "group-by": g.value.groupBy,
                    cfg: e.cfg,
                    signal: "metrics",
                    "metric-name": m.value.metricName,
                    disabled: !m.value.metricName,
                    onChange: F[14] || (F[14] = (A) => P("groupBy", A))
                  }, null, 8, ["group-by", "cfg", "metric-name", "disabled"])
                ])
              ])
            ]),
            B("div", uue, [
              B("div", cue, [
                F[42] || (F[42] = B("span", { class: "text-xs text-secondary" }, "聚合结果筛选", -1)),
                h(_(kt), {
                  size: "small",
                  placeholder: "如 sum > 100",
                  value: g.value.having?.expression ?? "",
                  onChange: F[15] || (F[15] = (A) => P("having", { expression: A.target.value }))
                }, null, 8, ["value"])
              ]),
              B("div", due, [
                F[43] || (F[43] = B("span", { class: "text-xs text-secondary" }, "条数", -1)),
                h(_(_o), {
                  size: "small",
                  style: { width: "80px" },
                  placeholder: "∞",
                  value: g.value.limit ?? void 0,
                  min: 1,
                  onChange: F[16] || (F[16] = (A) => P("limit", A ?? void 0))
                }, null, 8, ["value"])
              ])
            ]),
            B("div", fue, [
              B("div", pue, [
                F[44] || (F[44] = B("span", { class: "text-xs text-secondary" }, "排序", -1)),
                h(_(Et), {
                  size: "small",
                  "allow-clear": "",
                  placeholder: "字段 升序/降序",
                  value: g.value.order[0] ? `${g.value.order[0].key.name} ${g.value.order[0].direction}` : void 0,
                  options: [
                    { value: "value asc", label: "值 升序" },
                    { value: "value desc", label: "值 降序" }
                  ],
                  onChange: F[17] || (F[17] = (A) => N(A)),
                  onClear: F[18] || (F[18] = () => P("order", []))
                }, null, 8, ["value"])
              ]),
              B("div", hue, [
                F[45] || (F[45] = B("span", { class: "text-xs text-secondary" }, "图例", -1)),
                h(_(kt), {
                  size: "small",
                  placeholder: "{{label}}",
                  value: g.value.legend,
                  onChange: F[19] || (F[19] = (A) => P("legend", A.target.value))
                }, null, 8, ["value"])
              ])
            ])
          ], 64)),
          h(_P, {
            functions: g.value.functions,
            signal: g.value.signal,
            onChange: F[20] || (F[20] = (A) => P("functions", A))
          }, null, 8, ["functions", "signal"])
        ])) : e.item.type === "builder_query" && l.value === "builder" && g.value ? (ne(), xe("div", gue, [
          B("div", vue, [
            F[46] || (F[46] = B("span", { class: "text-xs text-secondary" }, "过滤条件", -1)),
            h(_(kt), {
              size: "small",
              placeholder: "过滤表达式",
              value: g.value.filter.expression,
              onChange: F[21] || (F[21] = (A) => P("filter", { expression: A.target.value }))
            }, null, 8, ["value"])
          ]),
          B("div", mue, [
            F[49] || (F[49] = B("span", { class: "text-xs text-secondary" }, "聚合表达式", -1)),
            B("div", bue, [
              (ne(!0), xe(Je, null, Ut(w.value, (A, G) => (ne(), xe("div", {
                key: G,
                class: "flex items-center gap-1"
              }, [
                h(_(kt), {
                  size: "small",
                  style: { flex: "1" },
                  placeholder: "如 count() / avg(body)",
                  value: A.expression,
                  onChange: (j) => R(G, j.target.value)
                }, null, 8, ["value", "onChange"]),
                w.value.length > 1 ? (ne(), dt(_(Ft), {
                  key: 0,
                  size: "small",
                  type: "text",
                  danger: "",
                  onClick: (j) => M(G)
                }, {
                  default: he(() => [...F[47] || (F[47] = [
                    Le(" × ", -1)
                  ])]),
                  _: 1
                }, 8, ["onClick"])) : nt("", !0)
              ]))), 128)),
              h(_(Ft), {
                size: "small",
                type: "dashed",
                style: { "align-self": "flex-start" },
                onClick: T
              }, {
                default: he(() => [
                  B("span", {
                    class: Pt([_(bt).plus, "mr-0.5"])
                  }, null, 2),
                  F[48] || (F[48] = Le("添加聚合 ", -1))
                ]),
                _: 1
              })
            ])
          ]),
          B("div", yue, [
            F[50] || (F[50] = B("span", { class: "text-xs text-secondary" }, "分组", -1)),
            h(Qv, {
              "group-by": g.value.groupBy,
              cfg: e.cfg,
              signal: g.value.signal,
              onChange: F[22] || (F[22] = (A) => P("groupBy", A))
            }, null, 8, ["group-by", "cfg", "signal"])
          ]),
          B("div", xue, [
            B("div", wue, [
              F[51] || (F[51] = B("span", { class: "text-xs text-secondary" }, "聚合结果筛选", -1)),
              h(_(kt), {
                size: "small",
                placeholder: "如 count > 100",
                value: g.value.having?.expression ?? "",
                onChange: F[23] || (F[23] = (A) => P("having", { expression: A.target.value }))
              }, null, 8, ["value"])
            ]),
            B("div", Sue, [
              F[52] || (F[52] = B("span", { class: "text-xs text-secondary" }, "条数", -1)),
              h(_(_o), {
                size: "small",
                style: { width: "80px" },
                placeholder: "∞",
                value: g.value.limit ?? void 0,
                min: 1,
                onChange: F[24] || (F[24] = (A) => P("limit", A ?? void 0))
              }, null, 8, ["value"])
            ])
          ]),
          B("div", Cue, [
            F[53] || (F[53] = B("span", { class: "text-xs text-secondary" }, "图例", -1)),
            h(_(kt), {
              size: "small",
              placeholder: "{{label}}",
              value: g.value.legend,
              onChange: F[25] || (F[25] = (A) => P("legend", A.target.value))
            }, null, 8, ["value"])
          ]),
          h(_P, {
            functions: g.value.functions,
            signal: g.value.signal,
            onChange: F[26] || (F[26] = (A) => P("functions", A))
          }, null, 8, ["functions", "signal"])
        ])) : e.item.type === "builder_query" && l.value !== "builder" ? (ne(), xe("div", $ue, [
          h(_(kt).TextArea, {
            rows: 4,
            placeholder: l.value === "promql" ? "输入 PromQL 查询语句…" : "输入 ClickHouse SQL 查询语句…",
            value: e.item.rawQuery ?? "",
            style: { "font-family": "monospace", "font-size": "12px" },
            onChange: F[27] || (F[27] = (A) => o("change", { ...e.item, rawQuery: A.target.value }))
          }, null, 8, ["placeholder", "value"]),
          B("div", Pue, [
            F[54] || (F[54] = B("span", { class: "text-xs text-secondary whitespace-nowrap" }, "图例格式", -1)),
            h(_(kt), {
              size: "small",
              style: { flex: "1" },
              placeholder: "{{label}}",
              value: e.item.rawLegend ?? "",
              onChange: F[28] || (F[28] = (A) => o("change", { ...e.item, rawLegend: A.target.value }))
            }, null, 8, ["value"])
          ])
        ])) : e.item.type === "builder_formula" ? (ne(), xe("div", Oue, [
          B("div", kue, [
            F[55] || (F[55] = B("span", { class: "text-xs text-secondary" }, "表达式", -1)),
            h(_(kt), {
              size: "small",
              placeholder: "如 A + B",
              value: e.item.spec.expression,
              onChange: F[29] || (F[29] = (A) => o("change", {
                ...e.item,
                spec: { ...e.item.spec, expression: A.target.value }
              }))
            }, null, 8, ["value"])
          ]),
          B("div", Iue, [
            B("div", Tue, [
              F[56] || (F[56] = B("span", { class: "text-xs text-secondary" }, "图例", -1)),
              h(_(kt), {
                size: "small",
                placeholder: "图例格式",
                value: e.item.spec.legend,
                onChange: F[30] || (F[30] = (A) => H({ legend: A.target.value }))
              }, null, 8, ["value"])
            ]),
            B("div", _ue, [
              F[57] || (F[57] = B("span", { class: "text-xs text-secondary" }, "条数", -1)),
              h(_(_o), {
                size: "small",
                style: { width: "80px" },
                placeholder: "∞",
                value: e.item.spec.limit ?? void 0,
                min: 1,
                onChange: F[31] || (F[31] = (A) => H({ limit: A ?? void 0 }))
              }, null, 8, ["value"])
            ])
          ])
        ])) : nt("", !0)
      ]))
    ]));
  }
}), Eue = { class: "flex flex-col gap-2 p-1" }, Due = {
  key: 0,
  class: "flex items-center gap-2 mb-1"
}, Aue = { class: "flex gap-1.5 mt-1" }, Nue = "ABCDEFGHIJKLMNOPQRSTUVWXYZ", Rue = /* @__PURE__ */ be({
  __name: "ArgusQueryEditor",
  props: {
    query: {},
    datasourceId: {},
    isChart: { type: Boolean }
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, { config: r } = tc(), i = E(
      () => (r.value.datasourceConfig ?? []).filter((x) => x.type === "argus")
    ), a = le(/* @__PURE__ */ new Set());
    function l(x) {
      return {
        name: x,
        signal: "metrics",
        stepInterval: null,
        disabled: !1,
        filter: { expression: "" },
        having: { expression: "" },
        groupBy: [],
        order: [],
        legend: "",
        functions: [],
        aggregations: [{ metricName: "", metricType: "", timeAggregation: "rate", spaceAggregation: "sum" }]
      };
    }
    function s(x) {
      return { name: x, expression: "", disabled: !1, legend: "", order: [] };
    }
    function u(x, S) {
      o("change", { ...n.query, [x]: S });
    }
    function c() {
      const x = n.query.queries.filter((P) => P.type === "builder_query"), S = Nue[x.length] ?? `Q${x.length}`, C = { type: "builder_query", spec: l(S) };
      o("change", { ...n.query, queries: [...n.query.queries, C] });
    }
    function d() {
      const S = `F${n.query.queries.filter((P) => P.type === "builder_formula").length + 1}`, C = { type: "builder_formula", spec: s(S) };
      o("change", { ...n.query, queries: [...n.query.queries, C] });
    }
    function f(x) {
      o("change", { ...n.query, queries: n.query.queries.filter((S) => S.spec.name !== x) });
    }
    function p(x) {
      o("change", {
        ...n.query,
        queries: n.query.queries.map((S) => S.spec.name === x.spec.name ? x : S)
      });
    }
    function v(x) {
      const S = new Set(a.value);
      S.has(x) ? S.delete(x) : S.add(x), a.value = S;
    }
    function g(x) {
      p({ ...x, spec: { ...x.spec, disabled: !x.spec.disabled } });
    }
    const m = E(() => {
      const x = (r.value.datasourceConfig ?? []).filter((C) => C.type === "argus");
      if (!x.length)
        return null;
      const S = x.find((C) => C.uid === n.datasourceId) ?? x.find((C) => C.default) ?? x[0];
      return { url: S.url, token: S.token };
    });
    return (x, S) => (ne(), xe("div", Eue, [
      i.value.length > 1 ? (ne(), xe("div", Due, [
        S[1] || (S[1] = B("span", { class: "text-xs text-secondary whitespace-nowrap" }, "数据源", -1)),
        h(_(Et), {
          size: "small",
          style: { width: "180px" },
          value: e.query.datasourceId,
          options: i.value.map((C) => ({ value: C.uid, label: C.name })),
          onChange: S[0] || (S[0] = (C) => u("datasourceId", C))
        }, null, 8, ["value", "options"])
      ])) : nt("", !0),
      (ne(!0), xe(Je, null, Ut(e.query.queries, (C) => (ne(), dt(Mue, {
        key: C.spec.name,
        item: C,
        cfg: m.value,
        collapsed: a.value.has(C.spec.name),
        "can-delete": e.query.queries.length > 1,
        onToggleCollapse: () => v(C.spec.name),
        onToggleDisabled: () => g(C),
        onDelete: () => f(C.spec.name),
        onChange: p
      }, null, 8, ["item", "cfg", "collapsed", "can-delete", "onToggleCollapse", "onToggleDisabled", "onDelete"]))), 128)),
      B("div", Aue, [
        h(_(Ft), {
          size: "small",
          type: "dashed",
          onClick: c
        }, {
          default: he(() => [
            B("span", {
              class: Pt([_(bt).plus, "mr-1"])
            }, null, 2),
            S[2] || (S[2] = Le("基础查询 ", -1))
          ]),
          _: 1
        }),
        h(_(Ft), {
          size: "small",
          type: "dashed",
          onClick: d
        }, {
          default: he(() => [
            B("span", {
              class: Pt([_(bt).plus, "mr-1"])
            }, null, 2),
            S[3] || (S[3] = Le("衍生算式 ", -1))
          ]),
          _: 1
        })
      ])
    ]));
  }
}), zue = { style: { "padding-top": "6px" } }, Fue = { class: "inline-flex items-center gap-1.5 mb-2" }, Bue = { class: "text-xs text-secondary" }, Lue = {
  key: 0,
  class: "inline-flex items-center gap-1.5 mb-0 ml-2"
}, Hue = { class: "text-xs text-secondary" }, Vue = {
  key: 1,
  class: "inline-flex items-center gap-1.5 mb-0 ml-2"
}, jue = { class: "text-xs text-secondary" }, Wue = {
  class: "text-xs text-secondary",
  style: { "min-width": "28px" }
}, Kue = /* @__PURE__ */ be({
  __name: "MockQueryEditor",
  props: {
    query: {},
    datasourceId: {},
    isChart: { type: Boolean }
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t, { t: o } = sn(), r = E(() => [
      { 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 (i, a) => (ne(), xe("div", zue, [
      B("div", Fue, [
        B("span", Bue, oe(_(o)("qb.pattern")), 1),
        h(_(Et), {
          size: "small",
          style: { width: "140px" },
          value: e.query.pattern,
          options: r.value,
          onChange: a[0] || (a[0] = (l) => n("change", { ...e.query, pattern: l }))
        }, null, 8, ["value", "options"])
      ]),
      e.isChart ? (ne(), xe("div", Lue, [
        B("span", Hue, oe(_(o)("qb.seriesCount")), 1),
        h(_(yr), {
          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"])
      ])) : nt("", !0),
      e.query.pattern === "live" ? (ne(), xe("div", Vue, [
        B("span", jue, oe(_(o)("qb.liveAmplitude")), 1),
        h(_(yr), {
          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", Wue, oe((e.query.liveAmplitude ?? 1).toFixed(1)) + "x ", 1)
      ])) : nt("", !0)
    ]));
  }
}), rs = /* @__PURE__ */ be({
  __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, r = le(n.displayValue ?? n.value ?? "");
    Ie(
      [() => n.value, () => n.displayValue],
      ([s, u]) => {
        r.value = u ?? s ?? "";
      }
    );
    function i(s, u) {
      return s.toLowerCase().includes(u.toLowerCase());
    }
    const a = E(() => {
      const s = r.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) => i(p.label, s)) })).filter((f) => f.options.length > 0) : n.groups;
      return [...c, ...d];
    }), l = E(
      () => a.value.map((s) => ({
        label: s.label,
        options: s.options
      }))
    );
    return (s, u) => (ne(), dt(_(Et), {
      size: "small",
      style: { width: "100%" },
      "show-search": "",
      "allow-clear": "",
      "filter-option": !1,
      value: e.value || void 0,
      "search-value": r.value,
      placeholder: e.placeholder,
      loading: e.loading,
      disabled: e.disabled,
      options: l.value,
      onFocus: u[0] || (u[0] = () => {
        r.value = e.displayValue ?? e.value ?? "";
      }),
      onSearch: u[1] || (u[1] = (c) => {
        r.value = c;
      }),
      onChange: u[2] || (u[2] = (c) => {
        r.value = String(c ?? ""), o("change", String(c));
      }),
      onClear: u[3] || (u[3] = () => {
        r.value = "", o("clear");
      })
    }, null, 8, ["value", "search-value", "placeholder", "loading", "disabled", "options"]));
  }
}), que = { class: "flex flex-wrap items-center gap-1.5 mt-1" }, Yue = { class: "text-xs text-secondary" }, Gue = { class: "font-medium text-blue lh-1" }, Uue = /* @__PURE__ */ be({
  __name: "FunctionsEditor",
  props: {
    functions: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, { t: r } = sn();
    function i(p, v) {
      return v.length === 0 ? `${p.name}()` : `${p.name}(${v.join(", ")})`;
    }
    function a(p) {
      return { def: p, params: [...p.defaultParams], text: i(p, p.defaultParams) };
    }
    function l(p) {
      const v = p.filter((m) => m.def.category === "Alias");
      return [...p.filter((m) => m.def.category !== "Alias"), ...v];
    }
    function s(p) {
      const v = Uw.find((m) => m.name === p);
      if (!v)
        return;
      const g = a(v);
      o("change", l([...n.functions, g]));
    }
    function u(p, v, g) {
      const m = n.functions.map((x, S) => {
        if (S !== p)
          return x;
        const C = [...x.params];
        return C[v] = g, { ...x, params: C, text: i(x.def, C) };
      });
      o("change", m);
    }
    function c(p) {
      o("change", n.functions.filter((v, g) => g !== p));
    }
    function d(p, v) {
      const g = p + v;
      if (g < 0 || g >= n.functions.length)
        return;
      const m = [...n.functions];
      [m[p], m[g]] = [m[g], m[p]], o("change", m);
    }
    const f = E(
      () => vB.map((p) => ({
        key: p,
        label: p,
        children: Uw.filter((v) => v.category === p).map((v) => ({ key: v.name, label: v.name }))
      }))
    );
    return (p, v) => (ne(), xe("div", que, [
      B("span", Yue, oe(_(r)("qb.functions")), 1),
      (ne(!0), xe(Je, null, Ut(e.functions, (g, m) => (ne(), xe("div", {
        key: m,
        class: "inline-flex items-center gap-0.5 rounded px-1",
        style: { background: "#eee", "font-size": "12px" }
      }, [
        h(_(Ft), {
          type: "text",
          size: "small",
          class: "p-0!",
          disabled: m === 0,
          onClick: (x) => d(m, -1)
        }, {
          default: he(() => [
            B("span", {
              class: Pt(_(bt).chevronLeft)
            }, null, 2)
          ]),
          _: 1
        }, 8, ["disabled", "onClick"]),
        B("span", Gue, oe(g.def.name), 1),
        v[1] || (v[1] = B("span", { class: "text-yellow" }, "(", -1)),
        (ne(!0), xe(Je, null, Ut(g.def.params, (x, S) => (ne(), xe(Je, { key: S }, [
          x.options ? (ne(), dt(_(Et), {
            key: 0,
            size: "small",
            value: String(g.params[S] ?? x.options[0]),
            options: x.options.map((C) => ({ value: String(C), label: String(C) })),
            "popup-match-select-width": "false",
            bordered: !1,
            variant: "borderless",
            style: { "min-width": "60px" },
            onChange: (C) => u(m, S, C)
          }, null, 8, ["value", "options", "onChange"])) : (ne(), dt(_(kt), {
            key: 1,
            class: "text-green text-center",
            size: "small",
            bordered: !1,
            value: String(g.params[S] ?? ""),
            style: { width: "40px", padding: "0 4px", height: "20px" },
            variant: "borderless",
            onChange: (C) => u(m, S, C.target.value)
          }, null, 8, ["value", "onChange"]))
        ], 64))), 128)),
        v[2] || (v[2] = B("span", { class: "text-yellow font-medium" }, ")", -1)),
        h(_(Ft), {
          type: "text",
          size: "small",
          class: "p-0!",
          disabled: m === e.functions.length - 1,
          onClick: (x) => d(m, 1)
        }, {
          default: he(() => [
            B("span", {
              class: Pt(_(bt).chevronRight)
            }, null, 2)
          ]),
          _: 1
        }, 8, ["disabled", "onClick"]),
        h(_(Ft), {
          type: "text",
          size: "small",
          class: "p-0!",
          danger: "",
          onClick: (x) => c(m)
        }, {
          default: he(() => [
            B("span", {
              class: Pt(_(bt).delete)
            }, null, 2)
          ]),
          _: 1
        }, 8, ["onClick"])
      ]))), 128)),
      h(_(Er), { trigger: ["click"] }, {
        overlay: he(() => [
          h(_(fo), {
            onClick: v[0] || (v[0] = ({ key: g }) => s(String(g)))
          }, {
            default: he(() => [
              (ne(!0), xe(Je, null, Ut(f.value, (g) => (ne(), dt(_(fo).SubMenu, {
                key: g.key,
                title: g.label
              }, {
                default: he(() => [
                  (ne(!0), xe(Je, null, Ut(g.children, (m) => (ne(), dt(_(fo).Item, {
                    key: m.key
                  }, {
                    default: he(() => [
                      Le(oe(m.label), 1)
                    ]),
                    _: 2
                  }, 1024))), 128))
                ]),
                _: 2
              }, 1032, ["title"]))), 128))
            ]),
            _: 1
          })
        ]),
        default: he(() => [
          h(_(Ft), {
            size: "small",
            type: "dashed"
          }, {
            default: he(() => [
              Le(" + " + oe(_(r)("qb.functions.add")), 1)
            ]),
            _: 1
          })
        ]),
        _: 1
      })
    ]));
  }
}), Xue = { class: "flex flex-wrap items-center gap-0 mt-3" }, Que = { class: "text-xs text-secondary font-medium" }, Zue = { class: "text-xs" }, Jue = { class: "inline-flex items-center gap-1.5 mr-3" }, ece = { class: "text-xs text-secondary whitespace-nowrap" }, tce = { class: "inline-flex items-center gap-1.5 mr-3" }, nce = { class: "text-xs text-secondary whitespace-nowrap" }, oce = { class: "inline-flex items-center gap-1.5 mr-3" }, rce = { class: "text-xs text-secondary whitespace-nowrap" }, ice = { class: "inline-flex items-center gap-1.5 mr-3" }, ace = { class: "text-xs text-secondary whitespace-nowrap" }, lce = {
  key: 1,
  class: "inline-flex items-center gap-1.5 mr-3"
}, sce = { class: "text-xs text-secondary whitespace-nowrap" }, uce = { class: "inline-flex items-center gap-1.5 mr-3" }, cce = { class: "text-xs text-secondary whitespace-nowrap" }, dce = { class: "inline-flex items-center gap-1.5 mr-3" }, fce = { class: "text-xs text-secondary whitespace-nowrap" }, pce = { class: "inline-flex items-center gap-1.5 mr-3" }, hce = { class: "text-xs text-secondary whitespace-nowrap" }, gce = { class: "inline-flex items-center gap-1.5 mr-3" }, vce = { class: "text-xs text-secondary whitespace-nowrap" }, mce = { class: "inline-flex items-center gap-1.5 mr-3" }, bce = { class: "text-xs text-secondary whitespace-nowrap" }, yce = { class: "inline-flex items-center gap-1.5 mr-3" }, xce = { class: "text-xs text-secondary whitespace-nowrap" }, wce = { class: "inline-flex items-center gap-1.5 mr-3" }, Sce = { class: "text-xs text-secondary whitespace-nowrap" }, Cce = { class: "inline-flex items-center gap-1.5 mr-3" }, $ce = { class: "text-xs text-secondary whitespace-nowrap" }, Pce = /* @__PURE__ */ be({
  __name: "OptionsEditor",
  props: {
    queryType: {},
    options: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, { t: r } = sn(), i = le(!0);
    function a(c) {
      o("change", { ...n.options, ...c });
    }
    const l = [
      { value: 2, label: r("qb.ack.all") },
      { value: 0, label: r("qb.ack.unack") },
      { value: 1, label: r("qb.ack.ack") }
    ], s = [
      { value: "default", label: r("qb.sort.default") },
      { value: "lastchange", label: r("qb.sort.lastchange") },
      { value: "severity", label: r("qb.sort.severity") }
    ], u = [
      { value: "default", label: r("qb.trends.default") },
      { value: "true", label: r("qb.trends.true") },
      { value: "false", label: r("qb.trends.false") }
    ];
    return (c, d) => (ne(), xe("div", Xue, [
      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) => i.value = !i.value)
      }, [
        B("span", Que, oe(_(r)("qb.options")), 1),
        B("span", Zue, oe(i.value ? "▸" : "▾"), 1)
      ]),
      B("div", {
        class: "flex flex-wrap items-center overflow-hidden transition-all",
        style: Ht({ maxHeight: i.value ? "200px" : "0" })
      }, [
        e.queryType === "metrics" || e.queryType === "itemid" || e.queryType === "services" ? (ne(), xe(Je, { key: 0 }, [
          B("div", Jue, [
            B("span", ece, oe(_(r)("qb.options.trends")), 1),
            h(_(Et), {
              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", tce, [
            B("span", nce, oe(_(r)("qb.options.showDisabled")), 1),
            h(_(Pa), {
              size: "small",
              checked: !!e.options.showDisabledItems,
              onChange: d[2] || (d[2] = (f) => a({ showDisabledItems: f }))
            }, null, 8, ["checked"])
          ]),
          B("div", oce, [
            B("span", rce, oe(_(r)("qb.options.valueMapping")), 1),
            h(_(Pa), {
              size: "small",
              checked: !!e.options.useZabbixValueMapping,
              onChange: d[3] || (d[3] = (f) => a({ useZabbixValueMapping: f }))
            }, null, 8, ["checked"])
          ]),
          B("div", ice, [
            B("span", ace, oe(_(r)("qb.options.disableAlignment")), 1),
            h(_(Pa), {
              size: "small",
              checked: !!e.options.disableDataAlignment,
              onChange: d[4] || (d[4] = (f) => a({ disableDataAlignment: f }))
            }, null, 8, ["checked"])
          ])
        ], 64)) : nt("", !0),
        e.queryType === "text" ? (ne(), xe("div", lce, [
          B("span", sce, oe(_(r)("qb.options.showDisabled")), 1),
          h(_(Pa), {
            size: "small",
            checked: !!e.options.showDisabledItems,
            onChange: d[5] || (d[5] = (f) => a({ showDisabledItems: f }))
          }, null, 8, ["checked"])
        ])) : nt("", !0),
        e.queryType === "problems" ? (ne(), xe(Je, { key: 2 }, [
          B("div", uce, [
            B("span", cce, oe(_(r)("qb.options.acknowledged")), 1),
            h(_(Et), {
              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", dce, [
            B("span", fce, oe(_(r)("qb.options.sortBy")), 1),
            h(_(Et), {
              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", pce, [
            B("span", hce, oe(_(r)("qb.options.useTimeRange")), 1),
            h(_(Pa), {
              size: "small",
              checked: !!e.options.useTimeRange,
              onChange: d[8] || (d[8] = (f) => a({ useTimeRange: f }))
            }, null, 8, ["checked"])
          ]),
          B("div", gce, [
            B("span", vce, oe(_(r)("qb.options.hostsInMaintenance")), 1),
            h(_(Pa), {
              size: "small",
              checked: !!e.options.hostsInMaintenance,
              onChange: d[9] || (d[9] = (f) => a({ hostsInMaintenance: f }))
            }, null, 8, ["checked"])
          ]),
          B("div", mce, [
            B("span", bce, oe(_(r)("qb.options.hostProxy")), 1),
            h(_(Pa), {
              size: "small",
              checked: !!e.options.hostProxy,
              onChange: d[10] || (d[10] = (f) => a({ hostProxy: f }))
            }, null, 8, ["checked"])
          ]),
          B("div", yce, [
            B("span", xce, oe(_(r)("qb.options.limit")), 1),
            h(_(kt), {
              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)) : nt("", !0),
        e.queryType === "triggers" ? (ne(), xe(Je, { key: 3 }, [
          B("div", wce, [
            B("span", Sce, oe(_(r)("qb.options.acknowledged")), 1),
            h(_(Et), {
              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", Cce, [
            B("span", $ce, oe(_(r)("qb.options.useTimeRange")), 1),
            h(_(Pa), {
              size: "small",
              checked: !!e.options.useTimeRange,
              onChange: d[13] || (d[13] = (f) => a({ useTimeRange: f }))
            }, null, 8, ["checked"])
          ])
        ], 64)) : nt("", !0)
      ], 4)
    ]));
  }
});
function _E(e) {
  const t = Is();
  return E(() => {
    const n = e();
    if (!n)
      return [];
    if (!n.startsWith("$"))
      return [n];
    const o = n.slice(1), r = Object.values(t.variables).find(
      (l) => l.config.name === o
    );
    if (!r)
      return [];
    const i = r.current, a = Array.isArray(i) ? i : [i];
    return a.includes("$__all") ? r.options.map((l) => l.value).filter((l) => l !== "$__all") : a.filter(Boolean);
  });
}
function Oce(e, t) {
  const n = le([]), o = le([]), r = le(!1), i = le(!1), a = _E(() => e().groupId);
  return Ie(
    () => ({ url: t().url, token: t().token }),
    async ({ url: l, token: s }) => {
      if (l) {
        r.value = !0, n.value = [];
        try {
          n.value = await oB({ url: l, token: s });
        } catch {
        } finally {
          r.value = !1;
        }
      }
    },
    { immediate: !0, deep: !0 }
  ), Ie(
    [a, () => t().url, () => t().token],
    async ([l, s, u]) => {
      if (!s || l.length === 0) {
        o.value = [];
        return;
      }
      i.value = !0, o.value = [];
      try {
        o.value = await rB(l, void 0, { url: s, token: u });
      } catch {
      } finally {
        i.value = !1;
      }
    },
    { immediate: !0 }
  ), { groups: n, hosts: o, loadingGroups: r, loadingHosts: i, resolvedGroupIds: a };
}
function kce(e) {
  const { config: t } = tc(), n = E(() => (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 = E(() => {
    const i = zE(e);
    return n.value.find((l) => l.uid === i) ?? n.value[0] ?? { url: "", token: "" };
  }), r = E(
    () => n.value.find((i) => i.isDefault)?.uid ?? n.value[0]?.uid ?? ""
  );
  return { sources: n, cfg: o, defaultUid: r };
}
const Ice = {
  class: "flex flex-col gap-3 p-2",
  style: { "font-size": "12px" }
}, Tce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, _ce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, Mce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, Ece = { key: 0 }, Dce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, Ace = {
  key: 1,
  style: { "max-width": "400px" }
}, Nce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, Rce = {
  class: "grid gap-3",
  style: { "grid-template-columns": "1fr 1fr" }
}, zce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, Fce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, Bce = { class: "flex items-center gap-2" }, Lce = {
  class: "text-secondary",
  style: { "font-size": "11px" }
}, Hce = { key: 3 }, Vce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, jce = { key: 4 }, Wce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, Kce = {
  class: "grid gap-3",
  style: { "grid-template-columns": "1fr 1fr 1fr" }
}, qce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, Yce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, Gce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, Uce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, Xce = { class: "flex flex-wrap gap-1" }, Qce = {
  key: 6,
  class: "grid gap-3",
  style: { "grid-template-columns": "1fr 1fr 1fr" }
}, Zce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, Jce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, ede = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, tde = { key: 7 }, nde = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, ode = {
  key: 8,
  class: "grid gap-3",
  style: { "grid-template-columns": "1fr 1fr" }
}, rde = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, ide = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, ade = /* @__PURE__ */ be({
  __name: "ZabbixQueryEditor",
  props: {
    query: {},
    datasourceId: {},
    isChart: { type: Boolean }
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, { t: r } = sn(), { cfg: i } = kce(() => n.datasourceId), a = Is();
    function l(ie) {
      o("change", { ...n.query, ...ie });
    }
    const s = E(
      () => Object.values(a.variables).map((ie) => ({
        value: `$${ie.config.name}`,
        label: `$${ie.config.name}`
      }))
    );
    function u(ie, re) {
      const te = [];
      return s.value.length > 0 && te.push({ label: "── 变量 ──", options: s.value }), te.push({ label: ie, options: re }), te;
    }
    function c(ie) {
      return typeof ie == "string" && ie.startsWith("$");
    }
    const { groups: d, hosts: f, loadingGroups: p, loadingHosts: v } = Oce(
      () => n.query,
      () => i.value
    ), g = _E(() => n.query.hostId), m = E(
      () => d.value.map((ie) => ({ value: ie.groupid, label: ie.name }))
    ), x = E(
      () => f.value.map((ie) => ({ value: ie.hostid, label: ie.name || ie.host }))
    ), S = le([]), C = le(!1);
    Ie(
      [
        g,
        () => i.value.url,
        () => i.value.token,
        () => n.query.queryType
      ],
      async ([ie, re, te, ve]) => {
        if (ve !== "metrics") {
          S.value = [];
          return;
        }
        if (!ie.length || !re) {
          S.value = [];
          return;
        }
        C.value = !0;
        try {
          S.value = (await Promise.all(
            ie.map(
              (ce) => Ek([ce], void 0, void 0, { url: re, token: te })
            )
          )).flat();
        } catch {
          S.value = [];
        } finally {
          C.value = !1;
        }
      },
      { immediate: !0 }
    );
    const P = E(() => {
      const ie = /* @__PURE__ */ new Set();
      return S.value.flatMap(
        (re) => (re.tags ?? []).map((te) => lB(te))
      ).filter((re) => ie.has(re) ? !1 : (ie.add(re), !0)).map((re) => ({ value: re, label: re }));
    }), $ = E(() => {
      if (!n.query.itemTagsFilter)
        return S.value;
      const [ie, re] = n.query.itemTagsFilter.split(":").map((te) => te.trim());
      return S.value.filter(
        (te) => (te.tags ?? []).some(
          (ve) => ve.tag === ie && (re ? ve.value === re : !0)
        )
      );
    }), I = E(() => {
      const ie = /* @__PURE__ */ new Set();
      return $.value.map((re) => re.name).filter((re) => ie.has(re) ? !1 : (ie.add(re), !0)).map((re) => ({ value: re, label: re }));
    }), w = le([]), T = le(!1);
    Ie(
      [
        () => n.query.hostId,
        () => i.value.url,
        () => i.value.token,
        () => n.query.queryType
      ],
      async ([ie, re, te, ve]) => {
        if (ve !== "text" || !ie || !re) {
          w.value = [];
          return;
        }
        T.value = !0;
        try {
          w.value = await sB([ie], void 0, { url: re, token: te });
        } catch {
          w.value = [];
        } finally {
          T.value = !1;
        }
      },
      { immediate: !0 }
    );
    const M = E(() => {
      const ie = /* @__PURE__ */ new Set();
      return w.value.map((re) => re.name).filter((re) => ie.has(re) ? !1 : (ie.add(re), !0)).map((re) => ({ value: re, label: re }));
    }), R = le([]), N = le(!1);
    Ie(
      [() => i.value.url, () => i.value.token, () => n.query.queryType],
      async ([ie, re, te]) => {
        if (!(te !== "services" || !ie)) {
          N.value = !0;
          try {
            R.value = await cB({ url: ie, token: re });
          } catch {
            R.value = [];
          } finally {
            N.value = !1;
          }
        }
      },
      { immediate: !0 }
    );
    const H = le([]), L = le(!1);
    Ie(
      [
        () => n.query.hostId,
        () => i.value.url,
        () => i.value.token,
        () => n.query.queryType
      ],
      async ([ie, re, te, ve]) => {
        if (ve !== "macros" || !ie || !re) {
          H.value = [];
          return;
        }
        L.value = !0;
        try {
          H.value = await uB([ie], { url: re, token: te });
        } catch {
          H.value = [];
        } finally {
          L.value = !1;
        }
      },
      { immediate: !0 }
    );
    const F = le([]), A = le(!1), G = le([]), j = le(!1);
    Ie(
      [
        () => n.query.hostId,
        () => i.value.url,
        () => i.value.token,
        () => n.query.queryType
      ],
      async ([ie, re, te, ve]) => {
        if (ve !== "lld" || !ie || ie.startsWith("$") || !re) {
          F.value = [];
          return;
        }
        A.value = !0;
        try {
          F.value = await fB([ie], { url: re, token: te });
        } catch {
          F.value = [];
        } finally {
          A.value = !1;
        }
      },
      { immediate: !0 }
    ), Ie(
      [() => n.query.lldRuleId, () => i.value.url, () => i.value.token],
      async ([ie, re, te]) => {
        if (!ie || !re) {
          G.value = [];
          return;
        }
        j.value = !0;
        try {
          const ve = /* @__PURE__ */ new Set();
          G.value = (await Dk(ie, { url: re, token: te })).map((ce) => {
            const fe = ce.key_.includes("[") ? ce.key_.slice(0, ce.key_.indexOf("[")) : ce.key_;
            return { value: fe, label: `${ce.name} (${fe})` };
          }).filter((ce) => ve.has(ce.value) ? !1 : (ve.add(ce.value), !0));
        } catch {
          G.value = [];
        } finally {
          j.value = !1;
        }
      },
      { immediate: !0 }
    );
    const Z = [
      "metrics",
      "text",
      "services",
      "itemid",
      "triggers",
      "problems",
      "macros",
      "lld"
    ], W = [
      "problems",
      "recent",
      "history"
    ], K = {
      problems: "Problems",
      recent: "Recent problems",
      history: "History"
    }, q = [
      { 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" }
    ], U = [
      { value: "status", label: "Status" },
      { value: "sli", label: "SLI" },
      { value: "uptime", label: "Uptime" },
      { value: "downtime", label: "Downtime" },
      { value: "error_budget", label: "Error budget" }
    ], ae = [
      { 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" }
    ], se = E(
      () => ["metrics", "text", "triggers", "problems", "macros", "lld"].includes(
        n.query.queryType
      )
    );
    return (ie, re) => (ne(), xe("div", Ice, [
      B("div", null, [
        B("div", Tce, oe(_(r)("qb.queryType")), 1),
        h(_(Et), {
          size: "small",
          style: { width: "100%" },
          value: e.query.queryType,
          options: Z.map((te) => ({
            value: te,
            label: _(r)(`qb.queryType.${te}`)
          })),
          onChange: re[0] || (re[0] = (te) => l({ queryType: te, itemIds: [], itemNames: [], itemids: "" }))
        }, null, 8, ["value", "options"])
      ]),
      se.value ? (ne(), xe("div", {
        key: 0,
        class: "grid gap-3",
        style: Ht({ gridTemplateColumns: e.query.queryType === "metrics" ? "repeat(3, 1fr)" : "repeat(2, 1fr)" })
      }, [
        B("div", null, [
          B("div", _ce, oe(_(r)("panel.group")), 1),
          h(_(Xo), {
            spinning: _(p),
            size: "small"
          }, {
            default: he(() => [
              h(rs, {
                value: e.query.groupId || void 0,
                "display-value": e.query.groupName || void 0,
                placeholder: _(r)("panel.group.placeholder"),
                groups: u("── 主机组 ──", m.value),
                onChange: re[1] || (re[1] = (te) => l({ groupId: te, groupName: c(te) ? te : _(d).find((ve) => ve.groupid === te)?.name ?? te, hostId: "", hostName: "", itemIds: [], itemNames: [] })),
                onClear: re[2] || (re[2] = () => l({ groupId: "", groupName: "", hostId: "", hostName: "", itemIds: [], itemNames: [] }))
              }, null, 8, ["value", "display-value", "placeholder", "groups"])
            ]),
            _: 1
          }, 8, ["spinning"])
        ]),
        B("div", null, [
          B("div", Mce, oe(_(r)("panel.host")), 1),
          h(_(Xo), {
            spinning: _(v),
            size: "small"
          }, {
            default: he(() => [
              h(rs, {
                value: e.query.hostId || void 0,
                "display-value": e.query.hostName || void 0,
                placeholder: _(r)("panel.host.placeholder"),
                groups: u("── 主机 ──", x.value),
                onChange: re[3] || (re[3] = (te) => l({ hostId: te, hostName: c(te) ? te : _(f).find((ve) => ve.hostid === te)?.name ?? te, itemIds: [], itemNames: [] })),
                onClear: re[4] || (re[4] = () => l({ hostId: "", hostName: "", itemIds: [], itemNames: [] }))
              }, null, 8, ["value", "display-value", "placeholder", "groups"])
            ]),
            _: 1
          }, 8, ["spinning"])
        ]),
        e.query.queryType === "metrics" ? (ne(), xe("div", Ece, [
          B("div", Dce, oe(_(r)("panel.itemTag")), 1),
          h(_(Xo), {
            spinning: C.value,
            size: "small"
          }, {
            default: he(() => [
              h(rs, {
                value: e.query.itemTagsFilter || void 0,
                placeholder: _(r)("panel.itemTag.placeholder"),
                groups: u("── 标签 ──", P.value),
                onChange: re[5] || (re[5] = (te) => l({ itemTagsFilter: te ?? "", itemIds: [], itemNames: [] })),
                onClear: re[6] || (re[6] = () => l({ itemTagsFilter: "", itemIds: [], itemNames: [] }))
              }, null, 8, ["value", "placeholder", "groups"])
            ]),
            _: 1
          }, 8, ["spinning"])
        ])) : nt("", !0)
      ], 4)) : nt("", !0),
      e.query.queryType === "metrics" ? (ne(), xe("div", Ace, [
        B("div", Nce, oe(_(r)("panel.items")), 1),
        h(rs, {
          value: e.query.itemNames[0] || void 0,
          placeholder: _(r)("panel.items.placeholder"),
          groups: u("── 监控项 ──", I.value),
          onChange: re[7] || (re[7] = (te) => l({ itemNames: [te], itemIds: [] })),
          onClear: re[8] || (re[8] = () => l({ itemNames: [], itemIds: [] }))
        }, null, 8, ["value", "placeholder", "groups"])
      ])) : nt("", !0),
      e.query.queryType === "text" ? (ne(), xe(Je, { key: 2 }, [
        B("div", Rce, [
          B("div", null, [
            B("div", zce, oe(_(r)("panel.items")), 1),
            h(_(Xo), {
              spinning: T.value,
              size: "small"
            }, {
              default: he(() => [
                h(rs, {
                  value: e.query.itemNames[0] || void 0,
                  placeholder: _(r)("panel.items.placeholder"),
                  disabled: !e.query.hostId,
                  groups: u("── 监控项 ──", M.value),
                  onChange: re[9] || (re[9] = (te) => l({ itemNames: [te], itemIds: [] })),
                  onClear: re[10] || (re[10] = () => l({ itemNames: [], itemIds: [] }))
                }, null, 8, ["value", "placeholder", "disabled", "groups"])
              ]),
              _: 1
            }, 8, ["spinning"])
          ]),
          B("div", null, [
            B("div", Fce, oe(_(r)("qb.textFilter")), 1),
            h(_(kt), {
              size: "small",
              style: { width: "100%" },
              value: e.query.textFilter,
              onChange: re[11] || (re[11] = (te) => l({ textFilter: te.target.value }))
            }, null, 8, ["value"])
          ])
        ]),
        B("div", Bce, [
          h(_(Eo), {
            checked: e.query.useCaptureGroups,
            onChange: re[12] || (re[12] = (te) => l({ useCaptureGroups: te.target.checked }))
          }, null, 8, ["checked"]),
          B("span", Lce, oe(_(r)("qb.useCaptureGroups")), 1)
        ])
      ], 64)) : nt("", !0),
      e.query.queryType === "itemid" ? (ne(), xe("div", Hce, [
        B("div", Vce, oe(_(r)("qb.itemIds")), 1),
        h(_(kt), {
          size: "small",
          style: { width: "100%" },
          value: e.query.itemids,
          placeholder: _(r)("qb.itemIds.placeholder"),
          onChange: re[13] || (re[13] = (te) => l({ itemids: te.target.value }))
        }, null, 8, ["value", "placeholder"])
      ])) : nt("", !0),
      e.query.queryType === "triggers" ? (ne(), xe("div", jce, [
        B("div", Wce, oe(_(r)("qb.triggerFilter")), 1),
        h(_(kt), {
          size: "small",
          style: { width: "100%" },
          value: e.query.triggerFilter,
          onChange: re[14] || (re[14] = (te) => l({ triggerFilter: te.target.value }))
        }, null, 8, ["value"])
      ])) : nt("", !0),
      e.query.queryType === "problems" ? (ne(), xe(Je, { key: 5 }, [
        B("div", Kce, [
          B("div", null, [
            B("div", qce, oe(_(r)("qb.problemName")), 1),
            h(_(kt), {
              size: "small",
              style: { width: "100%" },
              value: e.query.triggerFilter,
              onChange: re[15] || (re[15] = (te) => l({ triggerFilter: te.target.value }))
            }, null, 8, ["value"])
          ]),
          B("div", null, [
            B("div", Yce, oe(_(r)("qb.tags")), 1),
            h(_(kt), {
              size: "small",
              style: { width: "100%" },
              value: e.query.tagsFilter,
              onChange: re[16] || (re[16] = (te) => l({ tagsFilter: te.target.value }))
            }, null, 8, ["value"])
          ]),
          B("div", null, [
            B("div", Gce, oe(_(r)("qb.show")), 1),
            h(_(Et), {
              size: "small",
              style: { width: "100%" },
              value: e.query.showProblems,
              options: W.map((te) => ({ value: te, label: K[te] })),
              onChange: re[17] || (re[17] = (te) => l({ showProblems: te }))
            }, null, 8, ["value", "options"])
          ])
        ]),
        B("div", null, [
          B("div", Uce, oe(_(r)("qb.severity")), 1),
          B("div", Xce, [
            (ne(), xe(Je, null, Ut(q, (te) => h(_(Pi), {
              key: te.value,
              color: e.query.severities.includes(te.value) ? te.color : void 0,
              class: "cursor-pointer select-none",
              style: Ht({ opacity: e.query.severities.includes(te.value) ? 1 : 0.4 }),
              onClick: () => l({ severities: e.query.severities.includes(te.value) ? e.query.severities.filter((ve) => ve !== te.value) : [...e.query.severities, te.value] })
            }, {
              default: he(() => [
                Le(oe(te.label), 1)
              ]),
              _: 2
            }, 1032, ["color", "style", "onClick"])), 64))
          ])
        ])
      ], 64)) : nt("", !0),
      e.query.queryType === "services" ? (ne(), xe("div", Qce, [
        B("div", null, [
          B("div", Zce, oe(_(r)("qb.itService")), 1),
          h(_(Xo), {
            spinning: N.value,
            size: "small"
          }, {
            default: he(() => [
              h(rs, {
                value: e.query.itServiceFilter || void 0,
                placeholder: _(r)("qb.itService.placeholder"),
                groups: u("── 服务 ──", R.value.map((te) => ({ value: te.name, label: te.name }))),
                onChange: re[18] || (re[18] = (te) => l({ itServiceFilter: te })),
                onClear: re[19] || (re[19] = () => l({ itServiceFilter: "" }))
              }, null, 8, ["value", "placeholder", "groups"])
            ]),
            _: 1
          }, 8, ["spinning"])
        ]),
        B("div", null, [
          B("div", Jce, oe(_(r)("qb.slaProperty")), 1),
          h(_(Et), {
            size: "small",
            style: { width: "100%" },
            value: e.query.slaProperty,
            options: U,
            onChange: re[20] || (re[20] = (te) => l({ slaProperty: te }))
          }, null, 8, ["value"])
        ]),
        B("div", null, [
          B("div", ede, oe(_(r)("qb.slaInterval")), 1),
          h(_(Et), {
            size: "small",
            style: { width: "100%" },
            value: e.query.slaInterval,
            options: ae,
            onChange: re[21] || (re[21] = (te) => l({ slaInterval: te }))
          }, null, 8, ["value"])
        ])
      ])) : nt("", !0),
      e.query.queryType === "macros" ? (ne(), xe("div", tde, [
        B("div", nde, oe(_(r)("qb.macroFilter")), 1),
        h(_(Xo), {
          spinning: L.value,
          size: "small"
        }, {
          default: he(() => [
            h(rs, {
              value: e.query.macroFilter || void 0,
              placeholder: "{$MACRO_NAME}",
              disabled: !e.query.hostId,
              groups: [{ label: "── 宏 ──", options: H.value.map((te) => ({ value: te.macro, label: `${te.macro} = ${te.value}` })) }],
              onChange: re[22] || (re[22] = (te) => l({ macroFilter: te })),
              onClear: re[23] || (re[23] = () => l({ macroFilter: "" }))
            }, null, 8, ["value", "disabled", "groups"])
          ]),
          _: 1
        }, 8, ["spinning"])
      ])) : nt("", !0),
      e.query.queryType === "lld" ? (ne(), xe("div", ode, [
        B("div", null, [
          B("div", rde, oe(_(r)("qb.lld.rule")), 1),
          h(_(Xo), {
            spinning: A.value,
            size: "small"
          }, {
            default: he(() => [
              h(_(Et), {
                size: "small",
                style: { width: "100%" },
                "allow-clear": "",
                "show-search": "",
                value: e.query.lldRuleId || void 0,
                placeholder: _(r)("qb.lld.rule.placeholder"),
                options: F.value.map((te) => ({ value: te.itemid, label: te.name })),
                onChange: re[24] || (re[24] = (te) => l({ lldRuleId: te, lldRuleName: F.value.find((ve) => ve.itemid === te)?.name ?? te, lldItemKeys: [] })),
                onClear: re[25] || (re[25] = () => l({ lldRuleId: "", lldRuleName: "", lldItemKeys: [] }))
              }, null, 8, ["value", "placeholder", "options"])
            ]),
            _: 1
          }, 8, ["spinning"])
        ]),
        B("div", null, [
          B("div", ide, oe(_(r)("qb.lld.itemKeys")), 1),
          h(_(Xo), {
            spinning: j.value,
            size: "small"
          }, {
            default: he(() => [
              h(_(Et), {
                size: "small",
                style: { width: "100%" },
                mode: "multiple",
                "allow-clear": "",
                value: e.query.lldItemKeys ?? [],
                options: G.value,
                onChange: re[26] || (re[26] = (te) => l({ lldItemKeys: te }))
              }, null, 8, ["value", "options"])
            ]),
            _: 1
          }, 8, ["spinning"])
        ])
      ])) : nt("", !0),
      ["metrics", "itemid", "services"].includes(e.query.queryType) ? (ne(), dt(Uue, {
        key: 9,
        functions: e.query.functions ?? [],
        onChange: re[27] || (re[27] = (te) => l({ functions: te }))
      }, null, 8, ["functions"])) : nt("", !0),
      ["macros", "lld"].includes(e.query.queryType) ? nt("", !0) : (ne(), dt(Pce, {
        key: 10,
        "query-type": e.query.queryType,
        options: e.query.options ?? {},
        onChange: re[28] || (re[28] = (te) => l({ options: te }))
      }, null, 8, ["query-type", "options"]))
    ]));
  }
});
class lde {
  type = "argus";
  meta = { type: "argus", displayName: "Argus", icon: "📊" };
  QueryEditor = Rue;
  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 sde {
  type = "zabbix";
  meta = { type: "zabbix", displayName: "Zabbix", icon: "" };
  QueryEditor = ade;
  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(t) {
    const { range: n, targets: o, maxDataPoints: r, scopedVars: i, _dsCfg: a } = t;
    if (!a)
      return { data: [], state: "Done" };
    const l = { url: a.url, token: a.token }, s = Math.floor(n.from / 1e3), u = Math.ceil(n.to / 1e3), c = i ?? {}, d = t._variableStates ?? {}, f = [];
    for (const p of o) {
      const v = bB(p, c, d);
      let g = [];
      if (v.queryType === "itemid" && v.itemids?.trim()) {
        const L = v.itemids.split(",").map((F) => F.trim()).filter(Boolean);
        g = await iB(L, l);
      } else if (v.hostIds.length > 0 && p.itemNames.length > 0) {
        const L = (await Promise.all(
          v.hostIds.map(
            (A) => Ek([A], void 0, void 0, l, v.itemTagsFilter || void 0)
          )
        )).flat(), F = new Set(p.itemNames.filter((A) => !A.startsWith("$")));
        g = L.filter((A) => F.has(A.name));
      }
      if (g.length === 0)
        continue;
      const [m, x] = await Promise.all([
        (await import("./index-DC8q3QWD.js")).getHistory(
          g.map((L) => L.itemid),
          s,
          u,
          l
        ),
        p.options?.useZabbixValueMapping ? dB(l) : Promise.resolve([])
      ]);
      if (m.length === 0)
        continue;
      const S = /* @__PURE__ */ new Map();
      for (const L of x) {
        const F = {};
        for (const A of L.mappings)
          F[A.value] = A.newvalue;
        S.set(L.valuemapid, F);
      }
      const C = pB(m, g.map((L) => L.itemid)), P = Math.max(Math.ceil((u - s) / r), 60), $ = new Map(
        Array.from(C.entries()).map(([L, F]) => [
          L,
          F.length > r ? gB(F, P * 1e3) : F
        ])
      ), I = new Map(
        Array.from($.entries()).map(([L, F]) => [
          L,
          HF(F, s, u, P)
        ])
      ), w = (I.get(g[0].itemid) ?? []).map((L) => L.ts / 1e3), T = {
        timestamps: w,
        series: g.map((L) => {
          const F = I.get(L.itemid) ?? [];
          return { label: L.name, values: F.map((A) => A.value) };
        })
      }, M = eB(T, p.functions ?? []), R = /* @__PURE__ */ new Map();
      M.series.forEach((L, F) => {
        const A = g[F];
        A && R.set(
          A.itemid,
          L.values.map((G, j) => ({ ts: w[j] * 1e3, value: G }))
        );
      });
      const N = g.slice(0, M.series.length), H = tB(R, N, S, p.datasourceId || "A");
      M.series.forEach((L, F) => {
        const A = H.fields[F + 1];
        A?.config && (A.config.displayNameFromDS = L.label);
      }), f.push(H);
    }
    return { data: f, state: "Done" };
  }
}
let MP = !1;
function ude() {
  if (MP)
    return;
  MP = !0, a4();
  const e = new Yz();
  e.QueryEditor = Kue, Mg(e), Mg(new lde()), Mg(new sde());
}
const Bfe = /* @__PURE__ */ be({
  __name: "ArgusBoard",
  props: {
    hideHeader: { type: Boolean, default: !1 },
    canEdit: { type: Boolean, default: !0 },
    theme: { default: null },
    lang: { default: null },
    isEditing: { type: [Boolean, null], default: null },
    initialEditingPanelId: { default: null },
    datasourceConfig: { default: null },
    initialConfig: {},
    renderDefaultDashboard: { type: Boolean },
    presets: {}
  },
  emits: ["save"],
  setup(e, { emit: t }) {
    const n = e, o = t;
    At(() => {
      console.warn(
        "%c ArgusBoard %c v1.0.1 %c 2026/7/8 13:59:27",
        "background:#4096ff;color:#fff;padding:2px 4px;border-radius:3px 0 0 3px;font-weight:bold",
        "background:#1f1f1f;color:#4096ff;padding:2px 4px;font-weight:bold",
        "background:#1f1f1f;color:#888;padding:2px 4px;border-radius:0 3px 3px 0"
      );
    }), ude(), tD(() => ({
      hideHeader: n.hideHeader,
      canEdit: n.canEdit,
      theme: n.theme ?? null,
      lang: n.lang ?? null,
      isEditing: n.isEditing ?? null,
      initialEditingPanelId: n.initialEditingPanelId ?? null,
      datasourceConfig: n.datasourceConfig ?? null,
      initialConfig: n.initialConfig,
      renderDefaultDashboard: n.renderDefaultDashboard,
      presets: n.presets,
      onSave: (c) => o("save", c)
    }));
    const r = ta();
    n.theme && r.setTheme(n.theme);
    const i = E(() => n.theme ?? r.theme);
    Ie(i, (c) => {
      document.documentElement.dataset.theme = c, document.body.dataset.theme = c;
    }, { immediate: !0 });
    const a = le(n.lang ?? "zh");
    JE(a), Ie(() => n.lang, (c) => {
      c && (a.value = c);
    });
    const l = aa();
    function s(c) {
      c ? l.importJSON(
        typeof c == "string" ? c : JSON.stringify(c)
      ) : n.renderDefaultDashboard === !1 && l.importJSON(JSON.stringify({ title: "", panels: {}, layouts: [] }));
    }
    At(() => {
      n.canEdit === !1 ? l.setEditing(!1) : n.isEditing !== null && l.setEditing(n.isEditing ?? !0), s(n.initialConfig), n.initialEditingPanelId && l.setEditingPanel(n.initialEditingPanelId);
    }), Ie(() => n.initialConfig, (c) => {
      s(c);
    });
    const u = E(() => ({
      algorithm: i.value === "dark" ? B$.darkAlgorithm : B$.defaultAlgorithm,
      token: { colorPrimary: "#1677ff", borderRadius: 4 },
      getPopupContainer: () => document.body
    }));
    return (c, d) => (ne(), dt(_(Fa), { theme: u.value }, {
      default: he(() => [
        h(Lse)
      ]),
      _: 1
    }, 8, ["theme"]));
  }
}), cde = { class: "log-toolbar" }, dde = { class: "log-scroller" }, fde = { class: "log-time" }, pde = { class: "log-message" }, hde = {
  key: 0,
  class: "log-empty"
}, gde = /* @__PURE__ */ be({
  __name: "LogViewer",
  props: {
    logs: {},
    maxHeight: { default: 400 }
  },
  setup(e) {
    const t = e, n = le(""), o = le([]), r = E(() => t.logs.filter((a) => !(o.value.length > 0 && !o.value.includes(a.level) || n.value && !a.message.toLowerCase().includes(n.value.toLowerCase())))), i = {
      error: "#ff4d4f",
      warn: "#faad14",
      info: "#52c41a",
      debug: "#8c8c8c"
    };
    return (a, l) => {
      const s = yn("a-input"), u = yn("a-select");
      return ne(), xe("div", {
        class: "log-viewer",
        style: Ht({ maxHeight: `${e.maxHeight}px` })
      }, [
        B("div", cde, [
          h(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"]),
          h(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", dde, [
          (ne(!0), xe(Je, null, Ut(r.value, (c) => (ne(), xe("div", {
            key: c.id,
            class: "log-entry"
          }, [
            B("span", fde, oe(new Date(c.timestamp).toLocaleTimeString()), 1),
            B("span", {
              class: "log-level",
              style: Ht({ color: i[c.level] })
            }, oe(c.level.toUpperCase()), 5),
            B("span", pde, oe(c.message), 1)
          ]))), 128))
        ]),
        r.value.length === 0 ? (ne(), xe("div", hde, " No log entries ")) : nt("", !0)
      ], 4);
    };
  }
}), Lfe = /* @__PURE__ */ Sr(gde, [["__scopeId", "data-v-22a0d40d"]]), vde = {
  key: 0,
  class: "topology-empty"
}, mde = ["width", "height"], bde = { class: "edges" }, yde = ["x1", "y1", "x2", "y2"], xde = ["cx", "cy", "fill", "stroke"], wde = ["x", "y"], Sde = ["x", "y"], Cde = /* @__PURE__ */ be({
  __name: "ServiceTopology",
  props: {
    nodes: { default: () => [] },
    edges: { default: () => [] },
    width: { default: 800 },
    height: { default: 500 }
  },
  setup(e) {
    const t = e, n = le(), o = le({});
    function r() {
      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;
    }
    At(r);
    function i(a) {
      return a ? a > 0.05 ? "#ff4d4f" : a > 0.01 ? "#faad14" : "#52c41a" : "#52c41a";
    }
    return (a, l) => (ne(), xe("div", {
      class: "service-topology",
      style: Ht({ width: `${e.width}px`, height: `${e.height}px` })
    }, [
      e.nodes.length === 0 ? (ne(), xe("div", vde, " No topology data ")) : (ne(), xe("svg", {
        key: 1,
        ref_key: "svgRef",
        ref: n,
        width: e.width,
        height: e.height
      }, [
        B("g", bde, [
          (ne(!0), xe(Je, null, Ut(e.edges, (s) => (ne(), xe("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, yde))), 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)),
        (ne(!0), xe(Je, null, Ut(e.nodes, (s) => (ne(), xe("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: i(s.errorRate),
            "fill-opacity": "0.15",
            stroke: i(s.errorRate),
            "stroke-width": "2"
          }, null, 8, xde),
          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)"
          }, oe(s.name), 9, wde),
          s.latency !== void 0 ? (ne(), xe("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)"
          }, oe(s.latency) + "ms ", 9, Sde)) : nt("", !0)
        ]))), 128))
      ], 8, mde))
    ], 4));
  }
}), Hfe = /* @__PURE__ */ Sr(Cde, [["__scopeId", "data-v-da85d863"]]), $de = { class: "trace-waterfall" }, Pde = {
  key: 0,
  class: "trace-empty"
}, Ode = { class: "trace-name-col" }, kde = { class: "trace-service" }, Ide = { class: "trace-op" }, Tde = { class: "trace-bar-col" }, _de = { class: "trace-dur-col" }, Mde = /* @__PURE__ */ be({
  __name: "TraceWaterfall",
  props: {
    spans: { default: () => [] },
    startTime: {},
    endTime: {}
  },
  setup(e) {
    const t = e, n = E(() => t.startTime ?? Math.min(...t.spans.map((u) => u.startTime))), o = E(() => t.endTime ?? Math.max(...t.spans.map((u) => u.startTime + u.duration))), r = E(() => o.value - n.value);
    function i(u) {
      return (u.startTime - n.value) / r.value * 100;
    }
    function a(u) {
      return Math.max(u.duration / r.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) => (ne(), xe("div", $de, [
      e.spans.length === 0 ? (ne(), xe("div", Pde, " No trace data ")) : (ne(), xe(Je, { 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)),
        (ne(!0), xe(Je, null, Ut(e.spans, (d) => (ne(), xe("div", {
          key: d.spanId,
          class: "trace-row"
        }, [
          B("div", Ode, [
            B("span", kde, oe(d.serviceName), 1),
            B("span", Ide, oe(d.operationName), 1)
          ]),
          B("div", Tde, [
            B("div", {
              class: "trace-bar",
              style: Ht({
                left: `${i(d)}%`,
                width: `${a(d)}%`,
                background: s[d.status ?? "unset"]
              })
            }, null, 4)
          ]),
          B("div", _de, oe(l(d.duration)), 1)
        ]))), 128))
      ], 64))
    ]));
  }
}), Vfe = /* @__PURE__ */ Sr(Mde, [["__scopeId", "data-v-0212681c"]]), jfe = /* @__PURE__ */ be({
  __name: "SimpleChart",
  props: {
    options: {},
    data: {}
  },
  setup(e) {
    const t = e, n = le(), o = le(null), r = le({ width: 0, height: 0 });
    let i = null;
    function a() {
      o.value && (o.value.destroy(), o.value = null);
    }
    return qt(() => {
      i?.disconnect(), a();
    }), It((l) => {
      n.value && (i = new ResizeObserver((s) => {
        const { width: u, height: c } = s[0].contentRect;
        u > 0 && c > 0 && (r.value = { width: Math.floor(u), height: Math.floor(c) });
      }), i.observe(n.value), r.value = {
        width: Math.floor(n.value.getBoundingClientRect().width),
        height: Math.floor(n.value.getBoundingClientRect().height)
      }, l(() => {
        i?.disconnect();
      }));
    }), It((l) => {
      !n.value || r.value.width <= 0 || r.value.height <= 0 || (a(), o.value = new xo(
        { ...t.options, width: r.value.width, height: r.value.height },
        t.data,
        n.value
      ), l(() => {
        a();
      }));
    }), (l, s) => (ne(), xe("div", {
      ref_key: "containerRef",
      ref: n,
      class: "w-full h-full"
    }, null, 512));
  }
}), Ede = { class: "kbd-key" }, Dde = /* @__PURE__ */ be({
  __name: "Kbd",
  props: {
    char: {}
  },
  setup(e) {
    return (t, n) => (ne(), xe("kbd", Ede, [
      lr(t.$slots, "default", {}, () => [
        Le(oe(e.char), 1)
      ], !0)
    ]));
  }
}), Wfe = /* @__PURE__ */ Sr(Dde, [["__scopeId", "data-v-94fb4749"]]), Ade = ["href", "target"], Nde = {
  key: 1,
  class: "panel-links-icon",
  style: { cursor: "pointer" }
}, Rde = { style: { "font-size": "10px", "margin-left": "2px" } }, zde = /* @__PURE__ */ be({
  __name: "PanelLinksIcon",
  props: {
    panel: {}
  },
  setup(e) {
    return (t, n) => e.panel.links && e.panel.links.length > 0 ? (ne(), dt(_(Lo), {
      key: 0,
      title: e.panel.links.map((o) => o.title ?? o.url).join(", ")
    }, {
      default: he(() => [
        e.panel.links.length === 1 ? (ne(), xe("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] = cr(() => {
          }, ["stop"]))
        }, [...n[1] || (n[1] = [
          B("span", {
            class: "i-mdi-link",
            style: { "font-size": "14px" }
          }, null, -1)
        ])], 8, Ade)) : (ne(), xe("span", Nde, [
          n[2] || (n[2] = B("span", {
            class: "i-mdi-link-variant",
            style: { "font-size": "14px" }
          }, null, -1)),
          B("span", Rde, oe(e.panel.links.length), 1)
        ]))
      ]),
      _: 1
    }, 8, ["title"])) : nt("", !0);
  }
}), Kfe = /* @__PURE__ */ Sr(zde, [["__scopeId", "data-v-6925a5a2"]]), Fde = { class: "viz-picker" }, Bde = { class: "viz-picker-title" }, Lde = { class: "viz-picker-grid" }, Hde = ["onClick"], Vde = { class: "viz-picker-label" }, jde = /* @__PURE__ */ be({
  __name: "VizPickerPane",
  setup(e) {
    const { t } = sn(), { panel: n, onChange: o } = gc(), r = [
      { type: "timeseries", icon: bt.chartLine, labelKey: "config.type.timeseries" },
      { type: "bar", icon: bt.chartBar, labelKey: "config.type.bar" },
      { type: "stat", icon: bt.stat, labelKey: "config.type.stat" },
      { type: "gauge", icon: bt.gauge, labelKey: "config.type.gauge" },
      { type: "pie", icon: bt.chartPie, labelKey: "config.type.pie" },
      { type: "table", icon: bt.table, labelKey: "config.type.table" },
      { type: "histogram", icon: bt.chartArea, labelKey: "config.type.histogram" }
    ];
    return (i, a) => (ne(), xe("div", Fde, [
      B("div", Bde, oe(_(t)("editor.vizPicker.title")), 1),
      B("div", Lde, [
        (ne(), xe(Je, null, Ut(r, (l) => B("button", {
          key: l.type,
          class: Pt(["viz-picker-item", { "viz-picker-item--active": _(n).type === l.type }]),
          onClick: (s) => _(o)({ type: l.type })
        }, [
          B("span", {
            class: Pt(["viz-picker-icon", [l.icon]])
          }, null, 2),
          B("span", Vde, oe(_(t)(l.labelKey)), 1)
        ], 10, Hde)), 64))
      ])
    ]));
  }
}), qfe = /* @__PURE__ */ Sr(jde, [["__scopeId", "data-v-1d0d144f"]]);
export {
  zfe as $,
  BO as A,
  jO as B,
  Il as C,
  ws as D,
  VO as E,
  vB as F,
  Gn as G,
  yfe as H,
  kfe as I,
  gB as J,
  Sfe as K,
  Xf as L,
  Yz as M,
  BF as N,
  lm as O,
  Ife as P,
  LO as Q,
  $fe as R,
  sm as S,
  Pfe as T,
  c4 as U,
  LF as V,
  Tfe as W,
  Dfe as X,
  oD as Y,
  Pp as Z,
  Qz as _,
  xz as a,
  fB as a0,
  wfe as a1,
  xfe as a2,
  oB as a3,
  rB as a4,
  cB as a5,
  Dk as a6,
  Ek as a7,
  iB as a8,
  uB as a9,
  kE as aA,
  Bfe as aB,
  Rue as aC,
  Mse as aD,
  Lse as aE,
  Wfe as aF,
  Lfe as aG,
  Kue as aH,
  TP as aI,
  dse as aJ,
  hse as aK,
  Kfe as aL,
  Qb as aM,
  Hfe as aN,
  jfe as aO,
  IE as aP,
  Vfe as aQ,
  OE as aR,
  TE as aS,
  Rle as aT,
  qfe as aU,
  tD as aV,
  bae as aW,
  ude as aX,
  tc as aY,
  Ffe as aZ,
  nD as aa,
  Gz as ab,
  Zz as ac,
  Nfe as ad,
  m4 as ae,
  sB as af,
  Cfe as ag,
  Afe as ah,
  dB as ai,
  pB as aj,
  xa as ak,
  nu as al,
  WO as am,
  lB as an,
  Efe as ao,
  _fe as ap,
  ffe as aq,
  qz as ar,
  a4 as as,
  Mg as at,
  Ql as au,
  HO as av,
  bB as aw,
  bfe as ax,
  b4 as ay,
  Ose as az,
  gfe as b,
  az as c,
  vfe as d,
  Rfe as e,
  Yr as f,
  mfe as g,
  vh as h,
  Uw as i,
  qc as j,
  Mk as k,
  Xi as l,
  pfe as m,
  um as n,
  OF as o,
  DF as p,
  hB as q,
  HF as r,
  eB as s,
  hfe as t,
  Rc as u,
  zF as v,
  tB as w,
  uf as x,
  Ofe as y,
  Mfe as z
};
