reactjs-tiptap-editor 0.0.26 → 0.0.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locales-CReRRAlY.js","sources":["../src/constants/index.ts","../src/locales/en.ts","../src/locales/vi.ts","../src/locales/zh-cn.ts","../src/locales/index.tsx"],"sourcesContent":["/** Default lang */\nexport const DEFAULT_LANG_VALUE = 'en' as const\n\n/** Throttle time for editor input (milliseconds) */\nexport const EDITOR_UPDATE_THROTTLE_WAIT_TIME = 200 as const\n\n/**\n * watch throttling time must be less than the update time\n * otherwise the cursor position will reach the end\n */\nexport const EDITOR_UPDATE_WATCH_THROTTLE_WAIT_TIME = EDITOR_UPDATE_THROTTLE_WAIT_TIME - 80\n\n/** Minimum size for image adjustments */\nexport const IMAGE_MIN_SIZE = 20 as const\n/** Maximum size for image adjustments */\nexport const IMAGE_MAX_SIZE = 100_000 as const\n/** Throttle time during adjustments for images (milliseconds) */\nexport const IMAGE_THROTTLE_WAIT_TIME = 16 as const\n\n/** Default number of rows and columns for grids when creating a table */\nexport const TABLE_INIT_GRID_SIZE = 10 as const\n/** Maximum number of rows and columns for grids when creating a table */\nexport const TABLE_MAX_GRID_SIZE = 10 as const\n/** Minimum number of rows and columns for grids when creating a table */\nexport const TABLE_DEFAULT_SELECTED_GRID_SIZE = 2 as const\n\nexport const DEFAULT_COLOR = '#262626'\n/** Default color list for text color and text highlight */\nexport const COLORS_LIST = [\n '#000000',\n '#262626',\n '#595959',\n '#8C8C8C',\n '#BFBFBF',\n '#D9D9D9',\n '#E9E9E9',\n '#F5F5F5',\n '#FAFAFA',\n '#FFFFFF',\n '#F5222D',\n '#FA541C',\n '#FA8C16',\n '#FADB14',\n '#52C41A',\n '#13C2C2',\n '#1890FF',\n '#2F54EB',\n '#722ED1',\n '#EB2F96',\n '#FFE8E6',\n '#FFECE0',\n '#FFEFD1',\n '#FCFCCA',\n '#E4F7D2',\n '#D3F5F0',\n '#D4EEFC',\n '#DEE8FC',\n '#EFE1FA',\n '#FAE1EB',\n '#FFA39E',\n '#FFBB96',\n '#FFD591',\n '#FFFB8F',\n '#B7EB8F',\n '#87E8DE',\n '#91D5FF',\n '#ADC6FF',\n '#D3ADF7',\n '#FFADD2',\n '#FF4D4F',\n '#FF7A45',\n '#FFA940',\n '#FFEC3D',\n '#73D13D',\n '#36CFC9',\n '#40A9FF',\n '#597EF7',\n '#9254DE',\n '#F759AB',\n '#CF1322',\n '#D4380D',\n '#D46B08',\n '#D4B106',\n '#389E0D',\n '#08979C',\n '#096DD9',\n '#1D39C4',\n '#531DAB',\n '#C41D7F',\n '#820014',\n '#871400',\n '#873800',\n '#614700',\n '#135200',\n '#00474F',\n '#003A8C',\n '#061178',\n '#22075E',\n '#780650',\n] as const\n\n/** Default font family list */\nexport const DEFAULT_FONT_FAMILY_LIST = [\n 'Inter',\n 'Comic Sans MS, Comic Sans',\n 'serif',\n 'monospace',\n 'cursive',\n]\n\nexport const DEFAULT_LANGUAGE_CODE_BLOCK = [\n 'html',\n 'css',\n 'js',\n 'ts',\n]\n\nexport const MAP_LANGUAGE_CODE_LABELS = {\n html: 'HTML',\n css: 'CSS',\n js: 'JavaScript',\n ts: 'TypeScript',\n} as any\n\n/** Default font size list */\nexport const DEFAULT_FONT_SIZE_LIST = [\n '10px',\n '11px',\n '12px',\n '14px',\n '16px',\n '18px',\n '20px',\n '22px',\n '24px',\n '26px',\n '28px',\n '36px',\n '48px',\n '72px',\n] as const\n\n/** Default font size value */\nexport const DEFAULT_FONT_SIZE_VALUE = 'default'\n\n/** Options for setting image size in the bubble menu */\nexport enum IMAGE_SIZE {\n 'size-small' = 200,\n 'size-medium' = 500,\n 'size-large' = '100%',\n}\n\n/** Options for setting video size in the bubble menu */\nexport enum VIDEO_SIZE {\n 'size-small' = 480,\n 'size-medium' = 640,\n 'size-large' = '100%',\n}\n\n/** Line Height List */\nexport const DEFAULT_LINE_HEIGHT_LIST = ['100%', '115%', '150%', '200%', '250%', '300%']\nexport const LINE_HEIGHT_100 = 1.7\nexport const DEFAULT_LINE_HEIGHT = '1'\n\n/** display in menus */\nexport const NODE_TYPE_MENU: any = {\n image: [\n 'divider',\n 'image-size-small',\n 'image-size-medium',\n 'image-size-large',\n 'divider',\n 'image-left',\n 'image-center',\n 'image-right',\n 'divider',\n 'image-aspect-ratio',\n 'remove',\n ],\n text: [\n 'divider',\n 'text-bubble',\n 'divider',\n 'bold',\n 'italic',\n 'underline',\n 'strike',\n 'code',\n 'link',\n 'divider',\n 'color',\n 'highlight',\n 'textAlign',\n ],\n video: ['video-size-small', 'video-size-medium', 'video-size-large', 'divider', 'remove'],\n table: ['removeTable'],\n}\n\n/** display in bubble text menu */\nexport const BUBBLE_TEXT_LIST = [\n 'bold',\n 'italic',\n 'underline',\n 'strike',\n 'code',\n 'link',\n 'divider',\n 'color',\n 'highlight',\n 'textAlign',\n]\n","const locale = {\n 'editor.remove': 'Remove',\n 'editor.copy': 'Copy',\n 'editor.words': 'WORDS',\n 'editor.characters': 'CHARACTERS',\n 'editor.default': 'Default',\n 'editor.recent': 'Recently Used',\n 'editor.nofill': 'No Fill',\n 'editor.format': 'Format Painter',\n 'editor.table_of_content': 'Table of Content',\n 'editor.draghandle.tooltip': 'Modify',\n 'editor.copyToClipboard': 'CopyToClipboard',\n 'editor.importWord.tooltip': 'Import Word',\n 'editor.slash': 'Press \\'/\\' for commands',\n 'editor.slash.empty': 'No Result',\n 'editor.slash.format': 'Format',\n 'editor.slash.insert': 'Insert',\n 'editor.slash.embed': 'Embed Services',\n 'editor.content': 'Please input content',\n 'editor.fontFamily.tooltip': 'Font Family',\n 'editor.fontFamily.default.tooltip': 'Default',\n 'editor.moremark': 'More Text Styles',\n 'editor.size.small.tooltip': 'Small',\n 'editor.size.medium.tooltip': 'Medium',\n 'editor.size.large.tooltip': 'Cover',\n 'editor.bold.tooltip': 'Bold',\n 'editor.italic.tooltip': 'Italic',\n 'editor.underline.tooltip': 'Underline',\n 'editor.strike.tooltip': 'Strike',\n 'editor.color.tooltip': 'Color',\n 'editor.color.more': 'More Colors',\n 'editor.highlight.tooltip': 'Highlight',\n 'editor.lineheight.tooltip': 'Line Height',\n 'editor.heading.tooltip': 'Headings',\n 'editor.heading.h1.tooltip': 'Heading 1',\n 'editor.heading.h2.tooltip': 'Heading 2',\n 'editor.heading.h3.tooltip': 'Heading 3',\n 'editor.heading.h4.tooltip': 'Heading 4',\n 'editor.heading.h5.tooltip': 'Heading 5',\n 'editor.heading.h6.tooltip': 'Heading 6',\n 'editor.paragraph.tooltip': 'Paragraph',\n 'editor.textalign.tooltip': 'Align',\n 'editor.textalign.left.tooltip': 'Left',\n 'editor.textalign.center.tooltip': 'Center',\n 'editor.textalign.right.tooltip': 'Right',\n 'editor.textalign.justify.tooltip': 'Justify',\n 'editor.indent': 'Indent',\n 'editor.indent.indent': 'Increase Indent',\n 'editor.indent.outdent': 'Decrease Indent',\n 'editor.fontSize.tooltip': 'Font size',\n 'editor.fontSize.default.tooltip': 'Default',\n 'editor.superscript.tooltip': 'Superscript',\n 'editor.subscript.tooltip': 'Subscript',\n 'editor.bulletlist.tooltip': 'Bullet List',\n 'editor.orderedlist.tooltip': 'Ordered List',\n 'editor.tasklist.tooltip': 'Task List',\n 'editor.indent.tooltip': 'Indent',\n 'editor.outdent.tooltip': 'Outdent',\n 'editor.columns.tooltip': 'Columns',\n 'editor.link.tooltip': 'Link',\n 'editor.link.unlink.tooltip': 'UnLink',\n 'editor.link.open.tooltip': 'Open Link',\n 'editor.link.edit.tooltip': 'Edit Link',\n 'editor.link.dialog.title': 'Insert Link',\n 'editor.link.dialog.link': 'Link',\n 'editor.link.dialog.text': 'Text',\n 'editor.link.dialog.openInNewTab': 'Open In New Tab',\n 'editor.link.dialog.link.placeholder': 'Link Address',\n 'editor.link.dialog.text.placeholder': 'Add Description',\n 'editor.link.dialog.button.apply': 'Apply',\n 'editor.image.tooltip': 'Image',\n 'editor.image.dragger.tooltip': 'Click or drag the image to the area to upload',\n 'editor.image.float.left.tooltip': 'Float left',\n 'editor.image.float.none.tooltip': 'Float none',\n 'editor.image.float.right.tooltip': 'Float right',\n 'editor.image.dialog.title': 'Add an image',\n 'editor.image.dialog.tab.url': 'Url',\n 'editor.image.dialog.tab.upload': 'Upload',\n 'editor.image.dialog.uploading': 'Uploading',\n 'editor.image.dialog.form.link': 'Link',\n 'editor.image.dialog.placeholder': 'Link',\n 'editor.image.dialog.form.alt': 'Alt',\n 'editor.image.dialog.form.aspectRatio': 'Lock original aspect ratio',\n 'editor.image.dialog.form.file': 'File',\n 'editor.image.dialog.button.apply': 'apply',\n 'editor.video.tooltip': 'Video',\n 'editor.video.dialog.tab.upload': 'Upload',\n 'editor.video.dialog.uploading': 'Uploading',\n 'editor.video.dialog.title': 'Embed or upload a video',\n 'editor.video.dialog.link': 'link',\n 'editor.video.dialog.placeholder': 'Link',\n 'editor.video.dialog.button.apply': 'apply',\n 'editor.table.tooltip': 'Table',\n 'editor.table.menu.insert_table': 'Insert Table',\n 'editor.table.menu.insert_table.with_header_row': 'With header row',\n 'editor.table.menu.add_column_before': 'Add Column Before',\n 'editor.table.menu.add_column_after': 'Add Column After',\n 'editor.table.menu.delete_column': 'Delete Column',\n 'editor.table.menu.add_row_before': 'Add Row Before',\n 'editor.table.menu.add_row_after': 'Add Row After',\n 'editor.table.menu.delete_row': 'Delete Row',\n 'editor.table.menu.merge_or_split_cells': 'Merge Or Split Cells',\n 'editor.table.menu.delete_table': 'Delete Table',\n 'editor.blockquote.tooltip': 'Blockquote',\n 'editor.horizontalrule.tooltip': 'Horizontal Rule',\n 'editor.code.tooltip': 'Code',\n 'editor.codeblock.tooltip': 'Code Block',\n 'editor.clear.tooltip': 'Clear Format',\n 'editor.undo.tooltip': 'Undo',\n 'editor.redo.tooltip': 'Redo',\n 'editor.fullscreen.tooltip.fullscreen': 'Fullscreen',\n 'editor.fullscreen.tooltip.exit': 'Fullscreen Exit',\n 'editor.imageUpload.fileTypeNotSupported': 'File type not supported',\n 'editor.imageUpload.fileSizeTooBig': 'File size too big, Maximum size is',\n 'editor.table.menu.insertColumnBefore': 'Insert Column Before',\n 'editor.table.menu.insertColumnAfter': 'Insert Column After',\n 'editor.table.menu.deleteColumn': 'Delete Column',\n 'editor.table.menu.insertRowAbove': 'Insert Row Above',\n 'editor.table.menu.insertRowBelow': 'Insert Row Below',\n 'editor.table.menu.deleteRow': 'Delete Row',\n 'editor.table.menu.mergeCells': 'Merge Cells',\n 'editor.table.menu.splitCells': 'Split Cells',\n 'editor.table.menu.deleteTable': 'Delete Table',\n 'editor.table.menu.setCellsBgColor': 'Cell Background Color',\n 'editor.emoji.tooltip': 'Emoji',\n 'editor.iframe.tooltip': 'Iframe',\n 'editor.searchAndReplace.tooltip': 'Search and Replace',\n 'editor.search.dialog.text': 'Search',\n 'editor.replace.dialog.text': 'Replace',\n 'editor.replaceAll.dialog.text': 'Replace All',\n 'editor.previous.dialog.text': 'Previous',\n 'editor.next.dialog.text': 'Next',\n 'no_result_found': 'No results found',\n 'Smileys & People': 'Smileys & People',\n 'Animals & Nature': 'Animals & Nature',\n 'Food & Drink': 'Food & Drink',\n 'Activity': 'Activity',\n 'Travel & Places': 'Travel & Places',\n 'Object': 'Objects',\n 'Symbol': 'Symbols',\n 'Flags': 'Flags',\n 'Frequently used': 'Frequently used',\n 'editor.formula.dialog.text': 'Formula',\n 'editor.katex.tooltip': 'Math Formula',\n 'editor.exportPdf.tooltip': 'Export PDF',\n 'editor.exportWord.tooltip': 'Export Word',\n 'editor.importWrod.tooltip': 'Import Word',\n}\n\nexport default locale\n","const locale = {\n 'editor.remove': 'Xóa',\n 'editor.copy': 'Sao chép',\n 'editor.words': 'TỪ',\n 'editor.characters': 'KÝ TỰ',\n 'editor.default': 'Mặc định',\n 'editor.recent': 'Đã sử dụng gần đây',\n 'editor.nofill': 'Không tô',\n 'editor.format': 'Format Painter',\n 'editor.table_of_content': 'Mục lục',\n 'editor.draghandle.tooltip': 'Sửa đổi',\n 'editor.copyToClipboard': 'CopyToClipboard',\n 'editor.importWord.tooltip': 'Nhập Word',\n 'editor.slash': 'Nhấn \\'/\\' để biết lệnh',\n 'editor.slash.empty': 'Không có kết quả',\n 'editor.slash.format': 'Định dạng',\n 'editor.slash.insert': 'Chèn',\n 'editor.slash.embed': 'Dịch vụ nhúng',\n 'editor.content': 'Vui lòng nhập nội dung',\n 'editor.moremark': 'Nhiều kiểu văn bản hơn',\n 'editor.size.small.tooltip': 'Nhỏ',\n 'editor.fontFamily.tooltip': 'Phông chữ',\n 'editor.fontFamily.default.tooltip': 'Mặc định',\n 'editor.size.medium.tooltip': 'Trung bình',\n 'editor.size.large.tooltip': 'Lớn',\n 'editor.bold.tooltip': 'Đậm',\n 'editor.italic.tooltip': 'In nghiêng',\n 'editor.underline.tooltip': 'Gạch chân',\n 'editor.strike.tooltip': 'Gạch',\n 'editor.color.tooltip': 'Màu',\n 'editor.color.more': 'Nhiều màu hơn',\n 'editor.highlight.tooltip': 'Đánh dấu',\n 'editor.lineheight.tooltip': 'Chiều cao dòng',\n 'editor.heading.tooltip': 'Tiêu đề',\n 'editor.heading.h1.tooltip': 'Tiêu đề 1',\n 'editor.heading.h2.tooltip': 'Tiêu đề 2',\n 'editor.heading.h3.tooltip': 'Tiêu đề 3',\n 'editor.heading.h4.tooltip': 'Tiêu đề 4',\n 'editor.heading.h5.tooltip': 'Tiêu đề 5',\n 'editor.heading.h6.tooltip': 'Tiêu đề 6',\n 'editor.paragraph.tooltip': 'Đoạn văn',\n 'editor.textalign.tooltip': 'Căn chỉnh',\n 'editor.textalign.left.tooltip': 'Trái',\n 'editor.textalign.center.tooltip': 'Giữa',\n 'editor.textalign.right.tooltip': 'Phải',\n 'editor.textalign.justify.tooltip': 'Căn đều',\n 'editor.indent': 'Thụt lề',\n 'editor.indent.indent': 'Tăng thụt lề',\n 'editor.indent.outdent': 'Giảm thụt lề',\n 'editor.fontSize.tooltip': 'Kích thước phông chữ',\n 'editor.fontSize.default.tooltip': 'Mặc định',\n 'editor.superscript.tooltip': 'Chỉ số trên',\n 'editor.subscript.tooltip': 'Chỉ số dưới',\n 'editor.bulletlist.tooltip': 'Danh sách dấu đầu dòng',\n 'editor.orderedlist.tooltip': 'Danh sách có thứ tự',\n 'editor.tasklist.tooltip': 'Danh sách tác vụ',\n 'editor.indent.tooltip': 'Tăng thụt lề',\n 'editor.outdent.tooltip': 'Giảm thụt lề',\n 'editor.columns.tooltip': 'Cột',\n 'editor.link.tooltip': 'Liên kết',\n 'editor.link.unlink.tooltip': 'Hủy liên kết',\n 'editor.link.open.tooltip': 'Mở liên kết',\n 'editor.link.edit.tooltip': 'Chỉnh sửa liên kết',\n 'editor.link.dialog.title': 'Chèn liên kết',\n 'editor.link.dialog.link': 'Liên kết',\n 'editor.link.dialog.text': 'Văn bản',\n 'editor.link.dialog.openInNewTab': 'Mở trong tab mới',\n 'editor.link.dialog.link.placeholder': 'Địa chỉ liên kết',\n 'editor.link.dialog.text.placeholder': 'Thêm mô tả',\n 'editor.link.dialog.button.apply': 'Áp dụng',\n 'editor.image.tooltip': 'Hình ảnh',\n 'editor.image.dragger.tooltip': 'Nhấp hoặc kéo hình ảnh đến khu vực để tải lên',\n 'editor.image.float.left.tooltip': 'Trôi sang trái',\n 'editor.image.float.none.tooltip': 'Trôi không',\n 'editor.image.float.right.tooltip': 'Trôi sang phải',\n 'editor.image.dialog.title': 'Thêm hình ảnh',\n 'editor.image.dialog.tab.url': 'Url',\n 'editor.image.dialog.tab.upload': 'Tải lên',\n 'editor.image.dialog.uploading': 'Đang tải lên',\n 'editor.image.dialog.form.link': 'Liên kết',\n 'editor.image.dialog.placeholder': 'Liên kết',\n 'editor.image.dialog.form.alt': 'Alt',\n 'editor.image.dialog.form.aspectRatio': 'Khóa tỷ lệ khung hình gốc',\n 'editor.image.dialog.form.file': 'Tệp',\n 'editor.image.dialog.button.apply': 'áp dụng',\n 'editor.video.tooltip': 'Video',\n 'editor.video.dialog.tab.upload': 'Tải lên',\n 'editor.video.dialog.uploading': 'Đang tải lên',\n 'editor.video.dialog.title': 'Nhúng hoặc tải lên video',\n 'editor.video.dialog.link': 'liên kết',\n 'editor.video.dialog.placeholder': 'Liên kết',\n 'editor.video.dialog.button.apply': 'áp dụng',\n 'editor.table.tooltip': 'Bảng',\n 'editor.table.menu.insert_table': 'Chèn Bảng',\n 'editor.table.menu.insert_table.with_header_row': 'Có hàng tiêu đề',\n 'editor.table.menu.add_column_before': 'Thêm Cột Trước',\n 'editor.table.menu.add_column_after': 'Thêm Cột Sau',\n 'editor.table.menu.delete_column': 'Xóa Cột',\n 'editor.table.menu.add_row_before': 'Thêm Hàng Trước',\n 'editor.table.menu.add_row_after': 'Thêm Hàng Sau',\n 'editor.table.menu.delete_row': 'Xóa Hàng',\n 'editor.table.menu.merge_or_split_cells': 'Gộp Hoặc Tách Ô',\n 'editor.table.menu.delete_table': 'Xóa Bảng',\n 'editor.blockquote.tooltip': 'Blockquote',\n 'editor.horizontalrule.tooltip': 'Quy tắc ngang',\n 'editor.code.tooltip': 'Mã',\n 'editor.codeblock.tooltip': 'Khối mã',\n 'editor.clear.tooltip': 'Xóa định dạng',\n 'editor.undo.tooltip': 'Hoàn tác',\n 'editor.redo.tooltip': 'Làm lại',\n 'editor.fullscreen.tooltip.fullscreen': 'Toàn màn hình',\n 'editor.fullscreen.tooltip.exit': 'Thoát toàn màn hình',\n 'editor.imageUpload.fileTypeNotSupported': 'Loại tệp không được hỗ trợ',\n 'editor.imageUpload.fileSizeTooBig': 'Kích thước tệp quá lớn, Kích thước tối đa là',\n 'editor.table.menu.insertColumnBefore': 'Chèn cột trước',\n 'editor.table.menu.insertColumnAfter': 'Chèn cột sau',\n 'editor.table.menu.deleteColumn': 'Xóa cột',\n 'editor.table.menu.insertRowAbove': 'Chèn hàng ở trên',\n 'editor.table.menu.insertRowBelow': 'Chèn hàng ở dưới',\n 'editor.table.menu.deleteRow': 'Xóa hàng',\n 'editor.table.menu.mergeCells': 'Gộp các ô',\n 'editor.table.menu.splitCells': 'Chia ô',\n 'editor.table.menu.deleteTable': 'Xóa bảng',\n 'editor.table.menu.setCellsBgColor': 'Màu nền ô',\n 'editor.emoji.tooltip': 'Biểu tượng',\n 'editor.iframe.tooltip': 'Iframe',\n 'editor.searchAndReplace.tooltip': 'Tìm kiếm và thay thế',\n 'editor.search.dialog.text': 'Tìm kiếm',\n 'editor.replace.dialog.text': 'Thay thế',\n 'editor.replaceAll.dialog.text': 'Thay thế tất cả',\n 'editor.previous.dialog.text': 'Trước',\n 'editor.next.dialog.text': 'Tiếp theo',\n 'no_result_found': 'Không tìm thấy kết quả',\n 'Smileys & People': 'Cười & Mọi người',\n 'Animals & Nature': 'Động vật & Thiên nhiên',\n 'Food & Drink': 'Thức ăn & Đồ uống',\n 'Activity': 'Hoạt động',\n 'Travel & Places': 'Du lịch & Địa điểm',\n 'Object': 'Vật',\n 'Symbol': 'Ký hiệu',\n 'Flags': 'Cờ',\n 'Frequently used': 'Thường xuyên sử dụng',\n 'editor.formula.dialog.text': 'Công thức',\n 'editor.katex.tooltip': 'Công thức toán học',\n 'editor.exportPdf.tooltip': 'Xuất PDF',\n 'editor.exportWord.tooltip': 'Xuất Word',\n 'editor.importWrod.tooltip': 'Nhập Word',\n}\n\nexport default locale\n","const locale = {\n 'editor.remove': '移除',\n 'editor.copy': '复制',\n 'editor.words': '字数',\n 'editor.characters': '字符数',\n 'editor.default': '默认',\n 'editor.recent': '最近使用',\n 'editor.nofill': '无填充',\n 'editor.format': '格式刷',\n 'editor.table_of_content': '目录',\n 'editor.draghandle.tooltip': '修改',\n 'editor.copyToClipboard': '复制到剪贴板',\n 'editor.importWord.tooltip': '导入 Word',\n 'editor.slash': '按 \\'/\\' 使用命令',\n 'editor.slash.empty': '无结果',\n 'editor.slash.format': '格式',\n 'editor.slash.insert': '插入',\n 'editor.slash.embed': '嵌入服务',\n 'editor.content': '请输入内容',\n 'editor.fontFamily.tooltip': '字体',\n 'editor.fontFamily.default.tooltip': '默认',\n 'editor.moremark': '更多文本样式',\n 'editor.size.small.tooltip': '小',\n 'editor.size.medium.tooltip': '中',\n 'editor.size.large.tooltip': '封面',\n 'editor.bold.tooltip': '粗体',\n 'editor.italic.tooltip': '斜体',\n 'editor.underline.tooltip': '下划线',\n 'editor.strike.tooltip': '删除线',\n 'editor.color.tooltip': '颜色',\n 'editor.color.more': '更多颜色',\n 'editor.highlight.tooltip': '高亮',\n 'editor.lineheight.tooltip': '行高',\n 'editor.heading.tooltip': '标题',\n 'editor.heading.h1.tooltip': '标题 1',\n 'editor.heading.h2.tooltip': '标题 2',\n 'editor.heading.h3.tooltip': '标题 3',\n 'editor.heading.h4.tooltip': '标题 4',\n 'editor.heading.h5.tooltip': '标题 5',\n 'editor.heading.h6.tooltip': '标题 6',\n 'editor.paragraph.tooltip': '段落',\n 'editor.textalign.tooltip': '对齐',\n 'editor.textalign.left.tooltip': '左对齐',\n 'editor.textalign.center.tooltip': '居中',\n 'editor.textalign.right.tooltip': '右对齐',\n 'editor.textalign.justify.tooltip': '两端对齐',\n 'editor.indent': '缩进',\n 'editor.indent.indent': '增加缩进',\n 'editor.indent.outdent': '减少缩进',\n 'editor.fontSize.tooltip': '字号',\n 'editor.fontSize.default.tooltip': '默认',\n 'editor.superscript.tooltip': '上标',\n 'editor.subscript.tooltip': '下标',\n 'editor.bulletlist.tooltip': '无序列表',\n 'editor.orderedlist.tooltip': '有序列表',\n 'editor.tasklist.tooltip': '任务列表',\n 'editor.indent.tooltip': '缩进',\n 'editor.outdent.tooltip': '减少缩进',\n 'editor.columns.tooltip': '列',\n 'editor.link.tooltip': '链接',\n 'editor.link.unlink.tooltip': '取消链接',\n 'editor.link.open.tooltip': '打开链接',\n 'editor.link.edit.tooltip': '编辑链接',\n 'editor.link.dialog.title': '插入链接',\n 'editor.link.dialog.link': '链接',\n 'editor.link.dialog.text': '文本',\n 'editor.link.dialog.openInNewTab': '在新标签页中打开',\n 'editor.link.dialog.link.placeholder': '链接地址',\n 'editor.link.dialog.text.placeholder': '添加描述',\n 'editor.link.dialog.button.apply': '应用',\n 'editor.image.tooltip': '图片',\n 'editor.image.dragger.tooltip': '点击或拖拽图片到此区域上传',\n 'editor.image.float.left.tooltip': '左浮动',\n 'editor.image.float.none.tooltip': '无浮动',\n 'editor.image.float.right.tooltip': '右浮动',\n 'editor.image.dialog.title': '添加图片',\n 'editor.image.dialog.tab.url': '链接',\n 'editor.image.dialog.tab.upload': '上传',\n 'editor.image.dialog.uploading': '上传中',\n 'editor.image.dialog.form.link': '链接',\n 'editor.image.dialog.placeholder': '链接',\n 'editor.image.dialog.form.alt': '替代文本',\n 'editor.image.dialog.form.aspectRatio': '锁定原始宽高比',\n 'editor.image.dialog.form.file': '文件',\n 'editor.image.dialog.button.apply': '应用',\n 'editor.video.tooltip': '视频',\n 'editor.video.dialog.tab.upload': '上传',\n 'editor.video.dialog.uploading': '上传中',\n 'editor.video.dialog.title': '嵌入或上传视频',\n 'editor.video.dialog.link': '链接',\n 'editor.video.dialog.placeholder': '链接',\n 'editor.video.dialog.button.apply': '应用',\n 'editor.table.tooltip': '表格',\n 'editor.table.menu.insert_table': '插入表格',\n 'editor.table.menu.insert_table.with_header_row': '带标题行',\n 'editor.table.menu.add_column_before': '在前面插入列',\n 'editor.table.menu.add_column_after': '在后面插入列',\n 'editor.table.menu.delete_column': '删除列',\n 'editor.table.menu.add_row_before': '在上方插入行',\n 'editor.table.menu.add_row_after': '在下方插入行',\n 'editor.table.menu.delete_row': '删除行',\n 'editor.table.menu.merge_or_split_cells': '合并或拆分单元格',\n 'editor.table.menu.delete_table': '删除表格',\n 'editor.blockquote.tooltip': '引用',\n 'editor.horizontalrule.tooltip': '水平线',\n 'editor.code.tooltip': '代码',\n 'editor.codeblock.tooltip': '代码块',\n 'editor.clear.tooltip': '清除格式',\n 'editor.undo.tooltip': '撤销',\n 'editor.redo.tooltip': '重做',\n 'editor.fullscreen.tooltip.fullscreen': '全屏',\n 'editor.fullscreen.tooltip.exit': '退出全屏',\n 'editor.imageUpload.fileTypeNotSupported': '不支持的文件类型',\n 'editor.imageUpload.fileSizeTooBig': '文件大小超出限制,最大大小为',\n 'editor.table.menu.insertColumnBefore': '在前面插入列',\n 'editor.table.menu.insertColumnAfter': '在后面插入列',\n 'editor.table.menu.deleteColumn': '删除列',\n 'editor.table.menu.insertRowAbove': '在上方插入行',\n 'editor.table.menu.insertRowBelow': '在下方插入行',\n 'editor.table.menu.deleteRow': '删除行',\n 'editor.table.menu.mergeCells': '合并单元格',\n 'editor.table.menu.splitCells': '拆分单元格',\n 'editor.table.menu.deleteTable': '删除表格',\n 'editor.table.menu.setCellsBgColor': '设置单元格背景色',\n 'editor.emoji.tooltip': '表情',\n 'editor.iframe.tooltip': '内嵌框架',\n 'editor.searchAndReplace.tooltip': '搜索和替换',\n 'editor.search.dialog.text': '搜索',\n 'editor.replace.dialog.text': '替换',\n 'editor.replaceAll.dialog.text': '全部替换',\n 'editor.previous.dialog.text': '上一个',\n 'editor.next.dialog.text': '下一个',\n 'no_result_found': '未找到结果',\n 'Smileys & People': '笑脸和人',\n 'Animals & Nature': '动物和自然',\n 'Food & Drink': '食物和饮料',\n 'Activity': '活动',\n 'Travel & Places': '旅行和地点',\n 'Object': '物体',\n 'Symbol': '符号',\n 'Flags': '旗帜',\n 'Frequently used': '常用',\n 'editor.formula.dialog.text': '公式',\n 'editor.katex.tooltip': '数学公式',\n 'editor.exportPdf.tooltip': '导出 PDF',\n 'editor.exportWord.tooltip': '导出 Word',\n 'editor.importWrod.tooltip': '导入 Word',\n}\n\nexport default locale\n","import { useEffect, useMemo } from 'react'\n\nimport { proxy, useSnapshot } from 'valtio'\n\nimport en from './en'\nimport vi from './vi'\nimport zh_CN from './zh-cn'\nimport mitt from '@/utils/mitt'\nimport type { EventType } from '@/utils/mitt'\nimport { DEFAULT_LANG_VALUE } from '@/constants'\n\n// Define supported language types\ntype LanguageType = 'en' | 'vi' | 'zh_CN' | string\n\n// Define message key types based on the 'en' locale\ntype MessageKeysType = keyof typeof en\n\n// Interface for locale configuration\ninterface LocaleInterface {\n lang: LanguageType\n message: Record<LanguageType, Record<MessageKeysType, string>>\n}\n\n// Interface for Mitt events\ninterface MittEvents extends Record<EventType, unknown> {\n lang: LanguageType\n}\n\n// Default locale configuration\nexport const DEFAULT_LOCALE: LocaleInterface = {\n lang: DEFAULT_LANG_VALUE,\n message: {\n en,\n vi,\n zh_CN,\n },\n}\n\nclass Locale {\n private emitter\n constructor() {\n this.emitter = mitt<MittEvents>()\n }\n\n // Getter and setter for current language\n get lang(): LanguageType {\n return DEFAULT_LOCALE.lang\n }\n\n set lang(lang: LanguageType) {\n if (!this.isLangSupported(lang)) {\n console.warn(\n `Can't find the current language \"${lang}\", Using language \"${DEFAULT_LOCALE.lang}\" by default`,\n )\n return\n }\n\n DEFAULT_LOCALE.lang = lang\n this.emitter.emit('lang', lang)\n }\n\n // Getter and setter for messages\n get message(): Record<LanguageType, Record<MessageKeysType, string>> {\n return DEFAULT_LOCALE.message\n }\n\n set message(message: Record<LanguageType, Record<MessageKeysType, string>>) {\n DEFAULT_LOCALE.message = message\n }\n\n // Load messages for a specific language\n loadLangMessage(lang: LanguageType): Record<MessageKeysType, string> {\n return this.message[lang]\n }\n\n // Check if a language is supported\n private isLangSupported(lang: LanguageType): boolean {\n const supportedLangs = Object.keys(this.message) as LanguageType[]\n return supportedLangs.includes(lang)\n }\n\n // Set the current language\n public setLang(lang: LanguageType) {\n this.lang = lang\n }\n\n // Register a language change watcher\n public registerWatchLang(hook: (lang: LanguageType) => void) {\n this.emitter.on('lang', hook)\n\n const unsubscribe = () => {\n this.emitter.off('lang', hook)\n }\n\n return {\n unsubscribe,\n }\n }\n\n // Set messages for a specific language\n public setMessage(lang: string, message: Record<MessageKeysType, string>) {\n this.message[lang] = message\n }\n\n // Build a translation function for a given language\n buildLocalesHandler(lang?: LanguageType) {\n if (!lang) {\n lang = this.lang\n }\n\n const message = this.loadLangMessage(lang)\n\n return function t(path: MessageKeysType) {\n return message[path] || path\n }\n }\n}\n\nconst locale = new Locale()\n\n// Proxy for reactive language state\nconst atomLang = proxy({\n lang: DEFAULT_LOCALE.lang,\n})\n\nfunction useLocale() {\n const atomLangSnap = useSnapshot(atomLang)\n\n const t = useMemo(() => {\n return locale.buildLocalesHandler(atomLangSnap.lang)\n }, [atomLangSnap.lang])\n\n useEffect(() => {\n const watchLang = locale.registerWatchLang((val) => {\n atomLang.lang = val\n })\n\n return () => {\n watchLang.unsubscribe()\n }\n }, [])\n\n return {\n lang: atomLangSnap.lang,\n t,\n }\n}\n\nconst localeActions = {\n t: (path: MessageKeysType) => {\n return locale.buildLocalesHandler(atomLang.lang)(path)\n },\n}\n\nexport default locale\nexport { Locale, useLocale, localeActions }\n\nexport { default as en } from './en'\nexport { default as vi } from './vi'\nexport { default as zh_CN } from './zh-cn'\n"],"names":["DEFAULT_LANG_VALUE","EDITOR_UPDATE_THROTTLE_WAIT_TIME","EDITOR_UPDATE_WATCH_THROTTLE_WAIT_TIME","IMAGE_MIN_SIZE","IMAGE_MAX_SIZE","IMAGE_THROTTLE_WAIT_TIME","TABLE_INIT_GRID_SIZE","TABLE_MAX_GRID_SIZE","TABLE_DEFAULT_SELECTED_GRID_SIZE","DEFAULT_COLOR","COLORS_LIST","DEFAULT_FONT_FAMILY_LIST","DEFAULT_LANGUAGE_CODE_BLOCK","MAP_LANGUAGE_CODE_LABELS","DEFAULT_FONT_SIZE_LIST","DEFAULT_FONT_SIZE_VALUE","IMAGE_SIZE","VIDEO_SIZE","DEFAULT_LINE_HEIGHT_LIST","LINE_HEIGHT_100","DEFAULT_LINE_HEIGHT","NODE_TYPE_MENU","BUBBLE_TEXT_LIST","locale","en","vi","zh_CN","DEFAULT_LOCALE","Locale","__publicField","mitt","lang","message","hook","path","atomLang","proxy","useLocale","atomLangSnap","useSnapshot","useMemo","useEffect","watchLang","val","localeActions","locale$1"],"mappings":";;;;;;AACO,MAAMA,IAAqB,MAGrBC,IAAmC,KAMnCC,IAAyCD,IAAmC,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AQA,GAAoB;AACjC,SAAK,OAAOA;AAAA,EACd;AAAA;AAAA,EAGO,kBAAkBE,GAAoC;AACtD,gBAAA,QAAQ,GAAG,QAAQA,CAAI,GAMrB;AAAA,MACL,aALkB,MAAM;AACnB,aAAA,QAAQ,IAAI,QAAQA,CAAI;AAAA,MAAA;AAAA,IAI7B;AAAA,EAEJ;AAAA;AAAA,EAGO,WAAWF,GAAcC,GAA0C;AACnE,SAAA,QAAQD,CAAI,IAAIC;AAAA,EACvB;AAAA;AAAA,EAGA,oBAAoBD,GAAqB;AACvC,IAAKA,MACHA,IAAO,KAAK;AAGR,UAAAC,IAAU,KAAK,gBAAgBD,CAAI;AAElC,WAAA,SAAWG,GAAuB;AAChC,aAAAF,EAAQE,CAAI,KAAKA;AAAA,IAAA;AAAA,EAE5B;AACF;AAEA,MAAMX,IAAS,IAAIK,KAGbO,IAAWC,EAAM;AAAA,EACrB,MAAMT,EAAe;AACvB,CAAC;AAED,SAASU,IAAY;AACb,QAAAC,IAAeC,EAAYJ,CAAQ,GAEnC,IAAIK,EAAQ,MACTjB,EAAO,oBAAoBe,EAAa,IAAI,GAClD,CAACA,EAAa,IAAI,CAAC;AAEtB,SAAAG,EAAU,MAAM;AACd,UAAMC,IAAYnB,EAAO,kBAAkB,CAACoB,MAAQ;AAClD,MAAAR,EAAS,OAAOQ;AAAA,IAAA,CACjB;AAED,WAAO,MAAM;AACX,MAAAD,EAAU,YAAY;AAAA,IAAA;AAAA,EAE1B,GAAG,CAAE,CAAA,GAEE;AAAA,IACL,MAAMJ,EAAa;AAAA,IACnB;AAAA,EAAA;AAEJ;AAEA,MAAMM,IAAgB;AAAA,EACpB,GAAG,CAACV,MACKX,EAAO,oBAAoBY,EAAS,IAAI,EAAED,CAAI;AAEzD,GAEAW,IAAetB;"}
@@ -0,0 +1,2 @@
1
+ "use strict";const N=require("react"),W=require("./vendor-Btqs8WA3.cjs"),l=require("react/jsx-runtime"),Vt=require("react-dom");function Wt(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const s=Wt(N),st=Wt(Vt);function rr(e,n){typeof e=="function"?e(n):e!=null&&(e.current=n)}function Ae(...e){return n=>e.forEach(t=>rr(t,n))}function I(...e){return s.useCallback(Ae(...e),e)}var ce=s.forwardRef((e,n)=>{const{children:t,...o}=e,r=s.Children.toArray(t),a=r.find(sr);if(a){const i=a.props.children,c=r.map(d=>d===a?s.Children.count(i)>1?s.Children.only(null):s.isValidElement(i)?i.props.children:null:d);return l.jsx(Ze,{...o,ref:n,children:s.isValidElement(i)?s.cloneElement(i,void 0,c):null})}return l.jsx(Ze,{...o,ref:n,children:t})});ce.displayName="Slot";var Ze=s.forwardRef((e,n)=>{const{children:t,...o}=e;if(s.isValidElement(t)){const r=ir(t);return s.cloneElement(t,{...ar(o,t.props),ref:n?Ae(n,r):r})}return s.Children.count(t)>1?s.Children.only(null):null});Ze.displayName="SlotClone";var Yt=({children:e})=>l.jsx(l.Fragment,{children:e});function sr(e){return s.isValidElement(e)&&e.type===Yt}function ar(e,n){const t={...n};for(const o in n){const r=e[o],a=n[o];/^on[A-Z]/.test(o)?r&&a?t[o]=(...c)=>{a(...c),r(...c)}:r&&(t[o]=r):o==="style"?t[o]={...r,...a}:o==="className"&&(t[o]=[r,a].filter(Boolean).join(" "))}return{...e,...t}}function ir(e){var o,r;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,t=n&&"isReactWarning"in n&&n.isReactWarning;return t?e.ref:(n=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,t=n&&"isReactWarning"in n&&n.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}function E(e,n,{checkForDefaultPrevented:t=!0}={}){return function(r){if(e==null||e(r),t===!1||!r.defaultPrevented)return n==null?void 0:n(r)}}function q(e,n=[]){let t=[];function o(a,i){const c=s.createContext(i),d=t.length;t=[...t,i];function u(f){const{scope:v,children:w,...h}=f,m=(v==null?void 0:v[e][d])||c,g=s.useMemo(()=>h,Object.values(h));return l.jsx(m.Provider,{value:g,children:w})}function p(f,v){const w=(v==null?void 0:v[e][d])||c,h=s.useContext(w);if(h)return h;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${a}\``)}return u.displayName=a+"Provider",[u,p]}const r=()=>{const a=t.map(i=>s.createContext(i));return function(c){const d=(c==null?void 0:c[e])||a;return s.useMemo(()=>({[`__scope${e}`]:{...c,[e]:d}}),[c,d])}};return r.scopeName=e,[o,cr(r,...n)]}function cr(...e){const n=e[0];if(e.length===1)return n;const t=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(a){const i=o.reduce((c,{useScope:d,scopeName:u})=>{const f=d(a)[`__scope${u}`];return{...c,...f}},{});return s.useMemo(()=>({[`__scope${n.scopeName}`]:i}),[i])}};return t.scopeName=n.scopeName,t}function K(e){const n=s.useRef(e);return s.useEffect(()=>{n.current=e}),s.useMemo(()=>(...t)=>{var o;return(o=n.current)==null?void 0:o.call(n,...t)},[])}function ee({prop:e,defaultProp:n,onChange:t=()=>{}}){const[o,r]=ur({defaultProp:n,onChange:t}),a=e!==void 0,i=a?e:o,c=K(t),d=s.useCallback(u=>{if(a){const f=typeof u=="function"?u(e):u;f!==e&&c(f)}else r(u)},[a,e,r,c]);return[i,d]}function ur({defaultProp:e,onChange:n}){const t=s.useState(e),[o]=t,r=s.useRef(o),a=K(n);return s.useEffect(()=>{r.current!==o&&(a(o),r.current=o)},[o,r,a]),t}var lr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],_=lr.reduce((e,n)=>{const t=s.forwardRef((o,r)=>{const{asChild:a,...i}=o,c=a?ce:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:r})});return t.displayName=`Primitive.${n}`,{...e,[n]:t}},{});function at(e,n){e&&st.flushSync(()=>e.dispatchEvent(n))}function it(e){const n=e+"CollectionProvider",[t,o]=q(n),[r,a]=t(n,{collectionRef:{current:null},itemMap:new Map}),i=w=>{const{scope:h,children:m}=w,g=N.useRef(null),x=N.useRef(new Map).current;return l.jsx(r,{scope:h,itemMap:x,collectionRef:g,children:m})};i.displayName=n;const c=e+"CollectionSlot",d=N.forwardRef((w,h)=>{const{scope:m,children:g}=w,x=a(c,m),C=I(h,x.collectionRef);return l.jsx(ce,{ref:C,children:g})});d.displayName=c;const u=e+"CollectionItemSlot",p="data-radix-collection-item",f=N.forwardRef((w,h)=>{const{scope:m,children:g,...x}=w,C=N.useRef(null),y=I(h,C),b=a(u,m);return N.useEffect(()=>(b.itemMap.set(C,{ref:C,...x}),()=>void b.itemMap.delete(C))),l.jsx(ce,{[p]:"",ref:y,children:g})});f.displayName=u;function v(w){const h=a(e+"CollectionConsumer",w);return N.useCallback(()=>{const g=h.collectionRef.current;if(!g)return[];const x=Array.from(g.querySelectorAll(`[${p}]`));return Array.from(h.itemMap.values()).sort((b,M)=>x.indexOf(b.ref.current)-x.indexOf(M.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:i,Slot:d,ItemSlot:f},v,o]}var dr=s.createContext(void 0);function ct(e){const n=s.useContext(dr);return e||n||"ltr"}function fr(e,n=globalThis==null?void 0:globalThis.document){const t=K(e);s.useEffect(()=>{const o=r=>{r.key==="Escape"&&t(r)};return n.addEventListener("keydown",o,{capture:!0}),()=>n.removeEventListener("keydown",o,{capture:!0})},[t,n])}var pr="DismissableLayer",qe="dismissableLayer.update",vr="dismissableLayer.pointerDownOutside",mr="dismissableLayer.focusOutside",Ft,zt=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ce=s.forwardRef((e,n)=>{const{disableOutsidePointerEvents:t=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:a,onInteractOutside:i,onDismiss:c,...d}=e,u=s.useContext(zt),[p,f]=s.useState(null),v=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,w]=s.useState({}),h=I(n,R=>f(R)),m=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=m.indexOf(g),C=p?m.indexOf(p):-1,y=u.layersWithOutsidePointerEventsDisabled.size>0,b=C>=x,M=gr(R=>{const A=R.target,j=[...u.branches].some(L=>L.contains(A));!b||j||(r==null||r(R),i==null||i(R),R.defaultPrevented||c==null||c())},v),S=wr(R=>{const A=R.target;[...u.branches].some(L=>L.contains(A))||(a==null||a(R),i==null||i(R),R.defaultPrevented||c==null||c())},v);return fr(R=>{C===u.layers.size-1&&(o==null||o(R),!R.defaultPrevented&&c&&(R.preventDefault(),c()))},v),s.useEffect(()=>{if(p)return t&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ft=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),jt(),()=>{t&&u.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=Ft)}},[p,v,t,u]),s.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),jt())},[p,u]),s.useEffect(()=>{const R=()=>w({});return document.addEventListener(qe,R),()=>document.removeEventListener(qe,R)},[]),l.jsx(_.div,{...d,ref:h,style:{pointerEvents:y?b?"auto":"none":void 0,...e.style},onFocusCapture:E(e.onFocusCapture,S.onFocusCapture),onBlurCapture:E(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:E(e.onPointerDownCapture,M.onPointerDownCapture)})});Ce.displayName=pr;var hr="DismissableLayerBranch",Xt=s.forwardRef((e,n)=>{const t=s.useContext(zt),o=s.useRef(null),r=I(n,o);return s.useEffect(()=>{const a=o.current;if(a)return t.branches.add(a),()=>{t.branches.delete(a)}},[t.branches]),l.jsx(_.div,{...e,ref:r})});Xt.displayName=hr;function gr(e,n=globalThis==null?void 0:globalThis.document){const t=K(e),o=s.useRef(!1),r=s.useRef(()=>{});return s.useEffect(()=>{const a=c=>{if(c.target&&!o.current){let d=function(){Zt(vr,t,u,{discrete:!0})};const u={originalEvent:c};c.pointerType==="touch"?(n.removeEventListener("click",r.current),r.current=d,n.addEventListener("click",r.current,{once:!0})):d()}else n.removeEventListener("click",r.current);o.current=!1},i=window.setTimeout(()=>{n.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),n.removeEventListener("pointerdown",a),n.removeEventListener("click",r.current)}},[n,t]),{onPointerDownCapture:()=>o.current=!0}}function wr(e,n=globalThis==null?void 0:globalThis.document){const t=K(e),o=s.useRef(!1);return s.useEffect(()=>{const r=a=>{a.target&&!o.current&&Zt(mr,t,{originalEvent:a},{discrete:!1})};return n.addEventListener("focusin",r),()=>n.removeEventListener("focusin",r)},[n,t]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function jt(){const e=new CustomEvent(qe);document.dispatchEvent(e)}function Zt(e,n,t,{discrete:o}){const r=t.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:t});n&&r.addEventListener(e,n,{once:!0}),o?at(r,a):r.dispatchEvent(a)}var Cr=Ce,xr=Xt,Ve=0;function qt(){s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Lt()),document.body.insertAdjacentElement("beforeend",e[1]??Lt()),Ve++,()=>{Ve===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Ve--}},[])}function Lt(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var We="focusScope.autoFocusOnMount",Ye="focusScope.autoFocusOnUnmount",kt={bubbles:!1,cancelable:!0},Er="FocusScope",ut=s.forwardRef((e,n)=>{const{loop:t=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:a,...i}=e,[c,d]=s.useState(null),u=K(r),p=K(a),f=s.useRef(null),v=I(n,m=>d(m)),w=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(o){let m=function(y){if(w.paused||!c)return;const b=y.target;c.contains(b)?f.current=b:ne(f.current,{select:!0})},g=function(y){if(w.paused||!c)return;const b=y.relatedTarget;b!==null&&(c.contains(b)||ne(f.current,{select:!0}))},x=function(y){if(document.activeElement===document.body)for(const M of y)M.removedNodes.length>0&&ne(c)};document.addEventListener("focusin",m),document.addEventListener("focusout",g);const C=new MutationObserver(x);return c&&C.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),C.disconnect()}}},[o,c,w.paused]),s.useEffect(()=>{if(c){Kt.add(w);const m=document.activeElement;if(!c.contains(m)){const x=new CustomEvent(We,kt);c.addEventListener(We,u),c.dispatchEvent(x),x.defaultPrevented||(yr(Mr(Jt(c)),{select:!0}),document.activeElement===m&&ne(c))}return()=>{c.removeEventListener(We,u),setTimeout(()=>{const x=new CustomEvent(Ye,kt);c.addEventListener(Ye,p),c.dispatchEvent(x),x.defaultPrevented||ne(m??document.body,{select:!0}),c.removeEventListener(Ye,p),Kt.remove(w)},0)}}},[c,u,p,w]);const h=s.useCallback(m=>{if(!t&&!o||w.paused)return;const g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,x=document.activeElement;if(g&&x){const C=m.currentTarget,[y,b]=br(C);y&&b?!m.shiftKey&&x===b?(m.preventDefault(),t&&ne(y,{select:!0})):m.shiftKey&&x===y&&(m.preventDefault(),t&&ne(b,{select:!0})):x===C&&m.preventDefault()}},[t,o,w.paused]);return l.jsx(_.div,{tabIndex:-1,...i,ref:v,onKeyDown:h})});ut.displayName=Er;function yr(e,{select:n=!1}={}){const t=document.activeElement;for(const o of e)if(ne(o,{select:n}),document.activeElement!==t)return}function br(e){const n=Jt(e),t=$t(n,e),o=$t(n.reverse(),e);return[t,o]}function Jt(e){const n=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)n.push(t.currentNode);return n}function $t(e,n){for(const t of e)if(!Pr(t,{upTo:n}))return t}function Pr(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Tr(e){return e instanceof HTMLInputElement&&"select"in e}function ne(e,{select:n=!1}={}){if(e&&e.focus){const t=document.activeElement;e.focus({preventScroll:!0}),e!==t&&Tr(e)&&n&&e.select()}}var Kt=Rr();function Rr(){let e=[];return{add(n){const t=e[0];n!==t&&(t==null||t.pause()),e=Ut(e,n),e.unshift(n)},remove(n){var t;e=Ut(e,n),(t=e[0])==null||t.resume()}}}function Ut(e,n){const t=[...e],o=t.indexOf(n);return o!==-1&&t.splice(o,1),t}function Mr(e){return e.filter(n=>n.tagName!=="A")}var oe=globalThis!=null&&globalThis.document?s.useLayoutEffect:()=>{},_r=s.useId||(()=>{}),Sr=0;function re(e){const[n,t]=s.useState(_r());return oe(()=>{e||t(o=>o??String(Sr++))},[e]),e||(n?`radix-${n}`:"")}var Ar="Arrow",Qt=s.forwardRef((e,n)=>{const{children:t,width:o=10,height:r=5,...a}=e;return l.jsx(_.svg,{...a,ref:n,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?t:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});Qt.displayName=Ar;var Ir=Qt;function en(e){const[n,t]=s.useState(void 0);return oe(()=>{if(e){t({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const a=r[0];let i,c;if("borderBoxSize"in a){const d=a.borderBoxSize,u=Array.isArray(d)?d[0]:d;i=u.inlineSize,c=u.blockSize}else i=e.offsetWidth,c=e.offsetHeight;t({width:i,height:c})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else t(void 0)},[e]),n}var lt="Popper",[tn,fe]=q(lt),[Or,nn]=tn(lt),on=e=>{const{__scopePopper:n,children:t}=e,[o,r]=s.useState(null);return l.jsx(Or,{scope:n,anchor:o,onAnchorChange:r,children:t})};on.displayName=lt;var rn="PopperAnchor",sn=s.forwardRef((e,n)=>{const{__scopePopper:t,virtualRef:o,...r}=e,a=nn(rn,t),i=s.useRef(null),c=I(n,i);return s.useEffect(()=>{a.onAnchorChange((o==null?void 0:o.current)||i.current)}),o?null:l.jsx(_.div,{...r,ref:c})});sn.displayName=rn;var dt="PopperContent",[Nr,Dr]=tn(dt),an=s.forwardRef((e,n)=>{var Q,pe,z,ve,Ot,Nt;const{__scopePopper:t,side:o="bottom",sideOffset:r=0,align:a="center",alignOffset:i=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:u=[],collisionPadding:p=0,sticky:f="partial",hideWhenDetached:v=!1,updatePositionStrategy:w="optimized",onPlaced:h,...m}=e,g=nn(dt,t),[x,C]=s.useState(null),y=I(n,me=>C(me)),[b,M]=s.useState(null),S=en(b),R=(S==null?void 0:S.width)??0,A=(S==null?void 0:S.height)??0,j=o+(a!=="center"?"-"+a:""),L=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},H=Array.isArray(u)?u:[u],G=H.length>0,B={padding:L,boundary:H.filter(jr),altBoundary:G},{refs:T,floatingStyles:D,placement:O,isPositioned:Y,middlewareData:F}=W.useFloating({strategy:"fixed",placement:j,whileElementsMounted:(...me)=>W.autoUpdate(...me,{animationFrame:w==="always"}),elements:{reference:g.anchor},middleware:[W.offset({mainAxis:r+A,alignmentAxis:i}),d&&W.shift({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?W.limitShift():void 0,...B}),d&&W.flip({...B}),W.size({...B,apply:({elements:me,rects:Dt,availableWidth:er,availableHeight:tr})=>{const{width:nr,height:or}=Dt.reference,Te=me.floating.style;Te.setProperty("--radix-popper-available-width",`${er}px`),Te.setProperty("--radix-popper-available-height",`${tr}px`),Te.setProperty("--radix-popper-anchor-width",`${nr}px`),Te.setProperty("--radix-popper-anchor-height",`${or}px`)}}),b&&W.arrow({element:b,padding:c}),Lr({arrowWidth:R,arrowHeight:A}),v&&W.hide({strategy:"referenceHidden",...B})]}),[P,$]=ln(O),k=K(h);oe(()=>{Y&&(k==null||k())},[Y,k]);const V=(Q=F.arrow)==null?void 0:Q.x,Z=(pe=F.arrow)==null?void 0:pe.y,te=((z=F.arrow)==null?void 0:z.centerOffset)!==0,[Pe,ie]=s.useState();return oe(()=>{x&&ie(window.getComputedStyle(x).zIndex)},[x]),l.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:Y?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Pe,"--radix-popper-transform-origin":[(ve=F.transformOrigin)==null?void 0:ve.x,(Ot=F.transformOrigin)==null?void 0:Ot.y].join(" "),...((Nt=F.hide)==null?void 0:Nt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(Nr,{scope:t,placedSide:P,onArrowChange:M,arrowX:V,arrowY:Z,shouldHideArrow:te,children:l.jsx(_.div,{"data-side":P,"data-align":$,...m,ref:y,style:{...m.style,animation:Y?void 0:"none"}})})})});an.displayName=dt;var cn="PopperArrow",Fr={top:"bottom",right:"left",bottom:"top",left:"right"},un=s.forwardRef(function(n,t){const{__scopePopper:o,...r}=n,a=Dr(cn,o),i=Fr[a.placedSide];return l.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:l.jsx(Ir,{...r,ref:t,style:{...r.style,display:"block"}})})});un.displayName=cn;function jr(e){return e!==null}var Lr=e=>({name:"transformOrigin",options:e,fn(n){var g,x,C;const{placement:t,rects:o,middlewareData:r}=n,i=((g=r.arrow)==null?void 0:g.centerOffset)!==0,c=i?0:e.arrowWidth,d=i?0:e.arrowHeight,[u,p]=ln(t),f={start:"0%",center:"50%",end:"100%"}[p],v=(((x=r.arrow)==null?void 0:x.x)??0)+c/2,w=(((C=r.arrow)==null?void 0:C.y)??0)+d/2;let h="",m="";return u==="bottom"?(h=i?f:`${v}px`,m=`${-d}px`):u==="top"?(h=i?f:`${v}px`,m=`${o.floating.height+d}px`):u==="right"?(h=`${-d}px`,m=i?f:`${w}px`):u==="left"&&(h=`${o.floating.width+d}px`,m=i?f:`${w}px`),{data:{x:h,y:m}}}});function ln(e){const[n,t="center"]=e.split("-");return[n,t]}var Ie=on,Oe=sn,ft=an,pt=un,kr="Portal",Ne=s.forwardRef((e,n)=>{var c;const{container:t,...o}=e,[r,a]=s.useState(!1);oe(()=>a(!0),[]);const i=t||r&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return i?Vt.createPortal(l.jsx(_.div,{...o,ref:n}),i):null});Ne.displayName=kr;function $r(e,n){return s.useReducer((t,o)=>n[t][o]??t,e)}var J=e=>{const{present:n,children:t}=e,o=Kr(n),r=typeof t=="function"?t({present:o.isPresent}):s.Children.only(t),a=I(o.ref,Ur(r));return typeof t=="function"||o.isPresent?s.cloneElement(r,{ref:a}):null};J.displayName="Presence";function Kr(e){const[n,t]=s.useState(),o=s.useRef({}),r=s.useRef(e),a=s.useRef("none"),i=e?"mounted":"unmounted",[c,d]=$r(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const u=Re(o.current);a.current=c==="mounted"?u:"none"},[c]),oe(()=>{const u=o.current,p=r.current;if(p!==e){const v=a.current,w=Re(u);e?d("MOUNT"):w==="none"||(u==null?void 0:u.display)==="none"?d("UNMOUNT"):d(p&&v!==w?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,d]),oe(()=>{if(n){const u=f=>{const w=Re(o.current).includes(f.animationName);f.target===n&&w&&st.flushSync(()=>d("ANIMATION_END"))},p=f=>{f.target===n&&(a.current=Re(o.current))};return n.addEventListener("animationstart",p),n.addEventListener("animationcancel",u),n.addEventListener("animationend",u),()=>{n.removeEventListener("animationstart",p),n.removeEventListener("animationcancel",u),n.removeEventListener("animationend",u)}}else d("ANIMATION_END")},[n,d]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:s.useCallback(u=>{u&&(o.current=getComputedStyle(u)),t(u)},[])}}function Re(e){return(e==null?void 0:e.animationName)||"none"}function Ur(e){var o,r;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,t=n&&"isReactWarning"in n&&n.isReactWarning;return t?e.ref:(n=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,t=n&&"isReactWarning"in n&&n.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}var ze="rovingFocusGroup.onEntryFocus",Hr={bubbles:!1,cancelable:!0},De="RovingFocusGroup",[Je,dn,Gr]=it(De),[Br,Fe]=q(De,[Gr]),[Vr,Wr]=Br(De),fn=s.forwardRef((e,n)=>l.jsx(Je.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Je.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Yr,{...e,ref:n})})}));fn.displayName=De;var Yr=s.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:t,orientation:o,loop:r=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:d,onEntryFocus:u,preventScrollOnEntryFocus:p=!1,...f}=e,v=s.useRef(null),w=I(n,v),h=ct(a),[m=null,g]=ee({prop:i,defaultProp:c,onChange:d}),[x,C]=s.useState(!1),y=K(u),b=dn(t),M=s.useRef(!1),[S,R]=s.useState(0);return s.useEffect(()=>{const A=v.current;if(A)return A.addEventListener(ze,y),()=>A.removeEventListener(ze,y)},[y]),l.jsx(Vr,{scope:t,orientation:o,dir:h,loop:r,currentTabStopId:m,onItemFocus:s.useCallback(A=>g(A),[g]),onItemShiftTab:s.useCallback(()=>C(!0),[]),onFocusableItemAdd:s.useCallback(()=>R(A=>A+1),[]),onFocusableItemRemove:s.useCallback(()=>R(A=>A-1),[]),children:l.jsx(_.div,{tabIndex:x||S===0?-1:0,"data-orientation":o,...f,ref:w,style:{outline:"none",...e.style},onMouseDown:E(e.onMouseDown,()=>{M.current=!0}),onFocus:E(e.onFocus,A=>{const j=!M.current;if(A.target===A.currentTarget&&j&&!x){const L=new CustomEvent(ze,Hr);if(A.currentTarget.dispatchEvent(L),!L.defaultPrevented){const H=b().filter(O=>O.focusable),G=H.find(O=>O.active),B=H.find(O=>O.id===m),D=[G,B,...H].filter(Boolean).map(O=>O.ref.current);mn(D,p)}}M.current=!1}),onBlur:E(e.onBlur,()=>C(!1))})})}),pn="RovingFocusGroupItem",vn=s.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:t,focusable:o=!0,active:r=!1,tabStopId:a,...i}=e,c=re(),d=a||c,u=Wr(pn,t),p=u.currentTabStopId===d,f=dn(t),{onFocusableItemAdd:v,onFocusableItemRemove:w}=u;return s.useEffect(()=>{if(o)return v(),()=>w()},[o,v,w]),l.jsx(Je.ItemSlot,{scope:t,id:d,focusable:o,active:r,children:l.jsx(_.span,{tabIndex:p?0:-1,"data-orientation":u.orientation,...i,ref:n,onMouseDown:E(e.onMouseDown,h=>{o?u.onItemFocus(d):h.preventDefault()}),onFocus:E(e.onFocus,()=>u.onItemFocus(d)),onKeyDown:E(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){u.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const m=Zr(h,u.orientation,u.dir);if(m!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let x=f().filter(C=>C.focusable).map(C=>C.ref.current);if(m==="last")x.reverse();else if(m==="prev"||m==="next"){m==="prev"&&x.reverse();const C=x.indexOf(h.currentTarget);x=u.loop?qr(x,C+1):x.slice(C+1)}setTimeout(()=>mn(x))}})})})});vn.displayName=pn;var zr={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Xr(e,n){return n!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Zr(e,n,t){const o=Xr(e.key,t);if(!(n==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(n==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return zr[o]}function mn(e,n=!1){const t=document.activeElement;for(const o of e)if(o===t||(o.focus({preventScroll:n}),document.activeElement!==t))return}function qr(e,n){return e.map((t,o)=>e[(n+o)%e.length])}var hn=fn,gn=vn,Qe=["Enter"," "],Jr=["ArrowDown","PageUp","Home"],wn=["ArrowUp","PageDown","End"],Qr=[...Jr,...wn],es={ltr:[...Qe,"ArrowRight"],rtl:[...Qe,"ArrowLeft"]},ts={ltr:["ArrowLeft"],rtl:["ArrowRight"]},xe="Menu",[ge,ns,os]=it(xe),[ue,Cn]=q(xe,[os,fe,Fe]),Ee=fe(),xn=Fe(),[En,se]=ue(xe),[rs,ye]=ue(xe),yn=e=>{const{__scopeMenu:n,open:t=!1,children:o,dir:r,onOpenChange:a,modal:i=!0}=e,c=Ee(n),[d,u]=s.useState(null),p=s.useRef(!1),f=K(a),v=ct(r);return s.useEffect(()=>{const w=()=>{p.current=!0,document.addEventListener("pointerdown",h,{capture:!0,once:!0}),document.addEventListener("pointermove",h,{capture:!0,once:!0})},h=()=>p.current=!1;return document.addEventListener("keydown",w,{capture:!0}),()=>{document.removeEventListener("keydown",w,{capture:!0}),document.removeEventListener("pointerdown",h,{capture:!0}),document.removeEventListener("pointermove",h,{capture:!0})}},[]),l.jsx(Ie,{...c,children:l.jsx(En,{scope:n,open:t,onOpenChange:f,content:d,onContentChange:u,children:l.jsx(rs,{scope:n,onClose:s.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:p,dir:v,modal:i,children:o})})})};yn.displayName=xe;var ss="MenuAnchor",vt=s.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e,r=Ee(t);return l.jsx(Oe,{...r,...o,ref:n})});vt.displayName=ss;var mt="MenuPortal",[as,bn]=ue(mt,{forceMount:void 0}),Pn=e=>{const{__scopeMenu:n,forceMount:t,children:o,container:r}=e,a=se(mt,n);return l.jsx(as,{scope:n,forceMount:t,children:l.jsx(J,{present:t||a.open,children:l.jsx(Ne,{asChild:!0,container:r,children:o})})})};Pn.displayName=mt;var X="MenuContent",[is,ht]=ue(X),Tn=s.forwardRef((e,n)=>{const t=bn(X,e.__scopeMenu),{forceMount:o=t.forceMount,...r}=e,a=se(X,e.__scopeMenu),i=ye(X,e.__scopeMenu);return l.jsx(ge.Provider,{scope:e.__scopeMenu,children:l.jsx(J,{present:o||a.open,children:l.jsx(ge.Slot,{scope:e.__scopeMenu,children:i.modal?l.jsx(cs,{...r,ref:n}):l.jsx(us,{...r,ref:n})})})})}),cs=s.forwardRef((e,n)=>{const t=se(X,e.__scopeMenu),o=s.useRef(null),r=I(n,o);return s.useEffect(()=>{const a=o.current;if(a)return W.hideOthers(a)},[]),l.jsx(gt,{...e,ref:r,trapFocus:t.open,disableOutsidePointerEvents:t.open,disableOutsideScroll:!0,onFocusOutside:E(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>t.onOpenChange(!1)})}),us=s.forwardRef((e,n)=>{const t=se(X,e.__scopeMenu);return l.jsx(gt,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>t.onOpenChange(!1)})}),gt=s.forwardRef((e,n)=>{const{__scopeMenu:t,loop:o=!1,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:c,onEntryFocus:d,onEscapeKeyDown:u,onPointerDownOutside:p,onFocusOutside:f,onInteractOutside:v,onDismiss:w,disableOutsideScroll:h,...m}=e,g=se(X,t),x=ye(X,t),C=Ee(t),y=xn(t),b=ns(t),[M,S]=s.useState(null),R=s.useRef(null),A=I(n,R,g.onContentChange),j=s.useRef(0),L=s.useRef(""),H=s.useRef(0),G=s.useRef(null),B=s.useRef("right"),T=s.useRef(0),D=h?W.ReactRemoveScroll:s.Fragment,O=h?{as:ce,allowPinchZoom:!0}:void 0,Y=P=>{var Q,pe;const $=L.current+P,k=b().filter(z=>!z.disabled),V=document.activeElement,Z=(Q=k.find(z=>z.ref.current===V))==null?void 0:Q.textValue,te=k.map(z=>z.textValue),Pe=Es(te,$,Z),ie=(pe=k.find(z=>z.textValue===Pe))==null?void 0:pe.ref.current;(function z(ve){L.current=ve,window.clearTimeout(j.current),ve!==""&&(j.current=window.setTimeout(()=>z(""),1e3))})($),ie&&setTimeout(()=>ie.focus())};s.useEffect(()=>()=>window.clearTimeout(j.current),[]),qt();const F=s.useCallback(P=>{var k,V;return B.current===((k=G.current)==null?void 0:k.side)&&bs(P,(V=G.current)==null?void 0:V.area)},[]);return l.jsx(is,{scope:t,searchRef:L,onItemEnter:s.useCallback(P=>{F(P)&&P.preventDefault()},[F]),onItemLeave:s.useCallback(P=>{var $;F(P)||(($=R.current)==null||$.focus(),S(null))},[F]),onTriggerLeave:s.useCallback(P=>{F(P)&&P.preventDefault()},[F]),pointerGraceTimerRef:H,onPointerGraceIntentChange:s.useCallback(P=>{G.current=P},[]),children:l.jsx(D,{...O,children:l.jsx(ut,{asChild:!0,trapped:r,onMountAutoFocus:E(a,P=>{var $;P.preventDefault(),($=R.current)==null||$.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:l.jsx(Ce,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:p,onFocusOutside:f,onInteractOutside:v,onDismiss:w,children:l.jsx(hn,{asChild:!0,...y,dir:x.dir,orientation:"vertical",loop:o,currentTabStopId:M,onCurrentTabStopIdChange:S,onEntryFocus:E(d,P=>{x.isUsingKeyboardRef.current||P.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(ft,{role:"menu","aria-orientation":"vertical","data-state":Hn(g.open),"data-radix-menu-content":"",dir:x.dir,...C,...m,ref:A,style:{outline:"none",...m.style},onKeyDown:E(m.onKeyDown,P=>{const k=P.target.closest("[data-radix-menu-content]")===P.currentTarget,V=P.ctrlKey||P.altKey||P.metaKey,Z=P.key.length===1;k&&(P.key==="Tab"&&P.preventDefault(),!V&&Z&&Y(P.key));const te=R.current;if(P.target!==te||!Qr.includes(P.key))return;P.preventDefault();const ie=b().filter(Q=>!Q.disabled).map(Q=>Q.ref.current);wn.includes(P.key)&&ie.reverse(),Cs(ie)}),onBlur:E(e.onBlur,P=>{P.currentTarget.contains(P.target)||(window.clearTimeout(j.current),L.current="")}),onPointerMove:E(e.onPointerMove,we(P=>{const $=P.target,k=T.current!==P.clientX;if(P.currentTarget.contains($)&&k){const V=P.clientX>T.current?"right":"left";B.current=V,T.current=P.clientX}}))})})})})})})});Tn.displayName=X;var ls="MenuGroup",wt=s.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e;return l.jsx(_.div,{role:"group",...o,ref:n})});wt.displayName=ls;var ds="MenuLabel",Rn=s.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e;return l.jsx(_.div,{...o,ref:n})});Rn.displayName=ds;var _e="MenuItem",Ht="menu.itemSelect",je=s.forwardRef((e,n)=>{const{disabled:t=!1,onSelect:o,...r}=e,a=s.useRef(null),i=ye(_e,e.__scopeMenu),c=ht(_e,e.__scopeMenu),d=I(n,a),u=s.useRef(!1),p=()=>{const f=a.current;if(!t&&f){const v=new CustomEvent(Ht,{bubbles:!0,cancelable:!0});f.addEventListener(Ht,w=>o==null?void 0:o(w),{once:!0}),at(f,v),v.defaultPrevented?u.current=!1:i.onClose()}};return l.jsx(Mn,{...r,ref:d,disabled:t,onClick:E(e.onClick,p),onPointerDown:f=>{var v;(v=e.onPointerDown)==null||v.call(e,f),u.current=!0},onPointerUp:E(e.onPointerUp,f=>{var v;u.current||(v=f.currentTarget)==null||v.click()}),onKeyDown:E(e.onKeyDown,f=>{const v=c.searchRef.current!=="";t||v&&f.key===" "||Qe.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});je.displayName=_e;var Mn=s.forwardRef((e,n)=>{const{__scopeMenu:t,disabled:o=!1,textValue:r,...a}=e,i=ht(_e,t),c=xn(t),d=s.useRef(null),u=I(n,d),[p,f]=s.useState(!1),[v,w]=s.useState("");return s.useEffect(()=>{const h=d.current;h&&w((h.textContent??"").trim())},[a.children]),l.jsx(ge.ItemSlot,{scope:t,disabled:o,textValue:r??v,children:l.jsx(gn,{asChild:!0,...c,focusable:!o,children:l.jsx(_.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...a,ref:u,onPointerMove:E(e.onPointerMove,we(h=>{o?i.onItemLeave(h):(i.onItemEnter(h),h.defaultPrevented||h.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:E(e.onPointerLeave,we(h=>i.onItemLeave(h))),onFocus:E(e.onFocus,()=>f(!0)),onBlur:E(e.onBlur,()=>f(!1))})})})}),fs="MenuCheckboxItem",_n=s.forwardRef((e,n)=>{const{checked:t=!1,onCheckedChange:o,...r}=e;return l.jsx(Nn,{scope:e.__scopeMenu,checked:t,children:l.jsx(je,{role:"menuitemcheckbox","aria-checked":Se(t)?"mixed":t,...r,ref:n,"data-state":Et(t),onSelect:E(r.onSelect,()=>o==null?void 0:o(Se(t)?!0:!t),{checkForDefaultPrevented:!1})})})});_n.displayName=fs;var Sn="MenuRadioGroup",[ps,vs]=ue(Sn,{value:void 0,onValueChange:()=>{}}),An=s.forwardRef((e,n)=>{const{value:t,onValueChange:o,...r}=e,a=K(o);return l.jsx(ps,{scope:e.__scopeMenu,value:t,onValueChange:a,children:l.jsx(wt,{...r,ref:n})})});An.displayName=Sn;var In="MenuRadioItem",On=s.forwardRef((e,n)=>{const{value:t,...o}=e,r=vs(In,e.__scopeMenu),a=t===r.value;return l.jsx(Nn,{scope:e.__scopeMenu,checked:a,children:l.jsx(je,{role:"menuitemradio","aria-checked":a,...o,ref:n,"data-state":Et(a),onSelect:E(o.onSelect,()=>{var i;return(i=r.onValueChange)==null?void 0:i.call(r,t)},{checkForDefaultPrevented:!1})})})});On.displayName=In;var Ct="MenuItemIndicator",[Nn,ms]=ue(Ct,{checked:!1}),Dn=s.forwardRef((e,n)=>{const{__scopeMenu:t,forceMount:o,...r}=e,a=ms(Ct,t);return l.jsx(J,{present:o||Se(a.checked)||a.checked===!0,children:l.jsx(_.span,{...r,ref:n,"data-state":Et(a.checked)})})});Dn.displayName=Ct;var hs="MenuSeparator",Fn=s.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e;return l.jsx(_.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})});Fn.displayName=hs;var gs="MenuArrow",jn=s.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e,r=Ee(t);return l.jsx(pt,{...r,...o,ref:n})});jn.displayName=gs;var xt="MenuSub",[ws,Ln]=ue(xt),kn=e=>{const{__scopeMenu:n,children:t,open:o=!1,onOpenChange:r}=e,a=se(xt,n),i=Ee(n),[c,d]=s.useState(null),[u,p]=s.useState(null),f=K(r);return s.useEffect(()=>(a.open===!1&&f(!1),()=>f(!1)),[a.open,f]),l.jsx(Ie,{...i,children:l.jsx(En,{scope:n,open:o,onOpenChange:f,content:u,onContentChange:p,children:l.jsx(ws,{scope:n,contentId:re(),triggerId:re(),trigger:c,onTriggerChange:d,children:t})})})};kn.displayName=xt;var he="MenuSubTrigger",$n=s.forwardRef((e,n)=>{const t=se(he,e.__scopeMenu),o=ye(he,e.__scopeMenu),r=Ln(he,e.__scopeMenu),a=ht(he,e.__scopeMenu),i=s.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:d}=a,u={__scopeMenu:e.__scopeMenu},p=s.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return s.useEffect(()=>p,[p]),s.useEffect(()=>{const f=c.current;return()=>{window.clearTimeout(f),d(null)}},[c,d]),l.jsx(vt,{asChild:!0,...u,children:l.jsx(Mn,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":t.open,"aria-controls":r.contentId,"data-state":Hn(t.open),...e,ref:Ae(n,r.onTriggerChange),onClick:f=>{var v;(v=e.onClick)==null||v.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),t.open||t.onOpenChange(!0))},onPointerMove:E(e.onPointerMove,we(f=>{a.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!t.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{t.onOpenChange(!0),p()},100))})),onPointerLeave:E(e.onPointerLeave,we(f=>{var w,h;p();const v=(w=t.content)==null?void 0:w.getBoundingClientRect();if(v){const m=(h=t.content)==null?void 0:h.dataset.side,g=m==="right",x=g?-5:5,C=v[g?"left":"right"],y=v[g?"right":"left"];a.onPointerGraceIntentChange({area:[{x:f.clientX+x,y:f.clientY},{x:C,y:v.top},{x:y,y:v.top},{x:y,y:v.bottom},{x:C,y:v.bottom}],side:m}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(f),f.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:E(e.onKeyDown,f=>{var w;const v=a.searchRef.current!=="";e.disabled||v&&f.key===" "||es[o.dir].includes(f.key)&&(t.onOpenChange(!0),(w=t.content)==null||w.focus(),f.preventDefault())})})})});$n.displayName=he;var Kn="MenuSubContent",Un=s.forwardRef((e,n)=>{const t=bn(X,e.__scopeMenu),{forceMount:o=t.forceMount,...r}=e,a=se(X,e.__scopeMenu),i=ye(X,e.__scopeMenu),c=Ln(Kn,e.__scopeMenu),d=s.useRef(null),u=I(n,d);return l.jsx(ge.Provider,{scope:e.__scopeMenu,children:l.jsx(J,{present:o||a.open,children:l.jsx(ge.Slot,{scope:e.__scopeMenu,children:l.jsx(gt,{id:c.contentId,"aria-labelledby":c.triggerId,...r,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:p=>{var f;i.isUsingKeyboardRef.current&&((f=d.current)==null||f.focus()),p.preventDefault()},onCloseAutoFocus:p=>p.preventDefault(),onFocusOutside:E(e.onFocusOutside,p=>{p.target!==c.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:E(e.onEscapeKeyDown,p=>{i.onClose(),p.preventDefault()}),onKeyDown:E(e.onKeyDown,p=>{var w;const f=p.currentTarget.contains(p.target),v=ts[i.dir].includes(p.key);f&&v&&(a.onOpenChange(!1),(w=c.trigger)==null||w.focus(),p.preventDefault())})})})})})});Un.displayName=Kn;function Hn(e){return e?"open":"closed"}function Se(e){return e==="indeterminate"}function Et(e){return Se(e)?"indeterminate":e?"checked":"unchecked"}function Cs(e){const n=document.activeElement;for(const t of e)if(t===n||(t.focus(),document.activeElement!==n))return}function xs(e,n){return e.map((t,o)=>e[(n+o)%e.length])}function Es(e,n,t){const r=n.length>1&&Array.from(n).every(u=>u===n[0])?n[0]:n,a=t?e.indexOf(t):-1;let i=xs(e,Math.max(a,0));r.length===1&&(i=i.filter(u=>u!==t));const d=i.find(u=>u.toLowerCase().startsWith(r.toLowerCase()));return d!==t?d:void 0}function ys(e,n){const{x:t,y:o}=e;let r=!1;for(let a=0,i=n.length-1;a<n.length;i=a++){const c=n[a].x,d=n[a].y,u=n[i].x,p=n[i].y;d>o!=p>o&&t<(u-c)*(o-d)/(p-d)+c&&(r=!r)}return r}function bs(e,n){if(!n)return!1;const t={x:e.clientX,y:e.clientY};return ys(t,n)}function we(e){return n=>n.pointerType==="mouse"?e(n):void 0}var Ps=yn,Ts=vt,Rs=Pn,Ms=Tn,_s=wt,Ss=Rn,As=je,Is=_n,Os=An,Ns=On,Ds=Dn,Fs=Fn,js=jn,Ls=kn,ks=$n,$s=Un,yt="DropdownMenu",[Ks,Zi]=q(yt,[Cn]),U=Cn(),[Us,Gn]=Ks(yt),Bn=e=>{const{__scopeDropdownMenu:n,children:t,dir:o,open:r,defaultOpen:a,onOpenChange:i,modal:c=!0}=e,d=U(n),u=s.useRef(null),[p=!1,f]=ee({prop:r,defaultProp:a,onChange:i});return l.jsx(Us,{scope:n,triggerId:re(),triggerRef:u,contentId:re(),open:p,onOpenChange:f,onOpenToggle:s.useCallback(()=>f(v=>!v),[f]),modal:c,children:l.jsx(Ps,{...d,open:p,onOpenChange:f,dir:o,modal:c,children:t})})};Bn.displayName=yt;var Vn="DropdownMenuTrigger",Wn=s.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,disabled:o=!1,...r}=e,a=Gn(Vn,t),i=U(t);return l.jsx(Ts,{asChild:!0,...i,children:l.jsx(_.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:Ae(n,a.triggerRef),onPointerDown:E(e.onPointerDown,c=>{!o&&c.button===0&&c.ctrlKey===!1&&(a.onOpenToggle(),a.open||c.preventDefault())}),onKeyDown:E(e.onKeyDown,c=>{o||(["Enter"," "].includes(c.key)&&a.onOpenToggle(),c.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});Wn.displayName=Vn;var Hs="DropdownMenuPortal",Yn=e=>{const{__scopeDropdownMenu:n,...t}=e,o=U(n);return l.jsx(Rs,{...o,...t})};Yn.displayName=Hs;var zn="DropdownMenuContent",Xn=s.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,r=Gn(zn,t),a=U(t),i=s.useRef(!1);return l.jsx(Ms,{id:r.contentId,"aria-labelledby":r.triggerId,...a,...o,ref:n,onCloseAutoFocus:E(e.onCloseAutoFocus,c=>{var d;i.current||(d=r.triggerRef.current)==null||d.focus(),i.current=!1,c.preventDefault()}),onInteractOutside:E(e.onInteractOutside,c=>{const d=c.detail.originalEvent,u=d.button===0&&d.ctrlKey===!0,p=d.button===2||u;(!r.modal||p)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Xn.displayName=zn;var Gs="DropdownMenuGroup",Zn=s.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,r=U(t);return l.jsx(_s,{...r,...o,ref:n})});Zn.displayName=Gs;var Bs="DropdownMenuLabel",qn=s.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,r=U(t);return l.jsx(Ss,{...r,...o,ref:n})});qn.displayName=Bs;var Vs="DropdownMenuItem",Jn=s.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,r=U(t);return l.jsx(As,{...r,...o,ref:n})});Jn.displayName=Vs;var Ws="DropdownMenuCheckboxItem",Qn=s.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,r=U(t);return l.jsx(Is,{...r,...o,ref:n})});Qn.displayName=Ws;var Ys="DropdownMenuRadioGroup",eo=s.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,r=U(t);return l.jsx(Os,{...r,...o,ref:n})});eo.displayName=Ys;var zs="DropdownMenuRadioItem",to=s.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,r=U(t);return l.jsx(Ns,{...r,...o,ref:n})});to.displayName=zs;var Xs="DropdownMenuItemIndicator",no=s.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,r=U(t);return l.jsx(Ds,{...r,...o,ref:n})});no.displayName=Xs;var Zs="DropdownMenuSeparator",oo=s.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,r=U(t);return l.jsx(Fs,{...r,...o,ref:n})});oo.displayName=Zs;var qs="DropdownMenuArrow",Js=s.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,r=U(t);return l.jsx(js,{...r,...o,ref:n})});Js.displayName=qs;var Qs=e=>{const{__scopeDropdownMenu:n,children:t,open:o,onOpenChange:r,defaultOpen:a}=e,i=U(n),[c=!1,d]=ee({prop:o,defaultProp:a,onChange:r});return l.jsx(Ls,{...i,open:c,onOpenChange:d,children:t})},ea="DropdownMenuSubTrigger",ro=s.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,r=U(t);return l.jsx(ks,{...r,...o,ref:n})});ro.displayName=ea;var ta="DropdownMenuSubContent",so=s.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,r=U(t);return l.jsx($s,{...r,...o,ref:n,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});so.displayName=ta;var na=Bn,oa=Wn,ra=Yn,sa=Xn,aa=Zn,ia=qn,ca=Jn,ua=Qn,la=eo,da=to,fa=no,pa=oo,va=Qs,ma=ro,ha=so,ga="Label",ao=s.forwardRef((e,n)=>l.jsx(_.label,{...e,ref:n,onMouseDown:t=>{var r;t.target.closest("button, input, select, textarea")||((r=e.onMouseDown)==null||r.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));ao.displayName=ga;var wa=ao,bt="Popover",[io,qi]=q(bt,[fe]),be=fe(),[Ca,ae]=io(bt),co=e=>{const{__scopePopover:n,children:t,open:o,defaultOpen:r,onOpenChange:a,modal:i=!1}=e,c=be(n),d=s.useRef(null),[u,p]=s.useState(!1),[f=!1,v]=ee({prop:o,defaultProp:r,onChange:a});return l.jsx(Ie,{...c,children:l.jsx(Ca,{scope:n,contentId:re(),triggerRef:d,open:f,onOpenChange:v,onOpenToggle:s.useCallback(()=>v(w=>!w),[v]),hasCustomAnchor:u,onCustomAnchorAdd:s.useCallback(()=>p(!0),[]),onCustomAnchorRemove:s.useCallback(()=>p(!1),[]),modal:i,children:t})})};co.displayName=bt;var uo="PopoverAnchor",xa=s.forwardRef((e,n)=>{const{__scopePopover:t,...o}=e,r=ae(uo,t),a=be(t),{onCustomAnchorAdd:i,onCustomAnchorRemove:c}=r;return s.useEffect(()=>(i(),()=>c()),[i,c]),l.jsx(Oe,{...a,...o,ref:n})});xa.displayName=uo;var lo="PopoverTrigger",fo=s.forwardRef((e,n)=>{const{__scopePopover:t,...o}=e,r=ae(lo,t),a=be(t),i=I(n,r.triggerRef),c=l.jsx(_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":go(r.open),...o,ref:i,onClick:E(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?c:l.jsx(Oe,{asChild:!0,...a,children:c})});fo.displayName=lo;var Pt="PopoverPortal",[Ea,ya]=io(Pt,{forceMount:void 0}),po=e=>{const{__scopePopover:n,forceMount:t,children:o,container:r}=e,a=ae(Pt,n);return l.jsx(Ea,{scope:n,forceMount:t,children:l.jsx(J,{present:t||a.open,children:l.jsx(Ne,{asChild:!0,container:r,children:o})})})};po.displayName=Pt;var le="PopoverContent",vo=s.forwardRef((e,n)=>{const t=ya(le,e.__scopePopover),{forceMount:o=t.forceMount,...r}=e,a=ae(le,e.__scopePopover);return l.jsx(J,{present:o||a.open,children:a.modal?l.jsx(ba,{...r,ref:n}):l.jsx(Pa,{...r,ref:n})})});vo.displayName=le;var ba=s.forwardRef((e,n)=>{const t=ae(le,e.__scopePopover),o=s.useRef(null),r=I(n,o),a=s.useRef(!1);return s.useEffect(()=>{const i=o.current;if(i)return W.hideOthers(i)},[]),l.jsx(W.ReactRemoveScroll,{as:ce,allowPinchZoom:!0,children:l.jsx(mo,{...e,ref:r,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:E(e.onCloseAutoFocus,i=>{var c;i.preventDefault(),a.current||(c=t.triggerRef.current)==null||c.focus()}),onPointerDownOutside:E(e.onPointerDownOutside,i=>{const c=i.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0,u=c.button===2||d;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:E(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Pa=s.forwardRef((e,n)=>{const t=ae(le,e.__scopePopover),o=s.useRef(!1),r=s.useRef(!1);return l.jsx(mo,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var i,c;(i=e.onCloseAutoFocus)==null||i.call(e,a),a.defaultPrevented||(o.current||(c=t.triggerRef.current)==null||c.focus(),a.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:a=>{var d,u;(d=e.onInteractOutside)==null||d.call(e,a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const i=a.target;((u=t.triggerRef.current)==null?void 0:u.contains(i))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&r.current&&a.preventDefault()}})}),mo=s.forwardRef((e,n)=>{const{__scopePopover:t,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:p,...f}=e,v=ae(le,t),w=be(t);return qt(),l.jsx(ut,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:a,children:l.jsx(Ce,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:p,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:u,onDismiss:()=>v.onOpenChange(!1),children:l.jsx(ft,{"data-state":go(v.open),role:"dialog",id:v.contentId,...w,...f,ref:n,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),ho="PopoverClose",Ta=s.forwardRef((e,n)=>{const{__scopePopover:t,...o}=e,r=ae(ho,t);return l.jsx(_.button,{type:"button",...o,ref:n,onClick:E(e.onClick,()=>r.onOpenChange(!1))})});Ta.displayName=ho;var Ra="PopoverArrow",Ma=s.forwardRef((e,n)=>{const{__scopePopover:t,...o}=e,r=be(t);return l.jsx(pt,{...r,...o,ref:n})});Ma.displayName=Ra;function go(e){return e?"open":"closed"}var _a=co,Sa=fo,Aa=po,Ia=vo,Oa="Separator",Gt="horizontal",Na=["horizontal","vertical"],wo=s.forwardRef((e,n)=>{const{decorative:t,orientation:o=Gt,...r}=e,a=Da(o)?o:Gt,c=t?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return l.jsx(_.div,{"data-orientation":a,...c,...r,ref:n})});wo.displayName=Oa;function Da(e){return Na.includes(e)}var Fa=wo;function ja(e){const n=s.useRef({value:e,previous:e});return s.useMemo(()=>(n.current.value!==e&&(n.current.previous=n.current.value,n.current.value=e),n.current.previous),[e])}var Tt="Switch",[La,Ji]=q(Tt),[ka,$a]=La(Tt),Co=s.forwardRef((e,n)=>{const{__scopeSwitch:t,name:o,checked:r,defaultChecked:a,required:i,disabled:c,value:d="on",onCheckedChange:u,...p}=e,[f,v]=s.useState(null),w=I(n,C=>v(C)),h=s.useRef(!1),m=f?!!f.closest("form"):!0,[g=!1,x]=ee({prop:r,defaultProp:a,onChange:u});return l.jsxs(ka,{scope:t,checked:g,disabled:c,children:[l.jsx(_.button,{type:"button",role:"switch","aria-checked":g,"aria-required":i,"data-state":yo(g),"data-disabled":c?"":void 0,disabled:c,value:d,...p,ref:w,onClick:E(e.onClick,C=>{x(y=>!y),m&&(h.current=C.isPropagationStopped(),h.current||C.stopPropagation())})}),m&&l.jsx(Ka,{control:f,bubbles:!h.current,name:o,value:d,checked:g,required:i,disabled:c,style:{transform:"translateX(-100%)"}})]})});Co.displayName=Tt;var xo="SwitchThumb",Eo=s.forwardRef((e,n)=>{const{__scopeSwitch:t,...o}=e,r=$a(xo,t);return l.jsx(_.span,{"data-state":yo(r.checked),"data-disabled":r.disabled?"":void 0,...o,ref:n})});Eo.displayName=xo;var Ka=e=>{const{control:n,checked:t,bubbles:o=!0,...r}=e,a=s.useRef(null),i=ja(t),c=en(n);return s.useEffect(()=>{const d=a.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(i!==t&&f){const v=new Event("click",{bubbles:o});f.call(d,t),d.dispatchEvent(v)}},[i,t,o]),l.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...r,tabIndex:-1,ref:a,style:{...e.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function yo(e){return e?"checked":"unchecked"}var Ua=Co,Ha=Eo,Rt="Tabs",[Ga,Qi]=q(Rt,[Fe]),bo=Fe(),[Ba,Mt]=Ga(Rt),Po=s.forwardRef((e,n)=>{const{__scopeTabs:t,value:o,onValueChange:r,defaultValue:a,orientation:i="horizontal",dir:c,activationMode:d="automatic",...u}=e,p=ct(c),[f,v]=ee({prop:o,onChange:r,defaultProp:a});return l.jsx(Ba,{scope:t,baseId:re(),value:f,onValueChange:v,orientation:i,dir:p,activationMode:d,children:l.jsx(_.div,{dir:p,"data-orientation":i,...u,ref:n})})});Po.displayName=Rt;var To="TabsList",Ro=s.forwardRef((e,n)=>{const{__scopeTabs:t,loop:o=!0,...r}=e,a=Mt(To,t),i=bo(t);return l.jsx(hn,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:o,children:l.jsx(_.div,{role:"tablist","aria-orientation":a.orientation,...r,ref:n})})});Ro.displayName=To;var Mo="TabsTrigger",_o=s.forwardRef((e,n)=>{const{__scopeTabs:t,value:o,disabled:r=!1,...a}=e,i=Mt(Mo,t),c=bo(t),d=Io(i.baseId,o),u=Oo(i.baseId,o),p=o===i.value;return l.jsx(gn,{asChild:!0,...c,focusable:!r,active:p,children:l.jsx(_.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":u,"data-state":p?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:d,...a,ref:n,onMouseDown:E(e.onMouseDown,f=>{!r&&f.button===0&&f.ctrlKey===!1?i.onValueChange(o):f.preventDefault()}),onKeyDown:E(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&i.onValueChange(o)}),onFocus:E(e.onFocus,()=>{const f=i.activationMode!=="manual";!p&&!r&&f&&i.onValueChange(o)})})})});_o.displayName=Mo;var So="TabsContent",Ao=s.forwardRef((e,n)=>{const{__scopeTabs:t,value:o,forceMount:r,children:a,...i}=e,c=Mt(So,t),d=Io(c.baseId,o),u=Oo(c.baseId,o),p=o===c.value,f=s.useRef(p);return s.useEffect(()=>{const v=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(v)},[]),l.jsx(J,{present:r||p,children:({present:v})=>l.jsx(_.div,{"data-state":p?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":d,hidden:!v,id:u,tabIndex:0,...i,ref:n,style:{...e.style,animationDuration:f.current?"0s":void 0},children:v&&a})})});Ao.displayName=So;function Io(e,n){return`${e}-trigger-${n}`}function Oo(e,n){return`${e}-content-${n}`}var Va=Po,Wa=Ro,Ya=_o,za=Ao,Xa="VisuallyHidden",Le=s.forwardRef((e,n)=>l.jsx(_.span,{...e,ref:n,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Le.displayName=Xa;var Za=Le,_t="ToastProvider",[St,qa,Ja]=it("Toast"),[No,ec]=q("Toast",[Ja]),[Qa,ke]=No(_t),Do=e=>{const{__scopeToast:n,label:t="Notification",duration:o=5e3,swipeDirection:r="right",swipeThreshold:a=50,children:i}=e,[c,d]=s.useState(null),[u,p]=s.useState(0),f=s.useRef(!1),v=s.useRef(!1);return t.trim()||console.error(`Invalid prop \`label\` supplied to \`${_t}\`. Expected non-empty \`string\`.`),l.jsx(St.Provider,{scope:n,children:l.jsx(Qa,{scope:n,label:t,duration:o,swipeDirection:r,swipeThreshold:a,toastCount:u,viewport:c,onViewportChange:d,onToastAdd:s.useCallback(()=>p(w=>w+1),[]),onToastRemove:s.useCallback(()=>p(w=>w-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:v,children:i})})};Do.displayName=_t;var Fo="ToastViewport",ei=["F8"],et="toast.viewportPause",tt="toast.viewportResume",jo=s.forwardRef((e,n)=>{const{__scopeToast:t,hotkey:o=ei,label:r="Notifications ({hotkey})",...a}=e,i=ke(Fo,t),c=qa(t),d=s.useRef(null),u=s.useRef(null),p=s.useRef(null),f=s.useRef(null),v=I(n,f,i.onViewportChange),w=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=i.toastCount>0;s.useEffect(()=>{const g=x=>{var y;o.every(b=>x[b]||x.code===b)&&((y=f.current)==null||y.focus())};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[o]),s.useEffect(()=>{const g=d.current,x=f.current;if(h&&g&&x){const C=()=>{if(!i.isClosePausedRef.current){const S=new CustomEvent(et);x.dispatchEvent(S),i.isClosePausedRef.current=!0}},y=()=>{if(i.isClosePausedRef.current){const S=new CustomEvent(tt);x.dispatchEvent(S),i.isClosePausedRef.current=!1}},b=S=>{!g.contains(S.relatedTarget)&&y()},M=()=>{g.contains(document.activeElement)||y()};return g.addEventListener("focusin",C),g.addEventListener("focusout",b),g.addEventListener("pointermove",C),g.addEventListener("pointerleave",M),window.addEventListener("blur",C),window.addEventListener("focus",y),()=>{g.removeEventListener("focusin",C),g.removeEventListener("focusout",b),g.removeEventListener("pointermove",C),g.removeEventListener("pointerleave",M),window.removeEventListener("blur",C),window.removeEventListener("focus",y)}}},[h,i.isClosePausedRef]);const m=s.useCallback(({tabbingDirection:g})=>{const C=c().map(y=>{const b=y.ref.current,M=[b,...pi(b)];return g==="forwards"?M:M.reverse()});return(g==="forwards"?C.reverse():C).flat()},[c]);return s.useEffect(()=>{const g=f.current;if(g){const x=C=>{var M,S,R;const y=C.altKey||C.ctrlKey||C.metaKey;if(C.key==="Tab"&&!y){const A=document.activeElement,j=C.shiftKey;if(C.target===g&&j){(M=u.current)==null||M.focus();return}const G=m({tabbingDirection:j?"backwards":"forwards"}),B=G.findIndex(T=>T===A);Xe(G.slice(B+1))?C.preventDefault():j?(S=u.current)==null||S.focus():(R=p.current)==null||R.focus()}};return g.addEventListener("keydown",x),()=>g.removeEventListener("keydown",x)}},[c,m]),l.jsxs(xr,{ref:d,role:"region","aria-label":r.replace("{hotkey}",w),tabIndex:-1,style:{pointerEvents:h?void 0:"none"},children:[h&&l.jsx(nt,{ref:u,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"forwards"});Xe(g)}}),l.jsx(St.Slot,{scope:t,children:l.jsx(_.ol,{tabIndex:-1,...a,ref:v})}),h&&l.jsx(nt,{ref:p,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"backwards"});Xe(g)}})]})});jo.displayName=Fo;var Lo="ToastFocusProxy",nt=s.forwardRef((e,n)=>{const{__scopeToast:t,onFocusFromOutsideViewport:o,...r}=e,a=ke(Lo,t);return l.jsx(Le,{"aria-hidden":!0,tabIndex:0,...r,ref:n,style:{position:"fixed"},onFocus:i=>{var u;const c=i.relatedTarget;!((u=a.viewport)!=null&&u.contains(c))&&o()}})});nt.displayName=Lo;var $e="Toast",ti="toast.swipeStart",ni="toast.swipeMove",oi="toast.swipeCancel",ri="toast.swipeEnd",ko=s.forwardRef((e,n)=>{const{forceMount:t,open:o,defaultOpen:r,onOpenChange:a,...i}=e,[c=!0,d]=ee({prop:o,defaultProp:r,onChange:a});return l.jsx(J,{present:t||c,children:l.jsx(ii,{open:c,...i,ref:n,onClose:()=>d(!1),onPause:K(e.onPause),onResume:K(e.onResume),onSwipeStart:E(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:E(e.onSwipeMove,u=>{const{x:p,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${p}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:E(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:E(e.onSwipeEnd,u=>{const{x:p,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${p}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),d(!1)})})})});ko.displayName=$e;var[si,ai]=No($e,{onClose(){}}),ii=s.forwardRef((e,n)=>{const{__scopeToast:t,type:o="foreground",duration:r,open:a,onClose:i,onEscapeKeyDown:c,onPause:d,onResume:u,onSwipeStart:p,onSwipeMove:f,onSwipeCancel:v,onSwipeEnd:w,...h}=e,m=ke($e,t),[g,x]=s.useState(null),C=I(n,T=>x(T)),y=s.useRef(null),b=s.useRef(null),M=r||m.duration,S=s.useRef(0),R=s.useRef(M),A=s.useRef(0),{onToastAdd:j,onToastRemove:L}=m,H=K(()=>{var D;(g==null?void 0:g.contains(document.activeElement))&&((D=m.viewport)==null||D.focus()),i()}),G=s.useCallback(T=>{!T||T===1/0||(window.clearTimeout(A.current),S.current=new Date().getTime(),A.current=window.setTimeout(H,T))},[H]);s.useEffect(()=>{const T=m.viewport;if(T){const D=()=>{G(R.current),u==null||u()},O=()=>{const Y=new Date().getTime()-S.current;R.current=R.current-Y,window.clearTimeout(A.current),d==null||d()};return T.addEventListener(et,O),T.addEventListener(tt,D),()=>{T.removeEventListener(et,O),T.removeEventListener(tt,D)}}},[m.viewport,M,d,u,G]),s.useEffect(()=>{a&&!m.isClosePausedRef.current&&G(M)},[a,M,m.isClosePausedRef,G]),s.useEffect(()=>(j(),()=>L()),[j,L]);const B=s.useMemo(()=>g?Vo(g):null,[g]);return m.viewport?l.jsxs(l.Fragment,{children:[B&&l.jsx(ci,{__scopeToast:t,role:"status","aria-live":o==="foreground"?"assertive":"polite","aria-atomic":!0,children:B}),l.jsx(si,{scope:t,onClose:H,children:st.createPortal(l.jsx(St.ItemSlot,{scope:t,children:l.jsx(Cr,{asChild:!0,onEscapeKeyDown:E(c,()=>{m.isFocusedToastEscapeKeyDownRef.current||H(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:l.jsx(_.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":m.swipeDirection,...h,ref:C,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:E(e.onKeyDown,T=>{T.key==="Escape"&&(c==null||c(T.nativeEvent),T.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,H()))}),onPointerDown:E(e.onPointerDown,T=>{T.button===0&&(y.current={x:T.clientX,y:T.clientY})}),onPointerMove:E(e.onPointerMove,T=>{if(!y.current)return;const D=T.clientX-y.current.x,O=T.clientY-y.current.y,Y=!!b.current,F=["left","right"].includes(m.swipeDirection),P=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,$=F?P(0,D):0,k=F?0:P(0,O),V=T.pointerType==="touch"?10:2,Z={x:$,y:k},te={originalEvent:T,delta:Z};Y?(b.current=Z,Me(ni,f,te,{discrete:!1})):Bt(Z,m.swipeDirection,V)?(b.current=Z,Me(ti,p,te,{discrete:!1}),T.target.setPointerCapture(T.pointerId)):(Math.abs(D)>V||Math.abs(O)>V)&&(y.current=null)}),onPointerUp:E(e.onPointerUp,T=>{const D=b.current,O=T.target;if(O.hasPointerCapture(T.pointerId)&&O.releasePointerCapture(T.pointerId),b.current=null,y.current=null,D){const Y=T.currentTarget,F={originalEvent:T,delta:D};Bt(D,m.swipeDirection,m.swipeThreshold)?Me(ri,w,F,{discrete:!0}):Me(oi,v,F,{discrete:!0}),Y.addEventListener("click",P=>P.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),ci=e=>{const{__scopeToast:n,children:t,...o}=e,r=ke($e,n),[a,i]=s.useState(!1),[c,d]=s.useState(!1);return di(()=>i(!0)),s.useEffect(()=>{const u=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(u)},[]),c?null:l.jsx(Ne,{asChild:!0,children:l.jsx(Le,{...o,children:a&&l.jsxs(l.Fragment,{children:[r.label," ",t]})})})},ui="ToastTitle",$o=s.forwardRef((e,n)=>{const{__scopeToast:t,...o}=e;return l.jsx(_.div,{...o,ref:n})});$o.displayName=ui;var li="ToastDescription",Ko=s.forwardRef((e,n)=>{const{__scopeToast:t,...o}=e;return l.jsx(_.div,{...o,ref:n})});Ko.displayName=li;var Uo="ToastAction",Ho=s.forwardRef((e,n)=>{const{altText:t,...o}=e;return t.trim()?l.jsx(Bo,{altText:t,asChild:!0,children:l.jsx(At,{...o,ref:n})}):(console.error(`Invalid prop \`altText\` supplied to \`${Uo}\`. Expected non-empty \`string\`.`),null)});Ho.displayName=Uo;var Go="ToastClose",At=s.forwardRef((e,n)=>{const{__scopeToast:t,...o}=e,r=ai(Go,t);return l.jsx(Bo,{asChild:!0,children:l.jsx(_.button,{type:"button",...o,ref:n,onClick:E(e.onClick,r.onClose)})})});At.displayName=Go;var Bo=s.forwardRef((e,n)=>{const{__scopeToast:t,altText:o,...r}=e;return l.jsx(_.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...r,ref:n})});function Vo(e){const n=[];return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&n.push(o.textContent),fi(o)){const r=o.ariaHidden||o.hidden||o.style.display==="none",a=o.dataset.radixToastAnnounceExclude==="";if(!r)if(a){const i=o.dataset.radixToastAnnounceAlt;i&&n.push(i)}else n.push(...Vo(o))}}),n}function Me(e,n,t,{discrete:o}){const r=t.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:t});n&&r.addEventListener(e,n,{once:!0}),o?at(r,a):r.dispatchEvent(a)}var Bt=(e,n,t=0)=>{const o=Math.abs(e.x),r=Math.abs(e.y),a=o>r;return n==="left"||n==="right"?a&&o>t:!a&&r>t};function di(e=()=>{}){const n=K(e);oe(()=>{let t=0,o=0;return t=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(n)),()=>{window.cancelAnimationFrame(t),window.cancelAnimationFrame(o)}},[n])}function fi(e){return e.nodeType===e.ELEMENT_NODE}function pi(e){const n=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)n.push(t.currentNode);return n}function Xe(e){const n=document.activeElement;return e.some(t=>t===n?!0:(t.focus(),document.activeElement!==n))}var vi=Do,mi=jo,hi=ko,gi=$o,wi=Ko,Ci=Ho,xi=At,Ei="Toggle",Wo=s.forwardRef((e,n)=>{const{pressed:t,defaultPressed:o=!1,onPressedChange:r,...a}=e,[i=!1,c]=ee({prop:t,onChange:r,defaultProp:o});return l.jsx(_.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:n,onClick:E(e.onClick,()=>{e.disabled||c(!i)})})});Wo.displayName=Ei;var yi=Wo,[Ke,tc]=q("Tooltip",[fe]),Ue=fe(),Yo="TooltipProvider",bi=700,ot="tooltip.open",[Pi,It]=Ke(Yo),zo=e=>{const{__scopeTooltip:n,delayDuration:t=bi,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:a}=e,[i,c]=s.useState(!0),d=s.useRef(!1),u=s.useRef(0);return s.useEffect(()=>{const p=u.current;return()=>window.clearTimeout(p)},[]),l.jsx(Pi,{scope:n,isOpenDelayed:i,delayDuration:t,onOpen:s.useCallback(()=>{window.clearTimeout(u.current),c(!1)},[]),onClose:s.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>c(!0),o)},[o]),isPointerInTransitRef:d,onPointerInTransitChange:s.useCallback(p=>{d.current=p},[]),disableHoverableContent:r,children:a})};zo.displayName=Yo;var He="Tooltip",[Ti,Ge]=Ke(He),Xo=e=>{const{__scopeTooltip:n,children:t,open:o,defaultOpen:r=!1,onOpenChange:a,disableHoverableContent:i,delayDuration:c}=e,d=It(He,e.__scopeTooltip),u=Ue(n),[p,f]=s.useState(null),v=re(),w=s.useRef(0),h=i??d.disableHoverableContent,m=c??d.delayDuration,g=s.useRef(!1),[x=!1,C]=ee({prop:o,defaultProp:r,onChange:R=>{R?(d.onOpen(),document.dispatchEvent(new CustomEvent(ot))):d.onClose(),a==null||a(R)}}),y=s.useMemo(()=>x?g.current?"delayed-open":"instant-open":"closed",[x]),b=s.useCallback(()=>{window.clearTimeout(w.current),g.current=!1,C(!0)},[C]),M=s.useCallback(()=>{window.clearTimeout(w.current),C(!1)},[C]),S=s.useCallback(()=>{window.clearTimeout(w.current),w.current=window.setTimeout(()=>{g.current=!0,C(!0)},m)},[m,C]);return s.useEffect(()=>()=>window.clearTimeout(w.current),[]),l.jsx(Ie,{...u,children:l.jsx(Ti,{scope:n,contentId:v,open:x,stateAttribute:y,trigger:p,onTriggerChange:f,onTriggerEnter:s.useCallback(()=>{d.isOpenDelayed?S():b()},[d.isOpenDelayed,S,b]),onTriggerLeave:s.useCallback(()=>{h?M():window.clearTimeout(w.current)},[M,h]),onOpen:b,onClose:M,disableHoverableContent:h,children:t})})};Xo.displayName=He;var rt="TooltipTrigger",Zo=s.forwardRef((e,n)=>{const{__scopeTooltip:t,...o}=e,r=Ge(rt,t),a=It(rt,t),i=Ue(t),c=s.useRef(null),d=I(n,c,r.onTriggerChange),u=s.useRef(!1),p=s.useRef(!1),f=s.useCallback(()=>u.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),l.jsx(Oe,{asChild:!0,...i,children:l.jsx(_.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:d,onPointerMove:E(e.onPointerMove,v=>{v.pointerType!=="touch"&&!p.current&&!a.isPointerInTransitRef.current&&(r.onTriggerEnter(),p.current=!0)}),onPointerLeave:E(e.onPointerLeave,()=>{r.onTriggerLeave(),p.current=!1}),onPointerDown:E(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:E(e.onFocus,()=>{u.current||r.onOpen()}),onBlur:E(e.onBlur,r.onClose),onClick:E(e.onClick,r.onClose)})})});Zo.displayName=rt;var Ri="TooltipPortal",[nc,Mi]=Ke(Ri,{forceMount:void 0}),de="TooltipContent",qo=s.forwardRef((e,n)=>{const t=Mi(de,e.__scopeTooltip),{forceMount:o=t.forceMount,side:r="top",...a}=e,i=Ge(de,e.__scopeTooltip);return l.jsx(J,{present:o||i.open,children:i.disableHoverableContent?l.jsx(Jo,{side:r,...a,ref:n}):l.jsx(_i,{side:r,...a,ref:n})})}),_i=s.forwardRef((e,n)=>{const t=Ge(de,e.__scopeTooltip),o=It(de,e.__scopeTooltip),r=s.useRef(null),a=I(n,r),[i,c]=s.useState(null),{trigger:d,onClose:u}=t,p=r.current,{onPointerInTransitChange:f}=o,v=s.useCallback(()=>{c(null),f(!1)},[f]),w=s.useCallback((h,m)=>{const g=h.currentTarget,x={x:h.clientX,y:h.clientY},C=Oi(x,g.getBoundingClientRect()),y=Ni(x,C),b=Di(m.getBoundingClientRect()),M=ji([...y,...b]);c(M),f(!0)},[f]);return s.useEffect(()=>()=>v(),[v]),s.useEffect(()=>{if(d&&p){const h=g=>w(g,p),m=g=>w(g,d);return d.addEventListener("pointerleave",h),p.addEventListener("pointerleave",m),()=>{d.removeEventListener("pointerleave",h),p.removeEventListener("pointerleave",m)}}},[d,p,w,v]),s.useEffect(()=>{if(i){const h=m=>{const g=m.target,x={x:m.clientX,y:m.clientY},C=(d==null?void 0:d.contains(g))||(p==null?void 0:p.contains(g)),y=!Fi(x,i);C?v():y&&(v(),u())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[d,p,i,u,v]),l.jsx(Jo,{...e,ref:a})}),[Si,Ai]=Ke(He,{isInside:!1}),Jo=s.forwardRef((e,n)=>{const{__scopeTooltip:t,children:o,"aria-label":r,onEscapeKeyDown:a,onPointerDownOutside:i,...c}=e,d=Ge(de,t),u=Ue(t),{onClose:p}=d;return s.useEffect(()=>(document.addEventListener(ot,p),()=>document.removeEventListener(ot,p)),[p]),s.useEffect(()=>{if(d.trigger){const f=v=>{const w=v.target;w!=null&&w.contains(d.trigger)&&p()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[d.trigger,p]),l.jsx(Ce,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:p,children:l.jsxs(ft,{"data-state":d.stateAttribute,...u,...c,ref:n,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(Yt,{children:o}),l.jsx(Si,{scope:t,isInside:!0,children:l.jsx(Za,{id:d.contentId,role:"tooltip",children:r||o})})]})})});qo.displayName=de;var Qo="TooltipArrow",Ii=s.forwardRef((e,n)=>{const{__scopeTooltip:t,...o}=e,r=Ue(t);return Ai(Qo,t).isInside?null:l.jsx(pt,{...r,...o,ref:n})});Ii.displayName=Qo;function Oi(e,n){const t=Math.abs(n.top-e.y),o=Math.abs(n.bottom-e.y),r=Math.abs(n.right-e.x),a=Math.abs(n.left-e.x);switch(Math.min(t,o,r,a)){case a:return"left";case r:return"right";case t:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Ni(e,n,t=5){const o=[];switch(n){case"top":o.push({x:e.x-t,y:e.y+t},{x:e.x+t,y:e.y+t});break;case"bottom":o.push({x:e.x-t,y:e.y-t},{x:e.x+t,y:e.y-t});break;case"left":o.push({x:e.x+t,y:e.y-t},{x:e.x+t,y:e.y+t});break;case"right":o.push({x:e.x-t,y:e.y-t},{x:e.x-t,y:e.y+t});break}return o}function Di(e){const{top:n,right:t,bottom:o,left:r}=e;return[{x:r,y:n},{x:t,y:n},{x:t,y:o},{x:r,y:o}]}function Fi(e,n){const{x:t,y:o}=e;let r=!1;for(let a=0,i=n.length-1;a<n.length;i=a++){const c=n[a].x,d=n[a].y,u=n[i].x,p=n[i].y;d>o!=p>o&&t<(u-c)*(o-d)/(p-d)+c&&(r=!r)}return r}function ji(e){const n=e.slice();return n.sort((t,o)=>t.x<o.x?-1:t.x>o.x?1:t.y<o.y?-1:t.y>o.y?1:0),Li(n)}function Li(e){if(e.length<=1)return e.slice();const n=[];for(let o=0;o<e.length;o++){const r=e[o];for(;n.length>=2;){const a=n[n.length-1],i=n[n.length-2];if((a.x-i.x)*(r.y-i.y)>=(a.y-i.y)*(r.x-i.x))n.pop();else break}n.push(r)}n.pop();const t=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;t.length>=2;){const a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(r.y-i.y)>=(a.y-i.y)*(r.x-i.x))t.pop();else break}t.push(r)}return t.pop(),n.length===1&&t.length===1&&n[0].x===t[0].x&&n[0].y===t[0].y?n:n.concat(t)}var ki=zo,$i=Xo,Ki=Zo,Ui=qo;function Be(e,n){if(e==null)return{};var t={},o=Object.keys(e),r,a;for(a=0;a<o.length;a++)r=o[a],!(n.indexOf(r)>=0)&&(t[r]=e[r]);return t}var Hi=["color"],Gi=N.forwardRef(function(e,n){var t=e.color,o=t===void 0?"currentColor":t,r=Be(e,Hi);return N.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:n}),N.createElement("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM4 7.5C4 7.22386 4.22386 7 4.5 7H10.5C10.7761 7 11 7.22386 11 7.5C11 7.77614 10.7761 8 10.5 8H4.5C4.22386 8 4 7.77614 4 7.5ZM3 10.5C3 10.2239 3.22386 10 3.5 10H11.5C11.7761 10 12 10.2239 12 10.5C12 10.7761 11.7761 11 11.5 11H3.5C3.22386 11 3 10.7761 3 10.5Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))}),Bi=["color"],Vi=N.forwardRef(function(e,n){var t=e.color,o=t===void 0?"currentColor":t,r=Be(e,Bi);return N.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:n}),N.createElement("path",{d:"M2.5 4C2.22386 4 2 4.22386 2 4.5C2 4.77614 2.22386 5 2.5 5H12.5C12.7761 5 13 4.77614 13 4.5C13 4.22386 12.7761 4 12.5 4H2.5ZM2 7.5C2 7.22386 2.22386 7 2.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H2.5C2.22386 8 2 7.77614 2 7.5ZM2 10.5C2 10.2239 2.22386 10 2.5 10H12.5C12.7761 10 13 10.2239 13 10.5C13 10.7761 12.7761 11 12.5 11H2.5C2.22386 11 2 10.7761 2 10.5Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))}),Wi=["color"],Yi=N.forwardRef(function(e,n){var t=e.color,o=t===void 0?"currentColor":t,r=Be(e,Wi);return N.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:n}),N.createElement("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM2 7.5C2 7.22386 2.22386 7 2.5 7H7.5C7.77614 7 8 7.22386 8 7.5C8 7.77614 7.77614 8 7.5 8H2.5C2.22386 8 2 7.77614 2 7.5ZM2 10.5C2 10.2239 2.22386 10 2.5 10H10.5C10.7761 10 11 10.2239 11 10.5C11 10.7761 10.7761 11 10.5 11H2.5C2.22386 11 2 10.7761 2 10.5Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))}),zi=["color"],Xi=N.forwardRef(function(e,n){var t=e.color,o=t===void 0?"currentColor":t,r=Be(e,zi);return N.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:n}),N.createElement("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM7 7.5C7 7.22386 7.22386 7 7.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H7.5C7.22386 8 7 7.77614 7 7.5ZM4 10.5C4 10.2239 4.22386 10 4.5 10H12.5C12.7761 10 13 10.2239 13 10.5C13 10.7761 12.7761 11 12.5 11H4.5C4.22386 11 4 10.7761 4 10.5Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))});exports.Action=Ci;exports.CheckboxItem2=ua;exports.Close=xi;exports.Content=za;exports.Content2=sa;exports.Content2$1=Ia;exports.Content2$2=Ui;exports.Description=wi;exports.Group2=aa;exports.Item2=ca;exports.ItemIndicator2=fa;exports.Label2=ia;exports.List=Wa;exports.Portal=Aa;exports.Portal2=ra;exports.Provider=vi;exports.Provider$1=ki;exports.RadioGroup2=la;exports.RadioItem2=da;exports.Root=wa;exports.Root$1=Fa;exports.Root$2=Ua;exports.Root$3=yi;exports.Root2=na;exports.Root2$1=_a;exports.Root2$2=Va;exports.Root2$3=hi;exports.Root3=$i;exports.Separator2=pa;exports.Slot=ce;exports.Sub2=va;exports.SubContent2=ha;exports.SubTrigger2=ma;exports.TextAlignCenterIcon=Gi;exports.TextAlignJustifyIcon=Vi;exports.TextAlignLeftIcon=Yi;exports.TextAlignRightIcon=Xi;exports.Thumb=Ha;exports.Title=gi;exports.Trigger=oa;exports.Trigger$1=Sa;exports.Trigger$2=Ya;exports.Trigger$3=Ki;exports.Viewport=mi;
2
+ //# sourceMappingURL=radix-BnsE5jjU.cjs.map