@extclp/vexip-ui
Version:
A Vue 3 UI library, Highly customizability, full TypeScript, performance pretty good
1 lines • 3.36 MB
Source Map (JSON)
{"version":3,"file":"vexip-ui.mjs","sources":["../common/utils/src/common.ts","../common/utils/src/color.ts","../common/utils/src/counter.ts","../common/utils/src/data.ts","../common/utils/src/number.ts","../common/utils/src/date.ts","../common/utils/src/deep-clone.ts","../common/utils/src/destroy-object.ts","../common/utils/src/dom-event.ts","../common/utils/src/dom.ts","../common/utils/src/event-emitter.ts","../common/utils/src/log.ts","../common/utils/src/performance.ts","../common/utils/src/support.ts","../common/utils/src/transform.ts","../common/utils/src/word-case.ts","../common/config/src/hover-delay.ts","../common/config/src/locale/zh-CN.ts","../common/config/src/locale/index.ts","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/shared/src/utils.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/defaultAttributes.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/Icon.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/createLucideIcon.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/arrow-left-right.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/calendar.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/check.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/chevron-down.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/chevron-left.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/chevron-right.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/chevron-up.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/chevrons-left.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/chevrons-right.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/circle-alert.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/circle-check.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/circle-help.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/circle-x.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/clock.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/cloud-upload.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/ellipsis.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/eye-off.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/eye.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/file-archive.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/file-code.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/file-image.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/file-music.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/file-text.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/file-video.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/file.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/flip-horizontal.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/flip-vertical.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/fullscreen.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/funnel.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/grip-vertical.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/image.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/indent-decrease.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/indent-increase.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/info.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/loader-circle.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/log-out.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/maximize.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/message-circle-question.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/minimize.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/minus.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/moon.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/pause.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/picture-in-picture.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/play.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/plus.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/refresh-cw.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/repeat-2.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/rotate-ccw.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/rotate-cw.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/search.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/siren.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/skip-back.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/skip-forward.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/square-minus.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/square-plus.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/sun.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/trash-2.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/upload.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/user-round.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/volume-1.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/volume-2.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/volume-x.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/x.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/zoom-in.js","../node_modules/.pnpm/lucide-vue-next@0.511.0_vue@3.5.15_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/zoom-out.js","../common/config/src/icons.ts","../common/bem-helper/src/index.ts","../common/config/src/namespace.ts","../common/config/src/id.ts","../common/config/src/props.ts","../common/config/src/z-index.ts","../components/icon/props.ts","../components/icon/icon.tsx","../components/renderer/props.ts","../components/renderer/renderer.ts","../components/spin/props.ts","../components/spin/spin.vue","../directives/loading/index.ts","../common/hooks/src/listener.ts","../common/hooks/src/clickoutside.ts","../common/hooks/src/display.ts","../common/hooks/src/shared/utils.ts","../common/hooks/src/full-screen.ts","../common/hooks/src/hover.ts","../common/hooks/src/intersection.ts","../common/hooks/src/manual-ref.ts","../common/hooks/src/modifier.ts","../common/hooks/src/mounted.ts","../common/hooks/src/moving.ts","../common/hooks/src/pointer.ts","../node_modules/.pnpm/@floating-ui+utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs","../node_modules/.pnpm/@floating-ui+core@1.7.0/node_modules/@floating-ui/core/dist/floating-ui.core.mjs","../node_modules/.pnpm/@floating-ui+utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","../node_modules/.pnpm/@floating-ui+dom@1.7.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs","../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/utils/resizeObservers.js","../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/algorithms/hasActiveObservations.js","../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/algorithms/hasSkippedObservations.js","../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/algorithms/deliverResizeLoopError.js","../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/ResizeObserverBoxOptions.js","../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/utils/freeze.js","../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/ResizeObserverSize.js","../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/DOMRectReadOnly.js","../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/utils/element.js","../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/utils/global.js","../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/algorithms/calculateBoxSize.js","../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/ResizeObserverEntry.js","../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/algorithms/calculateDepthForNode.js","../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/algorithms/broadcastActiveObservations.js","../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/algorithms/gatherActiveObservationsAtDepth.js","../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/utils/process.js","../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/utils/queueMicroTask.js","../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/utils/queueResizeObserver.js","../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/utils/scheduler.js","../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/ResizeObservation.js","../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/ResizeObserverDetail.js","../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/ResizeObserverController.js","../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/ResizeObserver.js","../common/hooks/src/resize.ts","../common/hooks/src/rtl.ts","../common/hooks/src/popper.ts","../common/hooks/src/theme.ts","../common/hooks/src/timer-record.ts","../common/hooks/src/virtual.ts","../directives/resize/index.ts","../directives/index.ts","../components/affix/props.ts","../components/affix/helpers.ts","../components/affix/affix.vue","../components/collapse/props.ts","../components/collapse/collapse-transition.ts","../components/alert/props.ts","../components/alert/symbol.ts","../components/alert/alert.vue","../components/anchor/props.ts","../components/anchor/symbol.ts","../components/anchor/anchor-link.vue","../components/anchor/helper.ts","../components/anchor/anchor.vue","../components/row/props.ts","../components/row/symbol.ts","../components/row/row.ts","../components/form/props.ts","../components/form/symbol.ts","../components/form/form.vue","../components/form/helper.ts","../components/form/validator.ts","../components/input/props.ts","../components/input/input.tsx","../components/scrollbar/props.ts","../components/scrollbar/symbol.ts","../components/scrollbar/hooks.ts","../components/scrollbar/scrollbar.vue","../components/resize-observer/props.ts","../components/resize-observer/resize-observer.ts","../components/native-scroll/props.ts","../components/native-scroll/helper.ts","../components/native-scroll/hooks.ts","../components/native-scroll/native-scroll.tsx","../components/option/props.ts","../components/option/option.vue","../components/overflow/props.ts","../components/overflow/overflow.tsx","../components/portal/portal.vue","../components/popper/props.ts","../components/popper/popper.vue","../components/popper/popper.vue","../components/tag/props.ts","../components/tag/tag.tsx","../components/tooltip/props.ts","../components/tooltip/tooltip.tsx","../components/virtual-list/props.ts","../components/virtual-list/virtual-list.tsx","../components/select/props.ts","../components/select/symbol.ts","../components/select/select.vue","../components/auto-complete/props.ts","../components/auto-complete/auto-complete.vue","../components/avatar/props.ts","../components/avatar/symbol.ts","../components/avatar/avatar.vue","../components/avatar/avatar-group.vue","../components/badge/props.ts","../components/badge/symbol.ts","../components/badge/badge.vue","../components/breadcrumb/props.ts","../components/breadcrumb/symbol.ts","../components/breadcrumb/breadcrumb-item.vue","../components/breadcrumb/breadcrumb.vue","../components/bubble/props.ts","../components/bubble/symbol.ts","../components/bubble/bubble.vue","../components/button/props.ts","../components/button/symbol.ts","../components/button/button.tsx","../components/button/button-group.vue","../components/row/column.ts","../components/number-input/props.ts","../components/number-input/number-input.vue","../components/calendar/calendar-cell.vue","../components/calendar/props.ts","../components/calendar/calendar-panel.vue","../components/calendar/calendar.vue","../components/captcha/props.ts","../components/captcha/captcha-slider.vue","../components/captcha/hollow-paths.ts","../components/captcha/captcha.tsx","../components/card/props.ts","../components/card/card.vue","../components/carousel/props.ts","../components/carousel/symbol.ts","../components/carousel/carousel.vue","../components/carousel/carousel-item.vue","../components/checkbox/props.ts","../components/checkbox/symbol.ts","../components/checkbox/checkbox.vue","../components/cascader/cascader-panel.vue","../components/cascader/props.ts","../components/cascader/cascader.vue","../components/grid/props.ts","../components/grid/helper.ts","../components/grid/symbol.ts","../components/grid/cell.ts","../components/checkbox/checkbox-group.vue","../components/collapse/symbol.ts","../components/collapse/collapse.vue","../components/collapse/collapse-panel.vue","../components/color-picker/color-palette.vue","../components/color-picker/color-palette.vue","../components/color-picker/color-hue.vue","../components/color-picker/color-hue.vue","../components/color-picker/color-alpha.vue","../components/color-picker/color-alpha.vue","../components/color-picker/props.ts","../components/color-picker/symbol.ts","../components/color-picker/color-picker.vue","../components/config-provider/props.ts","../components/config-provider/config-provider.tsx","../components/masker/props.ts","../components/masker/masker.vue","../components/modal/props.ts","../components/modal/modal.vue","../components/modal/index.ts","../components/confirm/props.ts","../components/confirm/confirm.vue","../components/confirm/index.ts","../components/dropdown/symbol.ts","../components/dropdown/dropdown-drop.ts","../components/dropdown/props.ts","../components/dropdown/hooks.ts","../components/dropdown/dropdown.vue","../components/dropdown/dropdown-list.vue","../components/dropdown/dropdown-item.vue","../components/contextmenu/render.tsx","../components/contextmenu/contextmenu.vue","../components/contextmenu/index.ts","../components/date-picker/symbol.ts","../components/date-picker/helper.ts","../components/date-picker/date-control.vue","../components/scroll/props.ts","../components/scroll/hooks.ts","../components/scroll/symbol.ts","../components/scroll/scroll.vue","../components/wheel/symbol.ts","../components/wheel/wheel-item.vue","../components/wheel/props.ts","../components/wheel/wheel.vue","../components/date-picker/time-wheel.vue","../components/date-picker/date-panel.vue","../components/date-picker/props.ts","../components/date-picker/date-picker.vue","../components/divider/props.ts","../components/divider/divider.vue","../components/drawer/props.ts","../components/drawer/symbol.ts","../components/drawer/drawer.vue","../components/ellipsis/props.ts","../components/ellipsis/ellipsis.vue","../components/form/form-item.vue","../components/form/form-reset.vue","../components/form/form-submit.vue","../components/full-screen/props.ts","../components/full-screen/full-screen.vue","../components/grid/grid.ts","../components/highlight/props.ts","../components/highlight/highlight.vue","../components/viewer/props.ts","../components/viewer/symbol.ts","../components/viewer/viewer.vue","../components/image/props.ts","../components/image/image-viewer.vue","../components/skeleton/props.ts","../components/skeleton/symbol.ts","../components/skeleton/skeleton.tsx","../components/image/symbol.ts","../components/image/image.vue","../components/image/image-group.vue","../components/layout/props.ts","../components/layout/symbol.ts","../components/layout/helper.ts","../components/layout/layout-main.tsx","../components/menu/props.ts","../components/menu/symbol.ts","../components/menu/menu-item.tsx","../components/menu/menu-group.tsx","../components/menu/menu-rest.tsx","../components/menu/menu.tsx","../components/switch/props.ts","../components/switch/switch.vue","../components/layout/layout-header.tsx","../components/linker/props.ts","../components/linker/linker.vue","../components/layout/layout-footer.tsx","../components/layout/layout-aside.tsx","../components/layout/layout.tsx","../components/loading/loading.vue","../components/loading/index.ts","../components/popup/symbol.ts","../components/popup/popup-item.vue","../components/popup/popup.vue","../components/message/symbol.ts","../components/message/message.vue","../components/message/index.ts","../components/notice/symbol.ts","../components/notice/notice.vue","../components/notice/index.ts","../components/option/option-group.vue","../components/pagination/props.ts","../components/pagination/pagination.tsx","../components/progress/props.ts","../components/progress/symbol.ts","../components/progress/progress.vue","../components/radio/props.ts","../components/radio/symbol.ts","../components/radio/radio.vue","../components/radio/radio-group.vue","../components/result/props.ts","../components/result/symbol.ts","../components/result/result.vue","../components/skeleton/skeleton-group.ts","../components/slider/slider-trigger.vue","../components/slider/props.ts","../components/slider/slider.vue","../components/space/props.ts","../components/space/space.tsx","../components/split/props.ts","../components/split/split.vue","../components/split/split.vue","../components/tab-nav/props.ts","../components/tab-nav/symbol.ts","../components/tab-nav/tab-nav-item.vue","../components/tab-nav/tab-nav.vue","../components/tabs/props.ts","../components/tabs/symbol.ts","../components/tabs/tab-panel.vue","../components/table/props.ts","../components/table/symbol.ts","../components/table/table-column.ts","../components/table/table-column-group.tsx","../components/table/table-summary.ts","../components/table/table-icon.vue","../components/table/table-head-cell.vue","../components/table/table-row.vue","../components/table/table-head.vue","../components/table/table-cell.vue","../components/table/table-body.vue","../components/table/table-foot-cell.vue","../components/table/table-foot.vue","../components/tree/hooks.ts","../components/table/store.ts","../components/table/table.vue","../components/table/helper.ts","../components/tabs/tabs.vue","../components/textarea/props.ts","../components/textarea/textarea.vue","../components/time-ago/helper.ts","../components/time-ago/props.ts","../components/time-ago/time-ago.vue","../components/date-picker/time-control.vue","../components/date-picker/time-picker.vue","../components/timeline/props.ts","../components/timeline/symbol.ts","../components/timeline/timeline.vue","../components/timeline/timeline-item.vue","../components/toast/props.ts","../components/toast/symbol.ts","../components/toast/toast.vue","../components/toast/index.ts","../components/tour/props.ts","../components/tour/symbol.ts","../components/tour/tour.vue","../components/tour/tour-step.ts","../components/transfer/transfer-panel.tsx","../components/transfer/props.ts","../components/transfer/transfer.tsx","../components/tree/symbol.ts","../components/tree/tree-node.vue","../components/tree/props.ts","../components/tree/tree.vue","../components/upload/props.ts","../components/upload/file-icon.ts","../components/upload/symbol.ts","../components/upload/upload-file.vue","../components/upload/upload-list.vue","../components/upload/request.ts","../components/upload/upload.tsx","../components/video/props.ts","../components/video/symbol.ts","../components/video/video-control.vue","../components/video/helper.ts","../components/video/video-progress.vue","../components/video/video-timer.vue","../components/video/video-volume.vue","../components/video/video.tsx","../components/typography/props.ts","../components/typography/title.tsx","../components/typography/text.tsx","../components/typography/blockquote.tsx","../components/typography/ol.tsx","../components/typography/ul.tsx","../components/typography/h.tsx","../components/typography/p.tsx","../components/typography/strong.tsx","../components/create.ts","../components/version.ts","../components/index.ts"],"sourcesContent":["/** 当前环境是否为客户端 */\r\nexport const isClient = typeof window !== 'undefined'\r\n/** 当前环境是否为 IOS */\r\nexport const isIOS =\r\n /* #__PURE__ */ isClient &&\r\n window?.navigator?.userAgent &&\r\n /iP(ad|hone|od)/.test(window.navigator.userAgent)\r\n\r\nconst toString = Object.prototype.toString\r\nconst hasOwnProperty = Object.prototype.hasOwnProperty\r\n\r\n/**\r\n * 判断一个值是否为指定的类型\r\n *\r\n * @param value 需判断的值\r\n * @param type 指定的类型,注意大小写\r\n *\r\n * @returns 类型是否匹配\r\n */\r\nexport function is(value: unknown, type: string) {\r\n return toString.call(value) === `[object ${type}]`\r\n}\r\n\r\n/**\r\n * 判断一个对象是否包含指定的键值\r\n *\r\n * @param value 需判断的对象\r\n * @param key 指定的键值\r\n *\r\n * @returns 是否包含键值\r\n */\r\nexport function has(value: Record<string, any>, key: string | symbol): key is keyof typeof value {\r\n return hasOwnProperty.call(value, key)\r\n}\r\n\r\n/**\r\n * 判断一个值是否已定义\r\n *\r\n * @param value 需判断的值\r\n *\r\n * @returns 是否已定义\r\n */\r\nexport function isDefined<T = unknown>(\r\n value: T | undefined | null,\r\n): value is Exclude<T, undefined | null> {\r\n return value !== undefined && value !== null\r\n}\r\n\r\n/**\r\n * 判断一个值是否未被定义\r\n *\r\n * @param value 需判断的值\r\n *\r\n * @returns 是否未定义\r\n */\r\nexport function isNull(value: unknown): value is null | undefined {\r\n return value === undefined || value === null\r\n}\r\n\r\n/**\r\n * 判断一个值是否为数字\r\n *\r\n * @param value 需判断的值\r\n *\r\n * @returns 是否为数字\r\n */\r\nexport function isNumber(value: unknown): value is number {\r\n return typeof value === 'number'\r\n}\r\n\r\n/**\r\n * 判断一个值是否为 `NaN`\r\n *\r\n * @param value 需判断的值\r\n *\r\n * @returns 是否为 `NaN`\r\n */\r\nexport function isNaN(value: unknown): value is number {\r\n return Number.isNaN(value)\r\n}\r\n\r\n/**\r\n * 判断一个值是否为字符串\r\n *\r\n * @param value 需判断的值\r\n *\r\n * @returns 是否为字符串\r\n */\r\nexport function isString(value: unknown): value is string {\r\n return typeof value === 'string'\r\n}\r\n\r\n/**\r\n * 判断一个值是否为布尔值\r\n *\r\n * @param value 需判断的值\r\n *\r\n * @returns 是否为布尔值\r\n */\r\nexport function isBoolean(value: unknown): value is boolean {\r\n return typeof value === 'boolean'\r\n}\r\n\r\n/**\r\n * 判断一个值是否为 `true`\r\n *\r\n * @param value 需判断的值\r\n *\r\n * @returns 是否为 `true`\r\n */\r\nexport function isTrue(value: unknown): value is true {\r\n return value === true\r\n}\r\n\r\n/**\r\n * 判断一个值是否为 `false`\r\n *\r\n * @param value 需判断的值\r\n *\r\n * @returns 是否为 `false`\r\n */\r\nexport function isFalse(value: unknown): value is false {\r\n return value === false\r\n}\r\n\r\n/**\r\n * 判断一个值是否为 `Symbol`\r\n *\r\n * @param value 需判断的值\r\n *\r\n * @returns 是否为 `Symbol`\r\n */\r\nexport function isSymbol(value: unknown): value is symbol {\r\n return typeof value === 'symbol'\r\n}\r\n\r\n/**\r\n * 判断一个值是否为 `BigInt`\r\n *\r\n * @param value 需判断的值\r\n *\r\n * @returns 是否为 `BigInt`\r\n */\r\nexport function isBigInt(value: unknown): value is bigint {\r\n return typeof value === 'bigint'\r\n}\r\n\r\n/**\r\n * 判断一个值是否为数组\r\n *\r\n * @param value 需判断的值\r\n *\r\n * @returns 是否为数组\r\n */\r\nexport function isArray<T = any>(value: unknown): value is T[] {\r\n return Array.isArray(value)\r\n}\r\n\r\n/**\r\n * 判断一个值是否为对象\r\n *\r\n * 注意,`null` 与原生的特殊对象不被包含\r\n *\r\n * @param value 需判断的值\r\n *\r\n * @returns 是否为对象\r\n */\r\nexport function isObject<T extends Record<any, any> = Record<any, any>>(\r\n value: unknown,\r\n): value is T {\r\n return is(value, 'Object')\r\n}\r\n\r\n/**\r\n * 判断一个值是否为 `Promise`\r\n *\r\n * 如果一个对象包含 `then` 和 `catch` 方法,则被认为是一个 `Promise`\r\n *\r\n * @param value 需判断的值\r\n *\r\n * @returns 是否为 `Promise`\r\n */\r\nexport function isPromise<T = any>(value: unknown): value is Promise<T> {\r\n return (\r\n !!value &&\r\n typeof (value as any).then === 'function' &&\r\n typeof (value as any).catch === 'function'\r\n )\r\n}\r\n\r\n/**\r\n * 判断一个值是否为函数\r\n *\r\n * @param value 需判断的值\r\n *\r\n * @returns 是否为函数\r\n */\r\nexport function isFunction(value: unknown): value is (...any: any[]) => any {\r\n return typeof value === 'function'\r\n}\r\n\r\n/**\r\n * 判断一个值是否为 `Set`\r\n *\r\n * @param value 需判断的值\r\n *\r\n * @returns 是否为 `Set`\r\n */\r\nexport function isSet<T = any>(value: unknown): value is Set<T> {\r\n return is(value, 'Set')\r\n}\r\n\r\n/**\r\n * 判断一个值是否为 `Map`\r\n *\r\n * @param value 需判断的值\r\n *\r\n * @returns 是否为 `Map`\r\n */\r\nexport function isMap<K = any, V = any>(value: unknown): value is Map<K, V> {\r\n return is(value, 'Map')\r\n}\r\n\r\n/**\r\n * 判断一个值是否为 `Date`\r\n *\r\n * @param value 需判断的值\r\n *\r\n * @returns 是否为 `Date`\r\n */\r\nexport function isDate(value: unknown): value is Date {\r\n return is(value, 'Date')\r\n}\r\n\r\n/**\r\n * 判断一个值是否为正则\r\n *\r\n * @param value 需判断的值\r\n *\r\n * @returns 是否为正则\r\n */\r\nexport function isRegExp(value: unknown): value is RegExp {\r\n return is(value, 'RegExp')\r\n}\r\n\r\n/**\r\n * 判断一个值是否为空\r\n *\r\n * - 如果这是一个数组或字符串,则 `length` 为 `0` 时为空\r\n * - 如果这是一个 `Set` 或 `Map`,则 `size` 为 `0` 时为空\r\n * - 如果这是一个对象,则无任何键值时为空\r\n * - 如果这是一个数字,则为 `NaN` 时为空\r\n * - 其余情况下,未定义时为空\r\n *\r\n * @param value 需判断的值\r\n *\r\n * @returns 是否为空\r\n */\r\nexport function isEmpty(value: unknown) {\r\n if (Array.isArray(value) || typeof value === 'string') {\r\n return value.length === 0\r\n }\r\n\r\n if (value instanceof Map || value instanceof Set) {\r\n return value.size === 0\r\n }\r\n\r\n if (isObject(value)) {\r\n return Object.keys(value).length === 0\r\n }\r\n\r\n if (typeof value === 'number') {\r\n return isNaN(value)\r\n }\r\n\r\n return isNull(value)\r\n}\r\n\r\n/**\r\n * 判断一个值是否为 `Element`\r\n *\r\n * @param value 需判断的值\r\n * @param ssr 是否考虑服务端渲染\r\n *\r\n * @returns 是否为 `Element`\r\n */\r\nexport function isElement<T extends Element = Element>(value: unknown, ssr = false): value is T {\r\n if (!ssr && !isClient) return false\r\n\r\n return !!(value && 'nodeType' in (value as any))\r\n}\r\n\r\n/**\r\n * 判断一个值能否被迭代\r\n *\r\n * @param value 需判断的值\r\n *\r\n * @returns 能否被迭代\r\n */\r\nexport function isIterable(value: unknown) {\r\n return isDefined(value) && typeof (value as any)[Symbol.iterator] === 'function'\r\n}\r\n\r\n/**\r\n * 一个空的占位函数\r\n */\r\nexport function noop(...args: any[]): any\r\nexport function noop() {}\r\n\r\n/**\r\n * 一个返回 `true` 的占位函数\r\n *\r\n * @returns `true`\r\n */\r\nexport function toTrue(...args: any[]): true\r\nexport function toTrue() {\r\n return true\r\n}\r\n\r\n/**\r\n * 一个返回 `false` 的占位函数\r\n *\r\n * @returns `false`\r\n */\r\nexport function toFalse(...args: any[]): false\r\nexport function toFalse() {\r\n return false\r\n}\r\n\r\n/**\r\n * 生成一个值递进的数组\r\n *\r\n * @param size 大小\r\n * @param start 开始的数值,默认为 1\r\n * @param step 跨度,默认为 1\r\n *\r\n * @returns 生成的数组\r\n */\r\nexport function range(size: number, start = 1, step = 1) {\r\n const array: number[] = []\r\n\r\n for (let i = 0; i < size; ++i) {\r\n array.push(start + i * step)\r\n }\r\n\r\n return array\r\n}\r\n\r\n/**\r\n * 获取变量的类型\r\n *\r\n * @param value 任意变量\r\n *\r\n * @returns 变量的类型\r\n */\r\nexport function getType(value: unknown) {\r\n return Object.prototype.toString.call(value).slice(8, -1)\r\n}\r\n\r\n/**\r\n * 根据长度生成一串随机的字符串\r\n *\r\n * @param length 字符串的长度\r\n *\r\n * @returns 生成的字符串\r\n */\r\nexport function randomString(length = 16) {\r\n const chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'\r\n const maxPos = chars.length\r\n\r\n let string = ''\r\n\r\n while (length--) {\r\n string += chars.charAt(Math.floor(Math.random() * maxPos))\r\n }\r\n\r\n return string\r\n}\r\n\r\n/**\r\n * 根据一系列判断条件,执行第一个为 `true` 的条件所对应的回调函数\r\n *\r\n * @param conditions 判断条件及回调函数\r\n * @param options 额外的选项\r\n *\r\n * @returns 是否匹配了任一条件\r\n */\r\nexport async function decide(\r\n conditions: [boolean | (() => boolean), () => void | Promise<void>][],\r\n options: {\r\n /**\r\n * 当匹配任意一个条件时,会在该条件对应的回调函数执行前执行\r\n */\r\n beforeMatchAny?: () => void | Promise<void>,\r\n /**\r\n * 当匹配任意一个条件时,会在该条件对应的回调函数执行完后执行\r\n */\r\n afterMatchAny?: () => void | Promise<void>,\r\n } = {},\r\n) {\r\n if (conditions.length) {\r\n for (const [condition, callback] of conditions) {\r\n if (typeof condition === 'function' ? condition() : condition) {\r\n if (typeof options.beforeMatchAny === 'function') {\r\n await options.beforeMatchAny()\r\n }\r\n\r\n await callback()\r\n\r\n if (typeof options.afterMatchAny === 'function') {\r\n await options.afterMatchAny()\r\n }\r\n\r\n return true\r\n }\r\n }\r\n }\r\n\r\n return false\r\n}\r\n","import { isDefined } from './common'\r\n\r\ninterface RGB extends Record<any, any> {\r\n r: number,\r\n g: number,\r\n b: number,\r\n a?: number,\r\n}\r\n\r\nexport interface RGBColor extends RGB {\r\n a?: 1,\r\n format?: 'name' | 'rgb',\r\n}\r\n\r\nexport interface RGBAColor extends RGB {\r\n a: number,\r\n format?: 'name' | 'rgba',\r\n}\r\n\r\nexport interface HEX3Color extends RGB {\r\n a?: 1,\r\n format?: 'name' | 'hex3',\r\n}\r\nexport interface HEX4Color extends RGB {\r\n a: number,\r\n format?: 'name' | 'hex4',\r\n}\r\nexport interface HEX6Color extends RGB {\r\n a?: 1,\r\n format?: 'name' | 'hex6',\r\n}\r\nexport interface HEX8Color extends RGB {\r\n a: number,\r\n format?: 'name' | 'hex8',\r\n}\r\n\r\ninterface HSL extends Record<any, any> {\r\n h: number,\r\n s: number,\r\n l: number,\r\n a?: number,\r\n}\r\n\r\nexport interface HSLColor extends HSL {\r\n a?: 1,\r\n format?: 'name' | 'hsl',\r\n}\r\n\r\nexport interface HSLAColor extends HSL {\r\n a: number,\r\n format?: 'name' | 'hsla',\r\n}\r\n\r\ninterface HSV extends Record<any, any> {\r\n h: number,\r\n s: number,\r\n v: number,\r\n a?: number,\r\n}\r\n\r\nexport interface HSVColor extends HSV {\r\n a?: 1,\r\n format?: 'name' | 'hsv',\r\n}\r\n\r\nexport interface HSVAColor extends HSV {\r\n a: number,\r\n format?: 'name' | 'hsva',\r\n}\r\n\r\nexport type Color =\r\n | string\r\n | RGBColor\r\n | RGBAColor\r\n | HSLColor\r\n | HSLAColor\r\n | HSVColor\r\n | HSVAColor\r\n | HEX3Color\r\n | HEX4Color\r\n | HEX6Color\r\n | HEX8Color\r\n\r\nexport type ObjectColor = Exclude<Color, string>\r\n\r\nexport interface ColorMeta {\r\n rgb: RGBColor,\r\n hsl: HSLColor,\r\n hsv: HSVColor,\r\n hex: string,\r\n alpha: number,\r\n rgba: RGBAColor,\r\n hsla: HSLAColor,\r\n hsva: HSVAColor,\r\n hex8: string,\r\n gray: number,\r\n origin: Color,\r\n}\r\n\r\nexport type ColorType = 'hex' | 'rgb' | 'hsv' | 'hsl'\r\n\r\nconst INTEGER_REG = '[-\\\\+]?\\\\d+%?'\r\nconst NUMBER_REG = '[-\\\\+]?\\\\d*\\\\.\\\\d+%?'\r\n\r\nconst NUMBER_UNIT = `(?:${NUMBER_REG})|(?:${INTEGER_REG})`\r\n\r\nconst COLOR_REG_3 = `[\\\\s|\\\\(]+(${NUMBER_UNIT})[,|\\\\s]+(${NUMBER_UNIT})[,|\\\\s]+(${NUMBER_UNIT})\\\\s*\\\\)?`\r\nconst COLOR_REG_4 = `[\\\\s|\\\\(]+(${NUMBER_UNIT})[,|\\\\s]+(${NUMBER_UNIT})[,|\\\\s]+(${NUMBER_UNIT})[,|\\\\s]+(${NUMBER_UNIT})\\\\s*\\\\)?`\r\n\r\n// const UNIT_REG = new RegExp(NUMBER_UNIT)\r\n\r\n// const FORMAT_REG = /^((((?:rgb)|(?:hsl)|(?:hsv))a?)|hex[3468]?|name)$/\r\n\r\nexport const RGB_REG = new RegExp(`rgb${COLOR_REG_3}`)\r\nexport const RGBA_REG = new RegExp(`rgba${COLOR_REG_4}`)\r\nexport const HSL_REG = new RegExp(`hsl${COLOR_REG_4}`)\r\nexport const HSLA_REG = new RegExp(`hsla${COLOR_REG_4}`)\r\nexport const HSV_REG = new RegExp(`hsv${COLOR_REG_4}`)\r\nexport const HSVA_REG = new RegExp(`hsva${COLOR_REG_4}`)\r\n\r\nexport const HEX_REG_3 = /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/\r\nexport const HEX_REG_4 = /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/\r\nexport const HEX_REG_6 = /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/\r\nexport const HEX_REG_8 = /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/\r\n\r\nexport const NAMED_COLORS = Object.freeze({\r\n aliceblue: 'f0f8ff',\r\n antiquewhite: 'faebd7',\r\n aqua: '0ff',\r\n aquamarine: '7fffd4',\r\n azure: 'f0ffff',\r\n beige: 'f5f5dc',\r\n bisque: 'ffe4c4',\r\n black: '000',\r\n blanchedalmond: 'ffebcd',\r\n blue: '00f',\r\n blueviolet: '8a2be2',\r\n brown: 'a52a2a',\r\n burlywood: 'deb887',\r\n burntsienna: 'ea7e5d',\r\n cadetblue: '5f9ea0',\r\n chartreuse: '7fff00',\r\n chocolate: 'd2691e',\r\n coral: 'ff7f50',\r\n cornflowerblue: '6495ed',\r\n cornsilk: 'fff8dc',\r\n crimson: 'dc143c',\r\n cyan: '0ff',\r\n darkblue: '00008b',\r\n darkcyan: '008b8b',\r\n darkgoldenrod: 'b8860b',\r\n darkgray: 'a9a9a9',\r\n darkgreen: '006400',\r\n darkgrey: 'a9a9a9',\r\n darkkhaki: 'bdb76b',\r\n darkmagenta: '8b008b',\r\n darkolivegreen: '556b2f',\r\n darkorange: 'ff8c00',\r\n darkorchid: '9932cc',\r\n darkred: '8b0000',\r\n darksalmon: 'e9967a',\r\n darkseagreen: '8fbc8f',\r\n darkslateblue: '483d8b',\r\n darkslategray: '2f4f4f',\r\n darkslategrey: '2f4f4f',\r\n darkturquoise: '00ced1',\r\n darkviolet: '9400d3',\r\n deeppink: 'ff1493',\r\n deepskyblue: '00bfff',\r\n dimgray: '696969',\r\n dimgrey: '696969',\r\n dodgerblue: '1e90ff',\r\n firebrick: 'b22222',\r\n floralwhite: 'fffaf0',\r\n forestgreen: '228b22',\r\n fuchsia: 'f0f',\r\n gainsboro: 'dcdcdc',\r\n ghostwhite: 'f8f8ff',\r\n gold: 'ffd700',\r\n goldenrod: 'daa520',\r\n gray: '808080',\r\n green: '008000',\r\n greenyellow: 'adff2f',\r\n grey: '808080',\r\n honeydew: 'f0fff0',\r\n hotpink: 'ff69b4',\r\n indianred: 'cd5c5c',\r\n indigo: '4b0082',\r\n ivory: 'fffff0',\r\n khaki: 'f0e68c',\r\n lavender: 'e6e6fa',\r\n lavenderblush: 'fff0f5',\r\n lawngreen: '7cfc00',\r\n lemonchiffon: 'fffacd',\r\n lightblue: 'add8e6',\r\n lightcoral: 'f08080',\r\n lightcyan: 'e0ffff',\r\n lightgoldenrodyellow: 'fafad2',\r\n lightgray: 'd3d3d3',\r\n lightgreen: '90ee90',\r\n lightgrey: 'd3d3d3',\r\n lightpink: 'ffb6c1',\r\n lightsalmon: 'ffa07a',\r\n lightseagreen: '20b2aa',\r\n lightskyblue: '87cefa',\r\n lightslategray: '789',\r\n lightslategrey: '789',\r\n lightsteelblue: 'b0c4de',\r\n lightyellow: 'ffffe0',\r\n lime: '0f0',\r\n limegreen: '32cd32',\r\n linen: 'faf0e6',\r\n magenta: 'f0f',\r\n maroon: '800000',\r\n mediumaquamarine: '66cdaa',\r\n mediumblue: '0000cd',\r\n mediumorchid: 'ba55d3',\r\n mediumpurple: '9370db',\r\n mediumseagreen: '3cb371',\r\n mediumslateblue: '7b68ee',\r\n mediumspringgreen: '00fa9a',\r\n mediumturquoise: '48d1cc',\r\n mediumvioletred: 'c71585',\r\n midnightblue: '191970',\r\n mintcream: 'f5fffa',\r\n mistyrose: 'ffe4e1',\r\n moccasin: 'ffe4b5',\r\n navajowhite: 'ffdead',\r\n navy: '000080',\r\n oldlace: 'fdf5e6',\r\n olive: '808000',\r\n olivedrab: '6b8e23',\r\n orange: 'ffa500',\r\n orangered: 'ff4500',\r\n orchid: 'da70d6',\r\n palegoldenrod: 'eee8aa',\r\n palegreen: '98fb98',\r\n paleturquoise: 'afeeee',\r\n palevioletred: 'db7093',\r\n papayawhip: 'ffefd5',\r\n peachpuff: 'ffdab9',\r\n peru: 'cd853f',\r\n pink: 'ffc0cb',\r\n plum: 'dda0dd',\r\n powderblue: 'b0e0e6',\r\n purple: '800080',\r\n rebeccapurple: '663399',\r\n red: 'f00',\r\n rosybrown: 'bc8f8f',\r\n royalblue: '4169e1',\r\n saddlebrown: '8b4513',\r\n salmon: 'fa8072',\r\n sandybrown: 'f4a460',\r\n seagreen: '2e8b57',\r\n seashell: 'fff5ee',\r\n sienna: 'a0522d',\r\n silver: 'c0c0c0',\r\n skyblue: '87ceeb',\r\n slateblue: '6a5acd',\r\n slategray: '708090',\r\n slategrey: '708090',\r\n snow: 'fffafa',\r\n springgreen: '00ff7f',\r\n steelblue: '4682b4',\r\n tan: 'd2b48c',\r\n teal: '008080',\r\n thistle: 'd8bfd8',\r\n tomato: 'ff6347',\r\n turquoise: '40e0d0',\r\n violet: 'ee82ee',\r\n wheat: 'f5deb3',\r\n white: 'fff',\r\n whitesmoke: 'f5f5f5',\r\n yellow: 'ff0',\r\n yellowgreen: '9acd32',\r\n})\r\n\r\nexport type ColorName = keyof typeof NAMED_COLORS\r\n\r\nexport const COLOR_NAMES = Object.freeze(new Set(Object.keys(NAMED_COLORS))) as Readonly<\r\n Set<ColorName>\r\n>\r\n\r\n/**\r\n * 判断给定的字符串是否为一个合法颜色值\r\n *\r\n * @param value 原始字符串\r\n *\r\n * @returns 是否为合法颜色\r\n */\r\nexport function isColor(value: string): boolean {\r\n value = String(value).trim().toLowerCase()\r\n\r\n if (!value) {\r\n return false\r\n }\r\n\r\n if (value === 'transparent' || NAMED_COLORS[value as ColorName]) {\r\n return true\r\n }\r\n\r\n return (\r\n value === 'transparent' ||\r\n COLOR_NAMES.has(value as ColorName) ||\r\n RGB_REG.test(value) ||\r\n RGBA_REG.test(value) ||\r\n HSL_REG.test(value) ||\r\n HSLA_REG.test(value) ||\r\n HSV_REG.test(value) ||\r\n HSVA_REG.test(value) ||\r\n HEX_REG_3.test(value) ||\r\n HEX_REG_4.test(value) ||\r\n HEX_REG_6.test(value) ||\r\n HEX_REG_8.test(value)\r\n )\r\n}\r\n\r\n/**\r\n * 将给定的字符串转化为 {@link ObjectColor},无法转换时返回 null\r\n *\r\n * @param color 原始颜色字符串\r\n *\r\n * @returns 解析后的颜色对象\r\n */\r\nexport function parseStringColor(color: string): ObjectColor | null {\r\n color = color.toString().trim().toLowerCase()\r\n\r\n if (color === 'transparent') {\r\n return { r: 0, g: 0, b: 0, a: 0, format: 'name', toString: toRgbString }\r\n }\r\n\r\n let named = false\r\n\r\n if (NAMED_COLORS[color as ColorName]) {\r\n color = NAMED_COLORS[color as ColorName]\r\n named = true\r\n }\r\n\r\n let match\r\n\r\n if ((match = RGB_REG.exec(color))) {\r\n const { r, g, b } = normalizeRgb(match[1], match[2], match[3])\r\n\r\n return {\r\n r: r * 255,\r\n g: g * 255,\r\n b: b * 255,\r\n format: 'rgb',\r\n toString: toRgbString,\r\n }\r\n }\r\n\r\n if ((match = RGBA_REG.exec(color))) {\r\n const { r, g, b } = normalizeRgb(match[1], match[2], match[3])\r\n\r\n return {\r\n r: r * 255,\r\n g: g * 255,\r\n b: b * 255,\r\n a: normalizeAlpha(match[4]),\r\n format: 'rgba',\r\n toString: toRgbString,\r\n }\r\n }\r\n\r\n if ((match = HSL_REG.exec(color))) {\r\n const { h, s, l } = normalizeHsl(match[0], match[1], match[3])\r\n\r\n return { h: h * 360, s, l, format: 'hsl', toString: toHslString }\r\n }\r\n\r\n if ((match = HSLA_REG.exec(color))) {\r\n const { h, s, l } = normalizeHsl(match[0], match[1], match[3])\r\n\r\n return {\r\n h: h * 360,\r\n s,\r\n l,\r\n a: normalizeAlpha(match[4]),\r\n format: 'hsla',\r\n toString: toHslString,\r\n }\r\n }\r\n\r\n if ((match = HSV_REG.exec(color))) {\r\n const { h, s, v } = normalizeHsv(match[0], match[1], match[3])\r\n\r\n return { h: h * 360, s, v, format: 'hsv', toString: toHsvString }\r\n }\r\n\r\n if ((match = HSVA_REG.exec(color))) {\r\n const { h, s, v } = normalizeHsv(match[0], match[1], match[3])\r\n\r\n return {\r\n h: h * 360,\r\n s,\r\n v,\r\n a: normalizeAlpha(match[4]),\r\n format: 'hsva',\r\n toString: toHsvString,\r\n }\r\n }\r\n\r\n if ((match = HEX_REG_3.exec(color))) {\r\n return {\r\n r: parseInt(`${match[1]}${match[1]}`, 16),\r\n g: parseInt(`${match[2]}${match[2]}`, 16),\r\n b: parseInt(`${match[3]}${match[3]}`, 16),\r\n format: named ? 'name' : 'hex3',\r\n toString: toRgbString,\r\n }\r\n }\r\n\r\n if ((match = HEX_REG_4.exec(color))) {\r\n return {\r\n r: parseInt(`${match[1]}${match[1]}`, 16),\r\n g: parseInt(`${match[2]}${match[2]}`, 16),\r\n b: parseInt(`${match[3]}${match[3]}`, 16),\r\n a: convertHexToDecimal(`${match[4]}${match[4]}`),\r\n format: named ? 'name' : 'hex4',\r\n toString: toRgbString,\r\n }\r\n }\r\n\r\n if ((match = HEX_REG_6.exec(color))) {\r\n return {\r\n r: parseInt(match[1], 16),\r\n g: parseInt(match[2], 16),\r\n b: parseInt(match[3], 16),\r\n format: named ? 'name' : 'hex6',\r\n toString: toRgbString,\r\n }\r\n }\r\n\r\n if ((match = HEX_REG_8.exec(color))) {\r\n return {\r\n r: parseInt(match[1], 16),\r\n g: parseInt(match[2], 16),\r\n b: parseInt(match[3], 16),\r\n a: convertHexToDecimal(match[4]),\r\n format: named ? 'name' : 'hex8',\r\n toString: toRgbString,\r\n }\r\n }\r\n\r\n return null\r\n}\r\n\r\n/**\r\n * 将给定的 {@link Color} 解析为 {@link ColorMeta}\r\n *\r\n * @param color 原始颜色值\r\n *\r\n * @returns 解析后的颜色元数据\r\n */\r\nexport function parseColor(color: Color): ColorMeta {\r\n const { a, ...rgb } = parseColorToRgba(color)\r\n\r\n delete rgb.format\r\n\r\n const hsl = rgbToHsl(rgb.r, rgb.g, rgb.b)\r\n const hsv = rgbToHsv(rgb.r, rgb.g, rgb.b)\r\n const hex = rgbToHex(rgb.r, rgb.g, rgb.b)\r\n\r\n const hex8 = rgbaToHex(rgb.r, rgb.g, rgb.b, a)\r\n\r\n return {\r\n rgb: rgb as RGBColor,\r\n hsl,\r\n hsv,\r\n hex,\r\n alpha: a,\r\n rgba: { ...rgb, a, format: 'rgba' },\r\n hsla: { ...hsl, a, format: 'hsla' },\r\n hsva: { ...hsv, a, format: 'hsva' },\r\n hex8,\r\n gray: rgbToGrayScale(rgb),\r\n origin: color,\r\n }\r\n}\r\n\r\n/**\r\n * 将给定的 {@link Color} 解析为 {@link RGBAColor}\r\n *\r\n * @param originColor 原始颜色值\r\n *\r\n * @returns 解析后的 RGB 颜色对象\r\n */\r\nexport function parseColorToRgba(originColor: Color): RGBAColor {\r\n let rgb: RGBColor = { r: 0, g: 0, b: 0 }\r\n let a = 1\r\n let color: Color | null\r\n\r\n if (typeof originColor === 'string') {\r\n color = parseStringColor(originColor)\r\n } else {\r\n color = originColor\r\n }\r\n\r\n if (color !== null && typeof color === 'object') {\r\n if ('l' in color) {\r\n rgb = hslToRgb(color.h, color.s, color.l)\r\n } else if ('v' in color) {\r\n rgb = hsvToRgb(color.h, color.s, color.v)\r\n }\r\n\r\n if ('a' in color) {\r\n a = normalizeAlpha(color.a ?? 1)\r\n\r\n if (Number.isNaN(a)) {\r\n a = 1\r\n }\r\n }\r\n\r\n rgb = color as RGBColor\r\n }\r\n\r\n return { ...rgb, a, format: 'rgba', toString: toRgbString }\r\n}\r\n\r\n/**\r\n * 将原始的 h、s、l 值标准化为 0 ~ 1 的值\r\n *\r\n * @param h 0 ~ 360\r\n * @param s 0 ~ 1,0% ~ 100%\r\n * @param l 0 ~ 1,0% ~ 100%\r\n *\r\n * @returns 标准化后的 HSL 对象\r\n */\r\nexport function normalizeHsl(h: number | string, s: number | string, l: number | string) {\r\n return {\r\n h: boundRange(h, 0, 360) / 360,\r\n s: boundRange(isPercentage(s) ? parsePercentage(s) : s, 0, 1),\r\n l: boundRange(isPercentage(l) ? parsePercentage(l) : l, 0, 1),\r\n }\r\n}\r\n\r\n/**\r\n * 将原始的 r、g、b 值标准化为 0 ~ 1 的值\r\n *\r\n * @param r 0 ~ 255\r\n * @param g 0 ~ 255\r\n * @param b 0 ~ 255\r\n *\r\n * @returns 标准化后 RGB 对象\r\n */\r\nexport function normalizeRgb(r: number | string, g: number | string, b: number | string) {\r\n return {\r\n r: boundRange(r, 0, 255) / 255,\r\n g: boundRange(g, 0, 255) / 255,\r\n b: boundRange(b, 0, 255) / 255,\r\n }\r\n}\r\n\r\n/**\r\n * 将原始的 h、s、v 值标准化为 0 ~ 1 的值\r\n *\r\n * @param h 0 ~ 360\r\n * @param s 0 ~ 1,0% ~ 100%\r\n * @param v 0 ~ 1,0% ~ 100%\r\n *\r\n * @returns 标准化的 HSV 对象\r\n */\r\nexport function normalizeHsv(h: number | string, s: number | string, v: number | string) {\r\n return {\r\n h: boundRange(h, 0, 360) / 360,\r\n s: boundRange(isPercentage(s) ? parsePercentage(s) : s, 0, 1),\r\n v: boundRange(isPercentage(v) ? parsePercentage(v) : v, 0, 1),\r\n }\r\n}\r\n\r\n/**\r\n * 将原始透明度值标准化为 0 ~ 1 的值\r\n *\r\n * @param a 0 ~ 1,0% ~ 100%\r\n *\r\n * @returns 标准化后的透明度\r\n */\r\nexport function normalizeAlpha(a: number | string) {\r\n return boundRange(isPercentage(a) ? parsePercentage(a) : a, 0, 1)\r\n}\r\n\r\n/**\r\n * 将 HSL 颜色转换为 RGB 颜色\r\n *\r\n * @param h 0 ~ 360\r\n * @param s 0 ~ 1,0% ~ 100%\r\n * @param l 0 ~ 1,0% ~ 100%\r\n *\r\n * @returns 转换后的 RGB 颜色\r\n */\r\nexport function hslToRgb(h: number | string, s: number | string, l: number | string): RGBColor {\r\n let r, g, b\r\n ;({ h, s, l } = normalizeHsl(h, s, l))\r\n\r\n if (s === 0) {\r\n r = g = b = l\r\n } else {\r\n const q = l < 0.5 ? 1 * (1 + s) : l + s - l * s\r\n const p = 2 * l - q\r\n\r\n r = hueToRgb(p, q, h + 1 / 3)\r\n g = hueToRgb(p, q, h)\r\n b = hueToRgb(p, q, h - 1 / 3)\r\n }\r\n\r\n r *= 255\r\n g *= 255\r\n b *= 255\r\n\r\n return { r, g, b, toString: toRgbString }\r\n}\r\n\r\n/**\r\n * 将 RGB 颜色转换为 HSL 颜色\r\n *\r\n * @param r 0 ~ 255\r\n * @param g 0 ~ 255\r\n * @param b 0 ~ 255\r\n *\r\n * @returns 转换后的 HSL 颜色\r\n */\r\nexport function rgbToHsl(r: number | string, g: number | string, b: number | string): HSLColor {\r\n ;({ r, g, b } = normalizeRgb(r, g, b))\r\n\r\n const max = Math.max(r, g, b)\r\n const min = Math.min(r, g, b)\r\n let h, s\r\n\r\n const l = (max + min) / 2\r\n\r\n if (max === min) {\r\n h = s = 0\r\n } else {\r\n const d = max - min\r\n\r\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min)\r\n\r\n switch (max) {\r\n case r: {\r\n h = (g - b) / d + (g < b ? 6 : 0)\r\n break\r\n }\r\n case g: {\r\n h = (b - r) / d + 2\r\n break\r\n }\r\n case b: {\r\n h = (r - g) / d + 4\r\n break\r\n }\r\n default: {\r\n h = 0\r\n }\r\n }\r\n\r\n h *= 60\r\n }\r\n\r\n return { h, s,