diff --git a/.kiro/specs/dynamic-theming/design.md b/.kiro/specs/dynamic-theming/design.md new file mode 100644 index 0000000..1ca84d7 --- /dev/null +++ b/.kiro/specs/dynamic-theming/design.md @@ -0,0 +1,168 @@ +# Design Document + +## Overview + +The dynamic theming system will extract color values from the existing style.css file and create a modular theme architecture. The system will use CSS custom properties (CSS variables) to enable runtime theme switching without page reloads. The architecture will consist of theme definition files, a theme manager service, and a user interface for theme selection. + +## Architecture + +### Theme Structure +- **Theme Files**: CSS files containing CSS custom property definitions for each theme +- **Base Variables**: Core CSS custom properties that all themes implement +- **Theme Manager**: TypeScript service that handles theme loading and switching +- **Theme UI**: Interface component for theme selection and preview + +### File Organization +``` +public/assets/themes/ +├── base-variables.css # Base CSS custom properties structure +├── default.css # Default theme extracted from current colors +└── [future-themes].css # Additional themes (e.g., dark.css, light.css) + +src/lib/ +└── theme-manager.ts # Theme management service + +src/modals/ +└── theme-selector.ts # Theme selection modal +``` + +## Components and Interfaces + +### Theme CSS Structure +Each theme CSS file will define the same set of CSS custom properties: +```css +/* Example: default.css */ +:root { + /* Background colors */ + --color-body-background: #eee; + --color-outliner-background: #fff; + --color-modal-background: #fff; + + /* Text colors */ + --color-primary-text: #222; + --color-secondary-text: #aaa; + --color-link: #098bd9; + --color-link-visited: #b26be4; + + /* Interactive states */ + --color-cursor-background: #000; + --color-cursor-text: #fff; + --color-selected-background: #000; + --color-selected-text: #fff; + + /* UI elements */ + --color-border: #ddd; + --color-button-background: #eee; + --color-button-hover: #f4f4f4; + + /* Specialized elements */ + --color-date-header-background: #547883; + --color-table-header-background: #666; + --color-strikethrough: #808080; + --color-code-background: #eee; +} +``` + +### Theme Metadata Structure +Theme metadata will be embedded in CSS file headers using comments: +```css +/* +name: Default Theme +author: Original Author +version: 1.0.0 +description: The original color scheme extracted from style.css +*/ + +:root { + /* CSS custom properties... */ +} +``` + +### Theme Metadata Interface +```typescript +interface ThemeInfo { + name: string; + author?: string; + version?: string; + description?: string; + filename: string; +} +``` + +### Theme Manager Service +```typescript +class ThemeManager { + private currentTheme: string; + private availableThemes: ThemeInfo[]; + private currentThemeLink: HTMLLinkElement | null; + + async loadTheme(themeName: string): Promise + async switchTheme(themeName: string): Promise + getCurrentTheme(): string + getAvailableThemes(): ThemeInfo[] + private loadThemeCSS(filename: string): Promise + private removeCurrentTheme(): void + private parseThemeMetadata(cssContent: string): ThemeInfo + private discoverAvailableThemes(): Promise + private persistThemePreference(themeName: string): void + private loadThemePreference(): string +} +``` + +## Data Models + +### Theme Storage +- **Location**: `public/assets/themes/` directory +- **Format**: CSS files with CSS custom property definitions +- **Naming**: `{theme-name}.css` (e.g., `default.css`, `dark.css`) + +### Theme Loading Mechanism +- **Dynamic Loading**: Themes loaded by injecting `` elements into document head +- **Theme Switching**: Remove previous theme link and add new theme link +- **CSS Cascade**: Theme CSS custom properties override base styles automatically +- **Metadata Parsing**: Fetch theme CSS files to extract metadata from header comments +- **Theme Discovery**: Scan themes directory for available CSS files and parse their metadata + +### Theme Persistence +- **Storage**: localStorage +- **Key**: `outliner-theme-preference` +- **Value**: Theme name string + +## Error Handling + +### Theme Loading Failures +- **Fallback**: Always fall back to default theme if requested theme fails to load +- **CSS Load Detection**: Monitor link element load/error events +- **User Feedback**: Display error messages for failed theme operations + +### Missing Theme Files +- **Detection**: Handle CSS file 404 errors gracefully +- **Recovery**: Provide list of available themes if requested theme is missing +- **Logging**: Log theme-related errors for debugging + +### CSS Variable Support +- **Browser Compatibility**: Detect CSS custom property support +- **Graceful Degradation**: Fall back to static CSS if variables not supported +- **Progressive Enhancement**: Enhance experience for modern browsers + +## Testing Strategy + +### Unit Tests +- **Theme Manager**: Test theme loading, switching, and persistence +- **CSS Loading**: Test dynamic CSS file loading and error handling +- **Theme Detection**: Test available theme discovery + +### Integration Tests +- **Theme Switching**: Test complete theme switching workflow +- **UI Integration**: Test theme selector modal functionality +- **Persistence**: Test theme preference saving and loading + +### Visual Testing +- **Theme Consistency**: Verify all UI elements update correctly with theme changes +- **Color Contrast**: Ensure accessibility standards are met for all themes +- **Interactive States**: Test hover, selected, and cursor states across themes + +### Browser Compatibility +- **CSS Variables**: Test in browsers with and without CSS custom property support +- **Theme Persistence**: Test localStorage functionality across browsers +- **Performance**: Measure theme switching performance impact \ No newline at end of file diff --git a/.kiro/specs/dynamic-theming/requirements.md b/.kiro/specs/dynamic-theming/requirements.md new file mode 100644 index 0000000..44a4ca7 --- /dev/null +++ b/.kiro/specs/dynamic-theming/requirements.md @@ -0,0 +1,57 @@ +# Requirements Document + +## Introduction + +This feature will extract color values from the existing style.css file and create a separate theme system that allows for dynamic stylesheet swapping. The system will enable users to switch between different color themes (starting with a "default" theme) without requiring application restarts or page reloads. + +## Requirements + +### Requirement 1 + +**User Story:** As a user, I want to be able to switch between different color themes, so that I can customize the visual appearance of the application to my preferences. + +#### Acceptance Criteria + +1. WHEN the application loads THEN the system SHALL apply the default theme automatically +2. WHEN a user selects a different theme THEN the system SHALL update the visual appearance immediately without requiring a page reload +3. WHEN a theme is changed THEN the system SHALL persist the user's theme preference for future sessions + +### Requirement 2 + +**User Story:** As a developer, I want color values to be centralized in theme files, so that I can easily create and maintain different color schemes. + +#### Acceptance Criteria + +1. WHEN creating a new theme THEN all color values SHALL be defined in a single theme file +2. WHEN the main stylesheet is loaded THEN it SHALL reference theme variables instead of hardcoded color values +3. WHEN a color needs to be updated THEN it SHALL only require changes in the theme file, not the main stylesheet + +### Requirement 3 + +**User Story:** As a user, I want the theme system to preserve all existing visual functionality, so that changing themes doesn't break the application's appearance or usability. + +#### Acceptance Criteria + +1. WHEN any theme is applied THEN all existing visual elements SHALL maintain their intended styling and layout +2. WHEN switching themes THEN interactive states (hover, selected, cursor) SHALL continue to work correctly +3. WHEN a theme is applied THEN all color-dependent features (search results, node states, dates) SHALL remain visually distinct and functional + +### Requirement 4 + +**User Story:** As a user, I want a theme selection interface, so that I can easily choose and preview different themes. + +#### Acceptance Criteria + +1. WHEN accessing theme settings THEN the system SHALL provide a user interface for theme selection +2. WHEN previewing a theme THEN the system SHALL show the theme name and allow immediate application +3. WHEN a theme is selected THEN the interface SHALL provide visual feedback confirming the selection + +### Requirement 5 + +**User Story:** As a developer, I want the theme system to be extensible, so that new themes can be added easily in the future. + +#### Acceptance Criteria + +1. WHEN adding a new theme THEN it SHALL only require creating a new theme file following the established structure +2. WHEN a new theme file is added THEN the system SHALL automatically detect and make it available for selection +3. WHEN defining theme variables THEN the system SHALL use a consistent naming convention that maps clearly to CSS properties \ No newline at end of file diff --git a/.kiro/specs/dynamic-theming/tasks.md b/.kiro/specs/dynamic-theming/tasks.md new file mode 100644 index 0000000..a9365ed --- /dev/null +++ b/.kiro/specs/dynamic-theming/tasks.md @@ -0,0 +1,68 @@ +# Implementation Plan + +- [x] 1. Extract colors from existing style.css and create base theme structure + - Analyze current style.css to identify all color values used throughout the application + - Create themes directory structure at `public/assets/themes/` + - Create default.css theme file with metadata header and CSS custom properties extracted from style.css + - _Requirements: 2.1, 2.2_ + +- [x] 2. Modify main stylesheet to use CSS custom properties + - Update style.css to replace hardcoded color values with CSS custom property references + - Ensure all color-dependent styles use the new CSS variables + - Test that visual appearance remains identical with the new variable-based approach + - _Requirements: 2.2, 3.1, 3.2_ + +- [x] 3. Implement theme manager service + - Create ThemeManager class in `src/lib/theme-manager.ts` + - Implement theme metadata parsing from CSS file headers + - Implement dynamic CSS loading and switching functionality + - Add theme preference persistence using localStorage + - _Requirements: 1.1, 1.3, 2.1_ + +- [ ] 4. Add theme discovery and initialization + - Implement theme discovery mechanism to scan available theme files + - Add theme manager initialization to main client.ts + - Implement automatic default theme loading on application startup + - Add error handling for theme loading failures with fallback to default + - _Requirements: 1.1, 5.2_ + +- [ ] 5. Create theme selection modal interface + - Create theme selector modal component in `src/modals/theme-selector.ts` + - Implement theme list display with metadata (name, author, version) + - Add theme preview and selection functionality + - Integrate theme selector with existing modal system + - _Requirements: 4.1, 4.2, 4.3_ + +- [ ] 6. Add keyboard shortcut for theme selection + - Add new keyboard shortcut definition for opening theme selector + - Integrate theme selector shortcut with existing keyboard shortcut system + - Update help modal to include theme selection shortcut + - _Requirements: 4.1_ + +- [ ] 7. Implement theme switching functionality + - Connect theme selector UI to theme manager service + - Implement immediate theme application without page reload + - Add visual feedback for successful theme changes + - Ensure theme persistence works correctly across sessions + - _Requirements: 1.2, 1.3, 4.3_ + +- [ ] 8. Add comprehensive error handling and validation + - Implement CSS file loading error detection and handling + - Add validation for theme metadata format + - Implement graceful fallback to default theme on errors + - Add user-friendly error messages for theme-related issues + - _Requirements: 3.1, 3.2, 3.3_ + +- [ ] 9. Create unit tests for theme system + - Write tests for ThemeManager class methods + - Test theme metadata parsing functionality + - Test theme switching and persistence mechanisms + - Test error handling and fallback scenarios + - _Requirements: 2.1, 1.2, 1.3_ + +- [ ] 10. Verify theme system integration and functionality + - Test complete theme switching workflow end-to-end + - Verify all UI elements update correctly with theme changes + - Test theme persistence across browser sessions + - Ensure all interactive states (hover, selected, cursor) work with new themes + - _Requirements: 3.1, 3.2, 3.3, 1.2_ \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index f265b6e..75d3421 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "outline-browser", - "version": "0.0.1", + "version": "0.0.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "outline-browser", - "version": "0.0.1", + "version": "0.0.2", "dependencies": { "@lyrasearch/lyra": "^0.4.3", - "@tauri-apps/api": "^2.7.0", + "@tauri-apps/api": "^2.8.0", "@tauri-apps/plugin-dialog": "^2.3.2", "@tauri-apps/plugin-fs": "^2.4.1", "@tauri-apps/plugin-shell": "^2.3.0", @@ -21,7 +21,7 @@ "uuid": "^11.1.0" }, "devDependencies": { - "@tauri-apps/cli": "^2.7.1", + "@tauri-apps/cli": "^2.8.1", "@types/jest": "^30.0.0", "@types/keyboardjs": "^2.5.0", "@types/lodash": "^4.14.191", @@ -1128,9 +1128,9 @@ } }, "node_modules/@tauri-apps/api": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-2.7.0.tgz", - "integrity": "sha512-v7fVE8jqBl8xJFOcBafDzXFc8FnicoH3j8o8DNNs0tHuEBmXUDqrCOAzMRX0UkfpwqZLqvrvK0GNQ45DfnoVDg==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-2.8.0.tgz", + "integrity": "sha512-ga7zdhbS2GXOMTIZRT0mYjKJtR9fivsXzsyq5U3vjDL0s6DTMwYRm0UHNjzTY5dh4+LSC68Sm/7WEiimbQNYlw==", "license": "Apache-2.0 OR MIT", "funding": { "type": "opencollective", @@ -1138,9 +1138,9 @@ } }, "node_modules/@tauri-apps/cli": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-2.7.1.tgz", - "integrity": "sha512-RcGWR4jOUEl92w3uvI0h61Llkfj9lwGD1iwvDRD2isMrDhOzjeeeVn9aGzeW1jubQ/kAbMYfydcA4BA0Cy733Q==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-2.8.1.tgz", + "integrity": "sha512-ONVAfI7PFUO6MdSq9dh2YwlIb1cAezrzqrWw2+TChVskoqzDyyzncU7yXlcph/H/nR/kNDEY3E1pC8aV3TVCNQ==", "dev": true, "license": "Apache-2.0 OR MIT", "bin": { @@ -1154,23 +1154,23 @@ "url": "https://opencollective.com/tauri" }, "optionalDependencies": { - "@tauri-apps/cli-darwin-arm64": "2.7.1", - "@tauri-apps/cli-darwin-x64": "2.7.1", - "@tauri-apps/cli-linux-arm-gnueabihf": "2.7.1", - "@tauri-apps/cli-linux-arm64-gnu": "2.7.1", - "@tauri-apps/cli-linux-arm64-musl": "2.7.1", - "@tauri-apps/cli-linux-riscv64-gnu": "2.7.1", - "@tauri-apps/cli-linux-x64-gnu": "2.7.1", - "@tauri-apps/cli-linux-x64-musl": "2.7.1", - "@tauri-apps/cli-win32-arm64-msvc": "2.7.1", - "@tauri-apps/cli-win32-ia32-msvc": "2.7.1", - "@tauri-apps/cli-win32-x64-msvc": "2.7.1" + "@tauri-apps/cli-darwin-arm64": "2.8.1", + "@tauri-apps/cli-darwin-x64": "2.8.1", + "@tauri-apps/cli-linux-arm-gnueabihf": "2.8.1", + "@tauri-apps/cli-linux-arm64-gnu": "2.8.1", + "@tauri-apps/cli-linux-arm64-musl": "2.8.1", + "@tauri-apps/cli-linux-riscv64-gnu": "2.8.1", + "@tauri-apps/cli-linux-x64-gnu": "2.8.1", + "@tauri-apps/cli-linux-x64-musl": "2.8.1", + "@tauri-apps/cli-win32-arm64-msvc": "2.8.1", + "@tauri-apps/cli-win32-ia32-msvc": "2.8.1", + "@tauri-apps/cli-win32-x64-msvc": "2.8.1" } }, "node_modules/@tauri-apps/cli-darwin-arm64": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-2.7.1.tgz", - "integrity": "sha512-j2NXQN6+08G03xYiyKDKqbCV2Txt+hUKg0a8hYr92AmoCU8fgCjHyva/p16lGFGUG3P2Yu0xiNe1hXL9ZuRMzA==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-2.8.1.tgz", + "integrity": "sha512-301XWcDozcvJ79uMRquSvgI4vvAxetFs+reMpBI1U5mSWixjUqxZjxs9UDJAtE+GFXdGYTjSLUxCKe5WBDKZ/A==", "cpu": [ "arm64" ], @@ -1185,9 +1185,9 @@ } }, "node_modules/@tauri-apps/cli-darwin-x64": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-2.7.1.tgz", - "integrity": "sha512-CdYAefeM35zKsc91qIyKzbaO7FhzTyWKsE8hj7tEJ1INYpoh1NeNNyL/NSEA3Nebi5ilugioJ5tRK8ZXG8y3gw==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-2.8.1.tgz", + "integrity": "sha512-fJpOD/jWNy3sn27mjPGexBxGPTCgoCu29C+7qBV8kKJQGrRB4/zJk2zMqcKMjV/1Dma47n+saQWXLFwGpRUHgQ==", "cpu": [ "x64" ], @@ -1202,9 +1202,9 @@ } }, "node_modules/@tauri-apps/cli-linux-arm-gnueabihf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-2.7.1.tgz", - "integrity": "sha512-dnvyJrTA1UJxJjQ8q1N/gWomjP8Twij1BUQu2fdcT3OPpqlrbOk5R1yT0oD/721xoKNjroB5BXCsmmlykllxNg==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-2.8.1.tgz", + "integrity": "sha512-BcrZiInB3xjdV/Q2yv88aAz4Ajrxomd1+oePUO8ZWVpdhFwMZaAAOMbpPVgrlanGBeSzU7Aim9i1Opz/+JYiDA==", "cpu": [ "arm" ], @@ -1219,9 +1219,9 @@ } }, "node_modules/@tauri-apps/cli-linux-arm64-gnu": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-2.7.1.tgz", - "integrity": "sha512-FtBW6LJPNRTws3qyUc294AqCWU91l/H0SsFKq6q4Q45MSS4x6wxLxou8zB53tLDGEPx3JSoPLcDaSfPlSbyujQ==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-2.8.1.tgz", + "integrity": "sha512-uZXaQrcdk55h4qWSe3pngg6LMUwVUIoluxXG/cmKHeq8LddlUdKpj3OaSPahLWip1Ol6hq14ysvywzsrdhM4kA==", "cpu": [ "arm64" ], @@ -1236,9 +1236,9 @@ } }, "node_modules/@tauri-apps/cli-linux-arm64-musl": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.7.1.tgz", - "integrity": "sha512-/HXY0t4FHkpFzjeYS5c16mlA6z0kzn5uKLWptTLTdFSnYpr8FCnOP4Sdkvm2TDQPF2ERxXtNCd+WR/jQugbGnA==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.8.1.tgz", + "integrity": "sha512-VK/zwBzQY9SfyK7RSrxlIRQLJyhyssoByYWPK/FJMre8SV/y8zZ071cTQNG9dPWM1f+onI1WPTleG+TBUq/0Gw==", "cpu": [ "arm64" ], @@ -1253,9 +1253,9 @@ } }, "node_modules/@tauri-apps/cli-linux-riscv64-gnu": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-riscv64-gnu/-/cli-linux-riscv64-gnu-2.7.1.tgz", - "integrity": "sha512-GeW5lVI2GhhnaYckiDzstG2j2Jwlud5d2XefRGwlOK+C/bVGLT1le8MNPYK8wgRlpeK8fG1WnJJYD6Ke7YQ8bg==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-riscv64-gnu/-/cli-linux-riscv64-gnu-2.8.1.tgz", + "integrity": "sha512-bFw3zK6xkyurDR5kw2QgiU6YFlFNrfgtli3wRdTRv8zSVLZMQ2iZ8keYnd57vpvsbZ9PusFPYAMS7Fkzkf9I4g==", "cpu": [ "riscv64" ], @@ -1270,9 +1270,9 @@ } }, "node_modules/@tauri-apps/cli-linux-x64-gnu": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-2.7.1.tgz", - "integrity": "sha512-DprxKQkPxIPYwUgg+cscpv2lcIUhn2nxEPlk0UeaiV9vATxCXyytxr1gLcj3xgjGyNPlM0MlJyYaPy1JmRg1cA==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-2.8.1.tgz", + "integrity": "sha512-zOnFX+Rppuz0UVVSeCi67lMet8le+yT4UIiQ6t/QYGtpoWO/D4GpMoVYehJlR14klNXrC2CRxT9b3BUWTCEBwA==", "cpu": [ "x64" ], @@ -1287,9 +1287,9 @@ } }, "node_modules/@tauri-apps/cli-linux-x64-musl": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-2.7.1.tgz", - "integrity": "sha512-KLlq3kOK7OUyDR757c0zQjPULpGZpLhNB0lZmZpHXvoOUcqZoCXJHh4dT/mryWZJp5ilrem5l8o9ngrDo0X1AA==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-2.8.1.tgz", + "integrity": "sha512-gLy6eisaeOTC6NQirs3a0XZNCVT/i7JPYHkXx6ArH6+Kb9IU8ogthTY4MQoYbkWmdOp3ijKX+RT1dD3IZURrEg==", "cpu": [ "x64" ], @@ -1304,9 +1304,9 @@ } }, "node_modules/@tauri-apps/cli-win32-arm64-msvc": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-2.7.1.tgz", - "integrity": "sha512-dH7KUjKkSypCeWPiainHyXoES3obS+JIZVoSwSZfKq2gWgs48FY3oT0hQNYrWveE+VR4VoR3b/F3CPGbgFvksA==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-2.8.1.tgz", + "integrity": "sha512-ciZ93Dm847zFDqRyc1e0YRiu/cdWne1bMhvifcZOibbyqSKB9o+b95Y5axMtXqR4Wsd2mHiC5TE+MVF3NDsdEw==", "cpu": [ "arm64" ], @@ -1321,9 +1321,9 @@ } }, "node_modules/@tauri-apps/cli-win32-ia32-msvc": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-2.7.1.tgz", - "integrity": "sha512-1oeibfyWQPVcijOrTg709qhbXArjX3x1MPjrmA5anlygwrbByxLBcLXvotcOeULFcnH2FYUMMLLant8kgvwE5A==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-2.8.1.tgz", + "integrity": "sha512-uWUa503Pw53XidUvcqWOvVsBY7vpQs+ZlTyQgXSnPuTiMF1l5bFEzqoHMvZfIL3MFG13xCAqVK1bR7lFB/6qMQ==", "cpu": [ "ia32" ], @@ -1338,9 +1338,9 @@ } }, "node_modules/@tauri-apps/cli-win32-x64-msvc": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-2.7.1.tgz", - "integrity": "sha512-D7Q9kDObutuirCNLxYQ7KAg2Xxg99AjcdYz/KuMw5HvyEPbkC9Q7JL0vOrQOrHEHxIQ2lYzFOZvKKoC2yyqXcg==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-2.8.1.tgz", + "integrity": "sha512-KmiT0vI7FMBWfk5YDQg7+WcjzuMdeaHOQ7H0podZ7lyJg2qo2DpbGp8y+fMVCRsmvQx5bW6Cyh1ArfO1kkUInA==", "cpu": [ "x64" ], diff --git a/package.json b/package.json index e5a1228..14f8e00 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "tauri": "tauri" }, "devDependencies": { - "@tauri-apps/cli": "^2.7.1", + "@tauri-apps/cli": "^2.8.1", "@types/jest": "^30.0.0", "@types/keyboardjs": "^2.5.0", "@types/lodash": "^4.14.191", @@ -27,7 +27,7 @@ }, "dependencies": { "@lyrasearch/lyra": "^0.4.3", - "@tauri-apps/api": "^2.7.0", + "@tauri-apps/api": "^2.8.0", "@tauri-apps/plugin-dialog": "^2.3.2", "@tauri-apps/plugin-fs": "^2.4.1", "@tauri-apps/plugin-shell": "^2.3.0", diff --git a/public/assets/bundle.js b/public/assets/bundle.js index e860193..584b9e4 100644 --- a/public/assets/bundle.js +++ b/public/assets/bundle.js @@ -1,2 +1,2 @@ /*! For license information please see bundle.js.LICENSE.txt */ -(()=>{var e,t,n={23:(e,t,n)=>{"use strict";function r(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}n.r(t),n.d(t,{Hooks:()=>fe,Lexer:()=>ae,Marked:()=>de,Parser:()=>ce,Renderer:()=>ue,TextRenderer:()=>le,Tokenizer:()=>se,defaults:()=>i,getDefaults:()=>r,lexer:()=>ke,marked:()=>pe,options:()=>me,parse:()=>we,parseInline:()=>be,parser:()=>_e,setOptions:()=>ge,use:()=>ye,walkTokens:()=>ve});var i={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function o(e){i=e}var s={exec:()=>null};function a(e,t=""){let n="string"==typeof e?e:e.source,r={replace:(e,t)=>{let i="string"==typeof t?t:t.source;return i=i.replace(u.caret,"$1"),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var u={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},l=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,c=/(?:[*+-]|\d{1,9}[.)])/,f=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,d=a(f).replace(/bull/g,c).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),h=a(f).replace(/bull/g,c).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),p=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,m=/(?!\s*\])(?:\\.|[^\[\]\\])+/,g=a(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",m).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),y=a(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,c).getRegex(),v="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",b=/|$))/,w=a("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",b).replace("tag",v).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_=a(p).replace("hr",l).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",v).getRegex(),k={blockquote:a(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",_).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:g,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:l,html:w,lheading:d,list:y,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:_,table:s,text:/^[^\n]+/},x=a("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",l).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",v).getRegex(),S={...k,lheading:h,table:x,paragraph:a(p).replace("hr",l).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",x).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",v).getRegex()},O={...k,html:a("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",b).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:s,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:a(p).replace("hr",l).replace("heading"," *#{1,6} *[^\n]").replace("lheading",d).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},T=/^( {2,}|\\)\n(?!\s*$)/,C=/[\p{P}\p{S}]/u,D=/[\s\p{P}\p{S}]/u,N=/[^\s\p{P}\p{S}]/u,M=a(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,D).getRegex(),E=/(?!~)[\p{P}\p{S}]/u,L=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,I=a(L,"u").replace(/punct/g,C).getRegex(),A=a(L,"u").replace(/punct/g,E).getRegex(),$="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",R=a($,"gu").replace(/notPunctSpace/g,N).replace(/punctSpace/g,D).replace(/punct/g,C).getRegex(),j=a($,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,E).getRegex(),P=a("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,N).replace(/punctSpace/g,D).replace(/punct/g,C).getRegex(),U=a(/\\(punct)/,"gu").replace(/punct/g,C).getRegex(),z=a(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),F=a(b).replace("(?:--\x3e|$)","--\x3e").getRegex(),B=a("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",F).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),K=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,V=a(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",K).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),W=a(/^!?\[(label)\]\[(ref)\]/).replace("label",K).replace("ref",m).getRegex(),q=a(/^!?\[(ref)\](?:\[\])?/).replace("ref",m).getRegex(),Z={_backpedal:s,anyPunctuation:U,autolink:z,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,br:T,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:s,emStrongLDelim:I,emStrongRDelimAst:R,emStrongRDelimUnd:P,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:V,nolink:q,punctuation:M,reflink:W,reflinkSearch:a("reflink|nolink(?!\\()","g").replace("reflink",W).replace("nolink",q).getRegex(),tag:B,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},ee=e=>X[e];function te(e,t){if(t){if(u.escapeTest.test(e))return e.replace(u.escapeReplace,ee)}else if(u.escapeTestNoEncode.test(e))return e.replace(u.escapeReplaceNoEncode,ee);return e}function ne(e){try{e=encodeURI(e).replace(u.percentDecode,"%")}catch{return null}return e}function re(e,t){let n=e.replace(u.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"}).split(u.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:ie(e,"\n")}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=function(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(null===r)return t;let i=r[1];return t.split("\n").map(e=>{let t=e.match(n.other.beginningSpace);if(null===t)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join("\n")}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=ie(e,"#");(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:ie(t[0],"\n")}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=ie(t[0],"\n").split("\n"),n="",r="",i=[];for(;e.length>0;){let t,o=!1,s=[];for(t=0;t1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let o=this.rules.other.listItemRegex(n),s=!1;for(;e;){let n=!1,r="",a="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let u=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,e=>" ".repeat(3*e.length)),l=e.split("\n",1)[0],c=!u.trim(),f=0;if(this.options.pedantic?(f=2,a=u.trimStart()):c?f=t[1].length+1:(f=t[2].search(this.rules.other.nonSpaceChar),f=f>4?1:f,a=u.slice(f),f+=t[1].length),c&&this.rules.other.blankLine.test(l)&&(r+=l+"\n",e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(f),n=this.rules.other.hrRegex(f),i=this.rules.other.fencesBeginRegex(f),o=this.rules.other.headingBeginRegex(f),s=this.rules.other.htmlBeginRegex(f);for(;e;){let d,h=e.split("\n",1)[0];if(l=h,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting," "),d=l):d=l.replace(this.rules.other.tabCharGlobal," "),i.test(l)||o.test(l)||s.test(l)||t.test(l)||n.test(l))break;if(d.search(this.rules.other.nonSpaceChar)>=f||!l.trim())a+="\n"+d.slice(f);else{if(c||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||i.test(u)||o.test(u)||n.test(u))break;a+="\n"+l}!c&&!l.trim()&&(c=!0),r+=h+"\n",e=e.substring(h.length+1),u=d.slice(f)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(s=!0));let d,h=null;this.options.gfm&&(h=this.rules.other.listIsTask.exec(a),h&&(d="[ ] "!==h[0],a=a.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:r,task:!!h,checked:d,loose:!1,text:a,tokens:[]}),i.raw+=r}let a=i.items.at(-1);if(!a)return;a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd(),i.raw=i.raw.trimEnd();for(let e=0;e"space"===e.type),n=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw));i.loose=n}if(i.loose)for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:o.align[t]})));return o}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=ie(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{let e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r0?-2:-1}(t[2],"()");if(-2===e)return;if(e>-1){let n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),oe(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return oe(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!r[1]&&!r[2]||!n||this.rules.inline.punctuation.exec(n))){let n,i,o=[...r[0]].length-1,s=o,a=0,u="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+o);null!=(r=u.exec(t));){if(n=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!n)continue;if(i=[...n].length,r[3]||r[4]){s+=i;continue}if((r[5]||r[6])&&o%3&&!((o+i)%3)){a+=i;continue}if(s-=i,s>0)continue;i=Math.min(i,i+s+a);let t=[...r[0]][0].length,u=e.slice(0,o+r.index+t+i);if(Math.min(o,i)%2){let e=u.slice(1,-1);return{type:"em",raw:u,text:e,tokens:this.lexer.inlineTokens(e)}}let l=u.slice(2,-2);return{type:"strong",raw:u,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=t[1],n="mailto:"+e):(e=t[1],n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=t[0],n="mailto:"+e;else{let r;do{r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(r!==t[0]);e=t[0],n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}},ae=class e{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||i,this.options.tokenizer=this.options.tokenizer||new se,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:u,block:Y.normal,inline:Q.normal};this.options.pedantic?(t.block=Y.pedantic,t.inline=Q.pedantic):this.options.gfm&&(t.block=Y.gfm,this.options.breaks?t.inline=Q.breaks:t.inline=Q.gfm),this.tokenizer.rules=t}static get rules(){return{block:Y,inline:Q}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(u.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);1===r.raw.length&&void 0!==n?n.raw+="\n":t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+r.raw,n.text+="\n"+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+r.raw,n.text+="\n"+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let t,n=1/0,r=e.slice(1);this.options.extensions.startBlock.forEach(e=>{t=e.call({lexer:this},r),"number"==typeof t&&t>=0&&(n=Math.min(n,t))}),n<1/0&&n>=0&&(i=e.substring(0,n+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let o=t.at(-1);n&&"paragraph"===o?.type?(o.raw+=(o.raw.endsWith("\n")?"":"\n")+r.raw,o.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(n));)e.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.anyPunctuation.exec(n));)n=n.slice(0,r.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(n));)n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,o="";for(;e;){let r;if(i||(o=""),i=!1,this.options.extensions?.inline?.some(n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);"text"===r.type&&"text"===n?.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let s=e;if(this.options.extensions?.startInline){let t,n=1/0,r=e.slice(1);this.options.extensions.startInline.forEach(e=>{t=e.call({lexer:this},r),"number"==typeof t&&t>=0&&(n=Math.min(n,t))}),n<1/0&&n>=0&&(s=e.substring(0,n+1))}if(r=this.tokenizer.inlineText(s)){e=e.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(o=r.raw.slice(-1)),i=!0;let n=t.at(-1);"text"===n?.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return t}},ue=class{options;parser;constructor(e){this.options=e||i}space(e){return""}code({text:e,lang:t,escaped:n}){let r=(t||"").match(u.notSpaceStart)?.[0],i=e.replace(u.endingNewline,"")+"\n";return r?'
'+(n?i:te(i,!0))+"
\n":"
"+(n?i:te(i,!0))+"
\n"}blockquote({tokens:e}){return`
\n${this.parser.parse(e)}
\n`}html({text:e}){return e}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)}\n`}hr(e){return"
\n"}list(e){let t=e.ordered,n=e.start,r="";for(let t=0;t\n"+r+"\n"}listitem(e){let t="";if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?"paragraph"===e.tokens[0]?.type?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+te(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • \n`}checkbox({checked:e}){return"'}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    \n`}table(e){let t="",n="";for(let t=0;t${r}`),"\n\n"+t+"\n"+r+"
    \n"}tablerow({text:e}){return`\n${e}\n`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`\n`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${te(e,!0)}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=ne(e);if(null===i)return r;let o='
    ",o}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=ne(e);if(null===i)return te(n);let o=`${n}{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){let n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new ue(this.defaults);for(let n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let r=n,i=e.renderer[r],o=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return!1===n&&(n=o.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new se(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let r=n,i=e.tokenizer[r],o=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return!1===n&&(n=o.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new fe;for(let n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let r=n,i=e.hooks[r],o=t[r];fe.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async)return Promise.resolve(i.call(t,e)).then(e=>o.call(t,e));let n=i.call(t,e);return o.call(t,n)}:t[r]=(...e)=>{let n=i.apply(t,e);return!1===n&&(n=o.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ae.lex(e,t??this.defaults)}parser(e,t){return ce.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},o=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===r.async)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||null===t)return o(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=e);let s=i.hooks?i.hooks.provideLexer():e?ae.lex:ae.lexInline,a=i.hooks?i.hooks.provideParser():e?ce.parse:ce.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(t):t).then(e=>s(e,i)).then(e=>i.hooks?i.hooks.processAllTokens(e):e).then(e=>i.walkTokens?Promise.all(this.walkTokens(e,i.walkTokens)).then(()=>e):e).then(e=>a(e,i)).then(e=>i.hooks?i.hooks.postprocess(e):e).catch(o);try{i.hooks&&(t=i.hooks.preprocess(t));let e=s(t,i);i.hooks&&(e=i.hooks.processAllTokens(e)),i.walkTokens&&this.walkTokens(e,i.walkTokens);let n=a(e,i);return i.hooks&&(n=i.hooks.postprocess(n)),n}catch(e){return o(e)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){let e="

    An error occurred:

    "+te(n.message+"",!0)+"
    ";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},he=new de;function pe(e,t){return he.parse(e,t)}pe.options=pe.setOptions=function(e){return he.setOptions(e),pe.defaults=he.defaults,o(pe.defaults),pe},pe.getDefaults=r,pe.defaults=i,pe.use=function(...e){return he.use(...e),pe.defaults=he.defaults,o(pe.defaults),pe},pe.walkTokens=function(e,t){return he.walkTokens(e,t)},pe.parseInline=he.parseInline,pe.Parser=ce,pe.parser=ce.parse,pe.Renderer=ue,pe.TextRenderer=le,pe.Lexer=ae,pe.lexer=ae.lex,pe.Tokenizer=se,pe.Hooks=fe,pe.parse=pe;var me=pe.options,ge=pe.setOptions,ye=pe.use,ve=pe.walkTokens,be=pe.parseInline,we=pe,_e=ce.parse,ke=ae.lex},182:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=t.validate=t.v7=t.v6ToV1=t.v6=t.v5=t.v4=t.v3=t.v1ToV6=t.v1=t.stringify=t.parse=t.NIL=t.MAX=void 0;var r=n(2196);Object.defineProperty(t,"MAX",{enumerable:!0,get:function(){return r.default}});var i=n(3465);Object.defineProperty(t,"NIL",{enumerable:!0,get:function(){return i.default}});var o=n(1797);Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return o.default}});var s=n(6011);Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.default}});var a=n(1425);Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return a.default}});var u=n(6568);Object.defineProperty(t,"v1ToV6",{enumerable:!0,get:function(){return u.default}});var l=n(591);Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return l.default}});var c=n(8286);Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return c.default}});var f=n(4557);Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return f.default}});var d=n(6356);Object.defineProperty(t,"v6",{enumerable:!0,get:function(){return d.default}});var h=n(268);Object.defineProperty(t,"v6ToV1",{enumerable:!0,get:function(){return h.default}});var p=n(4299);Object.defineProperty(t,"v7",{enumerable:!0,get:function(){return p.default}});var m=n(9746);Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return m.default}});var g=n(2770);Object.defineProperty(t,"version",{enumerable:!0,get:function(){return g.default}})},268:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1797),i=n(6011);t.default=function(e){const t=(n="string"==typeof e?(0,r.default)(e):e,Uint8Array.of((15&n[3])<<4|n[4]>>4&15,(15&n[4])<<4|(240&n[5])>>4,(15&n[5])<<4|15&n[6],n[7],(15&n[1])<<4|(240&n[2])>>4,(15&n[2])<<4|(240&n[3])>>4,16|(240&n[0])>>4,(15&n[0])<<4|(240&n[1])>>4,n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15]));var n;return"string"==typeof e?(0,i.unsafeStringify)(t):t}},297:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContentNode=void 0;class n{constructor(e,t){this.id=e,this.content=t||"",this.created=Date.now(),this.type="text",this.archived=!1,this.deleted=!1}static Create(e){const t=new n(e.id,e.content);return t.type="text",t.created=e.created,t.lastUpdated=e.lastUpdated,t.archived=e.archived,t.archiveDate=e.archiveDate,t.deleted=e.deleted,t.deletedDate=e.deletedDate,t}setContent(e){this.content=e,this.lastUpdated=Date.now()}isArchived(){return!0===this.archived}isDeleted(){return!0===this.deleted}toggleArchiveStatus(){this.isArchived()?this.unarchive():this.archive()}unarchive(){this.archived=!1,this.archiveDate=null}archive(){this.archived=!0,this.archiveDate=Date.now()}undelete(){this.deleted=!1,this.deletedDate=null}delete(){this.deleted=!0,this.deletedDate=Date.now()}toJson(){return{id:this.id,created:this.created,lastUpdated:this.lastUpdated,type:this.type,content:this.content,archived:this.archived,archiveDate:this.archiveDate,deleted:this.deleted,deletedDate:this.deletedDate}}}t.ContentNode=n},338:(e,t)=>{"use strict";function n(e){return 14+(e+64>>>9<<4)+1}function r(e,t){const n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function i(e,t,n,i,o,s){return r((a=r(r(t,e),r(i,s)))<<(u=o)|a>>>32-u,n);var a,u}function o(e,t,n,r,o,s,a){return i(t&n|~t&r,e,t,o,s,a)}function s(e,t,n,r,o,s,a){return i(t&r|n&~r,e,t,o,s,a)}function a(e,t,n,r,o,s,a){return i(t^n^r,e,t,o,s,a)}function u(e,t,n,r,o,s,a){return i(n^(t|~r),e,t,o,s,a)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(e){const t=new Uint8Array(4*e.length);for(let n=0;n<4*e.length;n++)t[n]=e[n>>2]>>>n%4*8&255;return t}(function(e,t){const i=new Uint32Array(n(t)).fill(0);i.set(e),i[t>>5]|=128<>2]|=(255&e[n])<f.ContentNode.Create(e)),e=>e.id)}isTreeRoot(e){return this.data.id===e}findNodeInTree(e,t,n,r=!1){let i=r;i||u.each(e.children,(r,o)=>{if(r.id===t)return n(r,e),i=!0,!1;r.children&&this.findNodeInTree(r,t,n,i)})}fold(e){this.findNodeInTree(this.data.tree,e,e=>{e.collapsed=!0})}unfold(e){this.findNodeInTree(this.data.tree,e,e=>{e.collapsed=!1})}flattenOutlineTreeChildren(e){return e.children.map(e=>e.id)}liftNodeToParent(e){let t,n,r=!1;return this.findNodeInTree(this.data.tree,e,(e,i)=>{t=e,this.findNodeInTree(this.data.tree,i.id,(e,i)=>{if(r)return;n=i,r=!0;const o=i.children.map(e=>e.id),s=e.children.map(e=>e.id).indexOf(t.id),a=o.indexOf(e.id);e.children.splice(s,1),i.children.splice(a+1,0,t)})}),{targetNode:t,parentNode:n}}lowerNodeToChild(e){let t,n,r,i=!1;return this.findNodeInTree(this.data.tree,e,(e,o)=>{if(i)return;i=!0,t=e;let s=o.children.map(e=>e.id);if(1===s.length)return;const a=s.indexOf(t.id),u=a-1;o.children[u].children.splice(0,0,t),o.children.splice(a,1),n=o.children[u],r=o}),{targetNode:t,newParentNode:n,oldParentNode:r}}swapNodeWithNextSibling(e){let t,n;return this.findNodeInTree(this.data.tree,e,(e,r)=>{t=e,n=r;const i=n.children.map(e=>e.id),o=i.indexOf(t.id);o!==i.length-1&&(n.children.splice(o,1),n.children.splice(o+1,0,t))}),{targetNode:t,parentNode:n}}swapNodeWithPreviousSibling(e){let t,n;return this.findNodeInTree(this.data.tree,e,(e,r)=>{t=e,n=r;const i=n.children.map(e=>e.id).indexOf(t.id);0!==i&&(n.children.splice(i,1),n.children.splice(i-1,0,t))}),{targetNode:t,parentNode:n}}createSiblingNode(e,t){const n=t||new f.ContentNode((0,l.v4)());let r;return this.data.contentNodes[n.id]=n,this.findNodeInTree(this.data.tree,e,(t,i)=>{const o=i.children.map(e=>e.id).indexOf(e);i.children.splice(o+1,0,{id:n.id,collapsed:!1,children:[]}),r=i}),{node:n,parentNode:r}}createChildNode(e,t){const n=t?this.data.contentNodes[t]:new f.ContentNode((0,l.v4)());let r;return t||(this.data.contentNodes[n.id]=n),this.findNodeInTree(this.data.tree,e,(e,t)=>{e.children.unshift({id:n.id,children:[],collapsed:!1}),r=e}),{node:n,parentNode:r}}removeNode(e){let t,n,r=!1;return this.findNodeInTree(this.data.tree,e,(e,i)=>{if(r)return;r=!0,t=e,n=i;let o=n.children.map(e=>e.id).indexOf(e.id);n.children.splice(o,1)}),{removedNode:t,parentNode:n}}updateContent(e,t){if(!this.data.contentNodes[e])throw new Error("Invalid node");this.data.contentNodes[e].content=t}getContentNode(e){if(!this.data.contentNodes[e])throw new Error(`Invalid Node ${e}`);return this.data.contentNodes[e]}renderContent(e){return a(this,void 0,void 0,function*(){let t,n=this.getContentNode(e);if("text"===n.type){t=yield c.marked.parse(n.content);const e=h.DateTime.now(),r=(0,p.FindDate)(n.content);r.length&&r.forEach(t=>{e.startOf("day").toMillis()>t.toMillis()||(this.dates[t.toISODate()]||(this.dates[t.toISODate()]={}),this.dates[t.toISODate()][n.id]||(this.dates[t.toISODate()][n.id]={date:t,nodeId:n.id}))})}else t=n.content;return t})}renderDates(){let e=u.sortBy(Object.keys(this.dates).map(e=>h.DateTime.fromISO(e)),e=>e.toSeconds()).map(e=>`
  • ${e.toLocaleString({weekday:"long",day:"2-digit",month:"short"})}\n
    \n
      \n ${u.map(this.dates[e.toISODate()],e=>`
    1. \n ${c.marked.parse(this.getContentNode(e.nodeId).content.substr(0,100))}\n
    2. `).join("\n")}\n
    \n
  • `).join("\n");(0,m.$)("#dates").innerHTML=`
      ${e}
    `}renderNode(e){return a(this,void 0,void 0,function*(){if(e.id===this.data.id)return yield this.render();const t=this.data.contentNodes[e.id],n=e.collapsed?"collapsed":"expanded",r=t.isArchived()?"strikethrough":"",i=e.children.length?yield Promise.all(e.children.map(e=>a(this,void 0,void 0,function*(){return this.renderNode(e)}))):[];let o=`
    \n
    \n ${yield this.renderContent(e.id)}\n
    \n ${i.join("\n")}\n
    `;return this.renderDates(),o})}render(){return a(this,void 0,void 0,function*(){return(yield Promise.all(this.data.tree.children.map(e=>a(this,void 0,void 0,function*(){return this.renderNode(e)})))).join("\n")})}}},587:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.sidebarToggle=void 0;const i=n(876);t.sidebarToggle={context:"navigation",keys:["ctrl + ;"],description:"Toggle visibility of sidebar",action:e=>r(void 0,void 0,void 0,function*(){(0,i.$)("#sidebar").classList.toggle("hidden")})}},591:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0;const r=n(338),i=n(2988);var o=n(2988);function s(e,t,n,o){return(0,i.default)(48,r.default,e,t,n,o)}Object.defineProperty(t,"DNS",{enumerable:!0,get:function(){return o.DNS}}),Object.defineProperty(t,"URL",{enumerable:!0,get:function(){return o.URL}}),s.DNS=i.DNS,s.URL=i.URL,t.default=s},717:(e,t,n)=>{"use strict";var r,i,o,s,a,u=n(1889);const l="__TAURI_TO_IPC_KEY__";function c(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}class f{constructor(e){r.set(this,void 0),i.set(this,0),o.set(this,[]),s.set(this,void 0),u.__classPrivateFieldSet(this,r,e||(()=>{}),"f"),this.id=c(e=>{const t=e.index;if("end"in e)return void(t==u.__classPrivateFieldGet(this,i,"f")?this.cleanupCallback():u.__classPrivateFieldSet(this,s,t,"f"));const n=e.message;if(t==u.__classPrivateFieldGet(this,i,"f")){for(u.__classPrivateFieldGet(this,r,"f").call(this,n),u.__classPrivateFieldSet(this,i,u.__classPrivateFieldGet(this,i,"f")+1,"f");u.__classPrivateFieldGet(this,i,"f")in u.__classPrivateFieldGet(this,o,"f");){const e=u.__classPrivateFieldGet(this,o,"f")[u.__classPrivateFieldGet(this,i,"f")];u.__classPrivateFieldGet(this,r,"f").call(this,e),delete u.__classPrivateFieldGet(this,o,"f")[u.__classPrivateFieldGet(this,i,"f")],u.__classPrivateFieldSet(this,i,u.__classPrivateFieldGet(this,i,"f")+1,"f")}u.__classPrivateFieldGet(this,i,"f")===u.__classPrivateFieldGet(this,s,"f")&&this.cleanupCallback()}else u.__classPrivateFieldGet(this,o,"f")[t]=n})}cleanupCallback(){window.__TAURI_INTERNALS__.unregisterCallback(this.id)}set onmessage(e){u.__classPrivateFieldSet(this,r,e,"f")}get onmessage(){return u.__classPrivateFieldGet(this,r,"f")}[(r=new WeakMap,i=new WeakMap,o=new WeakMap,s=new WeakMap,l)](){return`__CHANNEL__:${this.id}`}toJSON(){return this[l]()}}class d{constructor(e,t,n){this.plugin=e,this.event=t,this.channelId=n}async unregister(){return h(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}}async function h(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}a=new WeakMap,t.Channel=f,t.PluginListener=d,t.Resource=class{get rid(){return u.__classPrivateFieldGet(this,a,"f")}constructor(e){a.set(this,void 0),u.__classPrivateFieldSet(this,a,e,"f")}async close(){return h("plugin:resources|close",{rid:this.rid})}},t.SERIALIZE_TO_IPC_FN=l,t.addPluginListener=async function(e,t,n){const r=new f(n);return h(`plugin:${e}|registerListener`,{event:t,handler:r}).then(()=>new d(e,t,r.id))},t.checkPermissions=async function(e){return h(`plugin:${e}|check_permissions`)},t.convertFileSrc=function(e,t="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,t)},t.invoke=h,t.isTauri=function(){return!!(globalThis||window).isTauri},t.requestPermissions=async function(e){return h(`plugin:${e}|request_permissions`)},t.transformCallback=c},763:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Search=void 0;const o=n(1730),s=n(2543),a=i(n(935)),u=n(876);t.Search=class{constructor(){this.state="notready",this.bindEvents()}createIndex(e){return r(this,void 0,void 0,function*(){this.schema=e,this.state="notready",this.db=yield(0,o.create)({schema:e}),this.state="ready"})}bindEvents(){a.default.withContext("search",()=>{a.default.bind("escape",e=>{document.querySelector(".modal").remove(),a.default.setContext("navigation"),console.log("switch to navigation context")}),a.default.bind("down",e=>{e.preventDefault(),document.getElementById("search-query").blur();const t=document.querySelector(".search-result.selected");t.nextElementSibling&&(t.classList.remove("selected"),t.nextElementSibling.classList.add("selected"),(0,u.isVisible)(t.nextElementSibling)||t.nextElementSibling.scrollIntoView())}),a.default.bind("up",e=>{e.preventDefault();const t=document.querySelector(".search-result.selected");t.previousElementSibling&&(t.classList.remove("selected"),t.previousElementSibling.classList.add("selected"),(0,u.isVisible)(t.previousElementSibling)||t.previousElementSibling.scrollIntoView())}),a.default.bind("enter",e=>{const t=document.querySelector(".search-result.selected").getAttribute("data-id");document.querySelector(".modal").remove(),a.default.setContext("navigation"),this.onTermSelection&&this.onTermSelection(t)})}),a.default.withContext("navigation",()=>{a.default.bind("shift + f",e=>{e.preventDefault(),e.stopPropagation(),document.querySelector("body").innerHTML+='\n\n';const t=document.getElementById("search-query");t.focus(),t.addEventListener("keyup",this.debounceSearch.bind(this)),a.default.setContext("search")})})}debounceSearch(e){this.debounce&&clearInterval(this.debounce);const t=e.target.value.toString().trim();t.length&&(this.debounce=setTimeout(()=>{this.displaySearch(t,e)},100))}displaySearch(e,t){return r(this,void 0,void 0,function*(){if(!this.state)return;const t=yield this.search(e),n=document.getElementById("search-results");if(0===t.hits.length)return void(n.innerHTML="
  • No Results
  • ");const r=t.hits.map((e,t)=>{const n=e.document.content.toString(),r=n.substring(0,100);return`\n
  • ${r}${n.length>r.length?"...":""}
  • \n `});n.innerHTML=r.join("\n")})}indexDoc(e){return(0,o.insert)(this.db,e)}indexBatch(e){return(0,o.insertBatch)(this.db,(0,s.map)(e,e=>e.toJson()))}search(e){return(0,o.search)(this.db,{term:e.trim(),properties:["content"]})}replace(e){return r(this,void 0,void 0,function*(){yield(0,o.remove)(this.db,e.id),yield(0,o.insert)(this.db,e.toJson())})}reset(){return this.createIndex(this.schema)}}},876:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isVisible=function(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.top<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},t.$=function(e,t){return(t||document).querySelector(e)},t.$$=function(e,t){return Array.from((t||document).querySelectorAll(e))}},935:function(e,t,n){e.exports=function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1&&s.splice(l,1)}if(0!==s.length)return!1}return!0}},{key:"_checkSubCombo",value:function(e,t,r){e=e.slice(0),r=r.slice(t);for(var i=t,o=0;o-1&&(e.splice(o,1),o-=1,u>i&&(i=u),0===e.length))return i}return-1}}]),n}();a.comboDeliminator=">",a.keyDeliminator="+",a.parseComboStr=function(e){for(var t=a._splitStr(e,a.comboDeliminator),n=[],r=0;r0&&n[s]===r&&"\\"!==n[s-1]&&(o.push(i.trim()),i="",s+=1),i+=n[s];return i&&o.push(i.trim()),o};var u=function(){function e(n){t(this,e),this.localeName=n,this.activeTargetKeys=[],this.pressedKeys=[],this._appliedMacros=[],this._keyMap={},this._killKeyCodes=[],this._macros=[]}return i(e,[{key:"bindKeyCode",value:function(e,t){"string"==typeof t&&(t=[t]),this._keyMap[e]=t}},{key:"bindMacro",value:function(e,t){"string"==typeof t&&(t=[t]);var n=null;"function"==typeof t&&(n=t,t=null);var r={keyCombo:new a(e),keyNames:t,handler:n};this._macros.push(r)}},{key:"getKeyCodes",value:function(e){var t=[];for(var n in this._keyMap)this._keyMap[n].indexOf(e)>-1&&t.push(0|n);return t}},{key:"getKeyNames",value:function(e){return this._keyMap[e]||[]}},{key:"setKillKey",value:function(e){if("string"!=typeof e)this._killKeyCodes.push(e);else for(var t=this.getKeyCodes(e),n=0;n-1&&this.pressedKeys.splice(o,1)}this.activeTargetKeys.length=0,this._clearMacros()}}},{key:"_applyMacros",value:function(){for(var e=this._macros.slice(0),t=0;t-1&&this.pressedKeys.splice(r,1)}t.handler&&(t.keyNames=null),this._appliedMacros.splice(e,1),e-=1}}}}]),e}(),l=function(){function r(e,n,i,o){t(this,r),this._locale=null,this._currentContext="",this._contexts={},this._listeners=[],this._appliedListeners=[],this._locales={},this._targetElement=null,this._targetWindow=null,this._targetPlatform="",this._targetUserAgent="",this._isModernBrowser=!1,this._targetKeyDownBinding=null,this._targetKeyUpBinding=null,this._targetResetBinding=null,this._paused=!1,this._contexts.global={listeners:this._listeners,targetWindow:e,targetElement:n,targetPlatform:i,targetUserAgent:o},this.setContext("global")}return i(r,[{key:"setLocale",value:function(e,t){var n=null;return"string"==typeof e?t?t(n=new u(e),this._targetPlatform,this._targetUserAgent):n=this._locales[e]||null:e=(n=e)._localeName,this._locale=n,this._locales[e]=n,n&&(this._locale.pressedKeys=n.pressedKeys),this}},{key:"getLocale",value:function(e){return e||(e=this._locale.localeName),this._locales[e]||null}},{key:"bind",value:function(t,n,r,i){if(null!==t&&"function"!=typeof t||(i=r,r=n,n=t,t=null),t&&"object"===e(t)&&"number"==typeof t.length){for(var o=0;o"]),e.bindMacro("shift + /",["questionmark","?"]),t.match("Mac")?e.bindMacro("command",["mod","modifier"]):e.bindMacro("ctrl",["mod","modifier"]);for(var r=65;r<=90;r+=1){var i=String.fromCharCode(r+32),o=String.fromCharCode(r);e.bindKeyCode(r,i),e.bindMacro("shift + "+i,o),e.bindMacro("capslock + "+i,o)}var s,a,u=n.match("Firefox")?59:186,l=n.match("Firefox")?173:189,c=n.match("Firefox")?61:187;t.match("Mac")&&(n.match("Safari")||n.match("Chrome"))?(s=91,a=93):t.match("Mac")&&n.match("Opera")?(s=17,a=17):t.match("Mac")&&n.match("Firefox")&&(s=224,a=224),e.bindKeyCode(u,["semicolon",";"]),e.bindKeyCode(l,["dash","-"]),e.bindKeyCode(c,["equal","equalsign","="]),e.bindKeyCode(s,["command","windows","win","super","leftcommand","leftwindows","leftwin","leftsuper"]),e.bindKeyCode(a,["command","windows","win","super","rightcommand","rightwindows","rightwin","rightsuper"]),e.setKillKey("command")}),c.Keyboard=l,c.Locale=u,c.KeyCombo=a,c}()},1031:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.slugify=function(e){return e.toLowerCase().split(" ").join("_")}},1062:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.l=void 0,t.l={context:"navigation",keys:["l"],description:"Move the cursor to the first child element of the current node",action:e=>n(void 0,void 0,void 0,function*(){const{e:t,cursor:n}=e;if(!t.shiftKey){if(n.isNodeCollapsed())return;const e=n.get().querySelector(".node");e&&n.set(`#id-${e.getAttribute("data-id")}`)}})}},1169:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends Error{}class r extends n{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class i extends n{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class o extends n{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class s extends n{}class a extends n{constructor(e){super(`Invalid unit ${e}`)}}class u extends n{}class l extends n{constructor(){super("Zone is an abstract class")}}const c="numeric",f="short",d="long",h={year:c,month:c,day:c},p={year:c,month:f,day:c},m={year:c,month:f,day:c,weekday:f},g={year:c,month:d,day:c},y={year:c,month:d,day:c,weekday:d},v={hour:c,minute:c},b={hour:c,minute:c,second:c},w={hour:c,minute:c,second:c,timeZoneName:f},_={hour:c,minute:c,second:c,timeZoneName:d},k={hour:c,minute:c,hourCycle:"h23"},x={hour:c,minute:c,second:c,hourCycle:"h23"},S={hour:c,minute:c,second:c,hourCycle:"h23",timeZoneName:f},O={hour:c,minute:c,second:c,hourCycle:"h23",timeZoneName:d},T={year:c,month:c,day:c,hour:c,minute:c},C={year:c,month:c,day:c,hour:c,minute:c,second:c},D={year:c,month:f,day:c,hour:c,minute:c},N={year:c,month:f,day:c,hour:c,minute:c,second:c},M={year:c,month:f,day:c,weekday:f,hour:c,minute:c},E={year:c,month:d,day:c,hour:c,minute:c,timeZoneName:f},L={year:c,month:d,day:c,hour:c,minute:c,second:c,timeZoneName:f},I={year:c,month:d,day:c,weekday:d,hour:c,minute:c,timeZoneName:d},A={year:c,month:d,day:c,weekday:d,hour:c,minute:c,second:c,timeZoneName:d};class ${get type(){throw new l}get name(){throw new l}get ianaName(){return this.name}get isUniversal(){throw new l}offsetName(e,t){throw new l}formatOffset(e,t){throw new l}offset(e){throw new l}equals(e){throw new l}get isValid(){throw new l}}let R=null;class j extends ${static get instance(){return null===R&&(R=new j),R}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return rt(e,t,n)}formatOffset(e,t){return at(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}const P=new Map,U={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6},z=new Map;class F extends ${static create(e){let t=z.get(e);return void 0===t&&z.set(e,t=new F(e)),t}static resetCache(){z.clear(),P.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}}constructor(e){super(),this.zoneName=e,this.valid=F.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return rt(e,t,n,this.name)}formatOffset(e,t){return at(this.offset(e),t)}offset(e){if(!this.valid)return NaN;const t=new Date(e);if(isNaN(t))return NaN;const n=function(e){let t=P.get(e);return void 0===t&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),P.set(e,t)),t}(this.name);let[r,i,o,s,a,u,l]=n.formatToParts?function(e,t){const n=e.formatToParts(t),r=[];for(let e=0;e=0?f:1e3+f,(Xe({year:r,month:i,day:o,hour:24===a?0:a,minute:u,second:l,millisecond:0})-c)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let B={};const K=new Map;function V(e,t={}){const n=JSON.stringify([e,t]);let r=K.get(n);return void 0===r&&(r=new Intl.DateTimeFormat(e,t),K.set(n,r)),r}const W=new Map,q=new Map;let Z=null;const H=new Map;function G(e){let t=H.get(e);return void 0===t&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),H.set(e,t)),t}const J=new Map;function Y(e,t,n,r){const i=e.listingMode();return"error"===i?null:"en"===i?n(t):r(t)}class Q{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:r,floor:i,...o}=n;if(!t||Object.keys(o).length>0){const t={useGrouping:!1,...n};n.padTo>0&&(t.minimumIntegerDigits=n.padTo),this.inf=function(e,t={}){const n=JSON.stringify([e,t]);let r=W.get(n);return void 0===r&&(r=new Intl.NumberFormat(e,t),W.set(n,r)),r}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return We(this.floor?Math.floor(e):Ge(e,3),this.padTo)}}class X{constructor(e,t,n){let r;if(this.opts=n,this.originalZone=void 0,this.opts.timeZone)this.dt=e;else if("fixed"===e.zone.type){const t=e.offset/60*-1,n=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;0!==e.offset&&F.create(n).valid?(r=n,this.dt=e):(r="UTC",this.dt=0===e.offset?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else"system"===e.zone.type?this.dt=e:"iana"===e.zone.type?(this.dt=e,r=e.zone.name):(r="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const i={...this.opts};i.timeZone=i.timeZone||r,this.dtf=V(t,i)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(e=>{if("timeZoneName"===e.type){const t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}return e}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class ee{constructor(e,t,n){this.opts={style:"long",...n},!t&&Ue()&&(this.rtf=function(e,t={}){const{base:n,...r}=t,i=JSON.stringify([e,r]);let o=q.get(i);return void 0===o&&(o=new Intl.RelativeTimeFormat(e,t),q.set(i,o)),o}(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n="always",r=!1){const i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&o){const n="days"===e;switch(t){case 1:return n?"tomorrow":`next ${i[e][0]}`;case-1:return n?"yesterday":`last ${i[e][0]}`;case 0:return n?"today":`this ${i[e][0]}`}}const s=Object.is(t,-0)||t<0,a=Math.abs(t),u=1===a,l=i[e],c=r?u?l[1]:l[2]||l[1]:u?i[e][0]:e;return s?`${a} ${c} ago`:`in ${a} ${c}`}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const te={firstDay:1,minimalDays:4,weekend:[6,7]};class ne{static fromOpts(e){return ne.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,r,i=!1){const o=e||we.defaultLocale,s=o||(i?"en-US":Z||(Z=(new Intl.DateTimeFormat).resolvedOptions().locale,Z)),a=t||we.defaultNumberingSystem,u=n||we.defaultOutputCalendar,l=Ke(r)||we.defaultWeekSettings;return new ne(s,a,u,l,o)}static resetCache(){Z=null,K.clear(),W.clear(),q.clear(),H.clear(),J.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:n,weekSettings:r}={}){return ne.create(e,t,n,r)}constructor(e,t,n,r,i){const[o,s,a]=function(e){const t=e.indexOf("-x-");-1!==t&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(-1===n)return[e];{let t,r;try{t=V(e).resolvedOptions(),r=e}catch(i){const o=e.substring(0,n);t=V(o).resolvedOptions(),r=o}const{numberingSystem:i,calendar:o}=t;return[r,i,o]}}(e);this.locale=o,this.numberingSystem=t||s||null,this.outputCalendar=n||a||null,this.weekSettings=r,this.intl=function(e,t,n){return n||t?(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`),e):e}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===G(e.locale).numberingSystem)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"}clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?ne.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Ke(e.weekSettings)||this.weekSettings,e.defaultToEN||!1):this}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return Y(this,e,dt,()=>{const n="ja"===this.intl||this.intl.startsWith("ja-"),r=(t&=!n)?{month:e,day:"numeric"}:{month:e},i=t?"format":"standalone";if(!this.monthsCache[i][e]){const t=n?e=>this.dtFormatter(e,r).format():e=>this.extract(e,r,"month");this.monthsCache[i][e]=function(e){const t=[];for(let n=1;n<=12;n++){const r=mr.utc(2009,n,1);t.push(e(r))}return t}(t)}return this.monthsCache[i][e]})}weekdays(e,t=!1){return Y(this,e,gt,()=>{const n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},r=t?"format":"standalone";return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=function(e){const t=[];for(let n=1;n<=7;n++){const r=mr.utc(2016,11,13+n);t.push(e(r))}return t}(e=>this.extract(e,n,"weekday"))),this.weekdaysCache[r][e]})}meridiems(){return Y(this,void 0,()=>yt,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[mr.utc(2016,11,13,9),mr.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return Y(this,e,_t,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[mr.utc(-40,1,1),mr.utc(2017,1,1)].map(e=>this.extract(e,t,"era"))),this.eraCache[e]})}extract(e,t,n){const r=this.dtFormatter(e,t).formatToParts().find(e=>e.type.toLowerCase()===n);return r?r.value:null}numberFormatter(e={}){return new Q(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new X(e,this.intl,t)}relFormatter(e={}){return new ee(this.intl,this.isEnglish(),e)}listFormatter(e={}){return function(e,t={}){const n=JSON.stringify([e,t]);let r=B[n];return r||(r=new Intl.ListFormat(e,t),B[n]=r),r}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||G(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:ze()?function(e){let t=J.get(e);if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in t||(t={...te,...t}),J.set(e,t)}return t}(this.locale):te}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let re=null;class ie extends ${static get utcInstance(){return null===re&&(re=new ie(0)),re}static instance(e){return 0===e?ie.utcInstance:new ie(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new ie(it(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${at(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${at(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return at(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}}class oe extends ${constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function se(e,t){if(Re(e)||null===e)return t;if(e instanceof $)return e;if("string"==typeof e){const n=e.toLowerCase();return"default"===n?t:"local"===n||"system"===n?j.instance:"utc"===n||"gmt"===n?ie.utcInstance:ie.parseSpecifier(n)||F.create(e)}return je(e)?ie.instance(e):"object"==typeof e&&"offset"in e&&"function"==typeof e.offset?e:new oe(e)}const ae={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},ue={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},le=ae.hanidec.replace(/[\[|\]]/g,"").split(""),ce=new Map;function fe({numberingSystem:e},t=""){const n=e||"latn";let r=ce.get(n);void 0===r&&(r=new Map,ce.set(n,r));let i=r.get(t);return void 0===i&&(i=new RegExp(`${ae[n]}${t}`),r.set(t,i)),i}let de,he=()=>Date.now(),pe="system",me=null,ge=null,ye=null,ve=60,be=null;class we{static get now(){return he}static set now(e){he=e}static set defaultZone(e){pe=e}static get defaultZone(){return se(pe,j.instance)}static get defaultLocale(){return me}static set defaultLocale(e){me=e}static get defaultNumberingSystem(){return ge}static set defaultNumberingSystem(e){ge=e}static get defaultOutputCalendar(){return ye}static set defaultOutputCalendar(e){ye=e}static get defaultWeekSettings(){return be}static set defaultWeekSettings(e){be=Ke(e)}static get twoDigitCutoffYear(){return ve}static set twoDigitCutoffYear(e){ve=e%100}static get throwOnInvalid(){return de}static set throwOnInvalid(e){de=e}static resetCaches(){ne.resetCache(),F.resetCache(),mr.resetCache(),ce.clear()}}class _e{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const ke=[0,31,59,90,120,151,181,212,243,273,304,334],xe=[0,31,60,91,121,152,182,213,244,274,305,335];function Se(e,t){return new _e("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function Oe(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const i=r.getUTCDay();return 0===i?7:i}function Te(e,t,n){return n+(Je(e)?xe:ke)[t-1]}function Ce(e,t){const n=Je(e)?xe:ke,r=n.findIndex(e=>ett(r,t,n)?(u=r+1,l=1):u=r,{weekYear:u,weekNumber:l,weekday:a,...ut(e)}}function Me(e,t=4,n=1){const{weekYear:r,weekNumber:i,weekday:o}=e,s=De(Oe(r,1,t),n),a=Ye(r);let u,l=7*i+o-s-7+t;l<1?(u=r-1,l+=Ye(u)):l>a?(u=r+1,l-=Ye(r)):u=r;const{month:c,day:f}=Ce(u,l);return{year:u,month:c,day:f,...ut(e)}}function Ee(e){const{year:t,month:n,day:r}=e;return{year:t,ordinal:Te(t,n,r),...ut(e)}}function Le(e){const{year:t,ordinal:n}=e,{month:r,day:i}=Ce(t,n);return{year:t,month:r,day:i,...ut(e)}}function Ie(e,t){if(!Re(e.localWeekday)||!Re(e.localWeekNumber)||!Re(e.localWeekYear)){if(!Re(e.weekday)||!Re(e.weekNumber)||!Re(e.weekYear))throw new s("Cannot mix locale-based week fields with ISO-based week fields");return Re(e.localWeekday)||(e.weekday=e.localWeekday),Re(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Re(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function Ae(e){const t=Pe(e.year),n=Ve(e.month,1,12),r=Ve(e.day,1,Qe(e.year,e.month));return t?n?!r&&Se("day",e.day):Se("month",e.month):Se("year",e.year)}function $e(e){const{hour:t,minute:n,second:r,millisecond:i}=e,o=Ve(t,0,23)||24===t&&0===n&&0===r&&0===i,s=Ve(n,0,59),a=Ve(r,0,59),u=Ve(i,0,999);return o?s?a?!u&&Se("millisecond",i):Se("second",r):Se("minute",n):Se("hour",t)}function Re(e){return void 0===e}function je(e){return"number"==typeof e}function Pe(e){return"number"==typeof e&&e%1==0}function Ue(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function ze(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function Fe(e,t,n){if(0!==e.length)return e.reduce((e,r)=>{const i=[t(r),r];return e&&n(e[0],i[0])===e[0]?e:i},null)[1]}function Be(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ke(e){if(null==e)return null;if("object"!=typeof e)throw new u("Week settings must be an object");if(!Ve(e.firstDay,1,7)||!Ve(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(e=>!Ve(e,1,7)))throw new u("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function Ve(e,t,n){return Pe(e)&&e>=t&&e<=n}function We(e,t=2){let n;return n=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),n}function qe(e){return Re(e)||null===e||""===e?void 0:parseInt(e,10)}function Ze(e){return Re(e)||null===e||""===e?void 0:parseFloat(e)}function He(e){if(!Re(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function Ge(e,t,n="round"){const r=10**t;switch(n){case"expand":return e>0?Math.ceil(e*r)/r:Math.floor(e*r)/r;case"trunc":return Math.trunc(e*r)/r;case"round":return Math.round(e*r)/r;case"floor":return Math.floor(e*r)/r;case"ceil":return Math.ceil(e*r)/r;default:throw new RangeError(`Value rounding ${n} is out of range`)}}function Je(e){return e%4==0&&(e%100!=0||e%400==0)}function Ye(e){return Je(e)?366:365}function Qe(e,t){const n=(r=t-1)-12*Math.floor(r/12)+1;var r;return 2===n?Je(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Xe(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function et(e,t,n){return-De(Oe(e,1,t),n)+t-1}function tt(e,t=4,n=1){const r=et(e,t,n),i=et(e+1,t,n);return(Ye(e)-r+i)/7}function nt(e){return e>99?e:e>we.twoDigitCutoffYear?1900+e:2e3+e}function rt(e,t,n,r=null){const i=new Date(e),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(o.timeZone=r);const s={timeZoneName:t,...o},a=new Intl.DateTimeFormat(n,s).formatToParts(i).find(e=>"timezonename"===e.type.toLowerCase());return a?a.value:null}function it(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-r:r)}function ot(e){const t=Number(e);if("boolean"==typeof e||""===e||!Number.isFinite(t))throw new u(`Invalid unit value ${e}`);return t}function st(e,t){const n={};for(const r in e)if(Be(e,r)){const i=e[r];if(null==i)continue;n[t(r)]=ot(i)}return n}function at(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),i=e>=0?"+":"-";switch(t){case"short":return`${i}${We(n,2)}:${We(r,2)}`;case"narrow":return`${i}${n}${r>0?`:${r}`:""}`;case"techie":return`${i}${We(n,2)}${We(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function ut(e){return function(e){return["hour","minute","second","millisecond"].reduce((t,n)=>(t[n]=e[n],t),{})}(e)}const lt=["January","February","March","April","May","June","July","August","September","October","November","December"],ct=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ft=["J","F","M","A","M","J","J","A","S","O","N","D"];function dt(e){switch(e){case"narrow":return[...ft];case"short":return[...ct];case"long":return[...lt];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const ht=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],pt=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],mt=["M","T","W","T","F","S","S"];function gt(e){switch(e){case"narrow":return[...mt];case"short":return[...pt];case"long":return[...ht];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const yt=["AM","PM"],vt=["Before Christ","Anno Domini"],bt=["BC","AD"],wt=["B","A"];function _t(e){switch(e){case"narrow":return[...wt];case"short":return[...bt];case"long":return[...vt];default:return null}}function kt(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const xt={D:h,DD:p,DDD:g,DDDD:y,t:v,tt:b,ttt:w,tttt:_,T:k,TT:x,TTT:S,TTTT:O,f:T,ff:D,fff:E,ffff:I,F:C,FF:N,FFF:L,FFFF:A};class St{static create(e,t={}){return new St(e,t)}static parseFormat(e){let t=null,n="",r=!1;const i=[];for(let o=0;o0||r)&&i.push({literal:r||/^\s+$/.test(n),val:""===n?"'":n}),t=null,n="",r=!r):r||s===t?n+=s:(n.length>0&&i.push({literal:/^\s+$/.test(n),val:n}),n=s,t=s)}return n.length>0&&i.push({literal:r||/^\s+$/.test(n),val:n}),i}static macroTokenToFormatOpts(e){return xt[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0,n=void 0){if(this.opts.forceSimple)return We(e,t);const r={...this.opts};return t>0&&(r.padTo=t),n&&(r.signDisplay=n),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,t){const n="en"===this.loc.listingMode(),r=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,i=(t,n)=>this.loc.extract(e,t,n),o=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",s=(t,r)=>n?function(e,t){return dt(t)[e.month-1]}(e,t):i(r?{month:t}:{month:t,day:"numeric"},"month"),a=(t,r)=>n?function(e,t){return gt(t)[e.weekday-1]}(e,t):i(r?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),u=t=>{const n=St.macroTokenToFormatOpts(t);return n?this.formatWithSystemDefault(e,n):t},l=t=>n?function(e,t){return _t(t)[e.year<0?0:1]}(e,t):i({era:t},"era");return kt(St.parseFormat(t),t=>{switch(t){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12==0?12:e.hour%12);case"hh":return this.num(e.hour%12==0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return n?function(e){return yt[e.hour<12?0:1]}(e):i({hour:"numeric",hourCycle:"h12"},"dayperiod");case"d":return r?i({day:"numeric"},"day"):this.num(e.day);case"dd":return r?i({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return a("short",!0);case"cccc":return a("long",!0);case"ccccc":return a("narrow",!0);case"EEE":return a("short",!1);case"EEEE":return a("long",!1);case"EEEEE":return a("narrow",!1);case"L":return r?i({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return r?i({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return s("short",!0);case"LLLL":return s("long",!0);case"LLLLL":return s("narrow",!0);case"M":return r?i({month:"numeric"},"month"):this.num(e.month);case"MM":return r?i({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return s("short",!1);case"MMMM":return s("long",!1);case"MMMMM":return s("narrow",!1);case"y":return r?i({year:"numeric"},"year"):this.num(e.year);case"yy":return r?i({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return r?i({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return r?i({year:"numeric"},"year"):this.num(e.year,6);case"G":return l("short");case"GG":return l("long");case"GGGGG":return l("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return u(t)}})}formatDurationFromString(e,t){const n="negativeLargestOnly"===this.opts.signMode?-1:1,r=e=>{switch(e[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},i=St.parseFormat(t),o=i.reduce((e,{literal:t,val:n})=>t?e:e.concat(n),[]),s=e.shiftTo(...o.map(r).filter(e=>e));return kt(i,((e,t)=>i=>{const o=r(i);if(o){const r=t.isNegativeDuration&&o!==t.largestUnit?n:1;let s;return s="negativeLargestOnly"===this.opts.signMode&&o!==t.largestUnit?"never":"all"===this.opts.signMode?"always":"auto",this.num(e.get(o)*r,i.length,s)}return i})(s,{isNegativeDuration:s<0,largestUnit:Object.keys(s.values)[0]}))}}const Ot=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Tt(...e){const t=e.reduce((e,t)=>e+t.source,"");return RegExp(`^${t}$`)}function Ct(...e){return t=>e.reduce(([e,n,r],i)=>{const[o,s,a]=i(t,r);return[{...e,...o},s||n,a]},[{},null,1]).slice(0,2)}function Dt(e,...t){if(null==e)return[null,null];for(const[n,r]of t){const t=n.exec(e);if(t)return r(t)}return[null,null]}function Nt(...e){return(t,n)=>{const r={};let i;for(i=0;ivoid 0!==e&&(t||e&&c)?-e:e;return[{years:d(Ze(n)),months:d(Ze(r)),weeks:d(Ze(i)),days:d(Ze(o)),hours:d(Ze(s)),minutes:d(Ze(a)),seconds:d(Ze(u),"-0"===u),milliseconds:d(He(l),f)}]}const Wt={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function qt(e,t,n,r,i,o,s){const a={year:2===t.length?nt(qe(t)):qe(t),month:ct.indexOf(n)+1,day:qe(r),hour:qe(i),minute:qe(o)};return s&&(a.second=qe(s)),e&&(a.weekday=e.length>3?ht.indexOf(e)+1:pt.indexOf(e)+1),a}const Zt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Ht(e){const[,t,n,r,i,o,s,a,u,l,c,f]=e,d=qt(t,i,r,n,o,s,a);let h;return h=u?Wt[u]:l?0:it(c,f),[d,new ie(h)]}const Gt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Jt=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Yt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Qt(e){const[,t,n,r,i,o,s,a]=e;return[qt(t,i,r,n,o,s,a),ie.utcInstance]}function Xt(e){const[,t,n,r,i,o,s,a]=e;return[qt(t,a,n,r,i,o,s),ie.utcInstance]}const en=Tt(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,It),tn=Tt(/(\d{4})-?W(\d\d)(?:-?(\d))?/,It),nn=Tt(/(\d{4})-?(\d{3})/,It),rn=Tt(Lt),on=Ct(function(e,t){return[{year:Pt(e,t),month:Pt(e,t+1,1),day:Pt(e,t+2,1)},null,t+3]},Ut,zt,Ft),sn=Ct(At,Ut,zt,Ft),an=Ct($t,Ut,zt,Ft),un=Ct(Ut,zt,Ft),ln=Ct(Ut),cn=Tt(/(\d{4})-(\d\d)-(\d\d)/,jt),fn=Tt(Rt),dn=Ct(Ut,zt,Ft),hn="Invalid Duration",pn={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},mn={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...pn},gn={years:{quarters:4,months:12,weeks:52.1775,days:365.2425,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:30.436875,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...pn},yn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],vn=yn.slice(0).reverse();function bn(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new xn(r)}function wn(e,t){var n;let r=null!=(n=t.milliseconds)?n:0;for(const n of vn.slice(1))t[n]&&(r+=t[n]*e[n].milliseconds);return r}function _n(e,t){const n=wn(e,t)<0?-1:1;yn.reduceRight((r,i)=>{if(Re(t[i]))return r;if(r){const o=t[r]*n,s=e[i][r],a=Math.floor(o/s);t[i]+=a*n,t[r]-=a*s*n}return i},null),yn.reduce((n,r)=>{if(Re(t[r]))return n;if(n){const i=t[n]%1;t[n]-=i,t[r]+=i*e[n][r]}return r},null)}function kn(e){const t={};for(const[n,r]of Object.entries(e))0!==r&&(t[n]=r);return t}class xn{constructor(e){const t="longterm"===e.conversionAccuracy||!1;let n=t?gn:mn;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||ne.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return xn.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(null==e||"object"!=typeof e)throw new u("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new xn({values:st(e,xn.normalizeUnit),loc:ne.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(je(e))return xn.fromMillis(e);if(xn.isDuration(e))return e;if("object"==typeof e)return xn.fromObject(e);throw new u(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[n]=function(e){return Dt(e,[Kt,Vt])}(e);return n?xn.fromObject(n,t):xn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[n]=function(e){return Dt(e,[Bt,ln])}(e);return n?xn.fromObject(n,t):xn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new u("need to specify a reason the Duration is invalid");const n=e instanceof _e?e:new _e(e,t);if(we.throwOnInvalid)throw new o(n);return new xn({invalid:n})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new a(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const n={...t,floor:!1!==t.round&&!1!==t.floor};return this.isValid?St.create(this.loc,n).formatDurationFromString(this,e):hn}toHuman(e={}){if(!this.isValid)return hn;const t=!1!==e.showZeros,n=yn.map(n=>{const r=this.values[n];return Re(r)||0===r&&!t?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:n.slice(0,-1)}).format(r)}).filter(e=>e);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=Ge(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},mr.fromMillis(t,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?wn(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=xn.fromDurationLike(e),n={};for(const e of yn)(Be(t.values,e)||Be(this.values,e))&&(n[e]=t.get(e)+this.get(e));return bn(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const t=xn.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=ot(e(this.values[n],n));return bn(this,{values:t},!0)}get(e){return this[xn.normalizeUnit(e)]}set(e){return this.isValid?bn(this,{values:{...this.values,...st(e,xn.normalizeUnit)}}):this}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:r}={}){return bn(this,{loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:r,conversionAccuracy:n})}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return _n(this.matrix,e),bn(this,{values:e},!0)}rescale(){return this.isValid?bn(this,{values:kn(this.normalize().shiftToAll().toObject())},!0):this}shiftTo(...e){if(!this.isValid)return this;if(0===e.length)return this;e=e.map(e=>xn.normalizeUnit(e));const t={},n={},r=this.toObject();let i;for(const o of yn)if(e.indexOf(o)>=0){i=o;let e=0;for(const t in n)e+=this.matrix[t][o]*n[t],n[t]=0;je(r[o])&&(e+=r[o]);const s=Math.trunc(e);t[o]=s,n[o]=(1e3*e-1e3*s)/1e3}else je(r[o])&&(n[o]=r[o]);for(const e in n)0!==n[e]&&(t[i]+=e===i?n[e]:n[e]/this.matrix[i][e]);return _n(this.matrix,t),bn(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=0===this.values[t]?0:-this.values[t];return bn(this,{values:e},!0)}removeZeros(){return this.isValid?bn(this,{values:kn(this.values)},!0):this}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;function t(e,t){return void 0===e||0===e?void 0===t||0===t:e===t}for(const n of yn)if(!t(this.values[n],e.values[n]))return!1;return!0}}const Sn="Invalid Interval";class On{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new u("need to specify a reason the Interval is invalid");const n=e instanceof _e?e:new _e(e,t);if(we.throwOnInvalid)throw new i(n);return new On({invalid:n})}static fromDateTimes(e,t){const n=gr(e),r=gr(t),i=function(e,t){return e&&e.isValid?t&&t.isValid?te}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&this.s<=e&&this.e>e}set({start:e,end:t}={}){return this.isValid?On.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(gr).filter(e=>this.contains(e)).sort((e,t)=>e.toMillis()-t.toMillis()),n=[];let{s:r}=this,i=0;for(;r+this.e?this.e:e;n.push(On.fromDateTimes(r,o)),r=o,i+=1}return n}splitBy(e){const t=xn.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let n,{s:r}=this,i=1;const o=[];for(;re*i));n=+e>+this.e?this.e:e,o.push(On.fromDateTimes(r,n)),r=n,i+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e}equals(e){return!(!this.isValid||!e.isValid)&&this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,n=this.e=n?null:On.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;const t=this.se.e?this.e:e.e;return On.fromDateTimes(t,n)}static merge(e){const[t,n]=e.sort((e,t)=>e.s-t.s).reduce(([e,t],n)=>t?t.overlaps(n)||t.abutsStart(n)?[e,t.union(n)]:[e.concat([t]),n]:[e,n],[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0;const r=[],i=e.map(e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}]),o=Array.prototype.concat(...i).sort((e,t)=>e.time-t.time);for(const e of o)n+="s"===e.type?1:-1,1===n?t=e.time:(t&&+t!==+e.time&&r.push(On.fromDateTimes(t,e.time)),t=null);return On.merge(r)}difference(...e){return On.xor([this].concat(e)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Sn}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=h,t={}){return this.isValid?St.create(this.s.loc.clone(t),e).formatInterval(this):Sn}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Sn}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Sn}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Sn}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Sn}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):xn.invalid(this.invalidReason)}mapEndpoints(e){return On.fromDateTimes(e(this.s),e(this.e))}}class Tn{static hasDST(e=we.defaultZone){const t=mr.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return F.isValidZone(e)}static normalizeZone(e){return se(e,we.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||ne.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||ne.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||ne.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i="gregory"}={}){return(r||ne.create(t,n,i)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i="gregory"}={}){return(r||ne.create(t,n,i)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||ne.create(t,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||ne.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return ne.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return ne.create(t,null,"gregory").eras(e)}static features(){return{relative:Ue(),localeWeek:ze()}}}function Cn(e,t){const n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(xn.fromMillis(r).as("days"))}function Dn(e,t=e=>e){return{regex:e,deser:([e])=>t(function(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n=n&&r<=i&&(t+=r-n)}}return parseInt(t,10)}return t}(e))}}const Nn=`[ ${String.fromCharCode(160)}]`,Mn=new RegExp(Nn,"g");function En(e){return e.replace(/\./g,"\\.?").replace(Mn,Nn)}function Ln(e){return e.replace(/\./g,"").replace(Mn," ").toLowerCase()}function In(e,t){return null===e?null:{regex:RegExp(e.map(En).join("|")),deser:([n])=>e.findIndex(e=>Ln(n)===Ln(e))+t}}function An(e,t){return{regex:e,deser:([,e,t])=>it(e,t),groups:t}}function $n(e){return{regex:e,deser:([e])=>e}}const Rn={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let jn=null;function Pn(e,t){return Array.prototype.concat(...e.map(e=>function(e,t){if(e.literal)return e;const n=Fn(St.macroTokenToFormatOpts(e.val),t);return null==n||n.includes(void 0)?e:n}(e,t)))}class Un{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=Pn(St.parseFormat(t),e),this.units=this.tokens.map(t=>function(e,t){const n=fe(t),r=fe(t,"{2}"),i=fe(t,"{3}"),o=fe(t,"{4}"),s=fe(t,"{6}"),a=fe(t,"{1,2}"),u=fe(t,"{1,3}"),l=fe(t,"{1,6}"),c=fe(t,"{1,9}"),f=fe(t,"{2,4}"),d=fe(t,"{4,6}"),h=e=>{return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([e])=>e,literal:!0};var t},p=(p=>{if(e.literal)return h(p);switch(p.val){case"G":return In(t.eras("short"),0);case"GG":return In(t.eras("long"),0);case"y":return Dn(l);case"yy":case"kk":return Dn(f,nt);case"yyyy":case"kkkk":return Dn(o);case"yyyyy":return Dn(d);case"yyyyyy":return Dn(s);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return Dn(a);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return Dn(r);case"MMM":return In(t.months("short",!0),1);case"MMMM":return In(t.months("long",!0),1);case"LLL":return In(t.months("short",!1),1);case"LLLL":return In(t.months("long",!1),1);case"o":case"S":return Dn(u);case"ooo":case"SSS":return Dn(i);case"u":return $n(c);case"uu":return $n(a);case"uuu":case"E":case"c":return Dn(n);case"a":return In(t.meridiems(),0);case"EEE":return In(t.weekdays("short",!1),1);case"EEEE":return In(t.weekdays("long",!1),1);case"ccc":return In(t.weekdays("short",!0),1);case"cccc":return In(t.weekdays("long",!0),1);case"Z":case"ZZ":return An(new RegExp(`([+-]${a.source})(?::(${r.source}))?`),2);case"ZZZ":return An(new RegExp(`([+-]${a.source})(${r.source})?`),2);case"z":return $n(/[a-z_+-/]{1,256}?/i);case" ":return $n(/[^\S\n\r]/);default:return h(p)}})(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return p.token=e,p}(t,e)),this.disqualifyingUnit=this.units.find(e=>e.invalidReason),!this.disqualifyingUnit){const[e,t]=[`^${(n=this.units).map(e=>e.regex).reduce((e,t)=>`${e}(${t.source})`,"")}$`,n];this.regex=RegExp(e,"i"),this.handlers=t}var n}explainFromTokens(e){if(this.isValid){const[t,n]=function(e,t,n){const r=e.match(t);if(r){const e={};let t=1;for(const i in n)if(Be(n,i)){const o=n[i],s=o.groups?o.groups+1:1;!o.literal&&o.token&&(e[o.token.val[0]]=o.deser(r.slice(t,t+s))),t+=s}return[r,e]}return[r,{}]}(e,this.regex,this.handlers),[r,i,o]=n?function(e){let t,n=null;return Re(e.z)||(n=F.create(e.z)),Re(e.Z)||(n||(n=new ie(e.Z)),t=e.Z),Re(e.q)||(e.M=3*(e.q-1)+1),Re(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),Re(e.u)||(e.S=He(e.u)),[Object.keys(e).reduce((t,n)=>{const r=(e=>{switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(n);return r&&(t[r]=e[n]),t},{}),n,t]}(n):[null,null,void 0];if(Be(n,"a")&&Be(n,"H"))throw new s("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:r,zone:i,specificOffset:o}}return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function zn(e,t,n){return new Un(e,n).explainFromTokens(t)}function Fn(e,t){if(!e)return null;const n=St.create(t,e).dtFormatter((jn||(jn=mr.fromMillis(1555555555555)),jn)),r=n.formatToParts(),i=n.resolvedOptions();return r.map(t=>function(e,t,n){const{type:r,value:i}=e;if("literal"===r){const e=/^\s+$/.test(i);return{literal:!e,val:e?" ":i}}const o=t[r];let s=r;"hour"===r&&(s=null!=t.hour12?t.hour12?"hour12":"hour24":null!=t.hourCycle?"h11"===t.hourCycle||"h12"===t.hourCycle?"hour12":"hour24":n.hour12?"hour12":"hour24");let a=Rn[s];if("object"==typeof a&&(a=a[o]),a)return{literal:!1,val:a}}(t,e,i))}const Bn="Invalid DateTime",Kn=864e13;function Vn(e){return new _e("unsupported zone",`the zone "${e.name}" is not supported`)}function Wn(e){return null===e.weekData&&(e.weekData=Ne(e.c)),e.weekData}function qn(e){return null===e.localWeekData&&(e.localWeekData=Ne(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Zn(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new mr({...n,...t,old:n})}function Hn(e,t,n){let r=e-60*t*1e3;const i=n.offset(r);if(t===i)return[r,t];r-=60*(i-t)*1e3;const o=n.offset(r);return i===o?[r,i]:[e-60*Math.min(i,o)*1e3,Math.max(i,o)]}function Gn(e,t){const n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Jn(e,t,n){return Hn(Xe(e),t,n)}function Yn(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),o={...e.c,year:r,month:i,day:Math.min(e.c.day,Qe(r,i))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},s=xn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=Xe(o);let[u,l]=Hn(a,n,e.zone);return 0!==s&&(u+=s,l=e.zone.offset(u)),{ts:u,o:l}}function Qn(e,t,n,r,i,o){const{setZone:s,zone:a}=n;if(e&&0!==Object.keys(e).length||t){const r=t||a,i=mr.fromObject(e,{...n,zone:r,specificOffset:o});return s?i:i.setZone(a)}return mr.invalid(new _e("unparsable",`the input "${i}" can't be parsed as ${r}`))}function Xn(e,t,n=!0){return e.isValid?St.create(ne.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function er(e,t,n){const r=e.c.year>9999||e.c.year<0;let i="";if(r&&e.c.year>=0&&(i+="+"),i+=We(e.c.year,r?6:4),"year"===n)return i;if(t){if(i+="-",i+=We(e.c.month),"month"===n)return i;i+="-"}else if(i+=We(e.c.month),"month"===n)return i;return i+=We(e.c.day),i}function tr(e,t,n,r,i,o,s){let a=!n||0!==e.c.millisecond||0!==e.c.second,u="";switch(s){case"day":case"month":case"year":break;default:if(u+=We(e.c.hour),"hour"===s)break;if(t){if(u+=":",u+=We(e.c.minute),"minute"===s)break;a&&(u+=":",u+=We(e.c.second))}else{if(u+=We(e.c.minute),"minute"===s)break;a&&(u+=We(e.c.second))}if("second"===s)break;!a||r&&0===e.c.millisecond||(u+=".",u+=We(e.c.millisecond,3))}return i&&(e.isOffsetFixed&&0===e.offset&&!o?u+="Z":e.o<0?(u+="-",u+=We(Math.trunc(-e.o/60)),u+=":",u+=We(Math.trunc(-e.o%60))):(u+="+",u+=We(Math.trunc(e.o/60)),u+=":",u+=We(Math.trunc(e.o%60)))),o&&(u+="["+e.zone.ianaName+"]"),u}const nr={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},rr={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ir={ordinal:1,hour:0,minute:0,second:0,millisecond:0},or=["year","month","day","hour","minute","second","millisecond"],sr=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],ar=["year","ordinal","hour","minute","second","millisecond"];function ur(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new a(e);return t}function lr(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return ur(e)}}function cr(e,t){const n=se(t.zone,we.defaultZone);if(!n.isValid)return mr.invalid(Vn(n));const r=ne.fromObject(t);let i,o;if(Re(e.year))i=we.now();else{for(const t of or)Re(e[t])&&(e[t]=nr[t]);const t=Ae(e)||$e(e);if(t)return mr.invalid(t);const r=function(e){if(void 0===hr&&(hr=we.now()),"iana"!==e.type)return e.offset(hr);const t=e.name;let n=pr.get(t);return void 0===n&&(n=e.offset(hr),pr.set(t,n)),n}(n);[i,o]=Jn(e,r,n)}return new mr({ts:i,zone:n,loc:r,o})}function fr(e,t,n){const r=!!Re(n.round)||n.round,i=Re(n.rounding)?"trunc":n.rounding,o=(e,o)=>(e=Ge(e,r||n.calendary?0:2,n.calendary?"round":i),t.loc.clone(n).relFormatter(n).format(e,o)),s=r=>n.calendary?t.hasSame(e,r)?0:t.startOf(r).diff(e.startOf(r),r).get(r):t.diff(e,r).get(r);if(n.unit)return o(s(n.unit),n.unit);for(const e of n.units){const t=s(e);if(Math.abs(t)>=1)return o(t,e)}return o(e>t?-0:0,n.units[n.units.length-1])}function dr(e){let t,n={};return e.length>0&&"object"==typeof e[e.length-1]?(n=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[n,t]}let hr;const pr=new Map;class mr{constructor(e){const t=e.zone||we.defaultZone;let n=e.invalid||(Number.isNaN(e.ts)?new _e("invalid input"):null)||(t.isValid?null:Vn(t));this.ts=Re(e.ts)?we.now():e.ts;let r=null,i=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[r,i]=[e.old.c,e.old.o];else{const o=je(e.o)&&!e.old?e.o:t.offset(this.ts);r=Gn(this.ts,o),n=Number.isNaN(r.year)?new _e("invalid input"):null,r=n?null:r,i=n?null:o}this._zone=t,this.loc=e.loc||ne.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=r,this.o=i,this.isLuxonDateTime=!0}static now(){return new mr({})}static local(){const[e,t]=dr(arguments),[n,r,i,o,s,a,u]=t;return cr({year:n,month:r,day:i,hour:o,minute:s,second:a,millisecond:u},e)}static utc(){const[e,t]=dr(arguments),[n,r,i,o,s,a,u]=t;return e.zone=ie.utcInstance,cr({year:n,month:r,day:i,hour:o,minute:s,second:a,millisecond:u},e)}static fromJSDate(e,t={}){const n=(r=e,"[object Date]"===Object.prototype.toString.call(r)?e.valueOf():NaN);var r;if(Number.isNaN(n))return mr.invalid("invalid input");const i=se(t.zone,we.defaultZone);return i.isValid?new mr({ts:n,zone:i,loc:ne.fromObject(t)}):mr.invalid(Vn(i))}static fromMillis(e,t={}){if(je(e))return e<-Kn||e>Kn?mr.invalid("Timestamp out of range"):new mr({ts:e,zone:se(t.zone,we.defaultZone),loc:ne.fromObject(t)});throw new u(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(je(e))return new mr({ts:1e3*e,zone:se(t.zone,we.defaultZone),loc:ne.fromObject(t)});throw new u("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const n=se(t.zone,we.defaultZone);if(!n.isValid)return mr.invalid(Vn(n));const r=ne.fromObject(t),i=st(e,lr),{minDaysInFirstWeek:o,startOfWeek:a}=Ie(i,r),u=we.now(),l=Re(t.specificOffset)?n.offset(u):t.specificOffset,c=!Re(i.ordinal),f=!Re(i.year),d=!Re(i.month)||!Re(i.day),h=f||d,p=i.weekYear||i.weekNumber;if((h||c)&&p)throw new s("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&c)throw new s("Can't mix ordinal dates with month/day");const m=p||i.weekday&&!h;let g,y,v=Gn(u,l);m?(g=sr,y=rr,v=Ne(v,o,a)):c?(g=ar,y=ir,v=Ee(v)):(g=or,y=nr);let b=!1;for(const e of g)Re(i[e])?i[e]=b?y[e]:v[e]:b=!0;const w=m?function(e,t=4,n=1){const r=Pe(e.weekYear),i=Ve(e.weekNumber,1,tt(e.weekYear,t,n)),o=Ve(e.weekday,1,7);return r?i?!o&&Se("weekday",e.weekday):Se("week",e.weekNumber):Se("weekYear",e.weekYear)}(i,o,a):c?function(e){const t=Pe(e.year),n=Ve(e.ordinal,1,Ye(e.year));return t?!n&&Se("ordinal",e.ordinal):Se("year",e.year)}(i):Ae(i),_=w||$e(i);if(_)return mr.invalid(_);const k=m?Me(i,o,a):c?Le(i):i,[x,S]=Jn(k,l,n),O=new mr({ts:x,zone:n,o:S,loc:r});return i.weekday&&h&&e.weekday!==O.weekday?mr.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${O.toISO()}`):O.isValid?O:mr.invalid(O.invalid)}static fromISO(e,t={}){const[n,r]=function(e){return Dt(e,[en,on],[tn,sn],[nn,an],[rn,un])}(e);return Qn(n,r,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[n,r]=function(e){return Dt(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[Zt,Ht])}(e);return Qn(n,r,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[n,r]=function(e){return Dt(e,[Gt,Qt],[Jt,Qt],[Yt,Xt])}(e);return Qn(n,r,t,"HTTP",t)}static fromFormat(e,t,n={}){if(Re(e)||Re(t))throw new u("fromFormat requires an input string and a format");const{locale:r=null,numberingSystem:i=null}=n,o=ne.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),[s,a,l,c]=function(e,t,n){const{result:r,zone:i,specificOffset:o,invalidReason:s}=zn(e,t,n);return[r,i,o,s]}(o,e,t);return c?mr.invalid(c):Qn(s,a,n,`format ${t}`,e,l)}static fromString(e,t,n={}){return mr.fromFormat(e,t,n)}static fromSQL(e,t={}){const[n,r]=function(e){return Dt(e,[cn,on],[fn,dn])}(e);return Qn(n,r,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new u("need to specify a reason the DateTime is invalid");const n=e instanceof _e?e:new _e(e,t);if(we.throwOnInvalid)throw new r(n);return new mr({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const n=Fn(e,ne.fromObject(t));return n?n.map(e=>e?e.val:null).join(""):null}static expandFormat(e,t={}){return Pn(St.parseFormat(e),ne.fromObject(t)).map(e=>e.val).join("")}static resetCache(){hr=void 0,pr.clear()}get(e){return this[e]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Wn(this).weekYear:NaN}get weekNumber(){return this.isValid?Wn(this).weekNumber:NaN}get weekday(){return this.isValid?Wn(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?qn(this).weekday:NaN}get localWeekNumber(){return this.isValid?qn(this).weekNumber:NaN}get localWeekYear(){return this.isValid?qn(this).weekYear:NaN}get ordinal(){return this.isValid?Ee(this.c).ordinal:NaN}get monthShort(){return this.isValid?Tn.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Tn.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Tn.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Tn.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,t=6e4,n=Xe(this.c),r=this.zone.offset(n-e),i=this.zone.offset(n+e),o=this.zone.offset(n-r*t),s=this.zone.offset(n-i*t);if(o===s)return[this];const a=n-o*t,u=n-s*t,l=Gn(a,o),c=Gn(u,s);return l.hour===c.hour&&l.minute===c.minute&&l.second===c.second&&l.millisecond===c.millisecond?[Zn(this,{ts:a}),Zn(this,{ts:u})]:[this]}get isInLeapYear(){return Je(this.year)}get daysInMonth(){return Qe(this.year,this.month)}get daysInYear(){return this.isValid?Ye(this.year):NaN}get weeksInWeekYear(){return this.isValid?tt(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?tt(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:n,calendar:r}=St.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:r}}toUTC(e=0,t={}){return this.setZone(ie.instance(e),t)}toLocal(){return this.setZone(we.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:n=!1}={}){if((e=se(e,we.defaultZone)).equals(this.zone))return this;if(e.isValid){let r=this.ts;if(t||n){const t=e.offset(this.ts),n=this.toObject();[r]=Jn(n,t,e)}return Zn(this,{ts:r,zone:e})}return mr.invalid(Vn(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){return Zn(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n})})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=st(e,lr),{minDaysInFirstWeek:n,startOfWeek:r}=Ie(t,this.loc),i=!Re(t.weekYear)||!Re(t.weekNumber)||!Re(t.weekday),o=!Re(t.ordinal),a=!Re(t.year),u=!Re(t.month)||!Re(t.day),l=a||u,c=t.weekYear||t.weekNumber;if((l||o)&&c)throw new s("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&o)throw new s("Can't mix ordinal dates with month/day");let f;i?f=Me({...Ne(this.c,n,r),...t},n,r):Re(t.ordinal)?(f={...this.toObject(),...t},Re(t.day)&&(f.day=Math.min(Qe(f.year,f.month),f.day))):f=Le({...Ee(this.c),...t});const[d,h]=Jn(f,this.o,this.zone);return Zn(this,{ts:d,o:h})}plus(e){return this.isValid?Zn(this,Yn(this,xn.fromDurationLike(e))):this}minus(e){return this.isValid?Zn(this,Yn(this,xn.fromDurationLike(e).negate())):this}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const n={},r=xn.normalizeUnit(e);switch(r){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0}if("weeks"===r)if(t){const e=this.loc.getStartOfWeek(),{weekday:t}=this;t=3&&(a+="T"),a+=tr(this,s,t,n,r,i,o),a}toISODate({format:e="extended",precision:t="day"}={}){return this.isValid?er(this,"extended"===e,ur(t)):null}toISOWeekDate(){return Xn(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:r=!1,extendedZone:i=!1,format:o="extended",precision:s="milliseconds"}={}){return this.isValid?(s=ur(s),(r&&or.indexOf(s)>=3?"T":"")+tr(this,"extended"===o,t,e,n,i,s)):null}toRFC2822(){return Xn(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Xn(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?er(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let r="HH:mm:ss.SSS";return(t||e)&&(n&&(r+=" "),t?r+="z":e&&(r+="ZZ")),Xn(this,r,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Bn}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",n={}){if(!this.isValid||!e.isValid)return xn.invalid("created by diffing an invalid DateTime");const r={locale:this.locale,numberingSystem:this.numberingSystem,...n},i=(a=t,Array.isArray(a)?a:[a]).map(xn.normalizeUnit),o=e.valueOf()>this.valueOf(),s=function(e,t,n,r){let[i,o,s,a]=function(e,t,n){const r=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+4*(t.year-e.year)],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const n=Cn(e,t);return(n-n%7)/7}],["days",Cn]],i={},o=e;let s,a;for(const[u,l]of r)n.indexOf(u)>=0&&(s=u,i[u]=l(e,t),a=o.plus(i),a>t?(i[u]--,(e=o.plus(i))>t&&(a=e,i[u]--,e=o.plus(i))):e=a);return[e,i,a,s]}(e,t,n);const u=t-i,l=n.filter(e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0);0===l.length&&(s0?xn.fromMillis(u,r).shiftTo(...l).plus(c):c}(o?this:e,o?e:this,i,r);var a;return o?s.negate():s}diffNow(e="milliseconds",t={}){return this.diff(mr.now(),e,t)}until(e){return this.isValid?On.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;const r=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t,n)<=r&&r<=i.endOf(t,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||mr.fromObject({},{zone:this.zone}),n=e.padding?thise.valueOf(),Math.min)}static max(...e){if(!e.every(mr.isDateTime))throw new u("max requires all arguments be DateTimes");return Fe(e,e=>e.valueOf(),Math.max)}static fromFormatExplain(e,t,n={}){const{locale:r=null,numberingSystem:i=null}=n;return zn(ne.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),e,t)}static fromStringExplain(e,t,n={}){return mr.fromFormatExplain(e,t,n)}static buildFormatParser(e,t={}){const{locale:n=null,numberingSystem:r=null}=t,i=ne.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0});return new Un(i,e)}static fromFormatParser(e,t,n={}){if(Re(e)||Re(t))throw new u("fromFormatParser requires an input string and a format parser");const{locale:r=null,numberingSystem:i=null}=n,o=ne.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0});if(!o.equals(t.locale))throw new u(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${t.locale}`);const{result:s,zone:a,specificOffset:l,invalidReason:c}=t.explainFromTokens(e);return c?mr.invalid(c):Qn(s,a,n,`format ${t.format}`,e,l)}static get DATE_SHORT(){return h}static get DATE_MED(){return p}static get DATE_MED_WITH_WEEKDAY(){return m}static get DATE_FULL(){return g}static get DATE_HUGE(){return y}static get TIME_SIMPLE(){return v}static get TIME_WITH_SECONDS(){return b}static get TIME_WITH_SHORT_OFFSET(){return w}static get TIME_WITH_LONG_OFFSET(){return _}static get TIME_24_SIMPLE(){return k}static get TIME_24_WITH_SECONDS(){return x}static get TIME_24_WITH_SHORT_OFFSET(){return S}static get TIME_24_WITH_LONG_OFFSET(){return O}static get DATETIME_SHORT(){return T}static get DATETIME_SHORT_WITH_SECONDS(){return C}static get DATETIME_MED(){return D}static get DATETIME_MED_WITH_SECONDS(){return N}static get DATETIME_MED_WITH_WEEKDAY(){return M}static get DATETIME_FULL(){return E}static get DATETIME_FULL_WITH_SECONDS(){return L}static get DATETIME_HUGE(){return I}static get DATETIME_HUGE_WITH_SECONDS(){return A}}function gr(e){if(mr.isDateTime(e))return e;if(e&&e.valueOf&&je(e.valueOf()))return mr.fromJSDate(e);if(e&&"object"==typeof e)return mr.fromObject(e);throw new u(`Unknown datetime argument: ${e}, of type ${typeof e}`)}t.DateTime=mr,t.Duration=xn,t.FixedOffsetZone=ie,t.IANAZone=F,t.Info=Tn,t.Interval=On,t.InvalidZone=oe,t.Settings=we,t.SystemZone=j,t.VERSION="3.7.1",t.Zone=$},1238:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.escapeEditing=void 0;const o=i(n(935));t.escapeEditing={context:"editing",keys:["esc","enter"],description:'Stop editing the current node and return to "navigation" mode',action:e=>r(void 0,void 0,void 0,function*(){const{e:t,cursor:n,outline:r,api:i,search:s}=e;if(t.shiftKey&&"Enter"===t.key)return;n.get().classList.remove("hidden-cursor");const a=n.get().querySelector(".nodeContent");a.contentEditable="false",a.blur(),o.default.setContext("navigation"),r.updateContent(n.getIdOfNode(),a.innerHTML.trim()),a.innerHTML=yield r.renderContent(n.getIdOfNode()),r.renderDates(),i.saveContentNode(r.getContentNode(n.getIdOfNode()))})}},1425:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateV1State=void 0;const r=n(2291),i=n(6011),o={};function s(e,t,n){return e.msecs??=-1/0,e.nsecs??=0,t===e.msecs?(e.nsecs++,e.nsecs>=1e4&&(e.node=void 0,e.nsecs=0)):t>e.msecs?e.nsecs=0:t= 16");if(o){if(s<0||s+16>o.length)throw new RangeError(`UUID byte range ${s}:${s+15} is out of buffer bounds`)}else o=new Uint8Array(16),s=0;t??=Date.now(),n??=0,r??=16383&(e[8]<<8|e[9]),i??=e.slice(10,16);const a=(1e4*(268435455&(t+=122192928e5))+n)%4294967296;o[s++]=a>>>24&255,o[s++]=a>>>16&255,o[s++]=a>>>8&255,o[s++]=255&a;const u=t/4294967296*1e4&268435455;o[s++]=u>>>8&255,o[s++]=255&u,o[s++]=u>>>24&15|16,o[s++]=u>>>16&255,o[s++]=r>>>8|128,o[s++]=255&r;for(let e=0;e<6;++e)o[s++]=i[e];return o}t.updateV1State=s,t.default=function(e,t,n){let u;const l=e?._v6??!1;if(e){const t=Object.keys(e);1===t.length&&"_v6"===t[0]&&(e=void 0)}if(e)u=a(e.random??e.rng?.()??(0,r.default)(),e.msecs,e.nsecs,e.clockseq,e.node,t,n);else{const e=Date.now(),i=(0,r.default)();s(o,e,i),u=a(i,o.msecs,o.nsecs,l?void 0:o.clockseq,l?void 0:o.node,t,n)}return t??(0,i.unsafeStringify)(u)}},1730:(e,t,n)=>{"use strict";let r,i,o,s,a,u,l,c,f,d;async function h(...e){if(!r){const e=await Promise.all([n.e(269),n.e(915)]).then(n.bind(n,9915));r=e.create}return r(...e)}async function p(...e){if(!i){const e=await n.e(164).then(n.bind(n,1164));i=e.insert}return i(...e)}async function m(...e){if(!o){const e=await n.e(164).then(n.bind(n,1164));o=e.insertWithHooks}return o(...e)}async function g(...e){if(!s){const e=await n.e(164).then(n.bind(n,1164));s=e.insertBatch}return s(...e)}async function y(...e){if(!a){const e=await Promise.all([n.e(269),n.e(903)]).then(n.bind(n,6903));a=e.remove}return a(...e)}async function v(...e){if(!u){const e=await Promise.all([n.e(269),n.e(753)]).then(n.bind(n,1753));u=e.search}return u(...e)}async function b(...e){if(!l){const e=await n.e(366).then(n.bind(n,9366));l=e.save}return l(...e)}async function w(...e){if(!c){const e=await n.e(379).then(n.bind(n,1379));c=e.load}return c(...e)}async function _(...e){if(!f){const e=await n.e(572).then(n.bind(n,2572));f=e.count}return f(...e)}async function k(...e){if(!d){const e=await n.e(572).then(n.bind(n,2572));d=e.getByID}return d(...e)}function x(e){Promise.all([n.e(269),n.e(753),n.e(550)]).then(n.bind(n,9550)).then(t=>setTimeout(()=>e(void 0,t),1)).catch(t=>setTimeout(()=>e(t),1))}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{create:()=>h,insert:()=>p,insertWithHooks:()=>m,insertBatch:()=>g,remove:()=>y,search:()=>v,save:()=>b,load:()=>w,count:()=>_,getByID:()=>k,requireLyra:()=>x})},1760:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.z=void 0,t.z={context:"navigation",keys:["z"],description:"hide all children node of the current node",action:e=>n(void 0,void 0,void 0,function*(){const{cursor:t,api:n,outline:r}=e;t.isNodeExpanded()?(t.collapse(),r.fold(t.getIdOfNode())):t.isNodeCollapsed()&&(t.expand(),r.unfold(t.getIdOfNode())),n.save(r)})}},1797:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9746);t.default=function(e){if(!(0,r.default)(e))throw TypeError("Invalid UUID");let t;return Uint8Array.of((t=parseInt(e.slice(0,8),16))>>>24,t>>>16&255,t>>>8&255,255&t,(t=parseInt(e.slice(9,13),16))>>>8,255&t,(t=parseInt(e.slice(14,18),16))>>>8,255&t,(t=parseInt(e.slice(19,23),16))>>>8,255&t,(t=parseInt(e.slice(24,36),16))/1099511627776&255,t/4294967296&255,t>>>24&255,t>>>16&255,t>>>8&255,255&t)}},1889:(e,t)=>{"use strict";"function"==typeof SuppressedError&&SuppressedError,t.__classPrivateFieldGet=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},t.__classPrivateFieldSet=function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}},2195:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FindDate=function(e){let t=[];for(let n=0,o=i.length;n{t.push(r.DateTime.fromISO(e.trim()))});break}catch(e){}}return t};const r=n(1169),i=[/[0-9]{4}-[0-9]{2}-[0-9]{2}/gi]},2196:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="ffffffff-ffff-ffff-ffff-ffffffffffff"},2291:(e,t)=>{"use strict";let n;Object.defineProperty(t,"__esModule",{value:!0});const r=new Uint8Array(16);t.default=function(){if(!n){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");n=crypto.getRandomValues.bind(crypto)}return n(r)}},2341:(e,t,n)=>{"use strict";var r,i=n(717);t.BaseDirectory=void 0,(r=t.BaseDirectory||(t.BaseDirectory={}))[r.Audio=1]="Audio",r[r.Cache=2]="Cache",r[r.Config=3]="Config",r[r.Data=4]="Data",r[r.LocalData=5]="LocalData",r[r.Document=6]="Document",r[r.Download=7]="Download",r[r.Picture=8]="Picture",r[r.Public=9]="Public",r[r.Video=10]="Video",r[r.Resource=11]="Resource",r[r.Temp=12]="Temp",r[r.AppConfig=13]="AppConfig",r[r.AppData=14]="AppData",r[r.AppLocalData=15]="AppLocalData",r[r.AppCache=16]="AppCache",r[r.AppLog=17]="AppLog",r[r.Desktop=18]="Desktop",r[r.Executable=19]="Executable",r[r.Font=20]="Font",r[r.Home=21]="Home",r[r.Runtime=22]="Runtime",r[r.Template=23]="Template",t.appCacheDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.AppCache})},t.appConfigDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.AppConfig})},t.appDataDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.AppData})},t.appLocalDataDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.AppLocalData})},t.appLogDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.AppLog})},t.audioDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Audio})},t.basename=async function(e,t){return i.invoke("plugin:path|basename",{path:e,ext:t})},t.cacheDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Cache})},t.configDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Config})},t.dataDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Data})},t.delimiter=function(){return window.__TAURI_INTERNALS__.plugins.path.delimiter},t.desktopDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Desktop})},t.dirname=async function(e){return i.invoke("plugin:path|dirname",{path:e})},t.documentDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Document})},t.downloadDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Download})},t.executableDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Executable})},t.extname=async function(e){return i.invoke("plugin:path|extname",{path:e})},t.fontDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Font})},t.homeDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Home})},t.isAbsolute=async function(e){return i.invoke("plugin:path|is_absolute",{path:e})},t.join=async function(...e){return i.invoke("plugin:path|join",{paths:e})},t.localDataDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.LocalData})},t.normalize=async function(e){return i.invoke("plugin:path|normalize",{path:e})},t.pictureDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Picture})},t.publicDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Public})},t.resolve=async function(...e){return i.invoke("plugin:path|resolve",{paths:e})},t.resolveResource=async function(e){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Resource,path:e})},t.resourceDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Resource})},t.runtimeDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Runtime})},t.sep=function(){return window.__TAURI_INTERNALS__.plugins.path.sep},t.tempDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Temp})},t.templateDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Template})},t.videoDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Video})}},2543:function(e,t,n){var r;e=n.nmd(e),function(){var i,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,l=128,c=1/0,f=9007199254740991,d=NaN,h=4294967295,p=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],m="[object Arguments]",g="[object Array]",y="[object Boolean]",v="[object Date]",b="[object Error]",w="[object Function]",_="[object GeneratorFunction]",k="[object Map]",x="[object Number]",S="[object Object]",O="[object Promise]",T="[object RegExp]",C="[object Set]",D="[object String]",N="[object Symbol]",M="[object WeakMap]",E="[object ArrayBuffer]",L="[object DataView]",I="[object Float32Array]",A="[object Float64Array]",$="[object Int8Array]",R="[object Int16Array]",j="[object Int32Array]",P="[object Uint8Array]",U="[object Uint8ClampedArray]",z="[object Uint16Array]",F="[object Uint32Array]",B=/\b__p \+= '';/g,K=/\b(__p \+=) '' \+/g,V=/(__e\(.*?\)|\b__t\)) \+\n'';/g,W=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,Z=RegExp(W.source),H=RegExp(q.source),G=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,Y=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,ie=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,de=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,me=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,we=/['\n\r\u2028\u2029\\]/g,_e="\\ud800-\\udfff",ke="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",xe="\\u2700-\\u27bf",Se="a-z\\xdf-\\xf6\\xf8-\\xff",Oe="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",Ce="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",De="["+_e+"]",Ne="["+Ce+"]",Me="["+ke+"]",Ee="\\d+",Le="["+xe+"]",Ie="["+Se+"]",Ae="[^"+_e+Ce+Ee+xe+Se+Oe+"]",$e="\\ud83c[\\udffb-\\udfff]",Re="[^"+_e+"]",je="(?:\\ud83c[\\udde6-\\uddff]){2}",Pe="[\\ud800-\\udbff][\\udc00-\\udfff]",Ue="["+Oe+"]",ze="\\u200d",Fe="(?:"+Ie+"|"+Ae+")",Be="(?:"+Ue+"|"+Ae+")",Ke="(?:['’](?:d|ll|m|re|s|t|ve))?",Ve="(?:['’](?:D|LL|M|RE|S|T|VE))?",We="(?:"+Me+"|"+$e+")?",qe="["+Te+"]?",Ze=qe+We+"(?:"+ze+"(?:"+[Re,je,Pe].join("|")+")"+qe+We+")*",He="(?:"+[Le,je,Pe].join("|")+")"+Ze,Ge="(?:"+[Re+Me+"?",Me,je,Pe,De].join("|")+")",Je=RegExp("['’]","g"),Ye=RegExp(Me,"g"),Qe=RegExp($e+"(?="+$e+")|"+Ge+Ze,"g"),Xe=RegExp([Ue+"?"+Ie+"+"+Ke+"(?="+[Ne,Ue,"$"].join("|")+")",Be+"+"+Ve+"(?="+[Ne,Ue+Fe,"$"].join("|")+")",Ue+"?"+Fe+"+"+Ke,Ue+"+"+Ve,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ee,He].join("|"),"g"),et=RegExp("["+ze+_e+ke+Te+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rt=-1,it={};it[I]=it[A]=it[$]=it[R]=it[j]=it[P]=it[U]=it[z]=it[F]=!0,it[m]=it[g]=it[E]=it[y]=it[L]=it[v]=it[b]=it[w]=it[k]=it[x]=it[S]=it[T]=it[C]=it[D]=it[M]=!1;var ot={};ot[m]=ot[g]=ot[E]=ot[L]=ot[y]=ot[v]=ot[I]=ot[A]=ot[$]=ot[R]=ot[j]=ot[k]=ot[x]=ot[S]=ot[T]=ot[C]=ot[D]=ot[N]=ot[P]=ot[U]=ot[z]=ot[F]=!0,ot[b]=ot[w]=ot[M]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},at=parseFloat,ut=parseInt,lt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ct="object"==typeof self&&self&&self.Object===Object&&self,ft=lt||ct||Function("return this")(),dt=t&&!t.nodeType&&t,ht=dt&&e&&!e.nodeType&&e,pt=ht&&ht.exports===dt,mt=pt&<.process,gt=function(){try{return ht&&ht.require&&ht.require("util").types||mt&&mt.binding&&mt.binding("util")}catch(e){}}(),yt=gt&>.isArrayBuffer,vt=gt&>.isDate,bt=gt&>.isMap,wt=gt&>.isRegExp,_t=gt&>.isSet,kt=gt&>.isTypedArray;function xt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function St(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i-1}function Mt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r-1;);return n}function Xt(e,t){for(var n=e.length;n--&&Ut(t,e[n],0)>-1;);return n}var en=Vt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tn=Vt({"&":"&","<":"<",">":">",'"':""","'":"'"});function nn(e){return"\\"+st[e]}function rn(e){return et.test(e)}function on(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function sn(e,t){return function(n){return e(t(n))}}function an(e,t){for(var n=-1,r=e.length,i=0,o=[];++n",""":'"',"'":"'"}),pn=function e(t){var n,r=(t=null==t?ft:pn.defaults(ft.Object(),t,pn.pick(ft,nt))).Array,ie=t.Date,_e=t.Error,ke=t.Function,xe=t.Math,Se=t.Object,Oe=t.RegExp,Te=t.String,Ce=t.TypeError,De=r.prototype,Ne=ke.prototype,Me=Se.prototype,Ee=t["__core-js_shared__"],Le=Ne.toString,Ie=Me.hasOwnProperty,Ae=0,$e=(n=/[^.]+$/.exec(Ee&&Ee.keys&&Ee.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Re=Me.toString,je=Le.call(Se),Pe=ft._,Ue=Oe("^"+Le.call(Ie).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ze=pt?t.Buffer:i,Fe=t.Symbol,Be=t.Uint8Array,Ke=ze?ze.allocUnsafe:i,Ve=sn(Se.getPrototypeOf,Se),We=Se.create,qe=Me.propertyIsEnumerable,Ze=De.splice,He=Fe?Fe.isConcatSpreadable:i,Ge=Fe?Fe.iterator:i,Qe=Fe?Fe.toStringTag:i,et=function(){try{var e=uo(Se,"defineProperty");return e({},"",{}),e}catch(e){}}(),st=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,lt=ie&&ie.now!==ft.Date.now&&ie.now,ct=t.setTimeout!==ft.setTimeout&&t.setTimeout,dt=xe.ceil,ht=xe.floor,mt=Se.getOwnPropertySymbols,gt=ze?ze.isBuffer:i,Rt=t.isFinite,Vt=De.join,mn=sn(Se.keys,Se),gn=xe.max,yn=xe.min,vn=ie.now,bn=t.parseInt,wn=xe.random,_n=De.reverse,kn=uo(t,"DataView"),xn=uo(t,"Map"),Sn=uo(t,"Promise"),On=uo(t,"Set"),Tn=uo(t,"WeakMap"),Cn=uo(Se,"create"),Dn=Tn&&new Tn,Nn={},Mn=jo(kn),En=jo(xn),Ln=jo(Sn),In=jo(On),An=jo(Tn),$n=Fe?Fe.prototype:i,Rn=$n?$n.valueOf:i,jn=$n?$n.toString:i;function Pn(e){if(ea(e)&&!Ks(e)&&!(e instanceof Bn)){if(e instanceof Fn)return e;if(Ie.call(e,"__wrapped__"))return Po(e)}return new Fn(e)}var Un=function(){function e(){}return function(t){if(!Xs(t))return{};if(We)return We(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function zn(){}function Fn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Bn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function sr(e,t,n,r,o,s){var a,u=1&t,l=2&t,c=4&t;if(n&&(a=o?n(e,r,o,s):n(e)),a!==i)return a;if(!Xs(e))return e;var f=Ks(e);if(f){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ie.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return Ti(e,a)}else{var d=fo(e),h=d==w||d==_;if(Zs(e))return wi(e,u);if(d==S||d==m||h&&!o){if(a=l||h?{}:po(e),!u)return l?function(e,t){return Ci(e,co(e),t)}(e,function(e,t){return e&&Ci(t,Ea(t),e)}(a,e)):function(e,t){return Ci(e,lo(e),t)}(e,nr(a,e))}else{if(!ot[d])return o?e:{};a=function(e,t,n){var r,i=e.constructor;switch(t){case E:return _i(e);case y:case v:return new i(+e);case L:return function(e,t){var n=t?_i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case I:case A:case $:case R:case j:case P:case U:case z:case F:return ki(e,n);case k:return new i;case x:case D:return new i(e);case T:return function(e){var t=new e.constructor(e.source,de.exec(e));return t.lastIndex=e.lastIndex,t}(e);case C:return new i;case N:return r=e,Rn?Se(Rn.call(r)):{}}}(e,d,u)}}s||(s=new Zn);var p=s.get(e);if(p)return p;s.set(e,a),oa(e)?e.forEach(function(r){a.add(sr(r,t,n,r,e,s))}):ta(e)&&e.forEach(function(r,i){a.set(i,sr(r,t,n,i,e,s))});var g=f?i:(c?l?to:eo:l?Ea:Ma)(e);return Ot(g||e,function(r,i){g&&(r=e[i=r]),Xn(a,i,sr(r,t,n,i,e,s))}),a}function ar(e,t,n){var r=n.length;if(null==e)return!r;for(e=Se(e);r--;){var o=n[r],s=t[o],a=e[o];if(a===i&&!(o in e)||!s(a))return!1}return!0}function ur(e,t,n){if("function"!=typeof e)throw new Ce(o);return Do(function(){e.apply(i,n)},t)}function lr(e,t,n,r){var i=-1,o=Nt,s=!0,a=e.length,u=[],l=t.length;if(!a)return u;n&&(t=Et(t,Gt(n))),r?(o=Mt,s=!1):t.length>=200&&(o=Yt,s=!1,t=new qn(t));e:for(;++i-1},Vn.prototype.set=function(e,t){var n=this.__data__,r=er(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Wn.prototype.clear=function(){this.size=0,this.__data__={hash:new Kn,map:new(xn||Vn),string:new Kn}},Wn.prototype.delete=function(e){var t=so(this,e).delete(e);return this.size-=t?1:0,t},Wn.prototype.get=function(e){return so(this,e).get(e)},Wn.prototype.has=function(e){return so(this,e).has(e)},Wn.prototype.set=function(e,t){var n=so(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},qn.prototype.add=qn.prototype.push=function(e){return this.__data__.set(e,s),this},qn.prototype.has=function(e){return this.__data__.has(e)},Zn.prototype.clear=function(){this.__data__=new Vn,this.size=0},Zn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Zn.prototype.get=function(e){return this.__data__.get(e)},Zn.prototype.has=function(e){return this.__data__.has(e)},Zn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Vn){var r=n.__data__;if(!xn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Wn(r)}return n.set(e,t),this.size=n.size,this};var cr=Mi(vr),fr=Mi(br,!0);function dr(e,t){var n=!0;return cr(e,function(e,r,i){return n=!!t(e,r,i)}),n}function hr(e,t,n){for(var r=-1,o=e.length;++r0&&n(a)?t>1?mr(a,t-1,n,r,i):Lt(i,a):r||(i[i.length]=a)}return i}var gr=Ei(),yr=Ei(!0);function vr(e,t){return e&&gr(e,t,Ma)}function br(e,t){return e&&yr(e,t,Ma)}function wr(e,t){return Dt(t,function(t){return Js(e[t])})}function _r(e,t){for(var n=0,r=(t=gi(t,e)).length;null!=e&&nt}function Or(e,t){return null!=e&&Ie.call(e,t)}function Tr(e,t){return null!=e&&t in Se(e)}function Cr(e,t,n){for(var o=n?Mt:Nt,s=e[0].length,a=e.length,u=a,l=r(a),c=1/0,f=[];u--;){var d=e[u];u&&t&&(d=Et(d,Gt(t))),c=yn(d.length,c),l[u]=!n&&(t||s>=120&&d.length>=120)?new qn(u&&d):i}d=e[0];var h=-1,p=l[0];e:for(;++h=a?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)});t--;)e[t]=e[t].value;return e}(i)}function Br(e,t,n){for(var r=-1,i=t.length,o={};++r-1;)a!==e&&Ze.call(a,u,1),Ze.call(e,u,1);return e}function Vr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;go(i)?Ze.call(e,i,1):ui(e,i)}}return e}function Wr(e,t){return e+ht(wn()*(t-e+1))}function qr(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=ht(t/2))&&(e+=e)}while(t);return n}function Zr(e,t){return No(So(e,t,nu),e+"")}function Hr(e){return Gn(Ua(e))}function Gr(e,t){var n=Ua(e);return Lo(n,or(t,0,n.length))}function Jr(e,t,n,r){if(!Xs(e))return e;for(var o=-1,s=(t=gi(t,e)).length,a=s-1,u=e;null!=u&&++oo?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var s=r(o);++i>>1,s=e[o];null!==s&&!aa(s)&&(n?s<=t:s=200){var l=t?null:qi(e);if(l)return un(l);s=!1,i=Yt,u=new qn}else u=t?[]:a;e:for(;++r=r?e:ei(e,t,n)}var bi=st||function(e){return ft.clearTimeout(e)};function wi(e,t){if(t)return e.slice();var n=e.length,r=Ke?Ke(n):new e.constructor(n);return e.copy(r),r}function _i(e){var t=new e.constructor(e.byteLength);return new Be(t).set(new Be(e)),t}function ki(e,t){var n=t?_i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function xi(e,t){if(e!==t){var n=e!==i,r=null===e,o=e==e,s=aa(e),a=t!==i,u=null===t,l=t==t,c=aa(t);if(!u&&!c&&!s&&e>t||s&&a&&l&&!u&&!c||r&&a&&l||!n&&l||!o)return 1;if(!r&&!s&&!c&&e1?n[o-1]:i,a=o>2?n[2]:i;for(s=e.length>3&&"function"==typeof s?(o--,s):i,a&&yo(n[0],n[1],a)&&(s=o<3?i:s,o=1),t=Se(t);++r-1?o[s?t[a]:a]:i}}function Ri(e){return Xi(function(t){var n=t.length,r=n,s=Fn.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new Ce(o);if(s&&!u&&"wrapper"==ro(a))var u=new Fn([],!0)}for(r=u?r:n;++r1&&w.reverse(),h&&fu))return!1;var c=s.get(e),f=s.get(t);if(c&&f)return c==t&&f==e;var d=-1,h=!0,p=2&n?new qn:i;for(s.set(e,t),s.set(t,e);++d-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Ot(p,function(n){var r="_."+n[0];t&n[1]&&!Nt(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ae):[]}(r),n)))}function Eo(e){var t=0,n=0;return function(){var r=vn(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Lo(e,t){var n=-1,r=e.length,o=r-1;for(t=t===i?r:t;++n1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,is(e,n)});function fs(e){var t=Pn(e);return t.__chain__=!0,t}function ds(e,t){return t(e)}var hs=Xi(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return ir(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Bn&&go(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ds,args:[o],thisArg:i}),new Fn(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(i),e})):this.thru(o)}),ps=Di(function(e,t,n){Ie.call(e,n)?++e[n]:rr(e,n,1)}),ms=$i(Bo),gs=$i(Ko);function ys(e,t){return(Ks(e)?Ot:cr)(e,oo(t,3))}function vs(e,t){return(Ks(e)?Tt:fr)(e,oo(t,3))}var bs=Di(function(e,t,n){Ie.call(e,n)?e[n].push(t):rr(e,n,[t])}),ws=Zr(function(e,t,n){var i=-1,o="function"==typeof t,s=Ws(e)?r(e.length):[];return cr(e,function(e){s[++i]=o?xt(t,e,n):Dr(e,t,n)}),s}),_s=Di(function(e,t,n){rr(e,n,t)});function ks(e,t){return(Ks(e)?Et:Rr)(e,oo(t,3))}var xs=Di(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),Ss=Zr(function(e,t){if(null==e)return[];var n=t.length;return n>1&&yo(e,t[0],t[1])?t=[]:n>2&&yo(t[0],t[1],t[2])&&(t=[t[0]]),Fr(e,mr(t,1),[])}),Os=lt||function(){return ft.Date.now()};function Ts(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Hi(e,l,i,i,i,i,t)}function Cs(e,t){var n;if("function"!=typeof t)throw new Ce(o);return e=ha(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Ds=Zr(function(e,t,n){var r=1;if(n.length){var i=an(n,io(Ds));r|=u}return Hi(e,r,t,n,i)}),Ns=Zr(function(e,t,n){var r=3;if(n.length){var i=an(n,io(Ns));r|=u}return Hi(t,r,e,n,i)});function Ms(e,t,n){var r,s,a,u,l,c,f=0,d=!1,h=!1,p=!0;if("function"!=typeof e)throw new Ce(o);function m(t){var n=r,o=s;return r=s=i,f=t,u=e.apply(o,n)}function g(e){var n=e-c;return c===i||n>=t||n<0||h&&e-f>=a}function y(){var e=Os();if(g(e))return v(e);l=Do(y,function(e){var n=t-(e-c);return h?yn(n,a-(e-f)):n}(e))}function v(e){return l=i,p&&r?m(e):(r=s=i,u)}function b(){var e=Os(),n=g(e);if(r=arguments,s=this,c=e,n){if(l===i)return function(e){return f=e,l=Do(y,t),d?m(e):u}(c);if(h)return bi(l),l=Do(y,t),m(c)}return l===i&&(l=Do(y,t)),u}return t=ma(t)||0,Xs(n)&&(d=!!n.leading,a=(h="maxWait"in n)?gn(ma(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p),b.cancel=function(){l!==i&&bi(l),f=0,r=c=s=l=i},b.flush=function(){return l===i?u:v(Os())},b}var Es=Zr(function(e,t){return ur(e,1,t)}),Ls=Zr(function(e,t,n){return ur(e,ma(t)||0,n)});function Is(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ce(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Is.Cache||Wn),n}function As(e){if("function"!=typeof e)throw new Ce(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Is.Cache=Wn;var $s=yi(function(e,t){var n=(t=1==t.length&&Ks(t[0])?Et(t[0],Gt(oo())):Et(mr(t,1),Gt(oo()))).length;return Zr(function(r){for(var i=-1,o=yn(r.length,n);++i=t}),Bs=Nr(function(){return arguments}())?Nr:function(e){return ea(e)&&Ie.call(e,"callee")&&!qe.call(e,"callee")},Ks=r.isArray,Vs=yt?Gt(yt):function(e){return ea(e)&&xr(e)==E};function Ws(e){return null!=e&&Qs(e.length)&&!Js(e)}function qs(e){return ea(e)&&Ws(e)}var Zs=gt||mu,Hs=vt?Gt(vt):function(e){return ea(e)&&xr(e)==v};function Gs(e){if(!ea(e))return!1;var t=xr(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ra(e)}function Js(e){if(!Xs(e))return!1;var t=xr(e);return t==w||t==_||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ys(e){return"number"==typeof e&&e==ha(e)}function Qs(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function Xs(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ea(e){return null!=e&&"object"==typeof e}var ta=bt?Gt(bt):function(e){return ea(e)&&fo(e)==k};function na(e){return"number"==typeof e||ea(e)&&xr(e)==x}function ra(e){if(!ea(e)||xr(e)!=S)return!1;var t=Ve(e);if(null===t)return!0;var n=Ie.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Le.call(n)==je}var ia=wt?Gt(wt):function(e){return ea(e)&&xr(e)==T},oa=_t?Gt(_t):function(e){return ea(e)&&fo(e)==C};function sa(e){return"string"==typeof e||!Ks(e)&&ea(e)&&xr(e)==D}function aa(e){return"symbol"==typeof e||ea(e)&&xr(e)==N}var ua=kt?Gt(kt):function(e){return ea(e)&&Qs(e.length)&&!!it[xr(e)]},la=Ki($r),ca=Ki(function(e,t){return e<=t});function fa(e){if(!e)return[];if(Ws(e))return sa(e)?fn(e):Ti(e);if(Ge&&e[Ge])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ge]());var t=fo(e);return(t==k?on:t==C?un:Ua)(e)}function da(e){return e?(e=ma(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ha(e){var t=da(e),n=t%1;return t==t?n?t-n:t:0}function pa(e){return e?or(ha(e),0,h):0}function ma(e){if("number"==typeof e)return e;if(aa(e))return d;if(Xs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Xs(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ht(e);var n=pe.test(e);return n||ge.test(e)?ut(e.slice(2),n?2:8):he.test(e)?d:+e}function ga(e){return Ci(e,Ea(e))}function ya(e){return null==e?"":si(e)}var va=Ni(function(e,t){if(_o(t)||Ws(t))Ci(t,Ma(t),e);else for(var n in t)Ie.call(t,n)&&Xn(e,n,t[n])}),ba=Ni(function(e,t){Ci(t,Ea(t),e)}),wa=Ni(function(e,t,n,r){Ci(t,Ea(t),e,r)}),_a=Ni(function(e,t,n,r){Ci(t,Ma(t),e,r)}),ka=Xi(ir),xa=Zr(function(e,t){e=Se(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&yo(t[0],t[1],o)&&(r=1);++n1),t}),Ci(e,to(e),n),r&&(n=sr(n,7,Yi));for(var i=t.length;i--;)ui(n,t[i]);return n}),$a=Xi(function(e,t){return null==e?{}:function(e,t){return Br(e,t,function(t,n){return Ta(e,n)})}(e,t)});function Ra(e,t){if(null==e)return{};var n=Et(to(e),function(e){return[e]});return t=oo(t),Br(e,n,function(e,n){return t(e,n[0])})}var ja=Zi(Ma),Pa=Zi(Ea);function Ua(e){return null==e?[]:Jt(e,Ma(e))}var za=Ii(function(e,t,n){return t=t.toLowerCase(),e+(n?Fa(t):t)});function Fa(e){return Ga(ya(e).toLowerCase())}function Ba(e){return(e=ya(e))&&e.replace(ve,en).replace(Ye,"")}var Ka=Ii(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Va=Ii(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Wa=Li("toLowerCase"),qa=Ii(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),Za=Ii(function(e,t,n){return e+(n?" ":"")+Ga(t)}),Ha=Ii(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Ga=Li("toUpperCase");function Ja(e,t,n){return e=ya(e),(t=n?i:t)===i?function(e){return tt.test(e)}(e)?function(e){return e.match(Xe)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Ya=Zr(function(e,t){try{return xt(e,i,t)}catch(e){return Gs(e)?e:new _e(e)}}),Qa=Xi(function(e,t){return Ot(t,function(t){t=Ro(t),rr(e,t,Ds(e[t],e))}),e});function Xa(e){return function(){return e}}var eu=Ri(),tu=Ri(!0);function nu(e){return e}function ru(e){return Ir("function"==typeof e?e:sr(e,1))}var iu=Zr(function(e,t){return function(n){return Dr(n,e,t)}}),ou=Zr(function(e,t){return function(n){return Dr(e,n,t)}});function su(e,t,n){var r=Ma(t),i=wr(t,r);null!=n||Xs(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=wr(t,Ma(t)));var o=!(Xs(n)&&"chain"in n&&!n.chain),s=Js(e);return Ot(i,function(n){var r=t[n];e[n]=r,s&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=Ti(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Lt([this.value()],arguments))})}),e}function au(){}var uu=zi(Et),lu=zi(Ct),cu=zi($t);function fu(e){return vo(e)?Kt(Ro(e)):function(e){return function(t){return _r(t,e)}}(e)}var du=Bi(),hu=Bi(!0);function pu(){return[]}function mu(){return!1}var gu,yu=Ui(function(e,t){return e+t},0),vu=Wi("ceil"),bu=Ui(function(e,t){return e/t},1),wu=Wi("floor"),_u=Ui(function(e,t){return e*t},1),ku=Wi("round"),xu=Ui(function(e,t){return e-t},0);return Pn.after=function(e,t){if("function"!=typeof t)throw new Ce(o);return e=ha(e),function(){if(--e<1)return t.apply(this,arguments)}},Pn.ary=Ts,Pn.assign=va,Pn.assignIn=ba,Pn.assignInWith=wa,Pn.assignWith=_a,Pn.at=ka,Pn.before=Cs,Pn.bind=Ds,Pn.bindAll=Qa,Pn.bindKey=Ns,Pn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ks(e)?e:[e]},Pn.chain=fs,Pn.chunk=function(e,t,n){t=(n?yo(e,t,n):t===i)?1:gn(ha(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var s=0,a=0,u=r(dt(o/t));so?0:o+n),(r=r===i||r>o?o:ha(r))<0&&(r+=o),r=n>r?0:pa(r);n>>0)?(e=ya(e))&&("string"==typeof t||null!=t&&!ia(t))&&!(t=si(t))&&rn(e)?vi(fn(e),0,n):e.split(t,n):[]},Pn.spread=function(e,t){if("function"!=typeof e)throw new Ce(o);return t=null==t?0:gn(ha(t),0),Zr(function(n){var r=n[t],i=vi(n,0,t);return r&&Lt(i,r),xt(e,this,i)})},Pn.tail=function(e){var t=null==e?0:e.length;return t?ei(e,1,t):[]},Pn.take=function(e,t,n){return e&&e.length?ei(e,0,(t=n||t===i?1:ha(t))<0?0:t):[]},Pn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ei(e,(t=r-(t=n||t===i?1:ha(t)))<0?0:t,r):[]},Pn.takeRightWhile=function(e,t){return e&&e.length?ci(e,oo(t,3),!1,!0):[]},Pn.takeWhile=function(e,t){return e&&e.length?ci(e,oo(t,3)):[]},Pn.tap=function(e,t){return t(e),e},Pn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Ce(o);return Xs(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ms(e,t,{leading:r,maxWait:t,trailing:i})},Pn.thru=ds,Pn.toArray=fa,Pn.toPairs=ja,Pn.toPairsIn=Pa,Pn.toPath=function(e){return Ks(e)?Et(e,Ro):aa(e)?[e]:Ti($o(ya(e)))},Pn.toPlainObject=ga,Pn.transform=function(e,t,n){var r=Ks(e),i=r||Zs(e)||ua(e);if(t=oo(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Xs(e)&&Js(o)?Un(Ve(e)):{}}return(i?Ot:vr)(e,function(e,r,i){return t(n,e,r,i)}),n},Pn.unary=function(e){return Ts(e,1)},Pn.union=es,Pn.unionBy=ts,Pn.unionWith=ns,Pn.uniq=function(e){return e&&e.length?ai(e):[]},Pn.uniqBy=function(e,t){return e&&e.length?ai(e,oo(t,2)):[]},Pn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ai(e,i,t):[]},Pn.unset=function(e,t){return null==e||ui(e,t)},Pn.unzip=rs,Pn.unzipWith=is,Pn.update=function(e,t,n){return null==e?e:li(e,t,mi(n))},Pn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:li(e,t,mi(n),r)},Pn.values=Ua,Pn.valuesIn=function(e){return null==e?[]:Jt(e,Ea(e))},Pn.without=os,Pn.words=Ja,Pn.wrap=function(e,t){return Rs(mi(t),e)},Pn.xor=ss,Pn.xorBy=as,Pn.xorWith=us,Pn.zip=ls,Pn.zipObject=function(e,t){return hi(e||[],t||[],Xn)},Pn.zipObjectDeep=function(e,t){return hi(e||[],t||[],Jr)},Pn.zipWith=cs,Pn.entries=ja,Pn.entriesIn=Pa,Pn.extend=ba,Pn.extendWith=wa,su(Pn,Pn),Pn.add=yu,Pn.attempt=Ya,Pn.camelCase=za,Pn.capitalize=Fa,Pn.ceil=vu,Pn.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=ma(n))==n?n:0),t!==i&&(t=(t=ma(t))==t?t:0),or(ma(e),t,n)},Pn.clone=function(e){return sr(e,4)},Pn.cloneDeep=function(e){return sr(e,5)},Pn.cloneDeepWith=function(e,t){return sr(e,5,t="function"==typeof t?t:i)},Pn.cloneWith=function(e,t){return sr(e,4,t="function"==typeof t?t:i)},Pn.conformsTo=function(e,t){return null==t||ar(e,t,Ma(t))},Pn.deburr=Ba,Pn.defaultTo=function(e,t){return null==e||e!=e?t:e},Pn.divide=bu,Pn.endsWith=function(e,t,n){e=ya(e),t=si(t);var r=e.length,o=n=n===i?r:or(ha(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},Pn.eq=Us,Pn.escape=function(e){return(e=ya(e))&&H.test(e)?e.replace(q,tn):e},Pn.escapeRegExp=function(e){return(e=ya(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Pn.every=function(e,t,n){var r=Ks(e)?Ct:dr;return n&&yo(e,t,n)&&(t=i),r(e,oo(t,3))},Pn.find=ms,Pn.findIndex=Bo,Pn.findKey=function(e,t){return jt(e,oo(t,3),vr)},Pn.findLast=gs,Pn.findLastIndex=Ko,Pn.findLastKey=function(e,t){return jt(e,oo(t,3),br)},Pn.floor=wu,Pn.forEach=ys,Pn.forEachRight=vs,Pn.forIn=function(e,t){return null==e?e:gr(e,oo(t,3),Ea)},Pn.forInRight=function(e,t){return null==e?e:yr(e,oo(t,3),Ea)},Pn.forOwn=function(e,t){return e&&vr(e,oo(t,3))},Pn.forOwnRight=function(e,t){return e&&br(e,oo(t,3))},Pn.get=Oa,Pn.gt=zs,Pn.gte=Fs,Pn.has=function(e,t){return null!=e&&ho(e,t,Or)},Pn.hasIn=Ta,Pn.head=Wo,Pn.identity=nu,Pn.includes=function(e,t,n,r){e=Ws(e)?e:Ua(e),n=n&&!r?ha(n):0;var i=e.length;return n<0&&(n=gn(i+n,0)),sa(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Ut(e,t,n)>-1},Pn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ha(n);return i<0&&(i=gn(r+i,0)),Ut(e,t,i)},Pn.inRange=function(e,t,n){return t=da(t),n===i?(n=t,t=0):n=da(n),function(e,t,n){return e>=yn(t,n)&&e=-9007199254740991&&e<=f},Pn.isSet=oa,Pn.isString=sa,Pn.isSymbol=aa,Pn.isTypedArray=ua,Pn.isUndefined=function(e){return e===i},Pn.isWeakMap=function(e){return ea(e)&&fo(e)==M},Pn.isWeakSet=function(e){return ea(e)&&"[object WeakSet]"==xr(e)},Pn.join=function(e,t){return null==e?"":Vt.call(e,t)},Pn.kebabCase=Ka,Pn.last=Go,Pn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=ha(n))<0?gn(r+o,0):yn(o,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Pt(e,Ft,o,!0)},Pn.lowerCase=Va,Pn.lowerFirst=Wa,Pn.lt=la,Pn.lte=ca,Pn.max=function(e){return e&&e.length?hr(e,nu,Sr):i},Pn.maxBy=function(e,t){return e&&e.length?hr(e,oo(t,2),Sr):i},Pn.mean=function(e){return Bt(e,nu)},Pn.meanBy=function(e,t){return Bt(e,oo(t,2))},Pn.min=function(e){return e&&e.length?hr(e,nu,$r):i},Pn.minBy=function(e,t){return e&&e.length?hr(e,oo(t,2),$r):i},Pn.stubArray=pu,Pn.stubFalse=mu,Pn.stubObject=function(){return{}},Pn.stubString=function(){return""},Pn.stubTrue=function(){return!0},Pn.multiply=_u,Pn.nth=function(e,t){return e&&e.length?zr(e,ha(t)):i},Pn.noConflict=function(){return ft._===this&&(ft._=Pe),this},Pn.noop=au,Pn.now=Os,Pn.pad=function(e,t,n){e=ya(e);var r=(t=ha(t))?cn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Fi(ht(i),n)+e+Fi(dt(i),n)},Pn.padEnd=function(e,t,n){e=ya(e);var r=(t=ha(t))?cn(e):0;return t&&rt){var r=e;e=t,t=r}if(n||e%1||t%1){var o=wn();return yn(e+o*(t-e+at("1e-"+((o+"").length-1))),t)}return Wr(e,t)},Pn.reduce=function(e,t,n){var r=Ks(e)?It:Wt,i=arguments.length<3;return r(e,oo(t,4),n,i,cr)},Pn.reduceRight=function(e,t,n){var r=Ks(e)?At:Wt,i=arguments.length<3;return r(e,oo(t,4),n,i,fr)},Pn.repeat=function(e,t,n){return t=(n?yo(e,t,n):t===i)?1:ha(t),qr(ya(e),t)},Pn.replace=function(){var e=arguments,t=ya(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Pn.result=function(e,t,n){var r=-1,o=(t=gi(t,e)).length;for(o||(o=1,e=i);++rf)return[];var n=h,r=yn(e,h);t=oo(t),e-=h;for(var i=Zt(r,t);++n=s)return e;var u=n-cn(r);if(u<1)return r;var l=a?vi(a,0,u).join(""):e.slice(0,u);if(o===i)return l+r;if(a&&(u+=l.length-u),ia(o)){if(e.slice(u).search(o)){var c,f=l;for(o.global||(o=Oe(o.source,ya(de.exec(o))+"g")),o.lastIndex=0;c=o.exec(f);)var d=c.index;l=l.slice(0,d===i?u:d)}}else if(e.indexOf(si(o),u)!=u){var h=l.lastIndexOf(o);h>-1&&(l=l.slice(0,h))}return l+r},Pn.unescape=function(e){return(e=ya(e))&&Z.test(e)?e.replace(W,hn):e},Pn.uniqueId=function(e){var t=++Ae;return ya(e)+t},Pn.upperCase=Ha,Pn.upperFirst=Ga,Pn.each=ys,Pn.eachRight=vs,Pn.first=Wo,su(Pn,(gu={},vr(Pn,function(e,t){Ie.call(Pn.prototype,t)||(gu[t]=e)}),gu),{chain:!1}),Pn.VERSION="4.17.21",Ot(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Pn[e].placeholder=Pn}),Ot(["drop","take"],function(e,t){Bn.prototype[e]=function(n){n=n===i?1:gn(ha(n),0);var r=this.__filtered__&&!t?new Bn(this):this.clone();return r.__filtered__?r.__takeCount__=yn(n,r.__takeCount__):r.__views__.push({size:yn(n,h),type:e+(r.__dir__<0?"Right":"")}),r},Bn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),Ot(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;Bn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:oo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),Ot(["head","last"],function(e,t){var n="take"+(t?"Right":"");Bn.prototype[e]=function(){return this[n](1).value()[0]}}),Ot(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");Bn.prototype[e]=function(){return this.__filtered__?new Bn(this):this[n](1)}}),Bn.prototype.compact=function(){return this.filter(nu)},Bn.prototype.find=function(e){return this.filter(e).head()},Bn.prototype.findLast=function(e){return this.reverse().find(e)},Bn.prototype.invokeMap=Zr(function(e,t){return"function"==typeof e?new Bn(this):this.map(function(n){return Dr(n,e,t)})}),Bn.prototype.reject=function(e){return this.filter(As(oo(e)))},Bn.prototype.slice=function(e,t){e=ha(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Bn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=ha(t))<0?n.dropRight(-t):n.take(t-e)),n)},Bn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Bn.prototype.toArray=function(){return this.take(h)},vr(Bn.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Pn[r?"take"+("last"==t?"Right":""):t],s=r||/^find/.test(t);o&&(Pn.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,u=t instanceof Bn,l=a[0],c=u||Ks(t),f=function(e){var t=o.apply(Pn,Lt([e],a));return r&&d?t[0]:t};c&&n&&"function"==typeof l&&1!=l.length&&(u=c=!1);var d=this.__chain__,h=!!this.__actions__.length,p=s&&!d,m=u&&!h;if(!s&&c){t=m?t:new Bn(this);var g=e.apply(t,a);return g.__actions__.push({func:ds,args:[f],thisArg:i}),new Fn(g,d)}return p&&m?e.apply(this,a):(g=this.thru(f),p?r?g.value()[0]:g.value():g)})}),Ot(["pop","push","shift","sort","splice","unshift"],function(e){var t=De[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Pn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Ks(i)?i:[],e)}return this[n](function(n){return t.apply(Ks(n)?n:[],e)})}}),vr(Bn.prototype,function(e,t){var n=Pn[t];if(n){var r=n.name+"";Ie.call(Nn,r)||(Nn[r]=[]),Nn[r].push({name:t,func:n})}}),Nn[ji(i,2).name]=[{name:"wrapper",func:i}],Bn.prototype.clone=function(){var e=new Bn(this.__wrapped__);return e.__actions__=Ti(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ti(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ti(this.__views__),e},Bn.prototype.reverse=function(){if(this.__filtered__){var e=new Bn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Bn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ks(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Pn.prototype.plant=function(e){for(var t,n=this;n instanceof zn;){var r=Po(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},Pn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Bn){var t=e;return this.__actions__.length&&(t=new Bn(this)),(t=t.reverse()).__actions__.push({func:ds,args:[Xo],thisArg:i}),new Fn(t,this.__chain__)}return this.thru(Xo)},Pn.prototype.toJSON=Pn.prototype.valueOf=Pn.prototype.value=function(){return fi(this.__wrapped__,this.__actions__)},Pn.prototype.first=Pn.prototype.head,Ge&&(Pn.prototype[Ge]=function(){return this}),Pn}();ft._=pn,(r=function(){return pn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},2770:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9746);t.default=function(e){if(!(0,r.default)(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)}},2829:(e,t)=>{"use strict";function n(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function r(e,t){return e<>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=[1518500249,1859775393,2400959708,3395469782],i=[1732584193,4023233417,2562383102,271733878,3285377520],o=new Uint8Array(e.length+1);o.set(e),o[e.length]=128;const s=(e=o).length/4+2,a=Math.ceil(s/16),u=new Array(a);for(let t=0;t>>0;f=c,c=l,l=r(a,30)>>>0,a=s,s=u}i[0]=i[0]+s>>>0,i[1]=i[1]+a>>>0,i[2]=i[2]+l>>>0,i[3]=i[3]+c>>>0,i[4]=i[4]+f>>>0}return Uint8Array.of(i[0]>>24,i[0]>>16,i[0]>>8,i[0],i[1]>>24,i[1]>>16,i[1]>>8,i[1],i[2]>>24,i[2]>>16,i[2]>>8,i[2],i[3]>>24,i[3]>>16,i[3]>>8,i[3],i[4]>>24,i[4]>>16,i[4]>>8,i[4])}},2988:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=t.stringToBytes=void 0;const r=n(1797),i=n(6011);function o(e){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let n=0;nn(void 0,void 0,void 0,function*(){const{cursor:t,outline:n,api:r,e:i}=e,o=t.get().previousElementSibling;if(o&&!o.classList.contains("nodeContent")&&i.shiftKey){const e=n.swapNodeWithPreviousSibling(t.getIdOfNode()),i=yield n.renderNode(e.parentNode);n.isTreeRoot(e.parentNode.id)?t.get().parentElement.innerHTML=i:t.get().parentElement.outerHTML=i,t.set(`#id-${e.targetNode.id}`),r.save(n)}})}},3298:(e,t,n)=>{"use strict";var r,i=n(2341),o=n(717);function s(e){return{isFile:e.isFile,isDirectory:e.isDirectory,isSymlink:e.isSymlink,size:e.size,mtime:null!==e.mtime?new Date(e.mtime):null,atime:null!==e.atime?new Date(e.atime):null,birthtime:null!==e.birthtime?new Date(e.birthtime):null,readonly:e.readonly,fileAttributes:e.fileAttributes,dev:e.dev,ino:e.ino,mode:e.mode,nlink:e.nlink,uid:e.uid,gid:e.gid,rdev:e.rdev,blksize:e.blksize,blocks:e.blocks}}t.SeekMode=void 0,(r=t.SeekMode||(t.SeekMode={}))[r.Start=0]="Start",r[r.Current=1]="Current",r[r.End=2]="End";class a extends o.Resource{async read(e){if(0===e.byteLength)return 0;const t=await o.invoke("plugin:fs|read",{rid:this.rid,len:e.byteLength}),n=function(e){const t=new Uint8ClampedArray(e),n=t.byteLength;let r=0;for(let e=0;ee instanceof URL?e.toString():e),options:n,onEvent:i}),a=new l(s);return()=>{a.close()}}Object.defineProperty(t,"BaseDirectory",{enumerable:!0,get:function(){return i.BaseDirectory}}),t.FileHandle=a,t.copyFile=async function(e,t,n){if(e instanceof URL&&"file:"!==e.protocol||t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");await o.invoke("plugin:fs|copy_file",{fromPath:e instanceof URL?e.toString():e,toPath:t instanceof URL?t.toString():t,options:n})},t.create=async function(e,t){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");const n=await o.invoke("plugin:fs|create",{path:e instanceof URL?e.toString():e,options:t});return new a(n)},t.exists=async function(e,t){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");return await o.invoke("plugin:fs|exists",{path:e instanceof URL?e.toString():e,options:t})},t.lstat=async function(e,t){return s(await o.invoke("plugin:fs|lstat",{path:e instanceof URL?e.toString():e,options:t}))},t.mkdir=async function(e,t){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");await o.invoke("plugin:fs|mkdir",{path:e instanceof URL?e.toString():e,options:t})},t.open=u,t.readDir=async function(e,t){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");return await o.invoke("plugin:fs|read_dir",{path:e instanceof URL?e.toString():e,options:t})},t.readFile=async function(e,t){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");const n=await o.invoke("plugin:fs|read_file",{path:e instanceof URL?e.toString():e,options:t});return n instanceof ArrayBuffer?new Uint8Array(n):Uint8Array.from(n)},t.readTextFile=async function(e,t){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");const n=await o.invoke("plugin:fs|read_text_file",{path:e instanceof URL?e.toString():e,options:t}),r=n instanceof ArrayBuffer?n:Uint8Array.from(n);return(new TextDecoder).decode(r)},t.readTextFileLines=async function(e,t){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");const n=e instanceof URL?e.toString():e;return await Promise.resolve({path:n,rid:null,async next(){null===this.rid&&(this.rid=await o.invoke("plugin:fs|read_text_file_lines",{path:n,options:t}));const e=await o.invoke("plugin:fs|read_text_file_lines_next",{rid:this.rid}),r=e instanceof ArrayBuffer?new Uint8Array(e):Uint8Array.from(e),i=1===r[r.byteLength-1];return i?(this.rid=null,{value:null,done:i}):{value:(new TextDecoder).decode(r.slice(0,r.byteLength)),done:i}},[Symbol.asyncIterator](){return this}})},t.remove=async function(e,t){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");await o.invoke("plugin:fs|remove",{path:e instanceof URL?e.toString():e,options:t})},t.rename=async function(e,t,n){if(e instanceof URL&&"file:"!==e.protocol||t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");await o.invoke("plugin:fs|rename",{oldPath:e instanceof URL?e.toString():e,newPath:t instanceof URL?t.toString():t,options:n})},t.size=async function(e){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");return await o.invoke("plugin:fs|size",{path:e instanceof URL?e.toString():e})},t.stat=async function(e,t){return s(await o.invoke("plugin:fs|stat",{path:e instanceof URL?e.toString():e,options:t}))},t.truncate=async function(e,t,n){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");await o.invoke("plugin:fs|truncate",{path:e instanceof URL?e.toString():e,len:t,options:n})},t.watch=async function(e,t,n){return await c(e,t,{delayMs:2e3,...n})},t.watchImmediate=async function(e,t,n){return await c(e,t,{...n,delayMs:void 0})},t.writeFile=async function(e,t,n){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");if(t instanceof ReadableStream){const r=await u(e,{create:!0,...n}),i=t.getReader();try{for(;;){const{done:e,value:t}=await i.read();if(e)break;await r.write(t)}}finally{i.releaseLock(),await r.close()}}else await o.invoke("plugin:fs|write_file",t,{headers:{path:encodeURIComponent(e instanceof URL?e.toString():e),options:JSON.stringify(n)}})},t.writeTextFile=async function(e,t,n){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");const r=new TextEncoder;await o.invoke("plugin:fs|write_text_file",r.encode(t),{headers:{path:encodeURIComponent(e instanceof URL?e.toString():e),options:JSON.stringify(n)}})}},3417:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.lift=void 0,t.lift={context:"navigation",keys:["shift + h"],description:"Lift the current node to be a sibling of the parent node",action:e=>n(void 0,void 0,void 0,function*(){const{e:t,cursor:n,outline:r,api:i}=e;if(t.shiftKey){if(r.data.tree.children.map(e=>e.id).includes(n.getIdOfNode()))return;const e=r.liftNodeToParent(n.getIdOfNode()),t=yield r.renderNode(e.parentNode);r.isTreeRoot(e.parentNode.id)?n.get().parentElement.parentElement.innerHTML=t:n.get().parentElement.parentElement.outerHTML=t,n.set(`#id-${e.targetNode.id}`),i.save(r)}})}},3465:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="00000000-0000-0000-0000-000000000000"},3727:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.lower=void 0,t.lower={context:"navigation",keys:["shift + l"],description:"Lower the current node to be a child of the previous sibling node",action:e=>n(void 0,void 0,void 0,function*(){const{e:t,outline:n,cursor:r,api:i}=e;if(t.shiftKey){const e=n.lowerNodeToChild(r.getIdOfNode()),t=yield n.renderNode(e.oldParentNode);n.isTreeRoot(e.oldParentNode.id)?r.get().parentElement.innerHTML=t:r.get().parentElement.outerHTML=t,r.set(`#id-${e.targetNode.id}`),i.save(n)}})}},3779:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);t.default={randomUUID:n}},3985:function(e,t,n){"use strict";var r,i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),s=0;s{f.default.withContext(e.context,()=>{f.default.bind(e.keys,t=>a(void 0,void 0,void 0,function*(){e.action({e:t,outline:_,cursor:k,api:x,search:S})}))})}),f.default.withContext("navigation",()=>{f.default.bind("ctrl + o",e=>a(void 0,void 0,void 0,function*(){const e=yield(0,m.openOutlineSelector)();if(!e.filename||!e.filename.length)return;const t=yield x.loadOutline(e.filename.split(".json")[0]);_=new l.Outline(t),O().innerHTML=yield _.render(),k.resetCursor(),yield S.reset(),yield S.indexBatch(_.data.contentNodes),document.getElementById("outlineName").innerHTML=_.data.name})),f.default.bind("ctrl + n",e=>a(void 0,void 0,void 0,function*(){C()}))}),S.onTermSelection=e=>{T(document.getElementById(`id-${e}`).parentElement),k.set(`#id-${e}`),x.save(_)},function(){a(this,void 0,void 0,function*(){yield x.createDirStructureIfNotExists();const e=(0,m.loadOutlineModal)();e.on("createOutline",()=>{C(),e.remove(),(0,g.bindOutlineRenamer)().on("attemptedRename",t=>a(this,void 0,void 0,function*(){try{yield x.renameOutline(_.data.name,t),_.data.name=t,yield x.saveOutline(_),document.getElementById("outlineName").innerHTML=_.data.name,e.remove()}catch(e){console.log(e)}}))}),e.on("loadOutline",t=>a(this,void 0,void 0,function*(){const n=yield x.loadOutline(t.split(".json")[0]);_=new l.Outline(n),O().innerHTML=yield _.render(),k.resetCursor(),document.getElementById("outlineName").innerHTML=_.data.name,f.default.setContext("navigation"),e.remove(),(0,g.bindOutlineRenamer)().on("attemptedRename",(e,t)=>a(this,void 0,void 0,function*(){try{yield x.renameOutline(_.data.name,e),_.data.name=e,yield x.saveOutline(_),document.getElementById("outlineName").innerHTML=_.data.name,t.remove()}catch(e){console.log(e)}})),S.createIndex({id:"string",content:"string"}).then(()=>a(this,void 0,void 0,function*(){yield S.indexBatch(_.data.contentNodes)}))})),e.show(),D()})}()},4161:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AllShortcuts=void 0;const r=n(587),i=n(9168),o=n(7167),s=n(1062),a=n(7802),u=n(1760),l=n(9342),c=n(6801),f=n(4488),d=n(5457),h=n(6656),p=n(6279),m=n(3417),g=n(3727),y=n(2993),v=n(7100),b=n(1238);t.AllShortcuts=[r.sidebarToggle,i.j,o.k,s.l,a.h,u.z,l.$,c.i,f.archive,d.tab,h.enter,p.d,m.lift,g.lower,y.swapUp,v.swapDown,b.escapeEditing]},4299:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateV7State=void 0;const r=n(2291),i=n(6011),o={};function s(e,t,n){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=n[6]<<23|n[7]<<16|n[8]<<8|n[9],e.msecs=t):(e.seq=e.seq+1|0,0===e.seq&&e.msecs++),e}function a(e,t,n,r,i=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(r){if(i<0||i+16>r.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`)}else r=new Uint8Array(16),i=0;return t??=Date.now(),n??=127*e[6]<<24|e[7]<<16|e[8]<<8|e[9],r[i++]=t/1099511627776&255,r[i++]=t/4294967296&255,r[i++]=t/16777216&255,r[i++]=t/65536&255,r[i++]=t/256&255,r[i++]=255&t,r[i++]=112|n>>>28&15,r[i++]=n>>>20&255,r[i++]=128|n>>>14&63,r[i++]=n>>>6&255,r[i++]=n<<2&255|3&e[10],r[i++]=e[11],r[i++]=e[12],r[i++]=e[13],r[i++]=e[14],r[i++]=e[15],r}t.updateV7State=s,t.default=function(e,t,n){let u;if(e)u=a(e.random??e.rng?.()??(0,r.default)(),e.msecs,e.seq,t,n);else{const e=Date.now(),i=(0,r.default)();s(o,e,i),u=a(i,o.msecs,o.seq,t,n)}return t??(0,i.unsafeStringify)(u)}},4300:function(e,t,n){"use strict";var r,i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),s=0;s!e.isDirectory)})}loadOutline(e){return a(this,void 0,void 0,function*(){const t=yield f.readTextFile(`outliner/${(0,l.slugify)(e)}.json`,{baseDir:f.BaseDirectory.AppLocalData}),n=JSON.parse(t),r=c.uniq(JSON.stringify(n.tree).match(/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi));r.shift();const i=yield Promise.allSettled(c.map(r,e=>f.readTextFile(`outliner/contentNodes/${e}.json`,{baseDir:f.BaseDirectory.AppLocalData})));return{id:n.id,version:n.version,created:n.created,name:n.name,tree:n.tree,contentNodes:c.keyBy(c.map(i,e=>{if("fulfilled"===e.status)return u.ContentNode.Create(JSON.parse(e.value));console.log("rejected node",e.reason)}),e=>e.id)}})}saveOutline(e){return a(this,void 0,void 0,function*(){yield f.writeTextFile(`outliner/${(0,l.slugify)(e.data.name)}.json`,JSON.stringify({id:e.data.id,version:e.data.version,created:e.data.created,name:e.data.name,tree:e.data.tree}),{baseDir:f.BaseDirectory.AppLocalData})})}renameOutline(e,t){return a(this,void 0,void 0,function*(){if(t.length&&e!==t)return f.rename(`outliner/${(0,l.slugify)(e)}.json`,`outliner/${(0,l.slugify)(t)}.json`,{oldPathBaseDir:f.BaseDirectory.AppLocalData,newPathBaseDir:f.BaseDirectory.AppLocalData})})}saveContentNode(e){return a(this,void 0,void 0,function*(){try{yield f.writeTextFile(`outliner/contentNodes/${e.id}.json`,JSON.stringify(e.toJson()),{baseDir:f.BaseDirectory.AppLocalData})}catch(e){console.error(e)}})}save(e){this.state.has("saveTimeout")||this.state.set("saveTimeout",setTimeout(()=>a(this,void 0,void 0,function*(){yield this.saveOutline(e),this.state.delete("saveTimeout")}),2e3))}}},4488:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.archive=void 0,t.archive={context:"navigation",keys:["shift + x"],description:'Mark a node and all its children as "archived"',action:e=>n(void 0,void 0,void 0,function*(){const{e:t,outline:n,cursor:r,api:i}=e;t.preventDefault(),r.get().classList.toggle("strikethrough"),n.getContentNode(r.getIdOfNode()).toggleArchiveStatus(),i.saveContentNode(n.getContentNode(r.getIdOfNode())),i.save(n)})}},4557:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0;const r=n(2829),i=n(2988);var o=n(2988);function s(e,t,n,o){return(0,i.default)(80,r.default,e,t,n,o)}Object.defineProperty(t,"DNS",{enumerable:!0,get:function(){return o.DNS}}),Object.defineProperty(t,"URL",{enumerable:!0,get:function(){return o.URL}}),s.DNS=i.DNS,s.URL=i.URL,t.default=s},5191:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CustomEventEmitter=void 0,t.CustomEventEmitter=class{constructor(){this.eventMap={}}on(e,t){this.eventMap[e]||(this.eventMap[e]=[]),this.eventMap[e].push(t)}emit(e,t){this.eventMap[e]&&this.eventMap[e].forEach(e=>{e.apply(null,t)})}}},5444:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cursor=void 0;const r=n(876);t.Cursor=class{constructor(){}resetCursor(){this.set(".node")}get(){return document.querySelector(".cursor")}getIdOfNode(){return this.get().getAttribute("data-id")}unset(){const e=this.get();e&&e.classList.remove("cursor")}set(e){this.unset();const t=document.querySelector(e);t&&(t.classList.add("cursor"),(0,r.isVisible)(t)||t.scrollIntoView(!0))}collapse(){this.get().classList.remove("expanded"),this.get().classList.add("collapsed")}expand(){this.get().classList.remove("collapsed"),this.get().classList.add("expanded")}isNodeCollapsed(){return this.get().classList.contains("collapsed")}isNodeExpanded(){return this.get().classList.contains("expanded")}}},5457:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.tab=void 0,t.tab={context:"navigation",keys:["tab"],description:"Add a new node as the child of the current node",action:e=>n(void 0,void 0,void 0,function*(){const{e:t,cursor:n,outline:r,api:i}=e;t.preventDefault();const o=r.createChildNode(n.getIdOfNode()),s=yield r.renderNode(o.parentNode);n.get().outerHTML=s,n.set(`#id-${o.node.id}`),i.saveContentNode(o.node),i.save(r)})}},6011:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unsafeStringify=void 0;const r=n(9746),i=[];for(let e=0;e<256;++e)i.push((e+256).toString(16).slice(1));function o(e,t=0){return(i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]).toLowerCase()}t.unsafeStringify=o,t.default=function(e,t=0){const n=o(e,t);if(!(0,r.default)(n))throw TypeError("Stringified UUID is invalid");return n}},6279:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.d=void 0,t.d={context:"navigation",keys:["shift + d"],description:"Delete the current node",action:e=>n(void 0,void 0,void 0,function*(){const{e:t,outline:n,cursor:r,api:i}=e;if(!t.shiftKey)return;const o=n.removeNode(r.getIdOfNode()),s=yield n.renderNode(o.parentNode),a=r.get().previousElementSibling,u=r.get().nextElementSibling;n.isTreeRoot(o.parentNode.id)?r.get().parentElement.innerHTML=s:r.get().parentElement.outerHTML=s,a&&a.getAttribute("data-id")?r.set(`#id-${a.getAttribute("data-id")}`):u&&u.getAttribute("data-id")?r.set(`#id-${u.getAttribute("data-id")}`):r.set(`#id-${o.parentNode.id}`),i.save(n)})}},6356:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(6011),i=n(1425),o=n(6568);t.default=function(e,t,n){e??={},n??=0;let s=(0,i.default)({...e,_v6:!0},new Uint8Array(16));if(s=(0,o.default)(s),t){for(let e=0;e<16;e++)t[n+e]=s[e];return t}return(0,r.unsafeStringify)(s)}},6568:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1797),i=n(6011);t.default=function(e){const t=(n="string"==typeof e?(0,r.default)(e):e,Uint8Array.of((15&n[6])<<4|n[7]>>4&15,(15&n[7])<<4|(240&n[4])>>4,(15&n[4])<<4|(240&n[5])>>4,(15&n[5])<<4|(240&n[0])>>4,(15&n[0])<<4|(240&n[1])>>4,(15&n[1])<<4|(240&n[2])>>4,96|15&n[2],n[3],n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15]));var n;return"string"==typeof e?(0,i.unsafeStringify)(t):t}},6656:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.enter=void 0,t.enter={context:"navigation",keys:["enter"],description:"Add a new node as the sibling of the current node",action:e=>n(void 0,void 0,void 0,function*(){const{e:t,outline:n,cursor:r,api:i}=e;if(t.shiftKey)return;t.preventDefault(),t.preventRepeat();const o=n.createSiblingNode(r.getIdOfNode()),s=yield n.renderNode(o.parentNode);n.isTreeRoot(o.parentNode.id)?r.get().parentElement.innerHTML=s:r.get().parentElement.outerHTML=s,r.set(`#id-${o.node.id}`),i.saveContentNode(o.node),i.save(n)})}},6697:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i},6759:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.help=void 0;const i=n(9492);t.help={context:"navigation",keys:["shift + /"],description:"Display help modal",action:e=>r(void 0,void 0,void 0,function*(){i.helpModal.show()})}},6801:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.i=void 0;const o=i(n(935));t.i={context:"navigation",keys:["i"],description:'Enter "edit" mode and place the cursor at the start of the editable content',action:e=>r(void 0,void 0,void 0,function*(){const{e:t,cursor:n,outline:r}=e;t.preventDefault(),n.get().classList.add("hidden-cursor");const i=n.get().querySelector(".nodeContent");i.innerHTML=r.data.contentNodes[n.getIdOfNode()].content,i.contentEditable="true",i.focus(),o.default.setContext("editing")})}},6928:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.link=function(e){return`
    ${e.text}`}},7100:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.swapDown=void 0,t.swapDown={context:"navigation",keys:["shift + j"],description:"Swap the current node with the next sibling node",action:e=>n(void 0,void 0,void 0,function*(){if(e.cursor.get().nextElementSibling&&e.e.shiftKey){const t=e.outline.swapNodeWithNextSibling(e.cursor.getIdOfNode()),n=yield e.outline.renderNode(t.parentNode);e.outline.isTreeRoot(t.parentNode.id)?e.cursor.get().parentElement.innerHTML=n:e.cursor.get().parentElement.outerHTML=n,e.cursor.set(`#id-${t.targetNode.id}`),e.api.save(e.outline)}})}},7167:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.k=void 0,t.k={context:"navigation",keys:["k"],description:"Move the cursor to the previous sibling of the current node",action:e=>n(void 0,void 0,void 0,function*(){const{cursor:t,e:n}=e,r=t.get().previousElementSibling;r&&!r.classList.contains("nodeContent")&&(n.shiftKey||t.set(`#id-${r.getAttribute("data-id")}`))})}},7670:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.bindOutlineRenamer=function(){const e=s();return(0,i.$)("#outlineName").addEventListener("click",t=>{e.show(),(0,i.$)("#outline-renamer").addEventListener("submit",t=>r(this,void 0,void 0,function*(){t.preventDefault(),t.stopPropagation();const n=(0,i.$)("#new-outline-name").value;e.emit("attemptedRename",[n,e])}))}),e},t.renameOutline=s;const i=n(876),o=n(8013);function s(){return new o.Modal({title:"Rename Outline",escapeExitable:!0},`\n
    \n \n \n
    \n `)}},7802:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.h=void 0,t.h={context:"navigation",keys:["h"],description:"Move the cursor to the parent element of the current node",action:e=>n(void 0,void 0,void 0,function*(){const{e:t,cursor:n}=e,r=n.get().parentElement;r&&r.classList.contains("node")&&(t.shiftKey||n.set(`#id-${r.getAttribute("data-id")}`))})}},8013:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Modal=void 0;const i=n(1031),o=n(182),s=n(5191),a=r(n(935));class u extends s.CustomEventEmitter{constructor(e,t=""){super(),this.options=e,this.content=t,this.name=(0,i.slugify)(this.options.name||this.options.title),this.id=`id-${(0,o.v4)()}`,this.options.escapeExitable&&!this.options.keyboardContext&&(this.options.keyboardContext=(0,i.slugify)(this.options.title)+"kbd-context"),this.options.keyboardContext&&this.options.escapeExitable&&this.makeExitable()}makeExitable(){a.default.withContext(this.options.keyboardContext,()=>{a.default.bind("escape",e=>{this.remove()})})}renderModalTitle(){return this.options.title?`

    ${this.options.title}

    `:""}renderModalContent(){return this.content}renderModal(){return`\n \n `}updateRender(){document.getElementById(this.id).innerHTML=``,this.emit("updated")}isShown(){const e=document.getElementById(this.id);return e&&!e.classList.contains("hidden")}show(){this.isShown()?this.updateRender():(document.querySelector("body").innerHTML+=this.renderModal(),this.options.keyboardContext&&(a.default.setContext(this.options.keyboardContext),this.options.escapeExitable),this.emit("rendered"))}remove(){document.getElementById(this.id).remove(),this.emit("removed"),a.default.setContext("navigation")}}t.Modal=u},8286:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3779),i=n(2291),o=n(6011);t.default=function(e,t,n){if(r.default.randomUUID&&!t&&!e)return r.default.randomUUID();const s=(e=e||{}).random??e.rng?.()??(0,i.default)();if(s.length<16)throw new Error("Random bytes length must be >= 16");if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){if((n=n||0)<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=s[e];return t}return(0,o.unsafeStringify)(s)}},8436:e=>{"use strict";e.exports=JSON.parse('{"id":"e067419a-85c3-422d-b8c4-41690be44500","version":"0.0.1","name":"Sample","created":1674409747467,"tree":{"id":"e067419a-85c3-422d-b8c4-41690be44500","collapsed":false,"children":[{"id":"e067419a-85c3-422d-b8c4-41690be4450d","collapsed":false,"children":[]}]},"contentNodes":{"e067419a-85c3-422d-b8c4-41690be4450d":{"id":"e067419a-85c3-422d-b8c4-41690be4450d","created":1674409747467,"lastUpdated":null,"type":"text","content":"**Welcome to my Outliner**
    ","archived":false,"archivedDate":null,"deleted":false,"deletedDate":null}}}')},8729:function(e,t,n){"use strict";var r,i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),s=0;s{document.getElementById("create-outline").addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),e.emit("createOutline",[t])}),document.getElementById("open-outline-selector").addEventListener("click",t=>a(this,void 0,void 0,function*(){t.preventDefault(),t.stopPropagation();const n=yield d();n&&e.emit("loadOutline",[n.filename])}))}),e};const u=s(n(9403)),l=s(n(2341)),c=n(8013),f='\n

    To begin, either create a new outline or open an existing one.

    \n\n';function d(){return a(this,void 0,void 0,function*(){const e=yield u.open({multiple:!1,defaultPath:yield l.join(yield l.appLocalDataDir(),"outliner"),directory:!1,title:"Select Outline",filters:[{name:"JSON",extensions:["json"]}]});return e?{filename:yield l.basename(e.toString()),fqp:e}:{filename:null,fqp:null}})}},9168:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.j=void 0,t.j={context:"navigation",keys:["j"],description:"Move the cursor to the next sibling of the current node",action:e=>n(void 0,void 0,void 0,function*(){const t=e.cursor.get().nextElementSibling;t&&(e.e.shiftKey||e.cursor.set(`#id-${t.getAttribute("data-id")}`))})}},9342:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.$=void 0;const o=i(n(935));t.$={context:"navigation",keys:["shift + 4"],description:'Enter "Edit" mode and place the cursor at the end of the editable content',action:e=>r(void 0,void 0,void 0,function*(){const{cursor:t,outline:n,e:r}=e;r.preventDefault(),t.get().classList.add("hidden-cursor");const i=t.get().querySelector(".nodeContent");i.innerHTML=n.data.contentNodes[t.getIdOfNode()].content,i.contentEditable="true";const s=document.createRange();s.selectNodeContents(i),s.collapse(!1);const a=window.getSelection();a.removeAllRanges(),a.addRange(s),i.focus(),o.default.setContext("editing")})}},9403:(e,t,n)=>{"use strict";var r=n(717);t.ask=async function(e,t){const n="string"==typeof t?{title:t}:t;return await r.invoke("plugin:dialog|ask",{message:e.toString(),title:n?.title?.toString(),kind:n?.kind,yesButtonLabel:n?.okLabel?.toString(),noButtonLabel:n?.cancelLabel?.toString()})},t.confirm=async function(e,t){const n="string"==typeof t?{title:t}:t;return await r.invoke("plugin:dialog|confirm",{message:e.toString(),title:n?.title?.toString(),kind:n?.kind,okButtonLabel:n?.okLabel?.toString(),cancelButtonLabel:n?.cancelLabel?.toString()})},t.message=async function(e,t){const n="string"==typeof t?{title:t}:t;await r.invoke("plugin:dialog|message",{message:e.toString(),title:n?.title?.toString(),kind:n?.kind,okButtonLabel:n?.okLabel?.toString()})},t.open=async function(e={}){return"object"==typeof e&&Object.freeze(e),await r.invoke("plugin:dialog|open",{options:e})},t.save=async function(e={}){return"object"==typeof e&&Object.freeze(e),await r.invoke("plugin:dialog|save",{options:e})}},9492:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.helpModal=void 0;const r=n(2543),i=n(8013),o=n(4161),s=`\n

    Daily Backup: The daily backup system lets you mash the "Daily Backup" button as much as you'd like.. but will only save the last time you clicked on it. You can only click it once and hour. Your content will always be saved in local-storage as well, but its always good to have a backup system.

    \n \n \n \n \n \n \n \n \n ${(0,r.map)(o.AllShortcuts,e=>`\n \n \n \n \n `).join("\n")}\n \n
    KeyAction
    \n ${e.keys.map(e=>`${e}`).join(" or ")}\n \n ${e.description}\n
    \n`;t.helpModal=new i.Modal({title:"Help",keyboardContext:"help",escapeExitable:!0},s)},9746:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(6697);t.default=function(e){return"string"==typeof e&&r.default.test(e)}}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={id:e,loaded:!1,exports:{}};return n[e].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.m=n,i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce((t,n)=>(i.f[n](e,t),t),[])),i.u=e=>e+".bundle.js",i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="outline-browser:",i.l=(n,r,o,s)=>{if(e[n])e[n].push(r);else{var a,u;if(void 0!==o)for(var l=document.getElementsByTagName("script"),c=0;c{a.onerror=a.onload=null,clearTimeout(h);var i=e[n];if(delete e[n],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach(e=>e(r)),t)return t(r)},h=setTimeout(d.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=d.bind(null,a.onerror),a.onload=d.bind(null,a.onload),u&&document.head.appendChild(a)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{var e={792:0};i.f.j=(t,n)=>{var r=i.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise((n,i)=>r=e[t]=[n,i]);n.push(r[2]=o);var s=i.p+i.u(t),a=new Error;i.l(s,n=>{if(i.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),s=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+s+")",a.name="ChunkLoadError",a.type=o,a.request=s,r[1](a)}},"chunk-"+t,t)}};var t=(t,n)=>{var r,o,[s,a,u]=n,l=0;if(s.some(t=>0!==e[t])){for(r in a)i.o(a,r)&&(i.m[r]=a[r]);u&&u(i)}for(t&&t(n);l{var e,t,n={23:(e,t,n)=>{"use strict";function r(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}n.r(t),n.d(t,{Hooks:()=>fe,Lexer:()=>ae,Marked:()=>he,Parser:()=>ce,Renderer:()=>ue,TextRenderer:()=>le,Tokenizer:()=>se,defaults:()=>i,getDefaults:()=>r,lexer:()=>ke,marked:()=>pe,options:()=>me,parse:()=>we,parseInline:()=>be,parser:()=>_e,setOptions:()=>ge,use:()=>ye,walkTokens:()=>ve});var i={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function o(e){i=e}var s={exec:()=>null};function a(e,t=""){let n="string"==typeof e?e:e.source,r={replace:(e,t)=>{let i="string"==typeof t?t:t.source;return i=i.replace(u.caret,"$1"),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var u={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},l=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,c=/(?:[*+-]|\d{1,9}[.)])/,f=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,h=a(f).replace(/bull/g,c).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),d=a(f).replace(/bull/g,c).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),p=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,m=/(?!\s*\])(?:\\.|[^\[\]\\])+/,g=a(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",m).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),y=a(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,c).getRegex(),v="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",b=/|$))/,w=a("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",b).replace("tag",v).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_=a(p).replace("hr",l).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",v).getRegex(),k={blockquote:a(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",_).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:g,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:l,html:w,lheading:h,list:y,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:_,table:s,text:/^[^\n]+/},x=a("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",l).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",v).getRegex(),S={...k,lheading:d,table:x,paragraph:a(p).replace("hr",l).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",x).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",v).getRegex()},T={...k,html:a("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",b).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:s,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:a(p).replace("hr",l).replace("heading"," *#{1,6} *[^\n]").replace("lheading",h).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},O=/^( {2,}|\\)\n(?!\s*$)/,C=/[\p{P}\p{S}]/u,M=/[\s\p{P}\p{S}]/u,D=/[^\s\p{P}\p{S}]/u,N=a(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,M).getRegex(),E=/(?!~)[\p{P}\p{S}]/u,L=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,I=a(L,"u").replace(/punct/g,C).getRegex(),A=a(L,"u").replace(/punct/g,E).getRegex(),$="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",R=a($,"gu").replace(/notPunctSpace/g,D).replace(/punctSpace/g,M).replace(/punct/g,C).getRegex(),j=a($,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,E).getRegex(),P=a("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,D).replace(/punctSpace/g,M).replace(/punct/g,C).getRegex(),U=a(/\\(punct)/,"gu").replace(/punct/g,C).getRegex(),z=a(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),F=a(b).replace("(?:--\x3e|$)","--\x3e").getRegex(),B=a("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",F).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),K=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,V=a(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",K).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),W=a(/^!?\[(label)\]\[(ref)\]/).replace("label",K).replace("ref",m).getRegex(),q=a(/^!?\[(ref)\](?:\[\])?/).replace("ref",m).getRegex(),Z={_backpedal:s,anyPunctuation:U,autolink:z,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,br:O,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:s,emStrongLDelim:I,emStrongRDelimAst:R,emStrongRDelimUnd:P,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:V,nolink:q,punctuation:N,reflink:W,reflinkSearch:a("reflink|nolink(?!\\()","g").replace("reflink",W).replace("nolink",q).getRegex(),tag:B,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},ee=e=>X[e];function te(e,t){if(t){if(u.escapeTest.test(e))return e.replace(u.escapeReplace,ee)}else if(u.escapeTestNoEncode.test(e))return e.replace(u.escapeReplaceNoEncode,ee);return e}function ne(e){try{e=encodeURI(e).replace(u.percentDecode,"%")}catch{return null}return e}function re(e,t){let n=e.replace(u.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"}).split(u.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:ie(e,"\n")}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=function(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(null===r)return t;let i=r[1];return t.split("\n").map(e=>{let t=e.match(n.other.beginningSpace);if(null===t)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join("\n")}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=ie(e,"#");(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:ie(t[0],"\n")}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=ie(t[0],"\n").split("\n"),n="",r="",i=[];for(;e.length>0;){let t,o=!1,s=[];for(t=0;t1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let o=this.rules.other.listItemRegex(n),s=!1;for(;e;){let n=!1,r="",a="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let u=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,e=>" ".repeat(3*e.length)),l=e.split("\n",1)[0],c=!u.trim(),f=0;if(this.options.pedantic?(f=2,a=u.trimStart()):c?f=t[1].length+1:(f=t[2].search(this.rules.other.nonSpaceChar),f=f>4?1:f,a=u.slice(f),f+=t[1].length),c&&this.rules.other.blankLine.test(l)&&(r+=l+"\n",e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(f),n=this.rules.other.hrRegex(f),i=this.rules.other.fencesBeginRegex(f),o=this.rules.other.headingBeginRegex(f),s=this.rules.other.htmlBeginRegex(f);for(;e;){let h,d=e.split("\n",1)[0];if(l=d,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting," "),h=l):h=l.replace(this.rules.other.tabCharGlobal," "),i.test(l)||o.test(l)||s.test(l)||t.test(l)||n.test(l))break;if(h.search(this.rules.other.nonSpaceChar)>=f||!l.trim())a+="\n"+h.slice(f);else{if(c||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||i.test(u)||o.test(u)||n.test(u))break;a+="\n"+l}!c&&!l.trim()&&(c=!0),r+=d+"\n",e=e.substring(d.length+1),u=h.slice(f)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(s=!0));let h,d=null;this.options.gfm&&(d=this.rules.other.listIsTask.exec(a),d&&(h="[ ] "!==d[0],a=a.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:r,task:!!d,checked:h,loose:!1,text:a,tokens:[]}),i.raw+=r}let a=i.items.at(-1);if(!a)return;a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd(),i.raw=i.raw.trimEnd();for(let e=0;e"space"===e.type),n=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw));i.loose=n}if(i.loose)for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:o.align[t]})));return o}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=ie(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{let e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r0?-2:-1}(t[2],"()");if(-2===e)return;if(e>-1){let n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),oe(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return oe(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!r[1]&&!r[2]||!n||this.rules.inline.punctuation.exec(n))){let n,i,o=[...r[0]].length-1,s=o,a=0,u="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+o);null!=(r=u.exec(t));){if(n=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!n)continue;if(i=[...n].length,r[3]||r[4]){s+=i;continue}if((r[5]||r[6])&&o%3&&!((o+i)%3)){a+=i;continue}if(s-=i,s>0)continue;i=Math.min(i,i+s+a);let t=[...r[0]][0].length,u=e.slice(0,o+r.index+t+i);if(Math.min(o,i)%2){let e=u.slice(1,-1);return{type:"em",raw:u,text:e,tokens:this.lexer.inlineTokens(e)}}let l=u.slice(2,-2);return{type:"strong",raw:u,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=t[1],n="mailto:"+e):(e=t[1],n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=t[0],n="mailto:"+e;else{let r;do{r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(r!==t[0]);e=t[0],n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}},ae=class e{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||i,this.options.tokenizer=this.options.tokenizer||new se,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:u,block:J.normal,inline:Q.normal};this.options.pedantic?(t.block=J.pedantic,t.inline=Q.pedantic):this.options.gfm&&(t.block=J.gfm,this.options.breaks?t.inline=Q.breaks:t.inline=Q.gfm),this.tokenizer.rules=t}static get rules(){return{block:J,inline:Q}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(u.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);1===r.raw.length&&void 0!==n?n.raw+="\n":t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+r.raw,n.text+="\n"+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+r.raw,n.text+="\n"+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let t,n=1/0,r=e.slice(1);this.options.extensions.startBlock.forEach(e=>{t=e.call({lexer:this},r),"number"==typeof t&&t>=0&&(n=Math.min(n,t))}),n<1/0&&n>=0&&(i=e.substring(0,n+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let o=t.at(-1);n&&"paragraph"===o?.type?(o.raw+=(o.raw.endsWith("\n")?"":"\n")+r.raw,o.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(n));)e.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.anyPunctuation.exec(n));)n=n.slice(0,r.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(n));)n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,o="";for(;e;){let r;if(i||(o=""),i=!1,this.options.extensions?.inline?.some(n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);"text"===r.type&&"text"===n?.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let s=e;if(this.options.extensions?.startInline){let t,n=1/0,r=e.slice(1);this.options.extensions.startInline.forEach(e=>{t=e.call({lexer:this},r),"number"==typeof t&&t>=0&&(n=Math.min(n,t))}),n<1/0&&n>=0&&(s=e.substring(0,n+1))}if(r=this.tokenizer.inlineText(s)){e=e.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(o=r.raw.slice(-1)),i=!0;let n=t.at(-1);"text"===n?.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return t}},ue=class{options;parser;constructor(e){this.options=e||i}space(e){return""}code({text:e,lang:t,escaped:n}){let r=(t||"").match(u.notSpaceStart)?.[0],i=e.replace(u.endingNewline,"")+"\n";return r?'
    '+(n?i:te(i,!0))+"
    \n":"
    "+(n?i:te(i,!0))+"
    \n"}blockquote({tokens:e}){return`
    \n${this.parser.parse(e)}
    \n`}html({text:e}){return e}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)}\n`}hr(e){return"
    \n"}list(e){let t=e.ordered,n=e.start,r="";for(let t=0;t\n"+r+"\n"}listitem(e){let t="";if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?"paragraph"===e.tokens[0]?.type?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+te(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • \n`}checkbox({checked:e}){return"'}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    \n`}table(e){let t="",n="";for(let t=0;t${r}`),"\n\n"+t+"\n"+r+"
    \n"}tablerow({text:e}){return`\n${e}\n`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`\n`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${te(e,!0)}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=ne(e);if(null===i)return r;let o='
    ",o}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=ne(e);if(null===i)return te(n);let o=`${n}{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){let n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new ue(this.defaults);for(let n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let r=n,i=e.renderer[r],o=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return!1===n&&(n=o.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new se(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let r=n,i=e.tokenizer[r],o=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return!1===n&&(n=o.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new fe;for(let n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let r=n,i=e.hooks[r],o=t[r];fe.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async)return Promise.resolve(i.call(t,e)).then(e=>o.call(t,e));let n=i.call(t,e);return o.call(t,n)}:t[r]=(...e)=>{let n=i.apply(t,e);return!1===n&&(n=o.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ae.lex(e,t??this.defaults)}parser(e,t){return ce.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},o=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===r.async)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||null===t)return o(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=e);let s=i.hooks?i.hooks.provideLexer():e?ae.lex:ae.lexInline,a=i.hooks?i.hooks.provideParser():e?ce.parse:ce.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(t):t).then(e=>s(e,i)).then(e=>i.hooks?i.hooks.processAllTokens(e):e).then(e=>i.walkTokens?Promise.all(this.walkTokens(e,i.walkTokens)).then(()=>e):e).then(e=>a(e,i)).then(e=>i.hooks?i.hooks.postprocess(e):e).catch(o);try{i.hooks&&(t=i.hooks.preprocess(t));let e=s(t,i);i.hooks&&(e=i.hooks.processAllTokens(e)),i.walkTokens&&this.walkTokens(e,i.walkTokens);let n=a(e,i);return i.hooks&&(n=i.hooks.postprocess(n)),n}catch(e){return o(e)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){let e="

    An error occurred:

    "+te(n.message+"",!0)+"
    ";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},de=new he;function pe(e,t){return de.parse(e,t)}pe.options=pe.setOptions=function(e){return de.setOptions(e),pe.defaults=de.defaults,o(pe.defaults),pe},pe.getDefaults=r,pe.defaults=i,pe.use=function(...e){return de.use(...e),pe.defaults=de.defaults,o(pe.defaults),pe},pe.walkTokens=function(e,t){return de.walkTokens(e,t)},pe.parseInline=de.parseInline,pe.Parser=ce,pe.parser=ce.parse,pe.Renderer=ue,pe.TextRenderer=le,pe.Lexer=ae,pe.lexer=ae.lex,pe.Tokenizer=se,pe.Hooks=fe,pe.parse=pe;var me=pe.options,ge=pe.setOptions,ye=pe.use,ve=pe.walkTokens,be=pe.parseInline,we=pe,_e=ce.parse,ke=ae.lex},182:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=t.validate=t.v7=t.v6ToV1=t.v6=t.v5=t.v4=t.v3=t.v1ToV6=t.v1=t.stringify=t.parse=t.NIL=t.MAX=void 0;var r=n(2196);Object.defineProperty(t,"MAX",{enumerable:!0,get:function(){return r.default}});var i=n(3465);Object.defineProperty(t,"NIL",{enumerable:!0,get:function(){return i.default}});var o=n(1797);Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return o.default}});var s=n(6011);Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.default}});var a=n(1425);Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return a.default}});var u=n(6568);Object.defineProperty(t,"v1ToV6",{enumerable:!0,get:function(){return u.default}});var l=n(591);Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return l.default}});var c=n(8286);Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return c.default}});var f=n(4557);Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return f.default}});var h=n(6356);Object.defineProperty(t,"v6",{enumerable:!0,get:function(){return h.default}});var d=n(268);Object.defineProperty(t,"v6ToV1",{enumerable:!0,get:function(){return d.default}});var p=n(4299);Object.defineProperty(t,"v7",{enumerable:!0,get:function(){return p.default}});var m=n(9746);Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return m.default}});var g=n(2770);Object.defineProperty(t,"version",{enumerable:!0,get:function(){return g.default}})},268:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1797),i=n(6011);t.default=function(e){const t=(n="string"==typeof e?(0,r.default)(e):e,Uint8Array.of((15&n[3])<<4|n[4]>>4&15,(15&n[4])<<4|(240&n[5])>>4,(15&n[5])<<4|15&n[6],n[7],(15&n[1])<<4|(240&n[2])>>4,(15&n[2])<<4|(240&n[3])>>4,16|(240&n[0])>>4,(15&n[0])<<4|(240&n[1])>>4,n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15]));var n;return"string"==typeof e?(0,i.unsafeStringify)(t):t}},297:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContentNode=void 0;class n{constructor(e,t){this.id=e,this.content=t||"",this.created=Date.now(),this.type="text",this.archived=!1,this.deleted=!1}static Create(e){const t=new n(e.id,e.content);return t.type="text",t.created=e.created,t.lastUpdated=e.lastUpdated,t.archived=e.archived,t.archiveDate=e.archiveDate,t.deleted=e.deleted,t.deletedDate=e.deletedDate,t}setContent(e){this.content=e,this.lastUpdated=Date.now()}isArchived(){return!0===this.archived}isDeleted(){return!0===this.deleted}toggleArchiveStatus(){this.isArchived()?this.unarchive():this.archive()}unarchive(){this.archived=!1,this.archiveDate=null}archive(){this.archived=!0,this.archiveDate=Date.now()}undelete(){this.deleted=!1,this.deletedDate=null}delete(){this.deleted=!0,this.deletedDate=Date.now()}toJson(){return{id:this.id,created:this.created,lastUpdated:this.lastUpdated,type:this.type,content:this.content,archived:this.archived,archiveDate:this.archiveDate,deleted:this.deleted,deletedDate:this.deletedDate}}}t.ContentNode=n},338:(e,t)=>{"use strict";function n(e){return 14+(e+64>>>9<<4)+1}function r(e,t){const n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function i(e,t,n,i,o,s){return r((a=r(r(t,e),r(i,s)))<<(u=o)|a>>>32-u,n);var a,u}function o(e,t,n,r,o,s,a){return i(t&n|~t&r,e,t,o,s,a)}function s(e,t,n,r,o,s,a){return i(t&r|n&~r,e,t,o,s,a)}function a(e,t,n,r,o,s,a){return i(t^n^r,e,t,o,s,a)}function u(e,t,n,r,o,s,a){return i(n^(t|~r),e,t,o,s,a)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(e){const t=new Uint8Array(4*e.length);for(let n=0;n<4*e.length;n++)t[n]=e[n>>2]>>>n%4*8&255;return t}(function(e,t){const i=new Uint32Array(n(t)).fill(0);i.set(e),i[t>>5]|=128<>2]|=(255&e[n])<f.ContentNode.Create(e)),e=>e.id)}isTreeRoot(e){return this.data.id===e}findNodeInTree(e,t,n,r=!1){let i=r;i||u.each(e.children,(r,o)=>{if(r.id===t)return n(r,e),i=!0,!1;r.children&&this.findNodeInTree(r,t,n,i)})}fold(e){this.findNodeInTree(this.data.tree,e,e=>{e.collapsed=!0})}unfold(e){this.findNodeInTree(this.data.tree,e,e=>{e.collapsed=!1})}flattenOutlineTreeChildren(e){return e.children.map(e=>e.id)}liftNodeToParent(e){let t,n,r=!1;return this.findNodeInTree(this.data.tree,e,(e,i)=>{t=e,this.findNodeInTree(this.data.tree,i.id,(e,i)=>{if(r)return;n=i,r=!0;const o=i.children.map(e=>e.id),s=e.children.map(e=>e.id).indexOf(t.id),a=o.indexOf(e.id);e.children.splice(s,1),i.children.splice(a+1,0,t)})}),{targetNode:t,parentNode:n}}lowerNodeToChild(e){let t,n,r,i=!1;return this.findNodeInTree(this.data.tree,e,(e,o)=>{if(i)return;i=!0,t=e;let s=o.children.map(e=>e.id);if(1===s.length)return;const a=s.indexOf(t.id),u=a-1;o.children[u].children.splice(0,0,t),o.children.splice(a,1),n=o.children[u],r=o}),{targetNode:t,newParentNode:n,oldParentNode:r}}swapNodeWithNextSibling(e){let t,n;return this.findNodeInTree(this.data.tree,e,(e,r)=>{t=e,n=r;const i=n.children.map(e=>e.id),o=i.indexOf(t.id);o!==i.length-1&&(n.children.splice(o,1),n.children.splice(o+1,0,t))}),{targetNode:t,parentNode:n}}swapNodeWithPreviousSibling(e){let t,n;return this.findNodeInTree(this.data.tree,e,(e,r)=>{t=e,n=r;const i=n.children.map(e=>e.id).indexOf(t.id);0!==i&&(n.children.splice(i,1),n.children.splice(i-1,0,t))}),{targetNode:t,parentNode:n}}createSiblingNode(e,t){const n=t||new f.ContentNode((0,l.v4)());let r;return this.data.contentNodes[n.id]=n,this.findNodeInTree(this.data.tree,e,(t,i)=>{const o=i.children.map(e=>e.id).indexOf(e);i.children.splice(o+1,0,{id:n.id,collapsed:!1,children:[]}),r=i}),{node:n,parentNode:r}}createChildNode(e,t){const n=t?this.data.contentNodes[t]:new f.ContentNode((0,l.v4)());let r;return t||(this.data.contentNodes[n.id]=n),this.findNodeInTree(this.data.tree,e,(e,t)=>{e.children.unshift({id:n.id,children:[],collapsed:!1}),r=e}),{node:n,parentNode:r}}removeNode(e){let t,n,r=!1;return this.findNodeInTree(this.data.tree,e,(e,i)=>{if(r)return;r=!0,t=e,n=i;let o=n.children.map(e=>e.id).indexOf(e.id);n.children.splice(o,1)}),{removedNode:t,parentNode:n}}updateContent(e,t){if(!this.data.contentNodes[e])throw new Error("Invalid node");this.data.contentNodes[e].content=t}getContentNode(e){if(!this.data.contentNodes[e])throw new Error(`Invalid Node ${e}`);return this.data.contentNodes[e]}renderContent(e){return a(this,void 0,void 0,function*(){let t,n=this.getContentNode(e);if("text"===n.type){t=yield c.marked.parse(n.content);const e=d.DateTime.now(),r=(0,p.FindDate)(n.content);r.length&&r.forEach(t=>{e.startOf("day").toMillis()>t.toMillis()||(this.dates[t.toISODate()]||(this.dates[t.toISODate()]={}),this.dates[t.toISODate()][n.id]||(this.dates[t.toISODate()][n.id]={date:t,nodeId:n.id}))})}else t=n.content;return t})}renderDates(){let e=u.sortBy(Object.keys(this.dates).map(e=>d.DateTime.fromISO(e)),e=>e.toSeconds()).map(e=>`
  • ${e.toLocaleString({weekday:"long",day:"2-digit",month:"short"})}\n
    \n
      \n ${u.map(this.dates[e.toISODate()],e=>`
    1. \n ${c.marked.parse(this.getContentNode(e.nodeId).content.substr(0,100))}\n
    2. `).join("\n")}\n
    \n
  • `).join("\n");(0,m.$)("#dates").innerHTML=`
      ${e}
    `}renderNode(e){return a(this,void 0,void 0,function*(){if(e.id===this.data.id)return yield this.render();const t=this.data.contentNodes[e.id],n=e.collapsed?"collapsed":"expanded",r=t.isArchived()?"strikethrough":"",i=e.children.length?yield Promise.all(e.children.map(e=>a(this,void 0,void 0,function*(){return this.renderNode(e)}))):[];let o=`
    \n
    \n ${yield this.renderContent(e.id)}\n
    \n ${i.join("\n")}\n
    `;return this.renderDates(),o})}render(){return a(this,void 0,void 0,function*(){return(yield Promise.all(this.data.tree.children.map(e=>a(this,void 0,void 0,function*(){return this.renderNode(e)})))).join("\n")})}}},515:function(e,t,n){"use strict";var r,i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),s=0;st.filename.replace(".css","")===e);if(!t)return console.warn(`Theme "${e}" not found, falling back to default`),yield this.loadThemeCSS("default.css"),void(this.currentTheme="default");yield this.loadThemeCSS(t.filename),this.currentTheme=e,this.persistThemePreference(e)}catch(t){console.error(`Failed to load theme "${e}":`,t),"default"!==e&&(yield this.loadTheme("default"))}})}switchTheme(e){return a(this,void 0,void 0,function*(){this.removeCurrentTheme(),yield this.loadTheme(e)})}getCurrentTheme(){return this.currentTheme}getAvailableThemes(){return[...this.availableThemes]}refreshThemeList(){return a(this,void 0,void 0,function*(){return yield this.discoverAvailableThemes(),this.getAvailableThemes()})}loadThemeCSS(e){return a(this,void 0,void 0,function*(){return new Promise((t,n)=>{this.removeCurrentTheme();const r=document.createElement("link");r.rel="stylesheet",r.type="text/css",r.href=`${this.THEMES_PATH}${e}`,r.id="theme-stylesheet",r.onload=()=>{this.currentThemeLink=r,console.log(`Theme CSS loaded successfully: ${e}`),t()},r.onerror=t=>{console.error(`Failed to load theme CSS: ${e}`,t),document.head.removeChild(r),n(new Error(`Failed to load theme CSS: ${e}`))},document.head.appendChild(r)})})}removeCurrentTheme(){this.currentThemeLink&&(this.currentThemeLink.remove(),this.currentThemeLink=null)}parseThemeMetadata(e){const t=e.match(/\/\*\s*([\s\S]*?)\s*\*\//),n={filename:""};if(t&&t[1]){const e=t[1].split("\n");for(const t of e){const[e,...r]=t.split(":");if(e&&r.length>0){const t=e.trim().toLowerCase(),i=r.join(":").trim();switch(t){case"name":n.name=i;break;case"author":n.author=i;break;case"version":n.version=i;break;case"description":n.description=i}}}}if(!n.name){const e=n.filename||"unknown";n.name=e.replace(".css","").replace(/-/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}return n}discoverAvailableThemes(){return a(this,void 0,void 0,function*(){try{let e=[];try{const t=yield(0,l.resolveResource)(this.THEMES_DIR);e=(yield u.readDir(t)).filter(e=>{var t;return!e.isDirectory&&(null===(t=e.name)||void 0===t?void 0:t.endsWith(".css"))}).map(e=>e.name),console.log("Discovered theme files via Tauri:",e)}catch(t){console.log("Tauri file system not available, using fallback method"),e=yield this.discoverThemesViaFetch()}const t=[];for(const n of e)try{let e;try{const t=yield(0,l.resolveResource)(`${this.THEMES_DIR}/${n}`);e=yield u.readTextFile(t)}catch(t){const r=yield fetch(`${this.THEMES_PATH}${n}`);if(!r.ok)throw new Error(`Failed to fetch theme: ${n}`);e=yield r.text()}const r=this.parseThemeMetadata(e);r.filename=n,t.push(r)}catch(e){console.warn(`Failed to parse theme ${n}:`,e),t.push({name:n.replace(".css","").replace(/-/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),filename:n})}return 0===t.length&&t.push({name:"Default Theme",filename:"default.css",description:"The original color scheme"}),this.availableThemes=t,t}catch(e){return console.error("Failed to discover themes:",e),this.availableThemes=[{name:"Default Theme",filename:"default.css",description:"The original color scheme"}],this.availableThemes}})}discoverThemesViaFetch(){return a(this,void 0,void 0,function*(){const e=["default.css","dark.css"],t=[];for(const n of e)try{(yield fetch(`${this.THEMES_PATH}${n}`,{method:"HEAD"})).ok&&t.push(n)}catch(e){}return t.length>0?t:["default.css"]})}persistThemePreference(e){try{localStorage.setItem(this.STORAGE_KEY,e)}catch(e){console.warn("Failed to save theme preference:",e)}}loadThemePreference(){try{return localStorage.getItem(this.STORAGE_KEY)}catch(e){return console.warn("Failed to load theme preference:",e),null}}}t.ThemeManager=c,c.instance=null},587:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.sidebarToggle=void 0;const i=n(876);t.sidebarToggle={context:"navigation",keys:["ctrl + ;"],description:"Toggle visibility of sidebar",action:e=>r(void 0,void 0,void 0,function*(){(0,i.$)("#sidebar").classList.toggle("hidden")})}},591:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0;const r=n(338),i=n(2988);var o=n(2988);function s(e,t,n,o){return(0,i.default)(48,r.default,e,t,n,o)}Object.defineProperty(t,"DNS",{enumerable:!0,get:function(){return o.DNS}}),Object.defineProperty(t,"URL",{enumerable:!0,get:function(){return o.URL}}),s.DNS=i.DNS,s.URL=i.URL,t.default=s},717:(e,t,n)=>{"use strict";var r,i,o,s,a,u=n(1889);const l="__TAURI_TO_IPC_KEY__";function c(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}class f{constructor(e){r.set(this,void 0),i.set(this,0),o.set(this,[]),s.set(this,void 0),u.__classPrivateFieldSet(this,r,e||(()=>{}),"f"),this.id=c(e=>{const t=e.index;if("end"in e)return void(t==u.__classPrivateFieldGet(this,i,"f")?this.cleanupCallback():u.__classPrivateFieldSet(this,s,t,"f"));const n=e.message;if(t==u.__classPrivateFieldGet(this,i,"f")){for(u.__classPrivateFieldGet(this,r,"f").call(this,n),u.__classPrivateFieldSet(this,i,u.__classPrivateFieldGet(this,i,"f")+1,"f");u.__classPrivateFieldGet(this,i,"f")in u.__classPrivateFieldGet(this,o,"f");){const e=u.__classPrivateFieldGet(this,o,"f")[u.__classPrivateFieldGet(this,i,"f")];u.__classPrivateFieldGet(this,r,"f").call(this,e),delete u.__classPrivateFieldGet(this,o,"f")[u.__classPrivateFieldGet(this,i,"f")],u.__classPrivateFieldSet(this,i,u.__classPrivateFieldGet(this,i,"f")+1,"f")}u.__classPrivateFieldGet(this,i,"f")===u.__classPrivateFieldGet(this,s,"f")&&this.cleanupCallback()}else u.__classPrivateFieldGet(this,o,"f")[t]=n})}cleanupCallback(){window.__TAURI_INTERNALS__.unregisterCallback(this.id)}set onmessage(e){u.__classPrivateFieldSet(this,r,e,"f")}get onmessage(){return u.__classPrivateFieldGet(this,r,"f")}[(r=new WeakMap,i=new WeakMap,o=new WeakMap,s=new WeakMap,l)](){return`__CHANNEL__:${this.id}`}toJSON(){return this[l]()}}class h{constructor(e,t,n){this.plugin=e,this.event=t,this.channelId=n}async unregister(){return d(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}}async function d(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}a=new WeakMap,t.Channel=f,t.PluginListener=h,t.Resource=class{get rid(){return u.__classPrivateFieldGet(this,a,"f")}constructor(e){a.set(this,void 0),u.__classPrivateFieldSet(this,a,e,"f")}async close(){return d("plugin:resources|close",{rid:this.rid})}},t.SERIALIZE_TO_IPC_FN=l,t.addPluginListener=async function(e,t,n){const r=new f(n);return d(`plugin:${e}|registerListener`,{event:t,handler:r}).then(()=>new h(e,t,r.id))},t.checkPermissions=async function(e){return d(`plugin:${e}|check_permissions`)},t.convertFileSrc=function(e,t="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,t)},t.invoke=d,t.isTauri=function(){return!!(globalThis||window).isTauri},t.requestPermissions=async function(e){return d(`plugin:${e}|request_permissions`)},t.transformCallback=c},763:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Search=void 0;const o=n(1730),s=n(2543),a=i(n(935)),u=n(876);t.Search=class{constructor(){this.state="notready",this.bindEvents()}createIndex(e){return r(this,void 0,void 0,function*(){this.schema=e,this.state="notready",this.db=yield(0,o.create)({schema:e}),this.state="ready"})}bindEvents(){a.default.withContext("search",()=>{a.default.bind("escape",e=>{document.querySelector(".modal").remove(),a.default.setContext("navigation"),console.log("switch to navigation context")}),a.default.bind("down",e=>{e.preventDefault(),document.getElementById("search-query").blur();const t=document.querySelector(".search-result.selected");t.nextElementSibling&&(t.classList.remove("selected"),t.nextElementSibling.classList.add("selected"),(0,u.isVisible)(t.nextElementSibling)||t.nextElementSibling.scrollIntoView())}),a.default.bind("up",e=>{e.preventDefault();const t=document.querySelector(".search-result.selected");t.previousElementSibling&&(t.classList.remove("selected"),t.previousElementSibling.classList.add("selected"),(0,u.isVisible)(t.previousElementSibling)||t.previousElementSibling.scrollIntoView())}),a.default.bind("enter",e=>{const t=document.querySelector(".search-result.selected").getAttribute("data-id");document.querySelector(".modal").remove(),a.default.setContext("navigation"),this.onTermSelection&&this.onTermSelection(t)})}),a.default.withContext("navigation",()=>{a.default.bind("shift + f",e=>{e.preventDefault(),e.stopPropagation(),document.querySelector("body").innerHTML+='\n\n';const t=document.getElementById("search-query");t.focus(),t.addEventListener("keyup",this.debounceSearch.bind(this)),a.default.setContext("search")})})}debounceSearch(e){this.debounce&&clearInterval(this.debounce);const t=e.target.value.toString().trim();t.length&&(this.debounce=setTimeout(()=>{this.displaySearch(t,e)},100))}displaySearch(e,t){return r(this,void 0,void 0,function*(){if(!this.state)return;const t=yield this.search(e),n=document.getElementById("search-results");if(0===t.hits.length)return void(n.innerHTML="
  • No Results
  • ");const r=t.hits.map((e,t)=>{const n=e.document.content.toString(),r=n.substring(0,100);return`\n
  • ${r}${n.length>r.length?"...":""}
  • \n `});n.innerHTML=r.join("\n")})}indexDoc(e){return(0,o.insert)(this.db,e)}indexBatch(e){return(0,o.insertBatch)(this.db,(0,s.map)(e,e=>e.toJson()))}search(e){return(0,o.search)(this.db,{term:e.trim(),properties:["content"]})}replace(e){return r(this,void 0,void 0,function*(){yield(0,o.remove)(this.db,e.id),yield(0,o.insert)(this.db,e.toJson())})}reset(){return this.createIndex(this.schema)}}},876:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isVisible=function(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.top<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},t.$=function(e,t){return(t||document).querySelector(e)},t.$$=function(e,t){return Array.from((t||document).querySelectorAll(e))}},935:function(e,t,n){e.exports=function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1&&s.splice(l,1)}if(0!==s.length)return!1}return!0}},{key:"_checkSubCombo",value:function(e,t,r){e=e.slice(0),r=r.slice(t);for(var i=t,o=0;o-1&&(e.splice(o,1),o-=1,u>i&&(i=u),0===e.length))return i}return-1}}]),n}();a.comboDeliminator=">",a.keyDeliminator="+",a.parseComboStr=function(e){for(var t=a._splitStr(e,a.comboDeliminator),n=[],r=0;r0&&n[s]===r&&"\\"!==n[s-1]&&(o.push(i.trim()),i="",s+=1),i+=n[s];return i&&o.push(i.trim()),o};var u=function(){function e(n){t(this,e),this.localeName=n,this.activeTargetKeys=[],this.pressedKeys=[],this._appliedMacros=[],this._keyMap={},this._killKeyCodes=[],this._macros=[]}return i(e,[{key:"bindKeyCode",value:function(e,t){"string"==typeof t&&(t=[t]),this._keyMap[e]=t}},{key:"bindMacro",value:function(e,t){"string"==typeof t&&(t=[t]);var n=null;"function"==typeof t&&(n=t,t=null);var r={keyCombo:new a(e),keyNames:t,handler:n};this._macros.push(r)}},{key:"getKeyCodes",value:function(e){var t=[];for(var n in this._keyMap)this._keyMap[n].indexOf(e)>-1&&t.push(0|n);return t}},{key:"getKeyNames",value:function(e){return this._keyMap[e]||[]}},{key:"setKillKey",value:function(e){if("string"!=typeof e)this._killKeyCodes.push(e);else for(var t=this.getKeyCodes(e),n=0;n-1&&this.pressedKeys.splice(o,1)}this.activeTargetKeys.length=0,this._clearMacros()}}},{key:"_applyMacros",value:function(){for(var e=this._macros.slice(0),t=0;t-1&&this.pressedKeys.splice(r,1)}t.handler&&(t.keyNames=null),this._appliedMacros.splice(e,1),e-=1}}}}]),e}(),l=function(){function r(e,n,i,o){t(this,r),this._locale=null,this._currentContext="",this._contexts={},this._listeners=[],this._appliedListeners=[],this._locales={},this._targetElement=null,this._targetWindow=null,this._targetPlatform="",this._targetUserAgent="",this._isModernBrowser=!1,this._targetKeyDownBinding=null,this._targetKeyUpBinding=null,this._targetResetBinding=null,this._paused=!1,this._contexts.global={listeners:this._listeners,targetWindow:e,targetElement:n,targetPlatform:i,targetUserAgent:o},this.setContext("global")}return i(r,[{key:"setLocale",value:function(e,t){var n=null;return"string"==typeof e?t?t(n=new u(e),this._targetPlatform,this._targetUserAgent):n=this._locales[e]||null:e=(n=e)._localeName,this._locale=n,this._locales[e]=n,n&&(this._locale.pressedKeys=n.pressedKeys),this}},{key:"getLocale",value:function(e){return e||(e=this._locale.localeName),this._locales[e]||null}},{key:"bind",value:function(t,n,r,i){if(null!==t&&"function"!=typeof t||(i=r,r=n,n=t,t=null),t&&"object"===e(t)&&"number"==typeof t.length){for(var o=0;o"]),e.bindMacro("shift + /",["questionmark","?"]),t.match("Mac")?e.bindMacro("command",["mod","modifier"]):e.bindMacro("ctrl",["mod","modifier"]);for(var r=65;r<=90;r+=1){var i=String.fromCharCode(r+32),o=String.fromCharCode(r);e.bindKeyCode(r,i),e.bindMacro("shift + "+i,o),e.bindMacro("capslock + "+i,o)}var s,a,u=n.match("Firefox")?59:186,l=n.match("Firefox")?173:189,c=n.match("Firefox")?61:187;t.match("Mac")&&(n.match("Safari")||n.match("Chrome"))?(s=91,a=93):t.match("Mac")&&n.match("Opera")?(s=17,a=17):t.match("Mac")&&n.match("Firefox")&&(s=224,a=224),e.bindKeyCode(u,["semicolon",";"]),e.bindKeyCode(l,["dash","-"]),e.bindKeyCode(c,["equal","equalsign","="]),e.bindKeyCode(s,["command","windows","win","super","leftcommand","leftwindows","leftwin","leftsuper"]),e.bindKeyCode(a,["command","windows","win","super","rightcommand","rightwindows","rightwin","rightsuper"]),e.setKillKey("command")}),c.Keyboard=l,c.Locale=u,c.KeyCombo=a,c}()},1031:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.slugify=function(e){return e.toLowerCase().split(" ").join("_")}},1062:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.l=void 0,t.l={context:"navigation",keys:["l"],description:"Move the cursor to the first child element of the current node",action:e=>n(void 0,void 0,void 0,function*(){const{e:t,cursor:n}=e;if(!t.shiftKey){if(n.isNodeCollapsed())return;const e=n.get().querySelector(".node");e&&n.set(`#id-${e.getAttribute("data-id")}`)}})}},1169:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends Error{}class r extends n{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class i extends n{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class o extends n{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class s extends n{}class a extends n{constructor(e){super(`Invalid unit ${e}`)}}class u extends n{}class l extends n{constructor(){super("Zone is an abstract class")}}const c="numeric",f="short",h="long",d={year:c,month:c,day:c},p={year:c,month:f,day:c},m={year:c,month:f,day:c,weekday:f},g={year:c,month:h,day:c},y={year:c,month:h,day:c,weekday:h},v={hour:c,minute:c},b={hour:c,minute:c,second:c},w={hour:c,minute:c,second:c,timeZoneName:f},_={hour:c,minute:c,second:c,timeZoneName:h},k={hour:c,minute:c,hourCycle:"h23"},x={hour:c,minute:c,second:c,hourCycle:"h23"},S={hour:c,minute:c,second:c,hourCycle:"h23",timeZoneName:f},T={hour:c,minute:c,second:c,hourCycle:"h23",timeZoneName:h},O={year:c,month:c,day:c,hour:c,minute:c},C={year:c,month:c,day:c,hour:c,minute:c,second:c},M={year:c,month:f,day:c,hour:c,minute:c},D={year:c,month:f,day:c,hour:c,minute:c,second:c},N={year:c,month:f,day:c,weekday:f,hour:c,minute:c},E={year:c,month:h,day:c,hour:c,minute:c,timeZoneName:f},L={year:c,month:h,day:c,hour:c,minute:c,second:c,timeZoneName:f},I={year:c,month:h,day:c,weekday:h,hour:c,minute:c,timeZoneName:h},A={year:c,month:h,day:c,weekday:h,hour:c,minute:c,second:c,timeZoneName:h};class ${get type(){throw new l}get name(){throw new l}get ianaName(){return this.name}get isUniversal(){throw new l}offsetName(e,t){throw new l}formatOffset(e,t){throw new l}offset(e){throw new l}equals(e){throw new l}get isValid(){throw new l}}let R=null;class j extends ${static get instance(){return null===R&&(R=new j),R}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return rt(e,t,n)}formatOffset(e,t){return at(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}const P=new Map,U={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6},z=new Map;class F extends ${static create(e){let t=z.get(e);return void 0===t&&z.set(e,t=new F(e)),t}static resetCache(){z.clear(),P.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}}constructor(e){super(),this.zoneName=e,this.valid=F.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return rt(e,t,n,this.name)}formatOffset(e,t){return at(this.offset(e),t)}offset(e){if(!this.valid)return NaN;const t=new Date(e);if(isNaN(t))return NaN;const n=function(e){let t=P.get(e);return void 0===t&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),P.set(e,t)),t}(this.name);let[r,i,o,s,a,u,l]=n.formatToParts?function(e,t){const n=e.formatToParts(t),r=[];for(let e=0;e=0?f:1e3+f,(Xe({year:r,month:i,day:o,hour:24===a?0:a,minute:u,second:l,millisecond:0})-c)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let B={};const K=new Map;function V(e,t={}){const n=JSON.stringify([e,t]);let r=K.get(n);return void 0===r&&(r=new Intl.DateTimeFormat(e,t),K.set(n,r)),r}const W=new Map,q=new Map;let Z=null;const H=new Map;function G(e){let t=H.get(e);return void 0===t&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),H.set(e,t)),t}const Y=new Map;function J(e,t,n,r){const i=e.listingMode();return"error"===i?null:"en"===i?n(t):r(t)}class Q{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:r,floor:i,...o}=n;if(!t||Object.keys(o).length>0){const t={useGrouping:!1,...n};n.padTo>0&&(t.minimumIntegerDigits=n.padTo),this.inf=function(e,t={}){const n=JSON.stringify([e,t]);let r=W.get(n);return void 0===r&&(r=new Intl.NumberFormat(e,t),W.set(n,r)),r}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return We(this.floor?Math.floor(e):Ge(e,3),this.padTo)}}class X{constructor(e,t,n){let r;if(this.opts=n,this.originalZone=void 0,this.opts.timeZone)this.dt=e;else if("fixed"===e.zone.type){const t=e.offset/60*-1,n=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;0!==e.offset&&F.create(n).valid?(r=n,this.dt=e):(r="UTC",this.dt=0===e.offset?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else"system"===e.zone.type?this.dt=e:"iana"===e.zone.type?(this.dt=e,r=e.zone.name):(r="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const i={...this.opts};i.timeZone=i.timeZone||r,this.dtf=V(t,i)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(e=>{if("timeZoneName"===e.type){const t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}return e}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class ee{constructor(e,t,n){this.opts={style:"long",...n},!t&&Ue()&&(this.rtf=function(e,t={}){const{base:n,...r}=t,i=JSON.stringify([e,r]);let o=q.get(i);return void 0===o&&(o=new Intl.RelativeTimeFormat(e,t),q.set(i,o)),o}(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n="always",r=!1){const i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&o){const n="days"===e;switch(t){case 1:return n?"tomorrow":`next ${i[e][0]}`;case-1:return n?"yesterday":`last ${i[e][0]}`;case 0:return n?"today":`this ${i[e][0]}`}}const s=Object.is(t,-0)||t<0,a=Math.abs(t),u=1===a,l=i[e],c=r?u?l[1]:l[2]||l[1]:u?i[e][0]:e;return s?`${a} ${c} ago`:`in ${a} ${c}`}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const te={firstDay:1,minimalDays:4,weekend:[6,7]};class ne{static fromOpts(e){return ne.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,r,i=!1){const o=e||we.defaultLocale,s=o||(i?"en-US":Z||(Z=(new Intl.DateTimeFormat).resolvedOptions().locale,Z)),a=t||we.defaultNumberingSystem,u=n||we.defaultOutputCalendar,l=Ke(r)||we.defaultWeekSettings;return new ne(s,a,u,l,o)}static resetCache(){Z=null,K.clear(),W.clear(),q.clear(),H.clear(),Y.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:n,weekSettings:r}={}){return ne.create(e,t,n,r)}constructor(e,t,n,r,i){const[o,s,a]=function(e){const t=e.indexOf("-x-");-1!==t&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(-1===n)return[e];{let t,r;try{t=V(e).resolvedOptions(),r=e}catch(i){const o=e.substring(0,n);t=V(o).resolvedOptions(),r=o}const{numberingSystem:i,calendar:o}=t;return[r,i,o]}}(e);this.locale=o,this.numberingSystem=t||s||null,this.outputCalendar=n||a||null,this.weekSettings=r,this.intl=function(e,t,n){return n||t?(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`),e):e}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===G(e.locale).numberingSystem)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"}clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?ne.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Ke(e.weekSettings)||this.weekSettings,e.defaultToEN||!1):this}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return J(this,e,ht,()=>{const n="ja"===this.intl||this.intl.startsWith("ja-"),r=(t&=!n)?{month:e,day:"numeric"}:{month:e},i=t?"format":"standalone";if(!this.monthsCache[i][e]){const t=n?e=>this.dtFormatter(e,r).format():e=>this.extract(e,r,"month");this.monthsCache[i][e]=function(e){const t=[];for(let n=1;n<=12;n++){const r=mr.utc(2009,n,1);t.push(e(r))}return t}(t)}return this.monthsCache[i][e]})}weekdays(e,t=!1){return J(this,e,gt,()=>{const n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},r=t?"format":"standalone";return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=function(e){const t=[];for(let n=1;n<=7;n++){const r=mr.utc(2016,11,13+n);t.push(e(r))}return t}(e=>this.extract(e,n,"weekday"))),this.weekdaysCache[r][e]})}meridiems(){return J(this,void 0,()=>yt,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[mr.utc(2016,11,13,9),mr.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return J(this,e,_t,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[mr.utc(-40,1,1),mr.utc(2017,1,1)].map(e=>this.extract(e,t,"era"))),this.eraCache[e]})}extract(e,t,n){const r=this.dtFormatter(e,t).formatToParts().find(e=>e.type.toLowerCase()===n);return r?r.value:null}numberFormatter(e={}){return new Q(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new X(e,this.intl,t)}relFormatter(e={}){return new ee(this.intl,this.isEnglish(),e)}listFormatter(e={}){return function(e,t={}){const n=JSON.stringify([e,t]);let r=B[n];return r||(r=new Intl.ListFormat(e,t),B[n]=r),r}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||G(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:ze()?function(e){let t=Y.get(e);if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in t||(t={...te,...t}),Y.set(e,t)}return t}(this.locale):te}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let re=null;class ie extends ${static get utcInstance(){return null===re&&(re=new ie(0)),re}static instance(e){return 0===e?ie.utcInstance:new ie(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new ie(it(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${at(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${at(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return at(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}}class oe extends ${constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function se(e,t){if(Re(e)||null===e)return t;if(e instanceof $)return e;if("string"==typeof e){const n=e.toLowerCase();return"default"===n?t:"local"===n||"system"===n?j.instance:"utc"===n||"gmt"===n?ie.utcInstance:ie.parseSpecifier(n)||F.create(e)}return je(e)?ie.instance(e):"object"==typeof e&&"offset"in e&&"function"==typeof e.offset?e:new oe(e)}const ae={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},ue={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},le=ae.hanidec.replace(/[\[|\]]/g,"").split(""),ce=new Map;function fe({numberingSystem:e},t=""){const n=e||"latn";let r=ce.get(n);void 0===r&&(r=new Map,ce.set(n,r));let i=r.get(t);return void 0===i&&(i=new RegExp(`${ae[n]}${t}`),r.set(t,i)),i}let he,de=()=>Date.now(),pe="system",me=null,ge=null,ye=null,ve=60,be=null;class we{static get now(){return de}static set now(e){de=e}static set defaultZone(e){pe=e}static get defaultZone(){return se(pe,j.instance)}static get defaultLocale(){return me}static set defaultLocale(e){me=e}static get defaultNumberingSystem(){return ge}static set defaultNumberingSystem(e){ge=e}static get defaultOutputCalendar(){return ye}static set defaultOutputCalendar(e){ye=e}static get defaultWeekSettings(){return be}static set defaultWeekSettings(e){be=Ke(e)}static get twoDigitCutoffYear(){return ve}static set twoDigitCutoffYear(e){ve=e%100}static get throwOnInvalid(){return he}static set throwOnInvalid(e){he=e}static resetCaches(){ne.resetCache(),F.resetCache(),mr.resetCache(),ce.clear()}}class _e{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const ke=[0,31,59,90,120,151,181,212,243,273,304,334],xe=[0,31,60,91,121,152,182,213,244,274,305,335];function Se(e,t){return new _e("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function Te(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const i=r.getUTCDay();return 0===i?7:i}function Oe(e,t,n){return n+(Ye(e)?xe:ke)[t-1]}function Ce(e,t){const n=Ye(e)?xe:ke,r=n.findIndex(e=>ett(r,t,n)?(u=r+1,l=1):u=r,{weekYear:u,weekNumber:l,weekday:a,...ut(e)}}function Ne(e,t=4,n=1){const{weekYear:r,weekNumber:i,weekday:o}=e,s=Me(Te(r,1,t),n),a=Je(r);let u,l=7*i+o-s-7+t;l<1?(u=r-1,l+=Je(u)):l>a?(u=r+1,l-=Je(r)):u=r;const{month:c,day:f}=Ce(u,l);return{year:u,month:c,day:f,...ut(e)}}function Ee(e){const{year:t,month:n,day:r}=e;return{year:t,ordinal:Oe(t,n,r),...ut(e)}}function Le(e){const{year:t,ordinal:n}=e,{month:r,day:i}=Ce(t,n);return{year:t,month:r,day:i,...ut(e)}}function Ie(e,t){if(!Re(e.localWeekday)||!Re(e.localWeekNumber)||!Re(e.localWeekYear)){if(!Re(e.weekday)||!Re(e.weekNumber)||!Re(e.weekYear))throw new s("Cannot mix locale-based week fields with ISO-based week fields");return Re(e.localWeekday)||(e.weekday=e.localWeekday),Re(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Re(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function Ae(e){const t=Pe(e.year),n=Ve(e.month,1,12),r=Ve(e.day,1,Qe(e.year,e.month));return t?n?!r&&Se("day",e.day):Se("month",e.month):Se("year",e.year)}function $e(e){const{hour:t,minute:n,second:r,millisecond:i}=e,o=Ve(t,0,23)||24===t&&0===n&&0===r&&0===i,s=Ve(n,0,59),a=Ve(r,0,59),u=Ve(i,0,999);return o?s?a?!u&&Se("millisecond",i):Se("second",r):Se("minute",n):Se("hour",t)}function Re(e){return void 0===e}function je(e){return"number"==typeof e}function Pe(e){return"number"==typeof e&&e%1==0}function Ue(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function ze(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function Fe(e,t,n){if(0!==e.length)return e.reduce((e,r)=>{const i=[t(r),r];return e&&n(e[0],i[0])===e[0]?e:i},null)[1]}function Be(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ke(e){if(null==e)return null;if("object"!=typeof e)throw new u("Week settings must be an object");if(!Ve(e.firstDay,1,7)||!Ve(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(e=>!Ve(e,1,7)))throw new u("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function Ve(e,t,n){return Pe(e)&&e>=t&&e<=n}function We(e,t=2){let n;return n=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),n}function qe(e){return Re(e)||null===e||""===e?void 0:parseInt(e,10)}function Ze(e){return Re(e)||null===e||""===e?void 0:parseFloat(e)}function He(e){if(!Re(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function Ge(e,t,n="round"){const r=10**t;switch(n){case"expand":return e>0?Math.ceil(e*r)/r:Math.floor(e*r)/r;case"trunc":return Math.trunc(e*r)/r;case"round":return Math.round(e*r)/r;case"floor":return Math.floor(e*r)/r;case"ceil":return Math.ceil(e*r)/r;default:throw new RangeError(`Value rounding ${n} is out of range`)}}function Ye(e){return e%4==0&&(e%100!=0||e%400==0)}function Je(e){return Ye(e)?366:365}function Qe(e,t){const n=(r=t-1)-12*Math.floor(r/12)+1;var r;return 2===n?Ye(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Xe(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function et(e,t,n){return-Me(Te(e,1,t),n)+t-1}function tt(e,t=4,n=1){const r=et(e,t,n),i=et(e+1,t,n);return(Je(e)-r+i)/7}function nt(e){return e>99?e:e>we.twoDigitCutoffYear?1900+e:2e3+e}function rt(e,t,n,r=null){const i=new Date(e),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(o.timeZone=r);const s={timeZoneName:t,...o},a=new Intl.DateTimeFormat(n,s).formatToParts(i).find(e=>"timezonename"===e.type.toLowerCase());return a?a.value:null}function it(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-r:r)}function ot(e){const t=Number(e);if("boolean"==typeof e||""===e||!Number.isFinite(t))throw new u(`Invalid unit value ${e}`);return t}function st(e,t){const n={};for(const r in e)if(Be(e,r)){const i=e[r];if(null==i)continue;n[t(r)]=ot(i)}return n}function at(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),i=e>=0?"+":"-";switch(t){case"short":return`${i}${We(n,2)}:${We(r,2)}`;case"narrow":return`${i}${n}${r>0?`:${r}`:""}`;case"techie":return`${i}${We(n,2)}${We(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function ut(e){return function(e){return["hour","minute","second","millisecond"].reduce((t,n)=>(t[n]=e[n],t),{})}(e)}const lt=["January","February","March","April","May","June","July","August","September","October","November","December"],ct=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ft=["J","F","M","A","M","J","J","A","S","O","N","D"];function ht(e){switch(e){case"narrow":return[...ft];case"short":return[...ct];case"long":return[...lt];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const dt=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],pt=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],mt=["M","T","W","T","F","S","S"];function gt(e){switch(e){case"narrow":return[...mt];case"short":return[...pt];case"long":return[...dt];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const yt=["AM","PM"],vt=["Before Christ","Anno Domini"],bt=["BC","AD"],wt=["B","A"];function _t(e){switch(e){case"narrow":return[...wt];case"short":return[...bt];case"long":return[...vt];default:return null}}function kt(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const xt={D:d,DD:p,DDD:g,DDDD:y,t:v,tt:b,ttt:w,tttt:_,T:k,TT:x,TTT:S,TTTT:T,f:O,ff:M,fff:E,ffff:I,F:C,FF:D,FFF:L,FFFF:A};class St{static create(e,t={}){return new St(e,t)}static parseFormat(e){let t=null,n="",r=!1;const i=[];for(let o=0;o0||r)&&i.push({literal:r||/^\s+$/.test(n),val:""===n?"'":n}),t=null,n="",r=!r):r||s===t?n+=s:(n.length>0&&i.push({literal:/^\s+$/.test(n),val:n}),n=s,t=s)}return n.length>0&&i.push({literal:r||/^\s+$/.test(n),val:n}),i}static macroTokenToFormatOpts(e){return xt[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0,n=void 0){if(this.opts.forceSimple)return We(e,t);const r={...this.opts};return t>0&&(r.padTo=t),n&&(r.signDisplay=n),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,t){const n="en"===this.loc.listingMode(),r=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,i=(t,n)=>this.loc.extract(e,t,n),o=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",s=(t,r)=>n?function(e,t){return ht(t)[e.month-1]}(e,t):i(r?{month:t}:{month:t,day:"numeric"},"month"),a=(t,r)=>n?function(e,t){return gt(t)[e.weekday-1]}(e,t):i(r?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),u=t=>{const n=St.macroTokenToFormatOpts(t);return n?this.formatWithSystemDefault(e,n):t},l=t=>n?function(e,t){return _t(t)[e.year<0?0:1]}(e,t):i({era:t},"era");return kt(St.parseFormat(t),t=>{switch(t){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12==0?12:e.hour%12);case"hh":return this.num(e.hour%12==0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return n?function(e){return yt[e.hour<12?0:1]}(e):i({hour:"numeric",hourCycle:"h12"},"dayperiod");case"d":return r?i({day:"numeric"},"day"):this.num(e.day);case"dd":return r?i({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return a("short",!0);case"cccc":return a("long",!0);case"ccccc":return a("narrow",!0);case"EEE":return a("short",!1);case"EEEE":return a("long",!1);case"EEEEE":return a("narrow",!1);case"L":return r?i({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return r?i({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return s("short",!0);case"LLLL":return s("long",!0);case"LLLLL":return s("narrow",!0);case"M":return r?i({month:"numeric"},"month"):this.num(e.month);case"MM":return r?i({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return s("short",!1);case"MMMM":return s("long",!1);case"MMMMM":return s("narrow",!1);case"y":return r?i({year:"numeric"},"year"):this.num(e.year);case"yy":return r?i({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return r?i({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return r?i({year:"numeric"},"year"):this.num(e.year,6);case"G":return l("short");case"GG":return l("long");case"GGGGG":return l("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return u(t)}})}formatDurationFromString(e,t){const n="negativeLargestOnly"===this.opts.signMode?-1:1,r=e=>{switch(e[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},i=St.parseFormat(t),o=i.reduce((e,{literal:t,val:n})=>t?e:e.concat(n),[]),s=e.shiftTo(...o.map(r).filter(e=>e));return kt(i,((e,t)=>i=>{const o=r(i);if(o){const r=t.isNegativeDuration&&o!==t.largestUnit?n:1;let s;return s="negativeLargestOnly"===this.opts.signMode&&o!==t.largestUnit?"never":"all"===this.opts.signMode?"always":"auto",this.num(e.get(o)*r,i.length,s)}return i})(s,{isNegativeDuration:s<0,largestUnit:Object.keys(s.values)[0]}))}}const Tt=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Ot(...e){const t=e.reduce((e,t)=>e+t.source,"");return RegExp(`^${t}$`)}function Ct(...e){return t=>e.reduce(([e,n,r],i)=>{const[o,s,a]=i(t,r);return[{...e,...o},s||n,a]},[{},null,1]).slice(0,2)}function Mt(e,...t){if(null==e)return[null,null];for(const[n,r]of t){const t=n.exec(e);if(t)return r(t)}return[null,null]}function Dt(...e){return(t,n)=>{const r={};let i;for(i=0;ivoid 0!==e&&(t||e&&c)?-e:e;return[{years:h(Ze(n)),months:h(Ze(r)),weeks:h(Ze(i)),days:h(Ze(o)),hours:h(Ze(s)),minutes:h(Ze(a)),seconds:h(Ze(u),"-0"===u),milliseconds:h(He(l),f)}]}const Wt={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function qt(e,t,n,r,i,o,s){const a={year:2===t.length?nt(qe(t)):qe(t),month:ct.indexOf(n)+1,day:qe(r),hour:qe(i),minute:qe(o)};return s&&(a.second=qe(s)),e&&(a.weekday=e.length>3?dt.indexOf(e)+1:pt.indexOf(e)+1),a}const Zt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Ht(e){const[,t,n,r,i,o,s,a,u,l,c,f]=e,h=qt(t,i,r,n,o,s,a);let d;return d=u?Wt[u]:l?0:it(c,f),[h,new ie(d)]}const Gt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Yt=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Jt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Qt(e){const[,t,n,r,i,o,s,a]=e;return[qt(t,i,r,n,o,s,a),ie.utcInstance]}function Xt(e){const[,t,n,r,i,o,s,a]=e;return[qt(t,a,n,r,i,o,s),ie.utcInstance]}const en=Ot(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,It),tn=Ot(/(\d{4})-?W(\d\d)(?:-?(\d))?/,It),nn=Ot(/(\d{4})-?(\d{3})/,It),rn=Ot(Lt),on=Ct(function(e,t){return[{year:Pt(e,t),month:Pt(e,t+1,1),day:Pt(e,t+2,1)},null,t+3]},Ut,zt,Ft),sn=Ct(At,Ut,zt,Ft),an=Ct($t,Ut,zt,Ft),un=Ct(Ut,zt,Ft),ln=Ct(Ut),cn=Ot(/(\d{4})-(\d\d)-(\d\d)/,jt),fn=Ot(Rt),hn=Ct(Ut,zt,Ft),dn="Invalid Duration",pn={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},mn={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...pn},gn={years:{quarters:4,months:12,weeks:52.1775,days:365.2425,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:30.436875,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...pn},yn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],vn=yn.slice(0).reverse();function bn(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new xn(r)}function wn(e,t){var n;let r=null!=(n=t.milliseconds)?n:0;for(const n of vn.slice(1))t[n]&&(r+=t[n]*e[n].milliseconds);return r}function _n(e,t){const n=wn(e,t)<0?-1:1;yn.reduceRight((r,i)=>{if(Re(t[i]))return r;if(r){const o=t[r]*n,s=e[i][r],a=Math.floor(o/s);t[i]+=a*n,t[r]-=a*s*n}return i},null),yn.reduce((n,r)=>{if(Re(t[r]))return n;if(n){const i=t[n]%1;t[n]-=i,t[r]+=i*e[n][r]}return r},null)}function kn(e){const t={};for(const[n,r]of Object.entries(e))0!==r&&(t[n]=r);return t}class xn{constructor(e){const t="longterm"===e.conversionAccuracy||!1;let n=t?gn:mn;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||ne.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return xn.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(null==e||"object"!=typeof e)throw new u("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new xn({values:st(e,xn.normalizeUnit),loc:ne.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(je(e))return xn.fromMillis(e);if(xn.isDuration(e))return e;if("object"==typeof e)return xn.fromObject(e);throw new u(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[n]=function(e){return Mt(e,[Kt,Vt])}(e);return n?xn.fromObject(n,t):xn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[n]=function(e){return Mt(e,[Bt,ln])}(e);return n?xn.fromObject(n,t):xn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new u("need to specify a reason the Duration is invalid");const n=e instanceof _e?e:new _e(e,t);if(we.throwOnInvalid)throw new o(n);return new xn({invalid:n})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new a(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const n={...t,floor:!1!==t.round&&!1!==t.floor};return this.isValid?St.create(this.loc,n).formatDurationFromString(this,e):dn}toHuman(e={}){if(!this.isValid)return dn;const t=!1!==e.showZeros,n=yn.map(n=>{const r=this.values[n];return Re(r)||0===r&&!t?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:n.slice(0,-1)}).format(r)}).filter(e=>e);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=Ge(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},mr.fromMillis(t,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?wn(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=xn.fromDurationLike(e),n={};for(const e of yn)(Be(t.values,e)||Be(this.values,e))&&(n[e]=t.get(e)+this.get(e));return bn(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const t=xn.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=ot(e(this.values[n],n));return bn(this,{values:t},!0)}get(e){return this[xn.normalizeUnit(e)]}set(e){return this.isValid?bn(this,{values:{...this.values,...st(e,xn.normalizeUnit)}}):this}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:r}={}){return bn(this,{loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:r,conversionAccuracy:n})}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return _n(this.matrix,e),bn(this,{values:e},!0)}rescale(){return this.isValid?bn(this,{values:kn(this.normalize().shiftToAll().toObject())},!0):this}shiftTo(...e){if(!this.isValid)return this;if(0===e.length)return this;e=e.map(e=>xn.normalizeUnit(e));const t={},n={},r=this.toObject();let i;for(const o of yn)if(e.indexOf(o)>=0){i=o;let e=0;for(const t in n)e+=this.matrix[t][o]*n[t],n[t]=0;je(r[o])&&(e+=r[o]);const s=Math.trunc(e);t[o]=s,n[o]=(1e3*e-1e3*s)/1e3}else je(r[o])&&(n[o]=r[o]);for(const e in n)0!==n[e]&&(t[i]+=e===i?n[e]:n[e]/this.matrix[i][e]);return _n(this.matrix,t),bn(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=0===this.values[t]?0:-this.values[t];return bn(this,{values:e},!0)}removeZeros(){return this.isValid?bn(this,{values:kn(this.values)},!0):this}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;function t(e,t){return void 0===e||0===e?void 0===t||0===t:e===t}for(const n of yn)if(!t(this.values[n],e.values[n]))return!1;return!0}}const Sn="Invalid Interval";class Tn{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new u("need to specify a reason the Interval is invalid");const n=e instanceof _e?e:new _e(e,t);if(we.throwOnInvalid)throw new i(n);return new Tn({invalid:n})}static fromDateTimes(e,t){const n=gr(e),r=gr(t),i=function(e,t){return e&&e.isValid?t&&t.isValid?te}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&this.s<=e&&this.e>e}set({start:e,end:t}={}){return this.isValid?Tn.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(gr).filter(e=>this.contains(e)).sort((e,t)=>e.toMillis()-t.toMillis()),n=[];let{s:r}=this,i=0;for(;r+this.e?this.e:e;n.push(Tn.fromDateTimes(r,o)),r=o,i+=1}return n}splitBy(e){const t=xn.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let n,{s:r}=this,i=1;const o=[];for(;re*i));n=+e>+this.e?this.e:e,o.push(Tn.fromDateTimes(r,n)),r=n,i+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e}equals(e){return!(!this.isValid||!e.isValid)&&this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,n=this.e=n?null:Tn.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;const t=this.se.e?this.e:e.e;return Tn.fromDateTimes(t,n)}static merge(e){const[t,n]=e.sort((e,t)=>e.s-t.s).reduce(([e,t],n)=>t?t.overlaps(n)||t.abutsStart(n)?[e,t.union(n)]:[e.concat([t]),n]:[e,n],[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0;const r=[],i=e.map(e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}]),o=Array.prototype.concat(...i).sort((e,t)=>e.time-t.time);for(const e of o)n+="s"===e.type?1:-1,1===n?t=e.time:(t&&+t!==+e.time&&r.push(Tn.fromDateTimes(t,e.time)),t=null);return Tn.merge(r)}difference(...e){return Tn.xor([this].concat(e)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Sn}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=d,t={}){return this.isValid?St.create(this.s.loc.clone(t),e).formatInterval(this):Sn}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Sn}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Sn}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Sn}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Sn}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):xn.invalid(this.invalidReason)}mapEndpoints(e){return Tn.fromDateTimes(e(this.s),e(this.e))}}class On{static hasDST(e=we.defaultZone){const t=mr.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return F.isValidZone(e)}static normalizeZone(e){return se(e,we.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||ne.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||ne.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||ne.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i="gregory"}={}){return(r||ne.create(t,n,i)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i="gregory"}={}){return(r||ne.create(t,n,i)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||ne.create(t,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||ne.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return ne.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return ne.create(t,null,"gregory").eras(e)}static features(){return{relative:Ue(),localeWeek:ze()}}}function Cn(e,t){const n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(xn.fromMillis(r).as("days"))}function Mn(e,t=e=>e){return{regex:e,deser:([e])=>t(function(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n=n&&r<=i&&(t+=r-n)}}return parseInt(t,10)}return t}(e))}}const Dn=`[ ${String.fromCharCode(160)}]`,Nn=new RegExp(Dn,"g");function En(e){return e.replace(/\./g,"\\.?").replace(Nn,Dn)}function Ln(e){return e.replace(/\./g,"").replace(Nn," ").toLowerCase()}function In(e,t){return null===e?null:{regex:RegExp(e.map(En).join("|")),deser:([n])=>e.findIndex(e=>Ln(n)===Ln(e))+t}}function An(e,t){return{regex:e,deser:([,e,t])=>it(e,t),groups:t}}function $n(e){return{regex:e,deser:([e])=>e}}const Rn={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let jn=null;function Pn(e,t){return Array.prototype.concat(...e.map(e=>function(e,t){if(e.literal)return e;const n=Fn(St.macroTokenToFormatOpts(e.val),t);return null==n||n.includes(void 0)?e:n}(e,t)))}class Un{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=Pn(St.parseFormat(t),e),this.units=this.tokens.map(t=>function(e,t){const n=fe(t),r=fe(t,"{2}"),i=fe(t,"{3}"),o=fe(t,"{4}"),s=fe(t,"{6}"),a=fe(t,"{1,2}"),u=fe(t,"{1,3}"),l=fe(t,"{1,6}"),c=fe(t,"{1,9}"),f=fe(t,"{2,4}"),h=fe(t,"{4,6}"),d=e=>{return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([e])=>e,literal:!0};var t},p=(p=>{if(e.literal)return d(p);switch(p.val){case"G":return In(t.eras("short"),0);case"GG":return In(t.eras("long"),0);case"y":return Mn(l);case"yy":case"kk":return Mn(f,nt);case"yyyy":case"kkkk":return Mn(o);case"yyyyy":return Mn(h);case"yyyyyy":return Mn(s);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return Mn(a);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return Mn(r);case"MMM":return In(t.months("short",!0),1);case"MMMM":return In(t.months("long",!0),1);case"LLL":return In(t.months("short",!1),1);case"LLLL":return In(t.months("long",!1),1);case"o":case"S":return Mn(u);case"ooo":case"SSS":return Mn(i);case"u":return $n(c);case"uu":return $n(a);case"uuu":case"E":case"c":return Mn(n);case"a":return In(t.meridiems(),0);case"EEE":return In(t.weekdays("short",!1),1);case"EEEE":return In(t.weekdays("long",!1),1);case"ccc":return In(t.weekdays("short",!0),1);case"cccc":return In(t.weekdays("long",!0),1);case"Z":case"ZZ":return An(new RegExp(`([+-]${a.source})(?::(${r.source}))?`),2);case"ZZZ":return An(new RegExp(`([+-]${a.source})(${r.source})?`),2);case"z":return $n(/[a-z_+-/]{1,256}?/i);case" ":return $n(/[^\S\n\r]/);default:return d(p)}})(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return p.token=e,p}(t,e)),this.disqualifyingUnit=this.units.find(e=>e.invalidReason),!this.disqualifyingUnit){const[e,t]=[`^${(n=this.units).map(e=>e.regex).reduce((e,t)=>`${e}(${t.source})`,"")}$`,n];this.regex=RegExp(e,"i"),this.handlers=t}var n}explainFromTokens(e){if(this.isValid){const[t,n]=function(e,t,n){const r=e.match(t);if(r){const e={};let t=1;for(const i in n)if(Be(n,i)){const o=n[i],s=o.groups?o.groups+1:1;!o.literal&&o.token&&(e[o.token.val[0]]=o.deser(r.slice(t,t+s))),t+=s}return[r,e]}return[r,{}]}(e,this.regex,this.handlers),[r,i,o]=n?function(e){let t,n=null;return Re(e.z)||(n=F.create(e.z)),Re(e.Z)||(n||(n=new ie(e.Z)),t=e.Z),Re(e.q)||(e.M=3*(e.q-1)+1),Re(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),Re(e.u)||(e.S=He(e.u)),[Object.keys(e).reduce((t,n)=>{const r=(e=>{switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(n);return r&&(t[r]=e[n]),t},{}),n,t]}(n):[null,null,void 0];if(Be(n,"a")&&Be(n,"H"))throw new s("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:r,zone:i,specificOffset:o}}return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function zn(e,t,n){return new Un(e,n).explainFromTokens(t)}function Fn(e,t){if(!e)return null;const n=St.create(t,e).dtFormatter((jn||(jn=mr.fromMillis(1555555555555)),jn)),r=n.formatToParts(),i=n.resolvedOptions();return r.map(t=>function(e,t,n){const{type:r,value:i}=e;if("literal"===r){const e=/^\s+$/.test(i);return{literal:!e,val:e?" ":i}}const o=t[r];let s=r;"hour"===r&&(s=null!=t.hour12?t.hour12?"hour12":"hour24":null!=t.hourCycle?"h11"===t.hourCycle||"h12"===t.hourCycle?"hour12":"hour24":n.hour12?"hour12":"hour24");let a=Rn[s];if("object"==typeof a&&(a=a[o]),a)return{literal:!1,val:a}}(t,e,i))}const Bn="Invalid DateTime",Kn=864e13;function Vn(e){return new _e("unsupported zone",`the zone "${e.name}" is not supported`)}function Wn(e){return null===e.weekData&&(e.weekData=De(e.c)),e.weekData}function qn(e){return null===e.localWeekData&&(e.localWeekData=De(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Zn(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new mr({...n,...t,old:n})}function Hn(e,t,n){let r=e-60*t*1e3;const i=n.offset(r);if(t===i)return[r,t];r-=60*(i-t)*1e3;const o=n.offset(r);return i===o?[r,i]:[e-60*Math.min(i,o)*1e3,Math.max(i,o)]}function Gn(e,t){const n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Yn(e,t,n){return Hn(Xe(e),t,n)}function Jn(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),o={...e.c,year:r,month:i,day:Math.min(e.c.day,Qe(r,i))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},s=xn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=Xe(o);let[u,l]=Hn(a,n,e.zone);return 0!==s&&(u+=s,l=e.zone.offset(u)),{ts:u,o:l}}function Qn(e,t,n,r,i,o){const{setZone:s,zone:a}=n;if(e&&0!==Object.keys(e).length||t){const r=t||a,i=mr.fromObject(e,{...n,zone:r,specificOffset:o});return s?i:i.setZone(a)}return mr.invalid(new _e("unparsable",`the input "${i}" can't be parsed as ${r}`))}function Xn(e,t,n=!0){return e.isValid?St.create(ne.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function er(e,t,n){const r=e.c.year>9999||e.c.year<0;let i="";if(r&&e.c.year>=0&&(i+="+"),i+=We(e.c.year,r?6:4),"year"===n)return i;if(t){if(i+="-",i+=We(e.c.month),"month"===n)return i;i+="-"}else if(i+=We(e.c.month),"month"===n)return i;return i+=We(e.c.day),i}function tr(e,t,n,r,i,o,s){let a=!n||0!==e.c.millisecond||0!==e.c.second,u="";switch(s){case"day":case"month":case"year":break;default:if(u+=We(e.c.hour),"hour"===s)break;if(t){if(u+=":",u+=We(e.c.minute),"minute"===s)break;a&&(u+=":",u+=We(e.c.second))}else{if(u+=We(e.c.minute),"minute"===s)break;a&&(u+=We(e.c.second))}if("second"===s)break;!a||r&&0===e.c.millisecond||(u+=".",u+=We(e.c.millisecond,3))}return i&&(e.isOffsetFixed&&0===e.offset&&!o?u+="Z":e.o<0?(u+="-",u+=We(Math.trunc(-e.o/60)),u+=":",u+=We(Math.trunc(-e.o%60))):(u+="+",u+=We(Math.trunc(e.o/60)),u+=":",u+=We(Math.trunc(e.o%60)))),o&&(u+="["+e.zone.ianaName+"]"),u}const nr={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},rr={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ir={ordinal:1,hour:0,minute:0,second:0,millisecond:0},or=["year","month","day","hour","minute","second","millisecond"],sr=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],ar=["year","ordinal","hour","minute","second","millisecond"];function ur(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new a(e);return t}function lr(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return ur(e)}}function cr(e,t){const n=se(t.zone,we.defaultZone);if(!n.isValid)return mr.invalid(Vn(n));const r=ne.fromObject(t);let i,o;if(Re(e.year))i=we.now();else{for(const t of or)Re(e[t])&&(e[t]=nr[t]);const t=Ae(e)||$e(e);if(t)return mr.invalid(t);const r=function(e){if(void 0===dr&&(dr=we.now()),"iana"!==e.type)return e.offset(dr);const t=e.name;let n=pr.get(t);return void 0===n&&(n=e.offset(dr),pr.set(t,n)),n}(n);[i,o]=Yn(e,r,n)}return new mr({ts:i,zone:n,loc:r,o})}function fr(e,t,n){const r=!!Re(n.round)||n.round,i=Re(n.rounding)?"trunc":n.rounding,o=(e,o)=>(e=Ge(e,r||n.calendary?0:2,n.calendary?"round":i),t.loc.clone(n).relFormatter(n).format(e,o)),s=r=>n.calendary?t.hasSame(e,r)?0:t.startOf(r).diff(e.startOf(r),r).get(r):t.diff(e,r).get(r);if(n.unit)return o(s(n.unit),n.unit);for(const e of n.units){const t=s(e);if(Math.abs(t)>=1)return o(t,e)}return o(e>t?-0:0,n.units[n.units.length-1])}function hr(e){let t,n={};return e.length>0&&"object"==typeof e[e.length-1]?(n=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[n,t]}let dr;const pr=new Map;class mr{constructor(e){const t=e.zone||we.defaultZone;let n=e.invalid||(Number.isNaN(e.ts)?new _e("invalid input"):null)||(t.isValid?null:Vn(t));this.ts=Re(e.ts)?we.now():e.ts;let r=null,i=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[r,i]=[e.old.c,e.old.o];else{const o=je(e.o)&&!e.old?e.o:t.offset(this.ts);r=Gn(this.ts,o),n=Number.isNaN(r.year)?new _e("invalid input"):null,r=n?null:r,i=n?null:o}this._zone=t,this.loc=e.loc||ne.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=r,this.o=i,this.isLuxonDateTime=!0}static now(){return new mr({})}static local(){const[e,t]=hr(arguments),[n,r,i,o,s,a,u]=t;return cr({year:n,month:r,day:i,hour:o,minute:s,second:a,millisecond:u},e)}static utc(){const[e,t]=hr(arguments),[n,r,i,o,s,a,u]=t;return e.zone=ie.utcInstance,cr({year:n,month:r,day:i,hour:o,minute:s,second:a,millisecond:u},e)}static fromJSDate(e,t={}){const n=(r=e,"[object Date]"===Object.prototype.toString.call(r)?e.valueOf():NaN);var r;if(Number.isNaN(n))return mr.invalid("invalid input");const i=se(t.zone,we.defaultZone);return i.isValid?new mr({ts:n,zone:i,loc:ne.fromObject(t)}):mr.invalid(Vn(i))}static fromMillis(e,t={}){if(je(e))return e<-Kn||e>Kn?mr.invalid("Timestamp out of range"):new mr({ts:e,zone:se(t.zone,we.defaultZone),loc:ne.fromObject(t)});throw new u(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(je(e))return new mr({ts:1e3*e,zone:se(t.zone,we.defaultZone),loc:ne.fromObject(t)});throw new u("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const n=se(t.zone,we.defaultZone);if(!n.isValid)return mr.invalid(Vn(n));const r=ne.fromObject(t),i=st(e,lr),{minDaysInFirstWeek:o,startOfWeek:a}=Ie(i,r),u=we.now(),l=Re(t.specificOffset)?n.offset(u):t.specificOffset,c=!Re(i.ordinal),f=!Re(i.year),h=!Re(i.month)||!Re(i.day),d=f||h,p=i.weekYear||i.weekNumber;if((d||c)&&p)throw new s("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&c)throw new s("Can't mix ordinal dates with month/day");const m=p||i.weekday&&!d;let g,y,v=Gn(u,l);m?(g=sr,y=rr,v=De(v,o,a)):c?(g=ar,y=ir,v=Ee(v)):(g=or,y=nr);let b=!1;for(const e of g)Re(i[e])?i[e]=b?y[e]:v[e]:b=!0;const w=m?function(e,t=4,n=1){const r=Pe(e.weekYear),i=Ve(e.weekNumber,1,tt(e.weekYear,t,n)),o=Ve(e.weekday,1,7);return r?i?!o&&Se("weekday",e.weekday):Se("week",e.weekNumber):Se("weekYear",e.weekYear)}(i,o,a):c?function(e){const t=Pe(e.year),n=Ve(e.ordinal,1,Je(e.year));return t?!n&&Se("ordinal",e.ordinal):Se("year",e.year)}(i):Ae(i),_=w||$e(i);if(_)return mr.invalid(_);const k=m?Ne(i,o,a):c?Le(i):i,[x,S]=Yn(k,l,n),T=new mr({ts:x,zone:n,o:S,loc:r});return i.weekday&&d&&e.weekday!==T.weekday?mr.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${T.toISO()}`):T.isValid?T:mr.invalid(T.invalid)}static fromISO(e,t={}){const[n,r]=function(e){return Mt(e,[en,on],[tn,sn],[nn,an],[rn,un])}(e);return Qn(n,r,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[n,r]=function(e){return Mt(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[Zt,Ht])}(e);return Qn(n,r,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[n,r]=function(e){return Mt(e,[Gt,Qt],[Yt,Qt],[Jt,Xt])}(e);return Qn(n,r,t,"HTTP",t)}static fromFormat(e,t,n={}){if(Re(e)||Re(t))throw new u("fromFormat requires an input string and a format");const{locale:r=null,numberingSystem:i=null}=n,o=ne.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),[s,a,l,c]=function(e,t,n){const{result:r,zone:i,specificOffset:o,invalidReason:s}=zn(e,t,n);return[r,i,o,s]}(o,e,t);return c?mr.invalid(c):Qn(s,a,n,`format ${t}`,e,l)}static fromString(e,t,n={}){return mr.fromFormat(e,t,n)}static fromSQL(e,t={}){const[n,r]=function(e){return Mt(e,[cn,on],[fn,hn])}(e);return Qn(n,r,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new u("need to specify a reason the DateTime is invalid");const n=e instanceof _e?e:new _e(e,t);if(we.throwOnInvalid)throw new r(n);return new mr({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const n=Fn(e,ne.fromObject(t));return n?n.map(e=>e?e.val:null).join(""):null}static expandFormat(e,t={}){return Pn(St.parseFormat(e),ne.fromObject(t)).map(e=>e.val).join("")}static resetCache(){dr=void 0,pr.clear()}get(e){return this[e]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Wn(this).weekYear:NaN}get weekNumber(){return this.isValid?Wn(this).weekNumber:NaN}get weekday(){return this.isValid?Wn(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?qn(this).weekday:NaN}get localWeekNumber(){return this.isValid?qn(this).weekNumber:NaN}get localWeekYear(){return this.isValid?qn(this).weekYear:NaN}get ordinal(){return this.isValid?Ee(this.c).ordinal:NaN}get monthShort(){return this.isValid?On.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?On.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?On.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?On.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,t=6e4,n=Xe(this.c),r=this.zone.offset(n-e),i=this.zone.offset(n+e),o=this.zone.offset(n-r*t),s=this.zone.offset(n-i*t);if(o===s)return[this];const a=n-o*t,u=n-s*t,l=Gn(a,o),c=Gn(u,s);return l.hour===c.hour&&l.minute===c.minute&&l.second===c.second&&l.millisecond===c.millisecond?[Zn(this,{ts:a}),Zn(this,{ts:u})]:[this]}get isInLeapYear(){return Ye(this.year)}get daysInMonth(){return Qe(this.year,this.month)}get daysInYear(){return this.isValid?Je(this.year):NaN}get weeksInWeekYear(){return this.isValid?tt(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?tt(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:n,calendar:r}=St.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:r}}toUTC(e=0,t={}){return this.setZone(ie.instance(e),t)}toLocal(){return this.setZone(we.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:n=!1}={}){if((e=se(e,we.defaultZone)).equals(this.zone))return this;if(e.isValid){let r=this.ts;if(t||n){const t=e.offset(this.ts),n=this.toObject();[r]=Yn(n,t,e)}return Zn(this,{ts:r,zone:e})}return mr.invalid(Vn(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){return Zn(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n})})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=st(e,lr),{minDaysInFirstWeek:n,startOfWeek:r}=Ie(t,this.loc),i=!Re(t.weekYear)||!Re(t.weekNumber)||!Re(t.weekday),o=!Re(t.ordinal),a=!Re(t.year),u=!Re(t.month)||!Re(t.day),l=a||u,c=t.weekYear||t.weekNumber;if((l||o)&&c)throw new s("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&o)throw new s("Can't mix ordinal dates with month/day");let f;i?f=Ne({...De(this.c,n,r),...t},n,r):Re(t.ordinal)?(f={...this.toObject(),...t},Re(t.day)&&(f.day=Math.min(Qe(f.year,f.month),f.day))):f=Le({...Ee(this.c),...t});const[h,d]=Yn(f,this.o,this.zone);return Zn(this,{ts:h,o:d})}plus(e){return this.isValid?Zn(this,Jn(this,xn.fromDurationLike(e))):this}minus(e){return this.isValid?Zn(this,Jn(this,xn.fromDurationLike(e).negate())):this}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const n={},r=xn.normalizeUnit(e);switch(r){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0}if("weeks"===r)if(t){const e=this.loc.getStartOfWeek(),{weekday:t}=this;t=3&&(a+="T"),a+=tr(this,s,t,n,r,i,o),a}toISODate({format:e="extended",precision:t="day"}={}){return this.isValid?er(this,"extended"===e,ur(t)):null}toISOWeekDate(){return Xn(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:r=!1,extendedZone:i=!1,format:o="extended",precision:s="milliseconds"}={}){return this.isValid?(s=ur(s),(r&&or.indexOf(s)>=3?"T":"")+tr(this,"extended"===o,t,e,n,i,s)):null}toRFC2822(){return Xn(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Xn(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?er(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let r="HH:mm:ss.SSS";return(t||e)&&(n&&(r+=" "),t?r+="z":e&&(r+="ZZ")),Xn(this,r,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Bn}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",n={}){if(!this.isValid||!e.isValid)return xn.invalid("created by diffing an invalid DateTime");const r={locale:this.locale,numberingSystem:this.numberingSystem,...n},i=(a=t,Array.isArray(a)?a:[a]).map(xn.normalizeUnit),o=e.valueOf()>this.valueOf(),s=function(e,t,n,r){let[i,o,s,a]=function(e,t,n){const r=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+4*(t.year-e.year)],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const n=Cn(e,t);return(n-n%7)/7}],["days",Cn]],i={},o=e;let s,a;for(const[u,l]of r)n.indexOf(u)>=0&&(s=u,i[u]=l(e,t),a=o.plus(i),a>t?(i[u]--,(e=o.plus(i))>t&&(a=e,i[u]--,e=o.plus(i))):e=a);return[e,i,a,s]}(e,t,n);const u=t-i,l=n.filter(e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0);0===l.length&&(s0?xn.fromMillis(u,r).shiftTo(...l).plus(c):c}(o?this:e,o?e:this,i,r);var a;return o?s.negate():s}diffNow(e="milliseconds",t={}){return this.diff(mr.now(),e,t)}until(e){return this.isValid?Tn.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;const r=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t,n)<=r&&r<=i.endOf(t,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||mr.fromObject({},{zone:this.zone}),n=e.padding?thise.valueOf(),Math.min)}static max(...e){if(!e.every(mr.isDateTime))throw new u("max requires all arguments be DateTimes");return Fe(e,e=>e.valueOf(),Math.max)}static fromFormatExplain(e,t,n={}){const{locale:r=null,numberingSystem:i=null}=n;return zn(ne.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),e,t)}static fromStringExplain(e,t,n={}){return mr.fromFormatExplain(e,t,n)}static buildFormatParser(e,t={}){const{locale:n=null,numberingSystem:r=null}=t,i=ne.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0});return new Un(i,e)}static fromFormatParser(e,t,n={}){if(Re(e)||Re(t))throw new u("fromFormatParser requires an input string and a format parser");const{locale:r=null,numberingSystem:i=null}=n,o=ne.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0});if(!o.equals(t.locale))throw new u(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${t.locale}`);const{result:s,zone:a,specificOffset:l,invalidReason:c}=t.explainFromTokens(e);return c?mr.invalid(c):Qn(s,a,n,`format ${t.format}`,e,l)}static get DATE_SHORT(){return d}static get DATE_MED(){return p}static get DATE_MED_WITH_WEEKDAY(){return m}static get DATE_FULL(){return g}static get DATE_HUGE(){return y}static get TIME_SIMPLE(){return v}static get TIME_WITH_SECONDS(){return b}static get TIME_WITH_SHORT_OFFSET(){return w}static get TIME_WITH_LONG_OFFSET(){return _}static get TIME_24_SIMPLE(){return k}static get TIME_24_WITH_SECONDS(){return x}static get TIME_24_WITH_SHORT_OFFSET(){return S}static get TIME_24_WITH_LONG_OFFSET(){return T}static get DATETIME_SHORT(){return O}static get DATETIME_SHORT_WITH_SECONDS(){return C}static get DATETIME_MED(){return M}static get DATETIME_MED_WITH_SECONDS(){return D}static get DATETIME_MED_WITH_WEEKDAY(){return N}static get DATETIME_FULL(){return E}static get DATETIME_FULL_WITH_SECONDS(){return L}static get DATETIME_HUGE(){return I}static get DATETIME_HUGE_WITH_SECONDS(){return A}}function gr(e){if(mr.isDateTime(e))return e;if(e&&e.valueOf&&je(e.valueOf()))return mr.fromJSDate(e);if(e&&"object"==typeof e)return mr.fromObject(e);throw new u(`Unknown datetime argument: ${e}, of type ${typeof e}`)}t.DateTime=mr,t.Duration=xn,t.FixedOffsetZone=ie,t.IANAZone=F,t.Info=On,t.Interval=Tn,t.InvalidZone=oe,t.Settings=we,t.SystemZone=j,t.VERSION="3.7.1",t.Zone=$},1238:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.escapeEditing=void 0;const o=i(n(935));t.escapeEditing={context:"editing",keys:["esc","enter"],description:'Stop editing the current node and return to "navigation" mode',action:e=>r(void 0,void 0,void 0,function*(){const{e:t,cursor:n,outline:r,api:i,search:s}=e;if(t.shiftKey&&"Enter"===t.key)return;n.get().classList.remove("hidden-cursor");const a=n.get().querySelector(".nodeContent");a.contentEditable="false",a.blur(),o.default.setContext("navigation"),r.updateContent(n.getIdOfNode(),a.innerHTML.trim()),a.innerHTML=yield r.renderContent(n.getIdOfNode()),r.renderDates(),i.saveContentNode(r.getContentNode(n.getIdOfNode()))})}},1425:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateV1State=void 0;const r=n(2291),i=n(6011),o={};function s(e,t,n){return e.msecs??=-1/0,e.nsecs??=0,t===e.msecs?(e.nsecs++,e.nsecs>=1e4&&(e.node=void 0,e.nsecs=0)):t>e.msecs?e.nsecs=0:t= 16");if(o){if(s<0||s+16>o.length)throw new RangeError(`UUID byte range ${s}:${s+15} is out of buffer bounds`)}else o=new Uint8Array(16),s=0;t??=Date.now(),n??=0,r??=16383&(e[8]<<8|e[9]),i??=e.slice(10,16);const a=(1e4*(268435455&(t+=122192928e5))+n)%4294967296;o[s++]=a>>>24&255,o[s++]=a>>>16&255,o[s++]=a>>>8&255,o[s++]=255&a;const u=t/4294967296*1e4&268435455;o[s++]=u>>>8&255,o[s++]=255&u,o[s++]=u>>>24&15|16,o[s++]=u>>>16&255,o[s++]=r>>>8|128,o[s++]=255&r;for(let e=0;e<6;++e)o[s++]=i[e];return o}t.updateV1State=s,t.default=function(e,t,n){let u;const l=e?._v6??!1;if(e){const t=Object.keys(e);1===t.length&&"_v6"===t[0]&&(e=void 0)}if(e)u=a(e.random??e.rng?.()??(0,r.default)(),e.msecs,e.nsecs,e.clockseq,e.node,t,n);else{const e=Date.now(),i=(0,r.default)();s(o,e,i),u=a(i,o.msecs,o.nsecs,l?void 0:o.clockseq,l?void 0:o.node,t,n)}return t??(0,i.unsafeStringify)(u)}},1730:(e,t,n)=>{"use strict";let r,i,o,s,a,u,l,c,f,h;async function d(...e){if(!r){const e=await Promise.all([n.e(269),n.e(915)]).then(n.bind(n,9915));r=e.create}return r(...e)}async function p(...e){if(!i){const e=await n.e(164).then(n.bind(n,1164));i=e.insert}return i(...e)}async function m(...e){if(!o){const e=await n.e(164).then(n.bind(n,1164));o=e.insertWithHooks}return o(...e)}async function g(...e){if(!s){const e=await n.e(164).then(n.bind(n,1164));s=e.insertBatch}return s(...e)}async function y(...e){if(!a){const e=await Promise.all([n.e(269),n.e(903)]).then(n.bind(n,6903));a=e.remove}return a(...e)}async function v(...e){if(!u){const e=await Promise.all([n.e(269),n.e(753)]).then(n.bind(n,1753));u=e.search}return u(...e)}async function b(...e){if(!l){const e=await n.e(366).then(n.bind(n,9366));l=e.save}return l(...e)}async function w(...e){if(!c){const e=await n.e(379).then(n.bind(n,1379));c=e.load}return c(...e)}async function _(...e){if(!f){const e=await n.e(572).then(n.bind(n,2572));f=e.count}return f(...e)}async function k(...e){if(!h){const e=await n.e(572).then(n.bind(n,2572));h=e.getByID}return h(...e)}function x(e){Promise.all([n.e(269),n.e(753),n.e(550)]).then(n.bind(n,9550)).then(t=>setTimeout(()=>e(void 0,t),1)).catch(t=>setTimeout(()=>e(t),1))}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{create:()=>d,insert:()=>p,insertWithHooks:()=>m,insertBatch:()=>g,remove:()=>y,search:()=>v,save:()=>b,load:()=>w,count:()=>_,getByID:()=>k,requireLyra:()=>x})},1760:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.z=void 0,t.z={context:"navigation",keys:["z"],description:"hide all children node of the current node",action:e=>n(void 0,void 0,void 0,function*(){const{cursor:t,api:n,outline:r}=e;t.isNodeExpanded()?(t.collapse(),r.fold(t.getIdOfNode())):t.isNodeCollapsed()&&(t.expand(),r.unfold(t.getIdOfNode())),n.save(r)})}},1797:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9746);t.default=function(e){if(!(0,r.default)(e))throw TypeError("Invalid UUID");let t;return Uint8Array.of((t=parseInt(e.slice(0,8),16))>>>24,t>>>16&255,t>>>8&255,255&t,(t=parseInt(e.slice(9,13),16))>>>8,255&t,(t=parseInt(e.slice(14,18),16))>>>8,255&t,(t=parseInt(e.slice(19,23),16))>>>8,255&t,(t=parseInt(e.slice(24,36),16))/1099511627776&255,t/4294967296&255,t>>>24&255,t>>>16&255,t>>>8&255,255&t)}},1889:(e,t)=>{"use strict";"function"==typeof SuppressedError&&SuppressedError,t.__classPrivateFieldGet=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},t.__classPrivateFieldSet=function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}},2195:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FindDate=function(e){let t=[];for(let n=0,o=i.length;n{t.push(r.DateTime.fromISO(e.trim()))});break}catch(e){}}return t};const r=n(1169),i=[/[0-9]{4}-[0-9]{2}-[0-9]{2}/gi]},2196:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="ffffffff-ffff-ffff-ffff-ffffffffffff"},2291:(e,t)=>{"use strict";let n;Object.defineProperty(t,"__esModule",{value:!0});const r=new Uint8Array(16);t.default=function(){if(!n){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");n=crypto.getRandomValues.bind(crypto)}return n(r)}},2341:(e,t,n)=>{"use strict";var r,i=n(717);t.BaseDirectory=void 0,(r=t.BaseDirectory||(t.BaseDirectory={}))[r.Audio=1]="Audio",r[r.Cache=2]="Cache",r[r.Config=3]="Config",r[r.Data=4]="Data",r[r.LocalData=5]="LocalData",r[r.Document=6]="Document",r[r.Download=7]="Download",r[r.Picture=8]="Picture",r[r.Public=9]="Public",r[r.Video=10]="Video",r[r.Resource=11]="Resource",r[r.Temp=12]="Temp",r[r.AppConfig=13]="AppConfig",r[r.AppData=14]="AppData",r[r.AppLocalData=15]="AppLocalData",r[r.AppCache=16]="AppCache",r[r.AppLog=17]="AppLog",r[r.Desktop=18]="Desktop",r[r.Executable=19]="Executable",r[r.Font=20]="Font",r[r.Home=21]="Home",r[r.Runtime=22]="Runtime",r[r.Template=23]="Template",t.appCacheDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.AppCache})},t.appConfigDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.AppConfig})},t.appDataDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.AppData})},t.appLocalDataDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.AppLocalData})},t.appLogDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.AppLog})},t.audioDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Audio})},t.basename=async function(e,t){return i.invoke("plugin:path|basename",{path:e,ext:t})},t.cacheDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Cache})},t.configDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Config})},t.dataDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Data})},t.delimiter=function(){return window.__TAURI_INTERNALS__.plugins.path.delimiter},t.desktopDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Desktop})},t.dirname=async function(e){return i.invoke("plugin:path|dirname",{path:e})},t.documentDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Document})},t.downloadDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Download})},t.executableDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Executable})},t.extname=async function(e){return i.invoke("plugin:path|extname",{path:e})},t.fontDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Font})},t.homeDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Home})},t.isAbsolute=async function(e){return i.invoke("plugin:path|is_absolute",{path:e})},t.join=async function(...e){return i.invoke("plugin:path|join",{paths:e})},t.localDataDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.LocalData})},t.normalize=async function(e){return i.invoke("plugin:path|normalize",{path:e})},t.pictureDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Picture})},t.publicDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Public})},t.resolve=async function(...e){return i.invoke("plugin:path|resolve",{paths:e})},t.resolveResource=async function(e){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Resource,path:e})},t.resourceDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Resource})},t.runtimeDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Runtime})},t.sep=function(){return window.__TAURI_INTERNALS__.plugins.path.sep},t.tempDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Temp})},t.templateDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Template})},t.videoDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Video})}},2543:function(e,t,n){var r;e=n.nmd(e),function(){var i,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,l=128,c=1/0,f=9007199254740991,h=NaN,d=4294967295,p=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],m="[object Arguments]",g="[object Array]",y="[object Boolean]",v="[object Date]",b="[object Error]",w="[object Function]",_="[object GeneratorFunction]",k="[object Map]",x="[object Number]",S="[object Object]",T="[object Promise]",O="[object RegExp]",C="[object Set]",M="[object String]",D="[object Symbol]",N="[object WeakMap]",E="[object ArrayBuffer]",L="[object DataView]",I="[object Float32Array]",A="[object Float64Array]",$="[object Int8Array]",R="[object Int16Array]",j="[object Int32Array]",P="[object Uint8Array]",U="[object Uint8ClampedArray]",z="[object Uint16Array]",F="[object Uint32Array]",B=/\b__p \+= '';/g,K=/\b(__p \+=) '' \+/g,V=/(__e\(.*?\)|\b__t\)) \+\n'';/g,W=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,Z=RegExp(W.source),H=RegExp(q.source),G=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,ie=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,me=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,we=/['\n\r\u2028\u2029\\]/g,_e="\\ud800-\\udfff",ke="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",xe="\\u2700-\\u27bf",Se="a-z\\xdf-\\xf6\\xf8-\\xff",Te="A-Z\\xc0-\\xd6\\xd8-\\xde",Oe="\\ufe0e\\ufe0f",Ce="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Me="["+_e+"]",De="["+Ce+"]",Ne="["+ke+"]",Ee="\\d+",Le="["+xe+"]",Ie="["+Se+"]",Ae="[^"+_e+Ce+Ee+xe+Se+Te+"]",$e="\\ud83c[\\udffb-\\udfff]",Re="[^"+_e+"]",je="(?:\\ud83c[\\udde6-\\uddff]){2}",Pe="[\\ud800-\\udbff][\\udc00-\\udfff]",Ue="["+Te+"]",ze="\\u200d",Fe="(?:"+Ie+"|"+Ae+")",Be="(?:"+Ue+"|"+Ae+")",Ke="(?:['’](?:d|ll|m|re|s|t|ve))?",Ve="(?:['’](?:D|LL|M|RE|S|T|VE))?",We="(?:"+Ne+"|"+$e+")?",qe="["+Oe+"]?",Ze=qe+We+"(?:"+ze+"(?:"+[Re,je,Pe].join("|")+")"+qe+We+")*",He="(?:"+[Le,je,Pe].join("|")+")"+Ze,Ge="(?:"+[Re+Ne+"?",Ne,je,Pe,Me].join("|")+")",Ye=RegExp("['’]","g"),Je=RegExp(Ne,"g"),Qe=RegExp($e+"(?="+$e+")|"+Ge+Ze,"g"),Xe=RegExp([Ue+"?"+Ie+"+"+Ke+"(?="+[De,Ue,"$"].join("|")+")",Be+"+"+Ve+"(?="+[De,Ue+Fe,"$"].join("|")+")",Ue+"?"+Fe+"+"+Ke,Ue+"+"+Ve,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ee,He].join("|"),"g"),et=RegExp("["+ze+_e+ke+Oe+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rt=-1,it={};it[I]=it[A]=it[$]=it[R]=it[j]=it[P]=it[U]=it[z]=it[F]=!0,it[m]=it[g]=it[E]=it[y]=it[L]=it[v]=it[b]=it[w]=it[k]=it[x]=it[S]=it[O]=it[C]=it[M]=it[N]=!1;var ot={};ot[m]=ot[g]=ot[E]=ot[L]=ot[y]=ot[v]=ot[I]=ot[A]=ot[$]=ot[R]=ot[j]=ot[k]=ot[x]=ot[S]=ot[O]=ot[C]=ot[M]=ot[D]=ot[P]=ot[U]=ot[z]=ot[F]=!0,ot[b]=ot[w]=ot[N]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},at=parseFloat,ut=parseInt,lt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ct="object"==typeof self&&self&&self.Object===Object&&self,ft=lt||ct||Function("return this")(),ht=t&&!t.nodeType&&t,dt=ht&&e&&!e.nodeType&&e,pt=dt&&dt.exports===ht,mt=pt&<.process,gt=function(){try{return dt&&dt.require&&dt.require("util").types||mt&&mt.binding&&mt.binding("util")}catch(e){}}(),yt=gt&>.isArrayBuffer,vt=gt&>.isDate,bt=gt&>.isMap,wt=gt&>.isRegExp,_t=gt&>.isSet,kt=gt&>.isTypedArray;function xt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function St(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i-1}function Nt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r-1;);return n}function Xt(e,t){for(var n=e.length;n--&&Ut(t,e[n],0)>-1;);return n}var en=Vt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tn=Vt({"&":"&","<":"<",">":">",'"':""","'":"'"});function nn(e){return"\\"+st[e]}function rn(e){return et.test(e)}function on(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function sn(e,t){return function(n){return e(t(n))}}function an(e,t){for(var n=-1,r=e.length,i=0,o=[];++n",""":'"',"'":"'"}),pn=function e(t){var n,r=(t=null==t?ft:pn.defaults(ft.Object(),t,pn.pick(ft,nt))).Array,ie=t.Date,_e=t.Error,ke=t.Function,xe=t.Math,Se=t.Object,Te=t.RegExp,Oe=t.String,Ce=t.TypeError,Me=r.prototype,De=ke.prototype,Ne=Se.prototype,Ee=t["__core-js_shared__"],Le=De.toString,Ie=Ne.hasOwnProperty,Ae=0,$e=(n=/[^.]+$/.exec(Ee&&Ee.keys&&Ee.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Re=Ne.toString,je=Le.call(Se),Pe=ft._,Ue=Te("^"+Le.call(Ie).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ze=pt?t.Buffer:i,Fe=t.Symbol,Be=t.Uint8Array,Ke=ze?ze.allocUnsafe:i,Ve=sn(Se.getPrototypeOf,Se),We=Se.create,qe=Ne.propertyIsEnumerable,Ze=Me.splice,He=Fe?Fe.isConcatSpreadable:i,Ge=Fe?Fe.iterator:i,Qe=Fe?Fe.toStringTag:i,et=function(){try{var e=uo(Se,"defineProperty");return e({},"",{}),e}catch(e){}}(),st=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,lt=ie&&ie.now!==ft.Date.now&&ie.now,ct=t.setTimeout!==ft.setTimeout&&t.setTimeout,ht=xe.ceil,dt=xe.floor,mt=Se.getOwnPropertySymbols,gt=ze?ze.isBuffer:i,Rt=t.isFinite,Vt=Me.join,mn=sn(Se.keys,Se),gn=xe.max,yn=xe.min,vn=ie.now,bn=t.parseInt,wn=xe.random,_n=Me.reverse,kn=uo(t,"DataView"),xn=uo(t,"Map"),Sn=uo(t,"Promise"),Tn=uo(t,"Set"),On=uo(t,"WeakMap"),Cn=uo(Se,"create"),Mn=On&&new On,Dn={},Nn=jo(kn),En=jo(xn),Ln=jo(Sn),In=jo(Tn),An=jo(On),$n=Fe?Fe.prototype:i,Rn=$n?$n.valueOf:i,jn=$n?$n.toString:i;function Pn(e){if(ea(e)&&!Ks(e)&&!(e instanceof Bn)){if(e instanceof Fn)return e;if(Ie.call(e,"__wrapped__"))return Po(e)}return new Fn(e)}var Un=function(){function e(){}return function(t){if(!Xs(t))return{};if(We)return We(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function zn(){}function Fn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Bn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function sr(e,t,n,r,o,s){var a,u=1&t,l=2&t,c=4&t;if(n&&(a=o?n(e,r,o,s):n(e)),a!==i)return a;if(!Xs(e))return e;var f=Ks(e);if(f){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ie.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return Oi(e,a)}else{var h=fo(e),d=h==w||h==_;if(Zs(e))return wi(e,u);if(h==S||h==m||d&&!o){if(a=l||d?{}:po(e),!u)return l?function(e,t){return Ci(e,co(e),t)}(e,function(e,t){return e&&Ci(t,Ea(t),e)}(a,e)):function(e,t){return Ci(e,lo(e),t)}(e,nr(a,e))}else{if(!ot[h])return o?e:{};a=function(e,t,n){var r,i=e.constructor;switch(t){case E:return _i(e);case y:case v:return new i(+e);case L:return function(e,t){var n=t?_i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case I:case A:case $:case R:case j:case P:case U:case z:case F:return ki(e,n);case k:return new i;case x:case M:return new i(e);case O:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case C:return new i;case D:return r=e,Rn?Se(Rn.call(r)):{}}}(e,h,u)}}s||(s=new Zn);var p=s.get(e);if(p)return p;s.set(e,a),oa(e)?e.forEach(function(r){a.add(sr(r,t,n,r,e,s))}):ta(e)&&e.forEach(function(r,i){a.set(i,sr(r,t,n,i,e,s))});var g=f?i:(c?l?to:eo:l?Ea:Na)(e);return Tt(g||e,function(r,i){g&&(r=e[i=r]),Xn(a,i,sr(r,t,n,i,e,s))}),a}function ar(e,t,n){var r=n.length;if(null==e)return!r;for(e=Se(e);r--;){var o=n[r],s=t[o],a=e[o];if(a===i&&!(o in e)||!s(a))return!1}return!0}function ur(e,t,n){if("function"!=typeof e)throw new Ce(o);return Mo(function(){e.apply(i,n)},t)}function lr(e,t,n,r){var i=-1,o=Dt,s=!0,a=e.length,u=[],l=t.length;if(!a)return u;n&&(t=Et(t,Gt(n))),r?(o=Nt,s=!1):t.length>=200&&(o=Jt,s=!1,t=new qn(t));e:for(;++i-1},Vn.prototype.set=function(e,t){var n=this.__data__,r=er(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Wn.prototype.clear=function(){this.size=0,this.__data__={hash:new Kn,map:new(xn||Vn),string:new Kn}},Wn.prototype.delete=function(e){var t=so(this,e).delete(e);return this.size-=t?1:0,t},Wn.prototype.get=function(e){return so(this,e).get(e)},Wn.prototype.has=function(e){return so(this,e).has(e)},Wn.prototype.set=function(e,t){var n=so(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},qn.prototype.add=qn.prototype.push=function(e){return this.__data__.set(e,s),this},qn.prototype.has=function(e){return this.__data__.has(e)},Zn.prototype.clear=function(){this.__data__=new Vn,this.size=0},Zn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Zn.prototype.get=function(e){return this.__data__.get(e)},Zn.prototype.has=function(e){return this.__data__.has(e)},Zn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Vn){var r=n.__data__;if(!xn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Wn(r)}return n.set(e,t),this.size=n.size,this};var cr=Ni(vr),fr=Ni(br,!0);function hr(e,t){var n=!0;return cr(e,function(e,r,i){return n=!!t(e,r,i)}),n}function dr(e,t,n){for(var r=-1,o=e.length;++r0&&n(a)?t>1?mr(a,t-1,n,r,i):Lt(i,a):r||(i[i.length]=a)}return i}var gr=Ei(),yr=Ei(!0);function vr(e,t){return e&&gr(e,t,Na)}function br(e,t){return e&&yr(e,t,Na)}function wr(e,t){return Mt(t,function(t){return Ys(e[t])})}function _r(e,t){for(var n=0,r=(t=gi(t,e)).length;null!=e&&nt}function Tr(e,t){return null!=e&&Ie.call(e,t)}function Or(e,t){return null!=e&&t in Se(e)}function Cr(e,t,n){for(var o=n?Nt:Dt,s=e[0].length,a=e.length,u=a,l=r(a),c=1/0,f=[];u--;){var h=e[u];u&&t&&(h=Et(h,Gt(t))),c=yn(h.length,c),l[u]=!n&&(t||s>=120&&h.length>=120)?new qn(u&&h):i}h=e[0];var d=-1,p=l[0];e:for(;++d=a?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)});t--;)e[t]=e[t].value;return e}(i)}function Br(e,t,n){for(var r=-1,i=t.length,o={};++r-1;)a!==e&&Ze.call(a,u,1),Ze.call(e,u,1);return e}function Vr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;go(i)?Ze.call(e,i,1):ui(e,i)}}return e}function Wr(e,t){return e+dt(wn()*(t-e+1))}function qr(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=dt(t/2))&&(e+=e)}while(t);return n}function Zr(e,t){return Do(So(e,t,nu),e+"")}function Hr(e){return Gn(Ua(e))}function Gr(e,t){var n=Ua(e);return Lo(n,or(t,0,n.length))}function Yr(e,t,n,r){if(!Xs(e))return e;for(var o=-1,s=(t=gi(t,e)).length,a=s-1,u=e;null!=u&&++oo?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var s=r(o);++i>>1,s=e[o];null!==s&&!aa(s)&&(n?s<=t:s=200){var l=t?null:qi(e);if(l)return un(l);s=!1,i=Jt,u=new qn}else u=t?[]:a;e:for(;++r=r?e:ei(e,t,n)}var bi=st||function(e){return ft.clearTimeout(e)};function wi(e,t){if(t)return e.slice();var n=e.length,r=Ke?Ke(n):new e.constructor(n);return e.copy(r),r}function _i(e){var t=new e.constructor(e.byteLength);return new Be(t).set(new Be(e)),t}function ki(e,t){var n=t?_i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function xi(e,t){if(e!==t){var n=e!==i,r=null===e,o=e==e,s=aa(e),a=t!==i,u=null===t,l=t==t,c=aa(t);if(!u&&!c&&!s&&e>t||s&&a&&l&&!u&&!c||r&&a&&l||!n&&l||!o)return 1;if(!r&&!s&&!c&&e1?n[o-1]:i,a=o>2?n[2]:i;for(s=e.length>3&&"function"==typeof s?(o--,s):i,a&&yo(n[0],n[1],a)&&(s=o<3?i:s,o=1),t=Se(t);++r-1?o[s?t[a]:a]:i}}function Ri(e){return Xi(function(t){var n=t.length,r=n,s=Fn.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new Ce(o);if(s&&!u&&"wrapper"==ro(a))var u=new Fn([],!0)}for(r=u?r:n;++r1&&w.reverse(),d&&fu))return!1;var c=s.get(e),f=s.get(t);if(c&&f)return c==t&&f==e;var h=-1,d=!0,p=2&n?new qn:i;for(s.set(e,t),s.set(t,e);++h-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Tt(p,function(n){var r="_."+n[0];t&n[1]&&!Dt(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ae):[]}(r),n)))}function Eo(e){var t=0,n=0;return function(){var r=vn(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Lo(e,t){var n=-1,r=e.length,o=r-1;for(t=t===i?r:t;++n1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,is(e,n)});function fs(e){var t=Pn(e);return t.__chain__=!0,t}function hs(e,t){return t(e)}var ds=Xi(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return ir(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Bn&&go(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:hs,args:[o],thisArg:i}),new Fn(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(i),e})):this.thru(o)}),ps=Mi(function(e,t,n){Ie.call(e,n)?++e[n]:rr(e,n,1)}),ms=$i(Bo),gs=$i(Ko);function ys(e,t){return(Ks(e)?Tt:cr)(e,oo(t,3))}function vs(e,t){return(Ks(e)?Ot:fr)(e,oo(t,3))}var bs=Mi(function(e,t,n){Ie.call(e,n)?e[n].push(t):rr(e,n,[t])}),ws=Zr(function(e,t,n){var i=-1,o="function"==typeof t,s=Ws(e)?r(e.length):[];return cr(e,function(e){s[++i]=o?xt(t,e,n):Mr(e,t,n)}),s}),_s=Mi(function(e,t,n){rr(e,n,t)});function ks(e,t){return(Ks(e)?Et:Rr)(e,oo(t,3))}var xs=Mi(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),Ss=Zr(function(e,t){if(null==e)return[];var n=t.length;return n>1&&yo(e,t[0],t[1])?t=[]:n>2&&yo(t[0],t[1],t[2])&&(t=[t[0]]),Fr(e,mr(t,1),[])}),Ts=lt||function(){return ft.Date.now()};function Os(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Hi(e,l,i,i,i,i,t)}function Cs(e,t){var n;if("function"!=typeof t)throw new Ce(o);return e=da(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Ms=Zr(function(e,t,n){var r=1;if(n.length){var i=an(n,io(Ms));r|=u}return Hi(e,r,t,n,i)}),Ds=Zr(function(e,t,n){var r=3;if(n.length){var i=an(n,io(Ds));r|=u}return Hi(t,r,e,n,i)});function Ns(e,t,n){var r,s,a,u,l,c,f=0,h=!1,d=!1,p=!0;if("function"!=typeof e)throw new Ce(o);function m(t){var n=r,o=s;return r=s=i,f=t,u=e.apply(o,n)}function g(e){var n=e-c;return c===i||n>=t||n<0||d&&e-f>=a}function y(){var e=Ts();if(g(e))return v(e);l=Mo(y,function(e){var n=t-(e-c);return d?yn(n,a-(e-f)):n}(e))}function v(e){return l=i,p&&r?m(e):(r=s=i,u)}function b(){var e=Ts(),n=g(e);if(r=arguments,s=this,c=e,n){if(l===i)return function(e){return f=e,l=Mo(y,t),h?m(e):u}(c);if(d)return bi(l),l=Mo(y,t),m(c)}return l===i&&(l=Mo(y,t)),u}return t=ma(t)||0,Xs(n)&&(h=!!n.leading,a=(d="maxWait"in n)?gn(ma(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p),b.cancel=function(){l!==i&&bi(l),f=0,r=c=s=l=i},b.flush=function(){return l===i?u:v(Ts())},b}var Es=Zr(function(e,t){return ur(e,1,t)}),Ls=Zr(function(e,t,n){return ur(e,ma(t)||0,n)});function Is(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ce(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Is.Cache||Wn),n}function As(e){if("function"!=typeof e)throw new Ce(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Is.Cache=Wn;var $s=yi(function(e,t){var n=(t=1==t.length&&Ks(t[0])?Et(t[0],Gt(oo())):Et(mr(t,1),Gt(oo()))).length;return Zr(function(r){for(var i=-1,o=yn(r.length,n);++i=t}),Bs=Dr(function(){return arguments}())?Dr:function(e){return ea(e)&&Ie.call(e,"callee")&&!qe.call(e,"callee")},Ks=r.isArray,Vs=yt?Gt(yt):function(e){return ea(e)&&xr(e)==E};function Ws(e){return null!=e&&Qs(e.length)&&!Ys(e)}function qs(e){return ea(e)&&Ws(e)}var Zs=gt||mu,Hs=vt?Gt(vt):function(e){return ea(e)&&xr(e)==v};function Gs(e){if(!ea(e))return!1;var t=xr(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ra(e)}function Ys(e){if(!Xs(e))return!1;var t=xr(e);return t==w||t==_||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Js(e){return"number"==typeof e&&e==da(e)}function Qs(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function Xs(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ea(e){return null!=e&&"object"==typeof e}var ta=bt?Gt(bt):function(e){return ea(e)&&fo(e)==k};function na(e){return"number"==typeof e||ea(e)&&xr(e)==x}function ra(e){if(!ea(e)||xr(e)!=S)return!1;var t=Ve(e);if(null===t)return!0;var n=Ie.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Le.call(n)==je}var ia=wt?Gt(wt):function(e){return ea(e)&&xr(e)==O},oa=_t?Gt(_t):function(e){return ea(e)&&fo(e)==C};function sa(e){return"string"==typeof e||!Ks(e)&&ea(e)&&xr(e)==M}function aa(e){return"symbol"==typeof e||ea(e)&&xr(e)==D}var ua=kt?Gt(kt):function(e){return ea(e)&&Qs(e.length)&&!!it[xr(e)]},la=Ki($r),ca=Ki(function(e,t){return e<=t});function fa(e){if(!e)return[];if(Ws(e))return sa(e)?fn(e):Oi(e);if(Ge&&e[Ge])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ge]());var t=fo(e);return(t==k?on:t==C?un:Ua)(e)}function ha(e){return e?(e=ma(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function da(e){var t=ha(e),n=t%1;return t==t?n?t-n:t:0}function pa(e){return e?or(da(e),0,d):0}function ma(e){if("number"==typeof e)return e;if(aa(e))return h;if(Xs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Xs(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ht(e);var n=pe.test(e);return n||ge.test(e)?ut(e.slice(2),n?2:8):de.test(e)?h:+e}function ga(e){return Ci(e,Ea(e))}function ya(e){return null==e?"":si(e)}var va=Di(function(e,t){if(_o(t)||Ws(t))Ci(t,Na(t),e);else for(var n in t)Ie.call(t,n)&&Xn(e,n,t[n])}),ba=Di(function(e,t){Ci(t,Ea(t),e)}),wa=Di(function(e,t,n,r){Ci(t,Ea(t),e,r)}),_a=Di(function(e,t,n,r){Ci(t,Na(t),e,r)}),ka=Xi(ir),xa=Zr(function(e,t){e=Se(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&yo(t[0],t[1],o)&&(r=1);++n1),t}),Ci(e,to(e),n),r&&(n=sr(n,7,Ji));for(var i=t.length;i--;)ui(n,t[i]);return n}),$a=Xi(function(e,t){return null==e?{}:function(e,t){return Br(e,t,function(t,n){return Oa(e,n)})}(e,t)});function Ra(e,t){if(null==e)return{};var n=Et(to(e),function(e){return[e]});return t=oo(t),Br(e,n,function(e,n){return t(e,n[0])})}var ja=Zi(Na),Pa=Zi(Ea);function Ua(e){return null==e?[]:Yt(e,Na(e))}var za=Ii(function(e,t,n){return t=t.toLowerCase(),e+(n?Fa(t):t)});function Fa(e){return Ga(ya(e).toLowerCase())}function Ba(e){return(e=ya(e))&&e.replace(ve,en).replace(Je,"")}var Ka=Ii(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Va=Ii(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Wa=Li("toLowerCase"),qa=Ii(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),Za=Ii(function(e,t,n){return e+(n?" ":"")+Ga(t)}),Ha=Ii(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Ga=Li("toUpperCase");function Ya(e,t,n){return e=ya(e),(t=n?i:t)===i?function(e){return tt.test(e)}(e)?function(e){return e.match(Xe)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Ja=Zr(function(e,t){try{return xt(e,i,t)}catch(e){return Gs(e)?e:new _e(e)}}),Qa=Xi(function(e,t){return Tt(t,function(t){t=Ro(t),rr(e,t,Ms(e[t],e))}),e});function Xa(e){return function(){return e}}var eu=Ri(),tu=Ri(!0);function nu(e){return e}function ru(e){return Ir("function"==typeof e?e:sr(e,1))}var iu=Zr(function(e,t){return function(n){return Mr(n,e,t)}}),ou=Zr(function(e,t){return function(n){return Mr(e,n,t)}});function su(e,t,n){var r=Na(t),i=wr(t,r);null!=n||Xs(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=wr(t,Na(t)));var o=!(Xs(n)&&"chain"in n&&!n.chain),s=Ys(e);return Tt(i,function(n){var r=t[n];e[n]=r,s&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=Oi(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Lt([this.value()],arguments))})}),e}function au(){}var uu=zi(Et),lu=zi(Ct),cu=zi($t);function fu(e){return vo(e)?Kt(Ro(e)):function(e){return function(t){return _r(t,e)}}(e)}var hu=Bi(),du=Bi(!0);function pu(){return[]}function mu(){return!1}var gu,yu=Ui(function(e,t){return e+t},0),vu=Wi("ceil"),bu=Ui(function(e,t){return e/t},1),wu=Wi("floor"),_u=Ui(function(e,t){return e*t},1),ku=Wi("round"),xu=Ui(function(e,t){return e-t},0);return Pn.after=function(e,t){if("function"!=typeof t)throw new Ce(o);return e=da(e),function(){if(--e<1)return t.apply(this,arguments)}},Pn.ary=Os,Pn.assign=va,Pn.assignIn=ba,Pn.assignInWith=wa,Pn.assignWith=_a,Pn.at=ka,Pn.before=Cs,Pn.bind=Ms,Pn.bindAll=Qa,Pn.bindKey=Ds,Pn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ks(e)?e:[e]},Pn.chain=fs,Pn.chunk=function(e,t,n){t=(n?yo(e,t,n):t===i)?1:gn(da(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var s=0,a=0,u=r(ht(o/t));so?0:o+n),(r=r===i||r>o?o:da(r))<0&&(r+=o),r=n>r?0:pa(r);n>>0)?(e=ya(e))&&("string"==typeof t||null!=t&&!ia(t))&&!(t=si(t))&&rn(e)?vi(fn(e),0,n):e.split(t,n):[]},Pn.spread=function(e,t){if("function"!=typeof e)throw new Ce(o);return t=null==t?0:gn(da(t),0),Zr(function(n){var r=n[t],i=vi(n,0,t);return r&&Lt(i,r),xt(e,this,i)})},Pn.tail=function(e){var t=null==e?0:e.length;return t?ei(e,1,t):[]},Pn.take=function(e,t,n){return e&&e.length?ei(e,0,(t=n||t===i?1:da(t))<0?0:t):[]},Pn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ei(e,(t=r-(t=n||t===i?1:da(t)))<0?0:t,r):[]},Pn.takeRightWhile=function(e,t){return e&&e.length?ci(e,oo(t,3),!1,!0):[]},Pn.takeWhile=function(e,t){return e&&e.length?ci(e,oo(t,3)):[]},Pn.tap=function(e,t){return t(e),e},Pn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Ce(o);return Xs(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ns(e,t,{leading:r,maxWait:t,trailing:i})},Pn.thru=hs,Pn.toArray=fa,Pn.toPairs=ja,Pn.toPairsIn=Pa,Pn.toPath=function(e){return Ks(e)?Et(e,Ro):aa(e)?[e]:Oi($o(ya(e)))},Pn.toPlainObject=ga,Pn.transform=function(e,t,n){var r=Ks(e),i=r||Zs(e)||ua(e);if(t=oo(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Xs(e)&&Ys(o)?Un(Ve(e)):{}}return(i?Tt:vr)(e,function(e,r,i){return t(n,e,r,i)}),n},Pn.unary=function(e){return Os(e,1)},Pn.union=es,Pn.unionBy=ts,Pn.unionWith=ns,Pn.uniq=function(e){return e&&e.length?ai(e):[]},Pn.uniqBy=function(e,t){return e&&e.length?ai(e,oo(t,2)):[]},Pn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ai(e,i,t):[]},Pn.unset=function(e,t){return null==e||ui(e,t)},Pn.unzip=rs,Pn.unzipWith=is,Pn.update=function(e,t,n){return null==e?e:li(e,t,mi(n))},Pn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:li(e,t,mi(n),r)},Pn.values=Ua,Pn.valuesIn=function(e){return null==e?[]:Yt(e,Ea(e))},Pn.without=os,Pn.words=Ya,Pn.wrap=function(e,t){return Rs(mi(t),e)},Pn.xor=ss,Pn.xorBy=as,Pn.xorWith=us,Pn.zip=ls,Pn.zipObject=function(e,t){return di(e||[],t||[],Xn)},Pn.zipObjectDeep=function(e,t){return di(e||[],t||[],Yr)},Pn.zipWith=cs,Pn.entries=ja,Pn.entriesIn=Pa,Pn.extend=ba,Pn.extendWith=wa,su(Pn,Pn),Pn.add=yu,Pn.attempt=Ja,Pn.camelCase=za,Pn.capitalize=Fa,Pn.ceil=vu,Pn.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=ma(n))==n?n:0),t!==i&&(t=(t=ma(t))==t?t:0),or(ma(e),t,n)},Pn.clone=function(e){return sr(e,4)},Pn.cloneDeep=function(e){return sr(e,5)},Pn.cloneDeepWith=function(e,t){return sr(e,5,t="function"==typeof t?t:i)},Pn.cloneWith=function(e,t){return sr(e,4,t="function"==typeof t?t:i)},Pn.conformsTo=function(e,t){return null==t||ar(e,t,Na(t))},Pn.deburr=Ba,Pn.defaultTo=function(e,t){return null==e||e!=e?t:e},Pn.divide=bu,Pn.endsWith=function(e,t,n){e=ya(e),t=si(t);var r=e.length,o=n=n===i?r:or(da(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},Pn.eq=Us,Pn.escape=function(e){return(e=ya(e))&&H.test(e)?e.replace(q,tn):e},Pn.escapeRegExp=function(e){return(e=ya(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Pn.every=function(e,t,n){var r=Ks(e)?Ct:hr;return n&&yo(e,t,n)&&(t=i),r(e,oo(t,3))},Pn.find=ms,Pn.findIndex=Bo,Pn.findKey=function(e,t){return jt(e,oo(t,3),vr)},Pn.findLast=gs,Pn.findLastIndex=Ko,Pn.findLastKey=function(e,t){return jt(e,oo(t,3),br)},Pn.floor=wu,Pn.forEach=ys,Pn.forEachRight=vs,Pn.forIn=function(e,t){return null==e?e:gr(e,oo(t,3),Ea)},Pn.forInRight=function(e,t){return null==e?e:yr(e,oo(t,3),Ea)},Pn.forOwn=function(e,t){return e&&vr(e,oo(t,3))},Pn.forOwnRight=function(e,t){return e&&br(e,oo(t,3))},Pn.get=Ta,Pn.gt=zs,Pn.gte=Fs,Pn.has=function(e,t){return null!=e&&ho(e,t,Tr)},Pn.hasIn=Oa,Pn.head=Wo,Pn.identity=nu,Pn.includes=function(e,t,n,r){e=Ws(e)?e:Ua(e),n=n&&!r?da(n):0;var i=e.length;return n<0&&(n=gn(i+n,0)),sa(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Ut(e,t,n)>-1},Pn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:da(n);return i<0&&(i=gn(r+i,0)),Ut(e,t,i)},Pn.inRange=function(e,t,n){return t=ha(t),n===i?(n=t,t=0):n=ha(n),function(e,t,n){return e>=yn(t,n)&&e=-9007199254740991&&e<=f},Pn.isSet=oa,Pn.isString=sa,Pn.isSymbol=aa,Pn.isTypedArray=ua,Pn.isUndefined=function(e){return e===i},Pn.isWeakMap=function(e){return ea(e)&&fo(e)==N},Pn.isWeakSet=function(e){return ea(e)&&"[object WeakSet]"==xr(e)},Pn.join=function(e,t){return null==e?"":Vt.call(e,t)},Pn.kebabCase=Ka,Pn.last=Go,Pn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=da(n))<0?gn(r+o,0):yn(o,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Pt(e,Ft,o,!0)},Pn.lowerCase=Va,Pn.lowerFirst=Wa,Pn.lt=la,Pn.lte=ca,Pn.max=function(e){return e&&e.length?dr(e,nu,Sr):i},Pn.maxBy=function(e,t){return e&&e.length?dr(e,oo(t,2),Sr):i},Pn.mean=function(e){return Bt(e,nu)},Pn.meanBy=function(e,t){return Bt(e,oo(t,2))},Pn.min=function(e){return e&&e.length?dr(e,nu,$r):i},Pn.minBy=function(e,t){return e&&e.length?dr(e,oo(t,2),$r):i},Pn.stubArray=pu,Pn.stubFalse=mu,Pn.stubObject=function(){return{}},Pn.stubString=function(){return""},Pn.stubTrue=function(){return!0},Pn.multiply=_u,Pn.nth=function(e,t){return e&&e.length?zr(e,da(t)):i},Pn.noConflict=function(){return ft._===this&&(ft._=Pe),this},Pn.noop=au,Pn.now=Ts,Pn.pad=function(e,t,n){e=ya(e);var r=(t=da(t))?cn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Fi(dt(i),n)+e+Fi(ht(i),n)},Pn.padEnd=function(e,t,n){e=ya(e);var r=(t=da(t))?cn(e):0;return t&&rt){var r=e;e=t,t=r}if(n||e%1||t%1){var o=wn();return yn(e+o*(t-e+at("1e-"+((o+"").length-1))),t)}return Wr(e,t)},Pn.reduce=function(e,t,n){var r=Ks(e)?It:Wt,i=arguments.length<3;return r(e,oo(t,4),n,i,cr)},Pn.reduceRight=function(e,t,n){var r=Ks(e)?At:Wt,i=arguments.length<3;return r(e,oo(t,4),n,i,fr)},Pn.repeat=function(e,t,n){return t=(n?yo(e,t,n):t===i)?1:da(t),qr(ya(e),t)},Pn.replace=function(){var e=arguments,t=ya(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Pn.result=function(e,t,n){var r=-1,o=(t=gi(t,e)).length;for(o||(o=1,e=i);++rf)return[];var n=d,r=yn(e,d);t=oo(t),e-=d;for(var i=Zt(r,t);++n=s)return e;var u=n-cn(r);if(u<1)return r;var l=a?vi(a,0,u).join(""):e.slice(0,u);if(o===i)return l+r;if(a&&(u+=l.length-u),ia(o)){if(e.slice(u).search(o)){var c,f=l;for(o.global||(o=Te(o.source,ya(he.exec(o))+"g")),o.lastIndex=0;c=o.exec(f);)var h=c.index;l=l.slice(0,h===i?u:h)}}else if(e.indexOf(si(o),u)!=u){var d=l.lastIndexOf(o);d>-1&&(l=l.slice(0,d))}return l+r},Pn.unescape=function(e){return(e=ya(e))&&Z.test(e)?e.replace(W,dn):e},Pn.uniqueId=function(e){var t=++Ae;return ya(e)+t},Pn.upperCase=Ha,Pn.upperFirst=Ga,Pn.each=ys,Pn.eachRight=vs,Pn.first=Wo,su(Pn,(gu={},vr(Pn,function(e,t){Ie.call(Pn.prototype,t)||(gu[t]=e)}),gu),{chain:!1}),Pn.VERSION="4.17.21",Tt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Pn[e].placeholder=Pn}),Tt(["drop","take"],function(e,t){Bn.prototype[e]=function(n){n=n===i?1:gn(da(n),0);var r=this.__filtered__&&!t?new Bn(this):this.clone();return r.__filtered__?r.__takeCount__=yn(n,r.__takeCount__):r.__views__.push({size:yn(n,d),type:e+(r.__dir__<0?"Right":"")}),r},Bn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),Tt(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;Bn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:oo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),Tt(["head","last"],function(e,t){var n="take"+(t?"Right":"");Bn.prototype[e]=function(){return this[n](1).value()[0]}}),Tt(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");Bn.prototype[e]=function(){return this.__filtered__?new Bn(this):this[n](1)}}),Bn.prototype.compact=function(){return this.filter(nu)},Bn.prototype.find=function(e){return this.filter(e).head()},Bn.prototype.findLast=function(e){return this.reverse().find(e)},Bn.prototype.invokeMap=Zr(function(e,t){return"function"==typeof e?new Bn(this):this.map(function(n){return Mr(n,e,t)})}),Bn.prototype.reject=function(e){return this.filter(As(oo(e)))},Bn.prototype.slice=function(e,t){e=da(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Bn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=da(t))<0?n.dropRight(-t):n.take(t-e)),n)},Bn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Bn.prototype.toArray=function(){return this.take(d)},vr(Bn.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Pn[r?"take"+("last"==t?"Right":""):t],s=r||/^find/.test(t);o&&(Pn.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,u=t instanceof Bn,l=a[0],c=u||Ks(t),f=function(e){var t=o.apply(Pn,Lt([e],a));return r&&h?t[0]:t};c&&n&&"function"==typeof l&&1!=l.length&&(u=c=!1);var h=this.__chain__,d=!!this.__actions__.length,p=s&&!h,m=u&&!d;if(!s&&c){t=m?t:new Bn(this);var g=e.apply(t,a);return g.__actions__.push({func:hs,args:[f],thisArg:i}),new Fn(g,h)}return p&&m?e.apply(this,a):(g=this.thru(f),p?r?g.value()[0]:g.value():g)})}),Tt(["pop","push","shift","sort","splice","unshift"],function(e){var t=Me[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Pn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Ks(i)?i:[],e)}return this[n](function(n){return t.apply(Ks(n)?n:[],e)})}}),vr(Bn.prototype,function(e,t){var n=Pn[t];if(n){var r=n.name+"";Ie.call(Dn,r)||(Dn[r]=[]),Dn[r].push({name:t,func:n})}}),Dn[ji(i,2).name]=[{name:"wrapper",func:i}],Bn.prototype.clone=function(){var e=new Bn(this.__wrapped__);return e.__actions__=Oi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Oi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Oi(this.__views__),e},Bn.prototype.reverse=function(){if(this.__filtered__){var e=new Bn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Bn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ks(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Pn.prototype.plant=function(e){for(var t,n=this;n instanceof zn;){var r=Po(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},Pn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Bn){var t=e;return this.__actions__.length&&(t=new Bn(this)),(t=t.reverse()).__actions__.push({func:hs,args:[Xo],thisArg:i}),new Fn(t,this.__chain__)}return this.thru(Xo)},Pn.prototype.toJSON=Pn.prototype.valueOf=Pn.prototype.value=function(){return fi(this.__wrapped__,this.__actions__)},Pn.prototype.first=Pn.prototype.head,Ge&&(Pn.prototype[Ge]=function(){return this}),Pn}();ft._=pn,(r=function(){return pn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},2770:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9746);t.default=function(e){if(!(0,r.default)(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)}},2829:(e,t)=>{"use strict";function n(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function r(e,t){return e<>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=[1518500249,1859775393,2400959708,3395469782],i=[1732584193,4023233417,2562383102,271733878,3285377520],o=new Uint8Array(e.length+1);o.set(e),o[e.length]=128;const s=(e=o).length/4+2,a=Math.ceil(s/16),u=new Array(a);for(let t=0;t>>0;f=c,c=l,l=r(a,30)>>>0,a=s,s=u}i[0]=i[0]+s>>>0,i[1]=i[1]+a>>>0,i[2]=i[2]+l>>>0,i[3]=i[3]+c>>>0,i[4]=i[4]+f>>>0}return Uint8Array.of(i[0]>>24,i[0]>>16,i[0]>>8,i[0],i[1]>>24,i[1]>>16,i[1]>>8,i[1],i[2]>>24,i[2]>>16,i[2]>>8,i[2],i[3]>>24,i[3]>>16,i[3]>>8,i[3],i[4]>>24,i[4]>>16,i[4]>>8,i[4])}},2988:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=t.stringToBytes=void 0;const r=n(1797),i=n(6011);function o(e){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let n=0;nn(void 0,void 0,void 0,function*(){const{cursor:t,outline:n,api:r,e:i}=e,o=t.get().previousElementSibling;if(o&&!o.classList.contains("nodeContent")&&i.shiftKey){const e=n.swapNodeWithPreviousSibling(t.getIdOfNode()),i=yield n.renderNode(e.parentNode);n.isTreeRoot(e.parentNode.id)?t.get().parentElement.innerHTML=i:t.get().parentElement.outerHTML=i,t.set(`#id-${e.targetNode.id}`),r.save(n)}})}},3298:(e,t,n)=>{"use strict";var r,i=n(2341),o=n(717);function s(e){return{isFile:e.isFile,isDirectory:e.isDirectory,isSymlink:e.isSymlink,size:e.size,mtime:null!==e.mtime?new Date(e.mtime):null,atime:null!==e.atime?new Date(e.atime):null,birthtime:null!==e.birthtime?new Date(e.birthtime):null,readonly:e.readonly,fileAttributes:e.fileAttributes,dev:e.dev,ino:e.ino,mode:e.mode,nlink:e.nlink,uid:e.uid,gid:e.gid,rdev:e.rdev,blksize:e.blksize,blocks:e.blocks}}t.SeekMode=void 0,(r=t.SeekMode||(t.SeekMode={}))[r.Start=0]="Start",r[r.Current=1]="Current",r[r.End=2]="End";class a extends o.Resource{async read(e){if(0===e.byteLength)return 0;const t=await o.invoke("plugin:fs|read",{rid:this.rid,len:e.byteLength}),n=function(e){const t=new Uint8ClampedArray(e),n=t.byteLength;let r=0;for(let e=0;ee instanceof URL?e.toString():e),options:n,onEvent:i}),a=new l(s);return()=>{a.close()}}Object.defineProperty(t,"BaseDirectory",{enumerable:!0,get:function(){return i.BaseDirectory}}),t.FileHandle=a,t.copyFile=async function(e,t,n){if(e instanceof URL&&"file:"!==e.protocol||t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");await o.invoke("plugin:fs|copy_file",{fromPath:e instanceof URL?e.toString():e,toPath:t instanceof URL?t.toString():t,options:n})},t.create=async function(e,t){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");const n=await o.invoke("plugin:fs|create",{path:e instanceof URL?e.toString():e,options:t});return new a(n)},t.exists=async function(e,t){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");return await o.invoke("plugin:fs|exists",{path:e instanceof URL?e.toString():e,options:t})},t.lstat=async function(e,t){return s(await o.invoke("plugin:fs|lstat",{path:e instanceof URL?e.toString():e,options:t}))},t.mkdir=async function(e,t){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");await o.invoke("plugin:fs|mkdir",{path:e instanceof URL?e.toString():e,options:t})},t.open=u,t.readDir=async function(e,t){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");return await o.invoke("plugin:fs|read_dir",{path:e instanceof URL?e.toString():e,options:t})},t.readFile=async function(e,t){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");const n=await o.invoke("plugin:fs|read_file",{path:e instanceof URL?e.toString():e,options:t});return n instanceof ArrayBuffer?new Uint8Array(n):Uint8Array.from(n)},t.readTextFile=async function(e,t){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");const n=await o.invoke("plugin:fs|read_text_file",{path:e instanceof URL?e.toString():e,options:t}),r=n instanceof ArrayBuffer?n:Uint8Array.from(n);return(new TextDecoder).decode(r)},t.readTextFileLines=async function(e,t){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");const n=e instanceof URL?e.toString():e;return await Promise.resolve({path:n,rid:null,async next(){null===this.rid&&(this.rid=await o.invoke("plugin:fs|read_text_file_lines",{path:n,options:t}));const e=await o.invoke("plugin:fs|read_text_file_lines_next",{rid:this.rid}),r=e instanceof ArrayBuffer?new Uint8Array(e):Uint8Array.from(e),i=1===r[r.byteLength-1];return i?(this.rid=null,{value:null,done:i}):{value:(new TextDecoder).decode(r.slice(0,r.byteLength)),done:i}},[Symbol.asyncIterator](){return this}})},t.remove=async function(e,t){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");await o.invoke("plugin:fs|remove",{path:e instanceof URL?e.toString():e,options:t})},t.rename=async function(e,t,n){if(e instanceof URL&&"file:"!==e.protocol||t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");await o.invoke("plugin:fs|rename",{oldPath:e instanceof URL?e.toString():e,newPath:t instanceof URL?t.toString():t,options:n})},t.size=async function(e){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");return await o.invoke("plugin:fs|size",{path:e instanceof URL?e.toString():e})},t.stat=async function(e,t){return s(await o.invoke("plugin:fs|stat",{path:e instanceof URL?e.toString():e,options:t}))},t.truncate=async function(e,t,n){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");await o.invoke("plugin:fs|truncate",{path:e instanceof URL?e.toString():e,len:t,options:n})},t.watch=async function(e,t,n){return await c(e,t,{delayMs:2e3,...n})},t.watchImmediate=async function(e,t,n){return await c(e,t,{...n,delayMs:void 0})},t.writeFile=async function(e,t,n){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");if(t instanceof ReadableStream){const r=await u(e,{create:!0,...n}),i=t.getReader();try{for(;;){const{done:e,value:t}=await i.read();if(e)break;await r.write(t)}}finally{i.releaseLock(),await r.close()}}else await o.invoke("plugin:fs|write_file",t,{headers:{path:encodeURIComponent(e instanceof URL?e.toString():e),options:JSON.stringify(n)}})},t.writeTextFile=async function(e,t,n){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");const r=new TextEncoder;await o.invoke("plugin:fs|write_text_file",r.encode(t),{headers:{path:encodeURIComponent(e instanceof URL?e.toString():e),options:JSON.stringify(n)}})}},3417:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.lift=void 0,t.lift={context:"navigation",keys:["shift + h"],description:"Lift the current node to be a sibling of the parent node",action:e=>n(void 0,void 0,void 0,function*(){const{e:t,cursor:n,outline:r,api:i}=e;if(t.shiftKey){if(r.data.tree.children.map(e=>e.id).includes(n.getIdOfNode()))return;const e=r.liftNodeToParent(n.getIdOfNode()),t=yield r.renderNode(e.parentNode);r.isTreeRoot(e.parentNode.id)?n.get().parentElement.parentElement.innerHTML=t:n.get().parentElement.parentElement.outerHTML=t,n.set(`#id-${e.targetNode.id}`),i.save(r)}})}},3465:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="00000000-0000-0000-0000-000000000000"},3727:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.lower=void 0,t.lower={context:"navigation",keys:["shift + l"],description:"Lower the current node to be a child of the previous sibling node",action:e=>n(void 0,void 0,void 0,function*(){const{e:t,outline:n,cursor:r,api:i}=e;if(t.shiftKey){const e=n.lowerNodeToChild(r.getIdOfNode()),t=yield n.renderNode(e.oldParentNode);n.isTreeRoot(e.oldParentNode.id)?r.get().parentElement.innerHTML=t:r.get().parentElement.outerHTML=t,r.set(`#id-${e.targetNode.id}`),i.save(n)}})}},3779:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);t.default={randomUUID:n}},3985:function(e,t,n){"use strict";var r,i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),s=0;s{f.default.withContext(e.context,()=>{f.default.bind(e.keys,t=>a(void 0,void 0,void 0,function*(){e.action({e:t,outline:k,cursor:x,api:S,search:T})}))})}),f.default.withContext("navigation",()=>{f.default.bind("ctrl + o",e=>a(void 0,void 0,void 0,function*(){const e=yield(0,m.openOutlineSelector)();if(!e.filename||!e.filename.length)return;const t=yield S.loadOutline(e.filename.split(".json")[0]);k=new l.Outline(t),O().innerHTML=yield k.render(),x.resetCursor(),yield T.reset(),yield T.indexBatch(k.data.contentNodes),document.getElementById("outlineName").innerHTML=k.data.name})),f.default.bind("ctrl + n",e=>a(void 0,void 0,void 0,function*(){M()}))}),T.onTermSelection=e=>{C(document.getElementById(`id-${e}`).parentElement),x.set(`#id-${e}`),S.save(k)},function(){a(this,void 0,void 0,function*(){const e=w.ThemeManager.getInstance();try{yield e.init(),console.log("Theme system initialized successfully")}catch(e){console.error("Failed to initialize theme system:",e)}yield S.createDirStructureIfNotExists();const t=(0,m.loadOutlineModal)();t.on("createOutline",()=>{M(),t.remove(),(0,g.bindOutlineRenamer)().on("attemptedRename",e=>a(this,void 0,void 0,function*(){try{yield S.renameOutline(k.data.name,e),k.data.name=e,yield S.saveOutline(k),document.getElementById("outlineName").innerHTML=k.data.name,t.remove()}catch(e){console.log(e)}}))}),t.on("loadOutline",e=>a(this,void 0,void 0,function*(){const n=yield S.loadOutline(e.split(".json")[0]);k=new l.Outline(n),O().innerHTML=yield k.render(),x.resetCursor(),document.getElementById("outlineName").innerHTML=k.data.name,f.default.setContext("navigation"),t.remove(),(0,g.bindOutlineRenamer)().on("attemptedRename",(e,t)=>a(this,void 0,void 0,function*(){try{yield S.renameOutline(k.data.name,e),k.data.name=e,yield S.saveOutline(k),document.getElementById("outlineName").innerHTML=k.data.name,t.remove()}catch(e){console.log(e)}})),T.createIndex({id:"string",content:"string"}).then(()=>a(this,void 0,void 0,function*(){yield T.indexBatch(k.data.contentNodes)}))})),t.show(),D()})}()},4025:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.themeSelector=void 0;const i=n(9630);t.themeSelector={context:"navigation",keys:["ctrl + t"],description:"Open theme selector",action:e=>r(void 0,void 0,void 0,function*(){(0,i.openThemeSelector)()})}},4161:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AllShortcuts=void 0;const r=n(587),i=n(9168),o=n(7167),s=n(1062),a=n(7802),u=n(1760),l=n(9342),c=n(6801),f=n(4488),h=n(5457),d=n(6656),p=n(6279),m=n(3417),g=n(3727),y=n(2993),v=n(7100),b=n(1238),w=n(4025);t.AllShortcuts=[r.sidebarToggle,w.themeSelector,i.j,o.k,s.l,a.h,u.z,l.$,c.i,f.archive,h.tab,d.enter,p.d,m.lift,g.lower,y.swapUp,v.swapDown,b.escapeEditing]},4299:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateV7State=void 0;const r=n(2291),i=n(6011),o={};function s(e,t,n){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=n[6]<<23|n[7]<<16|n[8]<<8|n[9],e.msecs=t):(e.seq=e.seq+1|0,0===e.seq&&e.msecs++),e}function a(e,t,n,r,i=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(r){if(i<0||i+16>r.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`)}else r=new Uint8Array(16),i=0;return t??=Date.now(),n??=127*e[6]<<24|e[7]<<16|e[8]<<8|e[9],r[i++]=t/1099511627776&255,r[i++]=t/4294967296&255,r[i++]=t/16777216&255,r[i++]=t/65536&255,r[i++]=t/256&255,r[i++]=255&t,r[i++]=112|n>>>28&15,r[i++]=n>>>20&255,r[i++]=128|n>>>14&63,r[i++]=n>>>6&255,r[i++]=n<<2&255|3&e[10],r[i++]=e[11],r[i++]=e[12],r[i++]=e[13],r[i++]=e[14],r[i++]=e[15],r}t.updateV7State=s,t.default=function(e,t,n){let u;if(e)u=a(e.random??e.rng?.()??(0,r.default)(),e.msecs,e.seq,t,n);else{const e=Date.now(),i=(0,r.default)();s(o,e,i),u=a(i,o.msecs,o.seq,t,n)}return t??(0,i.unsafeStringify)(u)}},4300:function(e,t,n){"use strict";var r,i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),s=0;s!e.isDirectory)})}loadOutline(e){return a(this,void 0,void 0,function*(){const t=yield f.readTextFile(`outliner/${(0,l.slugify)(e)}.json`,{baseDir:f.BaseDirectory.AppLocalData}),n=JSON.parse(t),r=c.uniq(JSON.stringify(n.tree).match(/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi));r.shift();const i=yield Promise.allSettled(c.map(r,e=>f.readTextFile(`outliner/contentNodes/${e}.json`,{baseDir:f.BaseDirectory.AppLocalData})));return{id:n.id,version:n.version,created:n.created,name:n.name,tree:n.tree,contentNodes:c.keyBy(c.map(i,e=>{if("fulfilled"===e.status)return u.ContentNode.Create(JSON.parse(e.value));console.log("rejected node",e.reason)}),e=>e.id)}})}saveOutline(e){return a(this,void 0,void 0,function*(){yield f.writeTextFile(`outliner/${(0,l.slugify)(e.data.name)}.json`,JSON.stringify({id:e.data.id,version:e.data.version,created:e.data.created,name:e.data.name,tree:e.data.tree}),{baseDir:f.BaseDirectory.AppLocalData})})}renameOutline(e,t){return a(this,void 0,void 0,function*(){if(t.length&&e!==t)return f.rename(`outliner/${(0,l.slugify)(e)}.json`,`outliner/${(0,l.slugify)(t)}.json`,{oldPathBaseDir:f.BaseDirectory.AppLocalData,newPathBaseDir:f.BaseDirectory.AppLocalData})})}saveContentNode(e){return a(this,void 0,void 0,function*(){try{yield f.writeTextFile(`outliner/contentNodes/${e.id}.json`,JSON.stringify(e.toJson()),{baseDir:f.BaseDirectory.AppLocalData})}catch(e){console.error(e)}})}save(e){this.state.has("saveTimeout")||this.state.set("saveTimeout",setTimeout(()=>a(this,void 0,void 0,function*(){yield this.saveOutline(e),this.state.delete("saveTimeout")}),2e3))}}},4488:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.archive=void 0,t.archive={context:"navigation",keys:["shift + x"],description:'Mark a node and all its children as "archived"',action:e=>n(void 0,void 0,void 0,function*(){const{e:t,outline:n,cursor:r,api:i}=e;t.preventDefault(),r.get().classList.toggle("strikethrough"),n.getContentNode(r.getIdOfNode()).toggleArchiveStatus(),i.saveContentNode(n.getContentNode(r.getIdOfNode())),i.save(n)})}},4557:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0;const r=n(2829),i=n(2988);var o=n(2988);function s(e,t,n,o){return(0,i.default)(80,r.default,e,t,n,o)}Object.defineProperty(t,"DNS",{enumerable:!0,get:function(){return o.DNS}}),Object.defineProperty(t,"URL",{enumerable:!0,get:function(){return o.URL}}),s.DNS=i.DNS,s.URL=i.URL,t.default=s},5191:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CustomEventEmitter=void 0,t.CustomEventEmitter=class{constructor(){this.eventMap={}}on(e,t){this.eventMap[e]||(this.eventMap[e]=[]),this.eventMap[e].push(t)}emit(e,t){this.eventMap[e]&&this.eventMap[e].forEach(e=>{e.apply(null,t)})}}},5444:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cursor=void 0;const r=n(876);t.Cursor=class{constructor(){}resetCursor(){this.set(".node")}get(){return document.querySelector(".cursor")}getIdOfNode(){return this.get().getAttribute("data-id")}unset(){const e=this.get();e&&e.classList.remove("cursor")}set(e){this.unset();const t=document.querySelector(e);t&&(t.classList.add("cursor"),(0,r.isVisible)(t)||t.scrollIntoView(!0))}collapse(){this.get().classList.remove("expanded"),this.get().classList.add("collapsed")}expand(){this.get().classList.remove("collapsed"),this.get().classList.add("expanded")}isNodeCollapsed(){return this.get().classList.contains("collapsed")}isNodeExpanded(){return this.get().classList.contains("expanded")}}},5457:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.tab=void 0,t.tab={context:"navigation",keys:["tab"],description:"Add a new node as the child of the current node",action:e=>n(void 0,void 0,void 0,function*(){const{e:t,cursor:n,outline:r,api:i}=e;t.preventDefault();const o=r.createChildNode(n.getIdOfNode()),s=yield r.renderNode(o.parentNode);n.get().outerHTML=s,n.set(`#id-${o.node.id}`),i.saveContentNode(o.node),i.save(r)})}},6011:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unsafeStringify=void 0;const r=n(9746),i=[];for(let e=0;e<256;++e)i.push((e+256).toString(16).slice(1));function o(e,t=0){return(i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]).toLowerCase()}t.unsafeStringify=o,t.default=function(e,t=0){const n=o(e,t);if(!(0,r.default)(n))throw TypeError("Stringified UUID is invalid");return n}},6279:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.d=void 0,t.d={context:"navigation",keys:["shift + d"],description:"Delete the current node",action:e=>n(void 0,void 0,void 0,function*(){const{e:t,outline:n,cursor:r,api:i}=e;if(!t.shiftKey)return;const o=n.removeNode(r.getIdOfNode()),s=yield n.renderNode(o.parentNode),a=r.get().previousElementSibling,u=r.get().nextElementSibling;n.isTreeRoot(o.parentNode.id)?r.get().parentElement.innerHTML=s:r.get().parentElement.outerHTML=s,a&&a.getAttribute("data-id")?r.set(`#id-${a.getAttribute("data-id")}`):u&&u.getAttribute("data-id")?r.set(`#id-${u.getAttribute("data-id")}`):r.set(`#id-${o.parentNode.id}`),i.save(n)})}},6356:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(6011),i=n(1425),o=n(6568);t.default=function(e,t,n){e??={},n??=0;let s=(0,i.default)({...e,_v6:!0},new Uint8Array(16));if(s=(0,o.default)(s),t){for(let e=0;e<16;e++)t[n+e]=s[e];return t}return(0,r.unsafeStringify)(s)}},6568:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1797),i=n(6011);t.default=function(e){const t=(n="string"==typeof e?(0,r.default)(e):e,Uint8Array.of((15&n[6])<<4|n[7]>>4&15,(15&n[7])<<4|(240&n[4])>>4,(15&n[4])<<4|(240&n[5])>>4,(15&n[5])<<4|(240&n[0])>>4,(15&n[0])<<4|(240&n[1])>>4,(15&n[1])<<4|(240&n[2])>>4,96|15&n[2],n[3],n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15]));var n;return"string"==typeof e?(0,i.unsafeStringify)(t):t}},6656:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.enter=void 0,t.enter={context:"navigation",keys:["enter"],description:"Add a new node as the sibling of the current node",action:e=>n(void 0,void 0,void 0,function*(){const{e:t,outline:n,cursor:r,api:i}=e;if(t.shiftKey)return;t.preventDefault(),t.preventRepeat();const o=n.createSiblingNode(r.getIdOfNode()),s=yield n.renderNode(o.parentNode);n.isTreeRoot(o.parentNode.id)?r.get().parentElement.innerHTML=s:r.get().parentElement.outerHTML=s,r.set(`#id-${o.node.id}`),i.saveContentNode(o.node),i.save(n)})}},6697:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i},6759:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.help=void 0;const i=n(9492);t.help={context:"navigation",keys:["shift + /"],description:"Display help modal",action:e=>r(void 0,void 0,void 0,function*(){i.helpModal.show()})}},6801:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.i=void 0;const o=i(n(935));t.i={context:"navigation",keys:["i"],description:'Enter "edit" mode and place the cursor at the start of the editable content',action:e=>r(void 0,void 0,void 0,function*(){const{e:t,cursor:n,outline:r}=e;t.preventDefault(),n.get().classList.add("hidden-cursor");const i=n.get().querySelector(".nodeContent");i.innerHTML=r.data.contentNodes[n.getIdOfNode()].content,i.contentEditable="true",i.focus(),o.default.setContext("editing")})}},6928:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.link=function(e){return`
    ${e.text}`}},7100:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.swapDown=void 0,t.swapDown={context:"navigation",keys:["shift + j"],description:"Swap the current node with the next sibling node",action:e=>n(void 0,void 0,void 0,function*(){if(e.cursor.get().nextElementSibling&&e.e.shiftKey){const t=e.outline.swapNodeWithNextSibling(e.cursor.getIdOfNode()),n=yield e.outline.renderNode(t.parentNode);e.outline.isTreeRoot(t.parentNode.id)?e.cursor.get().parentElement.innerHTML=n:e.cursor.get().parentElement.outerHTML=n,e.cursor.set(`#id-${t.targetNode.id}`),e.api.save(e.outline)}})}},7167:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.k=void 0,t.k={context:"navigation",keys:["k"],description:"Move the cursor to the previous sibling of the current node",action:e=>n(void 0,void 0,void 0,function*(){const{cursor:t,e:n}=e,r=t.get().previousElementSibling;r&&!r.classList.contains("nodeContent")&&(n.shiftKey||t.set(`#id-${r.getAttribute("data-id")}`))})}},7670:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.bindOutlineRenamer=function(){const e=s();return(0,i.$)("#outlineName").addEventListener("click",t=>{e.show(),(0,i.$)("#outline-renamer").addEventListener("submit",t=>r(this,void 0,void 0,function*(){t.preventDefault(),t.stopPropagation();const n=(0,i.$)("#new-outline-name").value;e.emit("attemptedRename",[n,e])}))}),e},t.renameOutline=s;const i=n(876),o=n(8013);function s(){return new o.Modal({title:"Rename Outline",escapeExitable:!0},`\n
    \n \n \n
    \n `)}},7802:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.h=void 0,t.h={context:"navigation",keys:["h"],description:"Move the cursor to the parent element of the current node",action:e=>n(void 0,void 0,void 0,function*(){const{e:t,cursor:n}=e,r=n.get().parentElement;r&&r.classList.contains("node")&&(t.shiftKey||n.set(`#id-${r.getAttribute("data-id")}`))})}},8013:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Modal=void 0;const i=n(1031),o=n(182),s=n(5191),a=r(n(935));class u extends s.CustomEventEmitter{constructor(e,t=""){super(),this.options=e,this.content=t,this.name=(0,i.slugify)(this.options.name||this.options.title),this.id=`id-${(0,o.v4)()}`,this.options.escapeExitable&&!this.options.keyboardContext&&(this.options.keyboardContext=(0,i.slugify)(this.options.title)+"kbd-context"),this.options.keyboardContext&&this.options.escapeExitable&&this.makeExitable()}makeExitable(){a.default.withContext(this.options.keyboardContext,()=>{a.default.bind("escape",e=>{this.remove()})})}renderModalTitle(){return this.options.title?`

    ${this.options.title}

    `:""}renderModalContent(){return this.content}renderModal(){return`\n \n `}updateRender(){document.getElementById(this.id).innerHTML=``,this.emit("updated")}isShown(){const e=document.getElementById(this.id);return e&&!e.classList.contains("hidden")}show(){this.isShown()?this.updateRender():(document.querySelector("body").innerHTML+=this.renderModal(),this.options.keyboardContext&&(a.default.setContext(this.options.keyboardContext),this.options.escapeExitable),this.emit("rendered"))}remove(){document.getElementById(this.id).remove(),this.emit("removed"),a.default.setContext("navigation")}}t.Modal=u},8286:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3779),i=n(2291),o=n(6011);t.default=function(e,t,n){if(r.default.randomUUID&&!t&&!e)return r.default.randomUUID();const s=(e=e||{}).random??e.rng?.()??(0,i.default)();if(s.length<16)throw new Error("Random bytes length must be >= 16");if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){if((n=n||0)<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=s[e];return t}return(0,o.unsafeStringify)(s)}},8436:e=>{"use strict";e.exports=JSON.parse('{"id":"e067419a-85c3-422d-b8c4-41690be44500","version":"0.0.1","name":"Sample","created":1674409747467,"tree":{"id":"e067419a-85c3-422d-b8c4-41690be44500","collapsed":false,"children":[{"id":"e067419a-85c3-422d-b8c4-41690be4450d","collapsed":false,"children":[]}]},"contentNodes":{"e067419a-85c3-422d-b8c4-41690be4450d":{"id":"e067419a-85c3-422d-b8c4-41690be4450d","created":1674409747467,"lastUpdated":null,"type":"text","content":"**Welcome to my Outliner**
    ","archived":false,"archivedDate":null,"deleted":false,"deletedDate":null}}}')},8729:function(e,t,n){"use strict";var r,i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),s=0;s{document.getElementById("create-outline").addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),e.emit("createOutline",[t])}),document.getElementById("open-outline-selector").addEventListener("click",t=>a(this,void 0,void 0,function*(){t.preventDefault(),t.stopPropagation();const n=yield h();n&&e.emit("loadOutline",[n.filename])}))}),e};const u=s(n(9403)),l=s(n(2341)),c=n(8013),f='\n

    To begin, either create a new outline or open an existing one.

    \n\n';function h(){return a(this,void 0,void 0,function*(){const e=yield u.open({multiple:!1,defaultPath:yield l.join(yield l.appLocalDataDir(),"outliner"),directory:!1,title:"Select Outline",filters:[{name:"JSON",extensions:["json"]}]});return e?{filename:yield l.basename(e.toString()),fqp:e}:{filename:null,fqp:null}})}},9168:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.j=void 0,t.j={context:"navigation",keys:["j"],description:"Move the cursor to the next sibling of the current node",action:e=>n(void 0,void 0,void 0,function*(){const t=e.cursor.get().nextElementSibling;t&&(e.e.shiftKey||e.cursor.set(`#id-${t.getAttribute("data-id")}`))})}},9342:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.$=void 0;const o=i(n(935));t.$={context:"navigation",keys:["shift + 4"],description:'Enter "Edit" mode and place the cursor at the end of the editable content',action:e=>r(void 0,void 0,void 0,function*(){const{cursor:t,outline:n,e:r}=e;r.preventDefault(),t.get().classList.add("hidden-cursor");const i=t.get().querySelector(".nodeContent");i.innerHTML=n.data.contentNodes[t.getIdOfNode()].content,i.contentEditable="true";const s=document.createRange();s.selectNodeContents(i),s.collapse(!1);const a=window.getSelection();a.removeAllRanges(),a.addRange(s),i.focus(),o.default.setContext("editing")})}},9403:(e,t,n)=>{"use strict";var r=n(717);t.ask=async function(e,t){const n="string"==typeof t?{title:t}:t;return await r.invoke("plugin:dialog|ask",{message:e.toString(),title:n?.title?.toString(),kind:n?.kind,yesButtonLabel:n?.okLabel?.toString(),noButtonLabel:n?.cancelLabel?.toString()})},t.confirm=async function(e,t){const n="string"==typeof t?{title:t}:t;return await r.invoke("plugin:dialog|confirm",{message:e.toString(),title:n?.title?.toString(),kind:n?.kind,okButtonLabel:n?.okLabel?.toString(),cancelButtonLabel:n?.cancelLabel?.toString()})},t.message=async function(e,t){const n="string"==typeof t?{title:t}:t;await r.invoke("plugin:dialog|message",{message:e.toString(),title:n?.title?.toString(),kind:n?.kind,okButtonLabel:n?.okLabel?.toString()})},t.open=async function(e={}){return"object"==typeof e&&Object.freeze(e),await r.invoke("plugin:dialog|open",{options:e})},t.save=async function(e={}){return"object"==typeof e&&Object.freeze(e),await r.invoke("plugin:dialog|save",{options:e})}},9492:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.helpModal=void 0;const r=n(2543),i=n(8013),o=n(4161),s=`\n

    Daily Backup: The daily backup system lets you mash the "Daily Backup" button as much as you'd like.. but will only save the last time you clicked on it. You can only click it once and hour. Your content will always be saved in local-storage as well, but its always good to have a backup system.

    \n \n \n \n \n \n \n \n \n ${(0,r.map)(o.AllShortcuts,e=>`\n \n \n \n \n `).join("\n")}\n \n
    KeyAction
    \n ${e.keys.map(e=>`${e}`).join(" or ")}\n \n ${e.description}\n
    \n`;t.helpModal=new i.Modal({title:"Help",keyboardContext:"help",escapeExitable:!0},s)},9630:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.ThemeSelectorModal=void 0,t.openThemeSelector=function(){const e=new s;return e.show(),e};const i=n(8013),o=n(515);class s extends i.Modal{constructor(){super({title:"Select Theme",keyboardContext:"theme-selector",escapeExitable:!0}),this.themeManager=o.ThemeManager.getInstance(),this.themes=this.themeManager.getAvailableThemes(),this.currentTheme=this.themeManager.getCurrentTheme()}renderModalContent(){return`\n
    \n
    \n ${this.renderThemeList()}\n
    \n
    \n \n \n
    \n
    \n `}renderThemeList(){return this.themes.map(e=>{const t=e.filename.replace(".css","")===this.currentTheme;return`\n
    \n
    \n
    ${e.name}
    \n ${e.author?`
    by ${e.author}
    `:""}\n ${e.description?`
    ${e.description}
    `:""}\n ${e.version?`
    v${e.version}
    `:""}\n
    \n
    \n \n
    \n
    \n `}).join("")}show(){super.show(),this.bindEventListeners()}bindEventListeners(){document.querySelectorAll(".theme-item").forEach(e=>{e.addEventListener("click",e=>{const t=e.currentTarget,n=(t.dataset.theme,t.querySelector('input[type="radio"]'));n&&(n.checked=!0),document.querySelectorAll(".theme-item").forEach(e=>e.classList.remove("active")),t.classList.add("active")})});const e=document.getElementById("apply-theme");e&&e.addEventListener("click",()=>r(this,void 0,void 0,function*(){const e=document.querySelector('input[name="theme-selection"]:checked');if(e){const t=e.value;try{yield this.themeManager.switchTheme(t),this.currentTheme=t,this.emit("theme-changed",[t]),this.remove()}catch(e){console.error("Failed to apply theme:",e)}}}));const t=document.getElementById("cancel-theme");t&&t.addEventListener("click",()=>{this.remove()})}refreshThemeList(){return r(this,void 0,void 0,function*(){this.themes=yield this.themeManager.refreshThemeList(),this.updateRender(),this.bindEventListeners()})}}t.ThemeSelectorModal=s},9746:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(6697);t.default=function(e){return"string"==typeof e&&r.default.test(e)}}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={id:e,loaded:!1,exports:{}};return n[e].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.m=n,i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce((t,n)=>(i.f[n](e,t),t),[])),i.u=e=>e+".bundle.js",i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="outline-browser:",i.l=(n,r,o,s)=>{if(e[n])e[n].push(r);else{var a,u;if(void 0!==o)for(var l=document.getElementsByTagName("script"),c=0;c{a.onerror=a.onload=null,clearTimeout(d);var i=e[n];if(delete e[n],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach(e=>e(r)),t)return t(r)},d=setTimeout(h.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=h.bind(null,a.onerror),a.onload=h.bind(null,a.onload),u&&document.head.appendChild(a)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{var e={792:0};i.f.j=(t,n)=>{var r=i.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise((n,i)=>r=e[t]=[n,i]);n.push(r[2]=o);var s=i.p+i.u(t),a=new Error;i.l(s,n=>{if(i.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),s=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+s+")",a.name="ChunkLoadError",a.type=o,a.request=s,r[1](a)}},"chunk-"+t,t)}};var t=(t,n)=>{var r,o,[s,a,u]=n,l=0;if(s.some(t=>0!==e[t])){for(r in a)i.o(a,r)&&(i.m[r]=a[r]);u&&u(i)}for(t&&t(n);l h1 { margin-bottom: 1rem; @@ -87,7 +88,7 @@ footer { /** SEARCH **/ #search-query { width: 100%; - border: solid 1px #888; + border: solid 1px var(--color-border-dark); padding: 0.5rem; box-sizing: border-box; } @@ -100,19 +101,19 @@ footer { line-height: 1.6rem; } .search-result.selected { - color: #fff; - background-color: #000; + color: var(--color-selected-text); + background-color: var(--color-selected-background); } /** OUTLINER **/ #outliner { - background-color: #fff; - border: solid 1px #ddd; + background-color: var(--color-outliner-background); + border: solid 1px var(--color-border); padding: 2rem 1rem; } .node { - margin: 0 1rem; - color: #222; + margin: 0 0 0 1rem; + color: var(--color-primary-text); } .node.collapsed::before, .node.expanded::before { @@ -121,11 +122,11 @@ footer { padding-right: 5px; } .node.collapsed::before { - color: #222; + color: var(--color-node-collapsed); content: "\25B8"; } .node.expanded::before { - color: #aaa; + color: var(--color-node-expanded); content: "\25B9"; } @@ -139,41 +140,41 @@ footer { min-height: 1.7rem; } .node.cursor.expanded::before { - color: #000; + color: var(--color-cursor-expanded); content: "\25B8"; } .node.cursor.collapsed::before { - color: #fff; + color: var(--color-cursor-collapsed); } .node.cursor > .nodeContent { - color: #fff; - background-color: #000; + color: var(--color-cursor-text); + background-color: var(--color-cursor-background); } .nodeContent img { width: 100%; } .cursor.hidden-cursor > .nodeContent { - color: #000; - background-color: #fff; + color: var(--color-hidden-cursor-text); + background-color: var(--color-hidden-cursor-background); } .strikethrough, .strikethrough .node { text-decoration: line-through; - color: #808080; + color: var(--color-strikethrough); } a { - color: #098bd9; + color: var(--color-link); } .cursor > .nodeContent a { - color: #098bd9; + color: var(--color-link); } a:visited { - color: #b26be4; + color: var(--color-link-visited); } .cursor > .nodeContent a:visited { - color: #b26be4; + color: var(--color-link-visited); } /* DATES */ @@ -182,14 +183,14 @@ a:visited { } .date-header { font-weight: bold; - background-color: #547883; + background-color: var(--color-date-header-background); padding: 0.5rem 1rem; } .date-node-substr { font-weight: normal; - background-color: #eee; + background-color: var(--color-date-node-substr-background); padding: 0.5rem 1rem; - border: solid 0 #888; + border: solid 0 var(--color-date-node-border); border-bottom-width: 1px; line-height: 1rem; font-size: 0.8rem; @@ -211,47 +212,153 @@ h1 { font-size: 1.7rem; } table { - border: solid 1px #ddd; + border: solid 1px var(--color-border); } th { font-weight: bold; - background-color: #666; - color: #fff; + background-color: var(--color-table-header-background); + color: var(--color-table-header-text); } th, td { padding: 0.7rem; } tr:nth-child(even) { - background-color: #eee; + background-color: var(--color-table-even-row); } kbd { - border: solid 1px #aaa; - background-color: #d2d2d2; + border: solid 1px var(--color-kbd-border); + background-color: var(--color-kbd-background); padding: 0 5px; line-height: 1rem; white-space: nowrap; } .button { - background-color: #eee; + background-color: var(--color-button-background); text-align: center; padding: 2rem; - border: solid 1px #888; + border: solid 1px var(--color-border-dark); text-decoration: none; display: inline-block; } .button:hover { - background-color: #f4f4f4; + background-color: var(--color-button-hover); } .button.large { padding: 2rem; } code { font-family: monospace; - background-color: #eee; + background-color: var(--color-code-background); padding: 2px; } .cursor code { - color: #000; + color: var(--color-hidden-cursor-text); +} + +/* Theme Selector Modal */ +.theme-selector { + min-height: 200px; +} + +.theme-list { + max-height: 400px; + overflow-y: auto; + margin-bottom: 1rem; + border: 1px solid var(--color-border); + border-radius: 4px; +} + +.theme-item { + display: flex; + justify-content: space-between; + align-items: center; + padding: 1rem; + border-bottom: 1px solid var(--color-border); + cursor: pointer; + transition: background-color 0.2s; +} + +.theme-item:last-child { + border-bottom: none; +} + +.theme-item:hover { + background-color: var(--color-button-background); +} + +.theme-item.active { + background-color: var(--color-button-hover); +} + +.theme-info { + flex: 1; +} + +.theme-name { + font-weight: bold; + font-size: 1.1rem; + margin-bottom: 0.25rem; +} + +.theme-author { + font-size: 0.9rem; + color: var(--color-secondary-text); + font-style: italic; +} + +.theme-description { + font-size: 0.9rem; + color: var(--color-primary-text); + margin-top: 0.25rem; +} + +.theme-version { + font-size: 0.85rem; + color: var(--color-secondary-text); + margin-top: 0.25rem; +} + +.theme-selection { + display: flex; + align-items: center; + padding-left: 1rem; +} + +.theme-selection input[type="radio"] { + width: 18px; + height: 18px; + cursor: pointer; +} + +.theme-actions { + display: flex; + justify-content: flex-end; + gap: 0.5rem; + padding-top: 1rem; + border-top: 1px solid var(--color-border); +} + +.theme-actions button { + padding: 0.5rem 1.5rem; + border: 1px solid var(--color-border); + background-color: var(--color-button-background); + cursor: pointer; + border-radius: 4px; + font-size: 1rem; +} + +.theme-actions button:hover { + background-color: var(--color-button-hover); +} + +.theme-actions button.primary { + background-color: var(--color-cursor-background); + color: var(--color-cursor-text); + border-color: var(--color-cursor-background); +} + +.theme-actions button.primary:hover { + opacity: 0.9; } diff --git a/public/assets/themes/dark.css b/public/assets/themes/dark.css new file mode 100644 index 0000000..fd8138c --- /dev/null +++ b/public/assets/themes/dark.css @@ -0,0 +1,57 @@ +/* +name: Dark Theme +author: Angelo Rodrigues +version: 1.0.0 +description: The original dark color scheme +*/ + +:root { + /* Background colors */ + --color-body-background: #000; + --color-outliner-background: #1A1A19; + --color-modal-background: #1A1A19; + --color-button-background: #31511E; + --color-button-hover: #859F3D; + + --color-code-background: #eee; + --color-kbd-background: #859F3D; + --color-table-even-row: #1c2616; + --color-date-node-substr-background: #eee; + + /* Text colors */ + --color-primary-text: #F6FCDF; + --color-secondary-text: #F6FCDF; + --color-strikethrough: #808080; + --color-table-header-text: #F6FCDF; + + /* Link colors */ + --color-link: #F6FCDF; + --color-link-visited: #b26be4; + + /* Interactive states */ + --color-cursor-background: #31511E; + --color-cursor-text: #F6FCDF; + --color-selected-background: #31511E; + --color-selected-text: #F6FCDF; + --color-hidden-cursor-background: #F6FCDF; + --color-hidden-cursor-text: #31511E; + + /* Border colors */ + --color-border: #393E46; + --color-border-dark: #393E46; + --color-kbd-border: #859F3D; + --color-date-node-border: #DFD0B8; + + /* Node expansion indicators */ + --color-node-collapsed: #F6FCDF; + --color-node-expanded: #F6FCDF; + --color-cursor-expanded: #F6FCDF; + --color-cursor-collapsed: #F6FCDF; + + /* Specialized elements */ + --color-date-header-background: #547883; + --color-table-header-background: #31511E; + + /* Shadow and effects */ + --color-modal-shadow: rgba(0, 0, 0, 0.7); +} diff --git a/public/assets/themes/default.css b/public/assets/themes/default.css new file mode 100644 index 0000000..c5d36ad --- /dev/null +++ b/public/assets/themes/default.css @@ -0,0 +1,56 @@ +/* +name: Default Theme +author: Angelo Rodrigues +version: 1.0.0 +description: The original light color scheme +*/ + +:root { + /* Background colors */ + --color-body-background: #eee; + --color-outliner-background: #fff; + --color-modal-background: #fff; + --color-button-background: #eee; + --color-button-hover: #f4f4f4; + --color-code-background: #eee; + --color-kbd-background: #d2d2d2; + --color-table-even-row: #eee; + --color-date-node-substr-background: #eee; + + /* Text colors */ + --color-primary-text: #222; + --color-secondary-text: #aaa; + --color-strikethrough: #808080; + --color-table-header-text: #fff; + + /* Link colors */ + --color-link: #098bd9; + --color-link-visited: #b26be4; + + /* Interactive states */ + --color-cursor-background: #000; + --color-cursor-text: #fff; + --color-selected-background: #000; + --color-selected-text: #fff; + --color-hidden-cursor-background: #fff; + --color-hidden-cursor-text: #000; + + /* Border colors */ + --color-border: #ddd; + --color-border-dark: #888; + --color-kbd-border: #aaa; + --color-date-node-border: #888; + + /* Node expansion indicators */ + --color-node-collapsed: #222; + --color-node-expanded: #aaa; + --color-cursor-expanded: #000; + --color-cursor-collapsed: #fff; + + /* Specialized elements */ + --color-date-header-background: #547883; + --color-table-header-background: #666; + + /* Shadow and effects */ + --color-modal-shadow: rgba(0, 0, 0, 0.7); +} \ No newline at end of file diff --git a/public/index.html b/public/index.html index d542c9d..a549f5d 100644 --- a/public/index.html +++ b/public/index.html @@ -3,6 +3,7 @@ Outliner + diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 921199b..e00ad15 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -11,12 +11,6 @@ dependencies = [ "gimli", ] -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - [[package]] name = "adler2" version = "2.0.1" @@ -64,9 +58,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.69" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800" +checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100" [[package]] name = "app" @@ -181,7 +175,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -210,13 +204,13 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.88" +version = "0.1.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" +checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -250,9 +244,9 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.1.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "backtrace" @@ -263,18 +257,12 @@ dependencies = [ "addr2line", "cfg-if", "libc", - "miniz_oxide 0.8.9", + "miniz_oxide", "object", "rustc-demangle", "windows-targets 0.52.6", ] -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - [[package]] name = "base64" version = "0.21.7" @@ -295,18 +283,18 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.9.1" +version = "2.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" +checksum = "34efbcccd345379ca2868b2b2c9d3782e9cc58ba87bc7d79d5b53d9c9ae6f25d" dependencies = [ "serde", ] [[package]] name = "block-buffer" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ "generic-array", ] @@ -326,7 +314,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "340d2f0bdb2a43c1d3cd40513185b2bd7def0aa1052f956455114bc98f82dcf2" dependencies = [ - "objc2 0.6.1", + "objc2 0.6.2", ] [[package]] @@ -344,9 +332,9 @@ dependencies = [ [[package]] name = "brotli" -version = "8.0.1" +version = "8.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9991eea70ea4f293524138648e41ee89b0b2b12ddef3b255effa43c8056e0e0d" +checksum = "4bd8b9603c7aa97359dbd97ecf258968c95f3adddd6db2f7e7a5bef101c84560" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -365,27 +353,27 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.12.0" +version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" +checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" [[package]] name = "bytemuck" -version = "1.13.0" +version = "1.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c041d3eab048880cb0b86b256447da3f18859a163c3b8d8893f4e6368abe6393" +checksum = "3995eaeebcdf32f91f980d360f78732ddc061097ab4e39991ae7a6ace9194677" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.4.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" dependencies = [ "serde", ] @@ -396,7 +384,7 @@ version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.3", "cairo-sys-rs", "glib", "libc", @@ -417,9 +405,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.11" +version = "1.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d07aa9a93b00c76f71bc35d598bed923f6d4f3a9ca5c24b7737ae1a292841c0" +checksum = "dd0b03af37dad7a14518b7691d81acb0f8222604ad3d1b02f6b4bed5188c0cd5" dependencies = [ "serde", ] @@ -441,10 +429,10 @@ checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba" dependencies = [ "camino", "cargo-platform", - "semver 1.0.16", + "semver", "serde", "serde_json", - "thiserror 2.0.14", + "thiserror 2.0.16", ] [[package]] @@ -459,9 +447,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.32" +version = "1.2.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2352e5597e9c544d5e6d9c95190d5d27738ade584fa8db0a16e130e5c2b5296e" +checksum = "42bc4aea80032b7bf409b0bc7ccad88853858911b7713a8062fdc0623867bedc" dependencies = [ "shlex", ] @@ -485,18 +473,19 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.11.0" +version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0357a6402b295ca3a86bc148e84df46c02e41f41fef186bda662557ef6328aa" +checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" dependencies = [ "smallvec", + "target-lexicon", ] [[package]] name = "cfg-if" -version = "1.0.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" [[package]] name = "cfg_aliases" @@ -519,9 +508,9 @@ dependencies = [ [[package]] name = "combine" -version = "4.6.6" +version = "4.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" dependencies = [ "bytes", "memchr", @@ -574,7 +563,7 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.3", "core-foundation", "core-graphics-types", "foreign-types", @@ -587,47 +576,43 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.3", "core-foundation", "libc", ] [[package]] name = "cpufeatures" -version = "0.2.5" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" dependencies = [ "libc", ] [[package]] name = "crc32fast" -version = "1.3.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.6" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" +checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" dependencies = [ - "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.14" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" -dependencies = [ - "cfg-if", -] +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crypto-common" @@ -653,17 +638,17 @@ dependencies = [ "proc-macro2", "quote", "smallvec", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] name = "cssparser-macros" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfae75de57f2b2e85e8768c3ea840fd159c8f33e2b6522c7835b7abac81be16e" +checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 1.0.107", + "syn 2.0.106", ] [[package]] @@ -673,7 +658,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a2785755761f3ddc1492979ce1e48d2c00d09311c39e4466429188f3dd6501" dependencies = [ "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -697,7 +682,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -708,7 +693,7 @@ checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ "darling_core", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -729,27 +714,27 @@ checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] name = "derive_more" -version = "0.99.17" +version = "0.99.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "6edb4b64a43d977b8e99788fe3a04d483834fba1215a7e02caa415b626497f7f" dependencies = [ "convert_case", "proc-macro2", "quote", - "rustc_version 0.4.0", - "syn 1.0.107", + "rustc_version", + "syn 2.0.106", ] [[package]] name = "digest" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", "crypto-common", @@ -788,8 +773,8 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" dependencies = [ - "bitflags 2.9.1", - "objc2 0.6.1", + "bitflags 2.9.3", + "objc2 0.6.2", ] [[package]] @@ -800,7 +785,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -814,9 +799,9 @@ dependencies = [ [[package]] name = "dlopen2" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1297103d2bbaea85724fcee6294c2d50b1081f9ad47d0f6f6f61eda65315a6" +checksum = "b54f373ccf864bf587a89e880fb7610f8d73f3045f13580948ccbcaff26febff" dependencies = [ "dlopen2_derive", "libc", @@ -832,7 +817,7 @@ checksum = "788160fb30de9cdd857af31c6a2675904b16ece8fc2737b2c7127ba368c9d0f4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -852,24 +837,24 @@ dependencies = [ [[package]] name = "dtoa" -version = "0.4.8" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" +checksum = "d6add3b8cff394282be81f3fc1a0605db594ed69890078ca6e2cab1c408bcf04" [[package]] name = "dtoa-short" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bde03329ae10e79ede66c9ce4dc930aa8599043b0743008548680f25b91502d6" +checksum = "cd1511a7b6a56299bd043a9c167a6d2bfb37bf84a6dfceaba651168adfb43c87" dependencies = [ "dtoa", ] [[package]] name = "dunce" -version = "1.0.3" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bd4b30a6560bbd9b4620f4de34c3f14f60848e58a9b7216801afcb4c7b31c3c" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "dyn-clone" @@ -885,7 +870,7 @@ checksum = "4c6d81016d6c977deefb2ef8d8290da019e27cc26167e102185da528e6c0ab38" dependencies = [ "cc", "memchr", - "rustc_version 0.4.0", + "rustc_version", "toml 0.9.5", "vswhom", "winreg", @@ -899,9 +884,9 @@ checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7" [[package]] name = "encoding_rs" -version = "0.8.32" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] @@ -930,7 +915,7 @@ checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -982,37 +967,37 @@ dependencies = [ [[package]] name = "fastrand" -version = "1.8.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" -dependencies = [ - "instant", -] +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] -name = "fastrand" -version = "2.3.0" +name = "fdeflate" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" +checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" +dependencies = [ + "simd-adler32", +] [[package]] name = "field-offset" -version = "0.3.4" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e1c54951450cbd39f3dbcf1005ac413b49487dabf18a720ad2383eccfeffb92" +checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" dependencies = [ - "memoffset 0.6.5", - "rustc_version 0.3.3", + "memoffset", + "rustc_version", ] [[package]] name = "flate2" -version = "1.0.25" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" +checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" dependencies = [ "crc32fast", - "miniz_oxide 0.6.2", + "miniz_oxide", ] [[package]] @@ -1039,7 +1024,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -1050,9 +1035,9 @@ checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" [[package]] name = "form_urlencoded" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" dependencies = [ "percent-encoding", ] @@ -1069,9 +1054,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.26" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e5317663a9089767a1ec00a487df42e0ca174b61b4483213ac24448e4664df5" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", ] @@ -1084,9 +1069,9 @@ checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.26" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8de0a35a6ab97ec8869e32a2473f4b1324459e14c29275d14b10cb1fd19b50e" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -1105,7 +1090,7 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" dependencies = [ - "fastrand 2.3.0", + "fastrand", "futures-core", "futures-io", "parking", @@ -1120,7 +1105,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -1262,9 +1247,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.6" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -1283,13 +1268,13 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.8" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi 0.11.1+wasi-snapshot-preview1", ] [[package]] @@ -1348,7 +1333,7 @@ version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.3", "futures-channel", "futures-core", "futures-executor", @@ -1376,7 +1361,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -1391,9 +1376,9 @@ dependencies = [ [[package]] name = "glob" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" [[package]] name = "gobject-sys" @@ -1451,11 +1436,11 @@ version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52ff3c5b21f14f0736fed6dcfc0bfb4225ebf5725f3c0209edeec181e4d73e9d" dependencies = [ - "proc-macro-crate 1.3.0", + "proc-macro-crate 1.3.1", "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -1548,18 +1533,20 @@ checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "hyper" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" +checksum = "eb3aa54a13a0dfe7fbe3a59e0c76093041720fdc77b110cc0fc260fafb4dc51e" dependencies = [ + "atomic-waker", "bytes", "futures-channel", - "futures-util", + "futures-core", "http", "http-body", "httparse", "itoa", "pin-project-lite", + "pin-utils", "smallvec", "tokio", "want", @@ -1567,20 +1554,24 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.7" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" +checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e" dependencies = [ + "base64 0.22.1", "bytes", "futures-channel", + "futures-core", "futures-util", "http", "http-body", "hyper", + "ipnet", + "libc", + "percent-encoding", "pin-project-lite", - "socket2 0.5.10", + "socket2", "tokio", - "tower", "tower-service", "tracing", ] @@ -1713,9 +1704,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "1.0.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" dependencies = [ "idna_adapter", "smallvec", @@ -1734,9 +1725,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown 0.12.3", @@ -1745,9 +1736,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.10.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" +checksum = "f2481980430f9f78649238835720ddccc57e52df14ffce1c6f37391d61b563e9" dependencies = [ "equivalent", "hashbrown 0.15.5", @@ -1763,22 +1754,13 @@ dependencies = [ "cfb", ] -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - [[package]] name = "io-uring" -version = "0.7.9" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4" +checksum = "046fa2d4d00aea763528b4950358d0ead425372445dc8ff86312b3c69ff7727b" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.3", "cfg-if", "libc", ] @@ -1789,6 +1771,16 @@ version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" +[[package]] +name = "iri-string" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" +dependencies = [ + "memchr", + "serde", +] + [[package]] name = "is-docker" version = "0.2.0" @@ -1810,9 +1802,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.5" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "javascriptcore-rs" @@ -1897,7 +1889,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b750dcadc39a09dbadd74e118f6dd6598df77fa01df0cfcdc52c28dece74528a" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.3", "serde", "unicode-segmentation", ] @@ -1910,15 +1902,15 @@ checksum = "02cb977175687f33fa4afa0c95c112b987ea1443e5a51c8f8ff27dc618270cc2" dependencies = [ "cssparser", "html5ever", - "indexmap 2.10.0", + "indexmap 2.11.0", "selectors", ] [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libappindicator" @@ -1976,19 +1968,10 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "391290121bad3d37fbddad76d8f5d1c1c314cfc646d143d7e07a3086ddff0ce3" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.3", "libc", ] -[[package]] -name = "line-wrap" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30344350a2a51da54c1d53be93fade8a237e545dbcc4bdbe635413f2117cab9" -dependencies = [ - "safemem", -] - [[package]] name = "linux-raw-sys" version = "0.9.4" @@ -2003,9 +1986,9 @@ checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" [[package]] name = "lock_api" -version = "0.4.9" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" dependencies = [ "autocfg", "scopeguard", @@ -2045,7 +2028,7 @@ checksum = "88a9689d8d44bf9964484516275f5cd4c9b59457a6940c1d5d0ecbb94510a36b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -2060,15 +2043,6 @@ version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" -[[package]] -name = "memoffset" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" -dependencies = [ - "autocfg", -] - [[package]] name = "memoffset" version = "0.9.1" @@ -2084,15 +2058,6 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" -[[package]] -name = "miniz_oxide" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" -dependencies = [ - "adler", -] - [[package]] name = "miniz_oxide" version = "0.8.9" @@ -2100,6 +2065,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ "adler2", + "simd-adler32", ] [[package]] @@ -2109,7 +2075,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" dependencies = [ "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi 0.11.1+wasi-snapshot-preview1", "windows-sys 0.59.0", ] @@ -2123,14 +2089,14 @@ dependencies = [ "dpi", "gtk", "keyboard-types", - "objc2 0.6.1", + "objc2 0.6.2", "objc2-app-kit 0.3.1", "objc2-core-foundation", "objc2-foundation 0.3.1", "once_cell", "png", "serde", - "thiserror 2.0.14", + "thiserror 2.0.16", "windows-sys 0.60.2", ] @@ -2140,7 +2106,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.3", "jni-sys", "log", "ndk-sys", @@ -2166,9 +2132,9 @@ dependencies = [ [[package]] name = "new_debug_unreachable" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" [[package]] name = "nix" @@ -2176,10 +2142,10 @@ version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.3", "cfg-if", "libc", - "memoffset 0.9.1", + "memoffset", ] [[package]] @@ -2188,15 +2154,6 @@ version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" -[[package]] -name = "nom8" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae01545c9c7fc4486ab7debaf2aad7003ac19431791868fb2e8066df97fad2f8" -dependencies = [ - "memchr", -] - [[package]] name = "num-conv" version = "0.1.0" @@ -2205,9 +2162,9 @@ checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] @@ -2228,10 +2185,10 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77e878c846a8abae00dd069496dbe8751b16ac1c3d6bd2a7283a938e8228f90d" dependencies = [ - "proc-macro-crate 1.3.0", + "proc-macro-crate 2.0.2", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -2252,9 +2209,9 @@ dependencies = [ [[package]] name = "objc2" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88c6597e14493ab2e44ce58f2fdecf095a51f12ca57bec060a11c57332520551" +checksum = "561f357ba7f3a2a61563a186a163d0a3a5247e1089524a3981d49adb775078bc" dependencies = [ "objc2-encode", "objc2-exception-helper", @@ -2266,7 +2223,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.3", "block2 0.5.1", "libc", "objc2 0.5.2", @@ -2282,10 +2239,10 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6f29f568bec459b0ddff777cec4fe3fd8666d82d5a40ebd0ff7e66134f89bcc" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.3", "block2 0.6.1", "libc", - "objc2 0.6.1", + "objc2 0.6.2", "objc2-cloud-kit", "objc2-core-data 0.3.1", "objc2-core-foundation", @@ -2301,8 +2258,8 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17614fdcd9b411e6ff1117dfb1d0150f908ba83a7df81b1f118005fe0a8ea15d" dependencies = [ - "bitflags 2.9.1", - "objc2 0.6.1", + "bitflags 2.9.3", + "objc2 0.6.2", "objc2-foundation 0.3.1", ] @@ -2312,7 +2269,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.3", "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", @@ -2324,8 +2281,8 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "291fbbf7d29287518e8686417cf7239c74700fd4b607623140a7d4a3c834329d" dependencies = [ - "bitflags 2.9.1", - "objc2 0.6.1", + "bitflags 2.9.3", + "objc2 0.6.2", "objc2-foundation 0.3.1", ] @@ -2335,9 +2292,9 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c10c2894a6fed806ade6027bcd50662746363a9589d3ec9d9bef30a4e4bc166" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.3", "dispatch2", - "objc2 0.6.1", + "objc2 0.6.2", ] [[package]] @@ -2346,9 +2303,9 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "989c6c68c13021b5c2d6b71456ebb0f9dc78d752e86a98da7c716f4f9470f5a4" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.3", "dispatch2", - "objc2 0.6.1", + "objc2 0.6.2", "objc2-core-foundation", "objc2-io-surface", ] @@ -2371,7 +2328,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79b3dc0cc4386b6ccf21c157591b34a7f44c8e75b064f85502901ab2188c007e" dependencies = [ - "objc2 0.6.1", + "objc2 0.6.2", "objc2-foundation 0.3.1", ] @@ -2396,7 +2353,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.3", "block2 0.5.1", "dispatch", "libc", @@ -2409,10 +2366,10 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "900831247d2fe1a09a683278e5384cfb8c80c79fe6b166f9d14bfdde0ea1b03c" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.3", "block2 0.6.1", "libc", - "objc2 0.6.1", + "objc2 0.6.2", "objc2-core-foundation", ] @@ -2422,8 +2379,18 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7282e9ac92529fa3457ce90ebb15f4ecbc383e8338060960760fa2cf75420c3c" dependencies = [ - "bitflags 2.9.1", - "objc2 0.6.1", + "bitflags 2.9.3", + "objc2 0.6.2", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-javascript-core" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9052cb1bb50a4c161d934befcf879526fb87ae9a68858f241e693ca46225cf5a" +dependencies = [ + "objc2 0.6.2", "objc2-core-foundation", ] @@ -2433,7 +2400,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.3", "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", @@ -2445,7 +2412,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.3", "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", @@ -2458,19 +2425,30 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90ffb6a0cd5f182dc964334388560b12a57f7b74b3e2dec5e2722aa2dfb2ccd5" dependencies = [ - "bitflags 2.9.1", - "objc2 0.6.1", + "bitflags 2.9.3", + "objc2 0.6.2", "objc2-foundation 0.3.1", ] +[[package]] +name = "objc2-security" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1f8e0ef3ab66b08c42644dcb34dba6ec0a574bbd8adbb8bdbdc7a2779731a44" +dependencies = [ + "bitflags 2.9.3", + "objc2 0.6.2", + "objc2-core-foundation", +] + [[package]] name = "objc2-ui-kit" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25b1312ad7bc8a0e92adae17aa10f90aae1fb618832f9b993b022b591027daed" dependencies = [ - "bitflags 2.9.1", - "objc2 0.6.1", + "bitflags 2.9.3", + "objc2 0.6.2", "objc2-core-foundation", "objc2-foundation 0.3.1", ] @@ -2481,12 +2459,14 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91672909de8b1ce1c2252e95bbee8c1649c9ad9d14b9248b3d7b4c47903c47ad" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.3", "block2 0.6.1", - "objc2 0.6.1", + "objc2 0.6.2", "objc2-app-kit 0.3.1", "objc2-core-foundation", "objc2-foundation 0.3.1", + "objc2-javascript-core", + "objc2-security", ] [[package]] @@ -2575,9 +2555,9 @@ checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" dependencies = [ "lock_api", "parking_lot_core", @@ -2585,38 +2565,28 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.7" +version = "0.9.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" +checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.2.16", + "redox_syscall", "smallvec", - "windows-sys 0.45.0", + "windows-targets 0.52.6", ] [[package]] name = "pathdiff" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" +checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" [[package]] name = "percent-encoding" -version = "2.3.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "pest" -version = "2.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "028accff104c4e513bad663bbcd2ad7cfd5304144404c31ed0a77ac103d00660" -dependencies = [ - "thiserror 1.0.69", - "ucd-trie", -] +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "phf" @@ -2709,7 +2679,7 @@ dependencies = [ "proc-macro-hack", "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -2722,7 +2692,7 @@ dependencies = [ "phf_shared 0.11.3", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -2731,7 +2701,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7" dependencies = [ - "siphasher 0.3.10", + "siphasher 0.3.11", ] [[package]] @@ -2740,7 +2710,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" dependencies = [ - "siphasher 0.3.10", + "siphasher 0.3.11", ] [[package]] @@ -2752,26 +2722,6 @@ dependencies = [ "siphasher 1.0.1", ] -[[package]] -name = "pin-project" -version = "1.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", -] - [[package]] name = "pin-project-lite" version = "0.2.16" @@ -2791,40 +2741,40 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" dependencies = [ "atomic-waker", - "fastrand 2.3.0", + "fastrand", "futures-io", ] [[package]] name = "pkg-config" -version = "0.3.26" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "plist" -version = "1.4.0" +version = "1.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5329b8f106a176ab0dce4aae5da86bfcb139bb74fb00882859e03745011f3635" +checksum = "3af6b589e163c5a788fab00ce0c0366f6efbb9959c2f9874b224936af7fce7e1" dependencies = [ - "base64 0.13.1", - "indexmap 1.9.2", - "line-wrap", - "quick-xml 0.26.0", + "base64 0.22.1", + "indexmap 2.11.0", + "quick-xml 0.38.3", "serde", "time", ] [[package]] name = "png" -version = "0.17.7" +version = "0.17.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d708eaf860a19b19ce538740d2b4bdeeb8337fa53f7738455e706623ad5c638" +checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" dependencies = [ "bitflags 1.3.2", "crc32fast", + "fdeflate", "flate2", - "miniz_oxide 0.6.2", + "miniz_oxide", ] [[package]] @@ -2858,9 +2808,12 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] [[package]] name = "precomputed-hash" @@ -2870,12 +2823,12 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" [[package]] name = "proc-macro-crate" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66618389e4ec1c7afe67d51a9bf34ff9236480f8d51e7489b7d5ab0303c13f34" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "toml_edit 0.18.1", + "toml_edit 0.19.15", ] [[package]] @@ -2897,7 +2850,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", "version_check", ] @@ -2920,27 +2873,27 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.97" +version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61789d7719defeb74ea5fe81f2fdfdbd28a803847077cecce2ff14e1472f6f1" +checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" dependencies = [ "unicode-ident", ] [[package]] name = "quick-xml" -version = "0.26.0" +version = "0.37.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f50b1c63b38611e7d4d7f68b82d3ad0cc71a2ad2e7f61fc10f1328d917c93cd" +checksum = "331e97a1af0bf59823e6eadffe373d7b27f485be8748f71471c662c1f269b7fb" dependencies = [ "memchr", ] [[package]] name = "quick-xml" -version = "0.37.5" +version = "0.38.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "331e97a1af0bf59823e6eadffe373d7b27f485be8748f71471c662c1f269b7fb" +checksum = "42a232e7487fc2ef313d96dde7948e7a3c05101870d8985e4fd8d26aedd27b89" dependencies = [ "memchr", ] @@ -3020,7 +2973,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.8", + "getrandom 0.2.16", ] [[package]] @@ -3047,22 +3000,13 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_syscall" version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.3", ] [[package]] @@ -3071,9 +3015,9 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" dependencies = [ - "getrandom 0.2.8", + "getrandom 0.2.16", "libredox", - "thiserror 2.0.14", + "thiserror 2.0.16", ] [[package]] @@ -3093,14 +3037,14 @@ checksum = "1165225c21bff1f3bbce98f5a1f889949bc902d3575308cc7b0de30b4f6d27c7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] name = "regex" -version = "1.11.1" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +checksum = "23d7fd106d8c02486a8d64e778353d1cffe08ce79ac2e82f540c86d0facf6912" dependencies = [ "aho-corasick", "memchr", @@ -3110,9 +3054,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6" dependencies = [ "aho-corasick", "memchr", @@ -3121,24 +3065,15 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" - -[[package]] -name = "remove_dir_all" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] +checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001" [[package]] name = "reqwest" -version = "0.12.9" +version = "0.12.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" +checksum = "d429f34c8092b2d42c7c93cec323bb4adeb7c67698f70839adec842ec10c7ceb" dependencies = [ "base64 0.22.1", "bytes", @@ -3149,11 +3084,8 @@ dependencies = [ "http-body-util", "hyper", "hyper-util", - "ipnet", "js-sys", "log", - "mime", - "once_cell", "percent-encoding", "pin-project-lite", "serde", @@ -3162,13 +3094,14 @@ dependencies = [ "sync_wrapper", "tokio", "tokio-util", + "tower", + "tower-http", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "wasm-streams", "web-sys", - "windows-registry", ] [[package]] @@ -3202,20 +3135,11 @@ checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" [[package]] name = "rustc_version" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" -dependencies = [ - "semver 0.11.0", -] - -[[package]] -name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ - "semver 1.0.16", + "semver", ] [[package]] @@ -3224,7 +3148,7 @@ version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.3", "errno", "libc", "linux-raw-sys", @@ -3233,21 +3157,15 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.11" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5583e89e108996506031660fe09baa5011b9dd0341b89029313006d1fb508d70" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "ryu" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" - -[[package]] -name = "safemem" -version = "0.3.3" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "same-file" @@ -3265,7 +3183,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" dependencies = [ "dyn-clone", - "indexmap 1.9.2", + "indexmap 1.9.3", "schemars_derive", "serde", "serde_json", @@ -3306,7 +3224,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -3341,31 +3259,13 @@ dependencies = [ [[package]] name = "semver" -version = "0.11.0" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver" -version = "1.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" +checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" dependencies = [ "serde", ] -[[package]] -name = "semver-parser" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" -dependencies = [ - "pest", -] - [[package]] name = "serde" version = "1.0.219" @@ -3394,7 +3294,7 @@ checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -3405,14 +3305,14 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] name = "serde_json" -version = "1.0.142" +version = "1.0.143" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "030fedb782600dcbd6f02d479bf0d817ac3bb40d644745b769d6a96bc3afc5a7" +checksum = "d401abef1d108fbd9cbaebc3e46611f4b1021f714a0597a71f41ee463f5f4a5a" dependencies = [ "itoa", "memchr", @@ -3422,13 +3322,13 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.10" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a5ec9fa74a20ebbe5d9ac23dac1fc96ba0ecfe9f50f2843b52e537b10fbcb4e" +checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 2.0.106", ] [[package]] @@ -3470,8 +3370,8 @@ dependencies = [ "base64 0.22.1", "chrono", "hex", - "indexmap 1.9.2", - "indexmap 2.10.0", + "indexmap 1.9.3", + "indexmap 2.11.0", "schemars 0.9.0", "schemars 1.0.4", "serde", @@ -3490,14 +3390,14 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] name = "serialize-to-javascript" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9823f2d3b6a81d98228151fdeaf848206a7855a7a042bbf9bf870449a66cafb" +checksum = "04f3666a07a197cdb77cdf306c32be9b7f598d7060d50cfd4d5aa04bfd92f6c5" dependencies = [ "serde", "serde_json", @@ -3506,13 +3406,13 @@ dependencies = [ [[package]] name = "serialize-to-javascript-impl" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74064874e9f6a15f04c1f3cb627902d0e6b410abbf36668afa873c61889f1763" +checksum = "772ee033c0916d670af7860b6e1ef7d658a4629a6d0b4c8c3e67f09b3765b75d" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 2.0.106", ] [[package]] @@ -3527,9 +3427,9 @@ dependencies = [ [[package]] name = "sha1" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", "cpufeatures", @@ -3538,9 +3438,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ "cfg-if", "cpufeatures", @@ -3594,11 +3494,17 @@ dependencies = [ "libc", ] +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + [[package]] name = "siphasher" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "siphasher" @@ -3618,16 +3524,6 @@ version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" -[[package]] -name = "socket2" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - [[package]] name = "socket2" version = "0.6.0" @@ -3654,7 +3550,7 @@ dependencies = [ "objc2-foundation 0.2.2", "objc2-quartz-core 0.2.2", "raw-window-handle", - "redox_syscall 0.5.17", + "redox_syscall", "wasm-bindgen", "web-sys", "windows-sys 0.59.0", @@ -3700,26 +3596,25 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "string_cache" -version = "0.8.4" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213494b7a2b503146286049378ce02b482200519accc31872ee8be91fa820a08" +checksum = "bf776ba3fa74f83bf4b63c3dcbbf82173db2632ed8452cb2d891d33f459de70f" dependencies = [ "new_debug_unreachable", - "once_cell", "parking_lot", - "phf_shared 0.10.0", + "phf_shared 0.11.3", "precomputed-hash", "serde", ] [[package]] name = "string_cache_codegen" -version = "0.5.2" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988" +checksum = "c711928715f1fe0fe509c53b43e993a9a557babc2d0a3567d0a3006f1ac931a0" dependencies = [ - "phf_generator 0.10.0", - "phf_shared 0.10.0", + "phf_generator 0.11.3", + "phf_shared 0.11.3", "proc-macro2", "quote", ] @@ -3743,9 +3638,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.107" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2", "quote", @@ -3754,9 +3649,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.104" +version = "2.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" +checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" dependencies = [ "proc-macro2", "quote", @@ -3780,29 +3675,30 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] name = "system-deps" -version = "6.0.3" +version = "6.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2955b1fe31e1fa2fbd1976b71cc69a606d7d4da16f6de3333d0c92d51419aeff" +checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" dependencies = [ "cfg-expr", - "heck 0.4.1", + "heck 0.5.0", "pkg-config", - "toml 0.5.11", + "toml 0.8.2", "version-compare", ] [[package]] name = "tao" -version = "0.34.0" +version = "0.34.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49c380ca75a231b87b6c9dd86948f035012e7171d1a7c40a9c2890489a7ffd8a" +checksum = "4daa814018fecdfb977b59a094df4bd43b42e8e21f88fddfc05807e6f46efaaf" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.3", + "block2 0.6.1", "core-foundation", "core-graphics", "crossbeam-channel", @@ -3819,7 +3715,7 @@ dependencies = [ "ndk", "ndk-context", "ndk-sys", - "objc2 0.6.1", + "objc2 0.6.2", "objc2-app-kit 0.3.1", "objc2-foundation 0.3.1", "once_cell", @@ -3843,17 +3739,24 @@ checksum = "f4e16beb8b2ac17db28eab8bca40e62dbfbb34c0fcdc6d9826b11b7b5d047dfd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] +[[package]] +name = "target-lexicon" +version = "0.12.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" + [[package]] name = "tauri" -version = "2.7.0" +version = "2.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "352a4bc7bf6c25f5624227e3641adf475a6535707451b09bb83271df8b7a6ac7" +checksum = "5d545ccf7b60dcd44e07c6fb5aeb09140966f0aabd5d2aa14a6821df7bc99348" dependencies = [ "anyhow", "bytes", + "cookie", "dirs", "dunce", "embed_plist", @@ -3867,10 +3770,11 @@ dependencies = [ "log", "mime", "muda", - "objc2 0.6.1", + "objc2 0.6.2", "objc2-app-kit 0.3.1", "objc2-foundation 0.3.1", "objc2-ui-kit", + "objc2-web-kit", "percent-encoding", "plist", "raw-window-handle", @@ -3885,7 +3789,7 @@ dependencies = [ "tauri-runtime", "tauri-runtime-wry", "tauri-utils", - "thiserror 2.0.14", + "thiserror 2.0.16", "tokio", "tray-icon", "url", @@ -3898,9 +3802,9 @@ dependencies = [ [[package]] name = "tauri-build" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "182d688496c06bf08ea896459bf483eb29cdff35c1c4c115fb14053514303064" +checksum = "67945dbaf8920dbe3a1e56721a419a0c3d085254ab24cff5b9ad55e2b0016e0b" dependencies = [ "anyhow", "cargo_toml", @@ -3909,20 +3813,20 @@ dependencies = [ "heck 0.5.0", "json-patch", "schemars 0.8.22", - "semver 1.0.16", + "semver", "serde", "serde_json", "tauri-utils", "tauri-winres", - "toml 0.8.2", + "toml 0.9.5", "walkdir", ] [[package]] name = "tauri-codegen" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b54a99a6cd8e01abcfa61508177e6096a4fe2681efecee9214e962f2f073ae4a" +checksum = "1ab3a62cf2e6253936a8b267c2e95839674e7439f104fa96ad0025e149d54d8a" dependencies = [ "base64 0.22.1", "brotli", @@ -3932,13 +3836,13 @@ dependencies = [ "png", "proc-macro2", "quote", - "semver 1.0.16", + "semver", "serde", "serde_json", "sha2", - "syn 2.0.104", + "syn 2.0.106", "tauri-utils", - "thiserror 2.0.14", + "thiserror 2.0.16", "time", "url", "uuid", @@ -3947,23 +3851,23 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "2.3.2" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7945b14dc45e23532f2ded6e120170bbdd4af5ceaa45784a6b33d250fbce3f9e" +checksum = "4368ea8094e7045217edb690f493b55b30caf9f3e61f79b4c24b6db91f07995e" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", "tauri-codegen", "tauri-utils", ] [[package]] name = "tauri-plugin" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bd5c1e56990c70a906ef67a9851bbdba9136d26075ee9a2b19c8b46986b3e02" +checksum = "9946a3cede302eac0c6eb6c6070ac47b1768e326092d32efbb91f21ed58d978f" dependencies = [ "anyhow", "glob", @@ -3972,15 +3876,15 @@ dependencies = [ "serde", "serde_json", "tauri-utils", - "toml 0.8.2", + "toml 0.9.5", "walkdir", ] [[package]] name = "tauri-plugin-dialog" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37e5858cc7b455a73ab4ea2ebc08b5be33682c00ff1bf4cad5537d4fb62499d9" +checksum = "0ee5a3c416dc59d7d9aa0de5490a82d6e201c67ffe97388979d77b69b08cda40" dependencies = [ "log", "raw-window-handle", @@ -3990,15 +3894,15 @@ dependencies = [ "tauri", "tauri-plugin", "tauri-plugin-fs", - "thiserror 2.0.14", + "thiserror 2.0.16", "url", ] [[package]] name = "tauri-plugin-fs" -version = "2.4.1" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c6ef84ee2f2094ce093e55106d90d763ba343fad57566992962e8f76d113f99" +checksum = "315784ec4be45e90a987687bae7235e6be3d6e9e350d2b75c16b8a4bf22c1db7" dependencies = [ "anyhow", "dunce", @@ -4011,16 +3915,16 @@ dependencies = [ "tauri", "tauri-plugin", "tauri-utils", - "thiserror 2.0.14", - "toml 0.8.2", + "thiserror 2.0.16", + "toml 0.9.5", "url", ] [[package]] name = "tauri-plugin-shell" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b9ffadec5c3523f11e8273465cacb3d86ea7652a28e6e2a2e9b5c182f791d25" +checksum = "54777d0c0d8add34eea3ced84378619ef5b97996bd967d3038c668feefd21071" dependencies = [ "encoding_rs", "log", @@ -4033,43 +3937,46 @@ dependencies = [ "shared_child", "tauri", "tauri-plugin", - "thiserror 2.0.14", + "thiserror 2.0.16", "tokio", ] [[package]] name = "tauri-runtime" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b1cc885be806ea15ff7b0eb47098a7b16323d9228876afda329e34e2d6c4676" +checksum = "d4cfc9ad45b487d3fded5a4731a567872a4812e9552e3964161b08edabf93846" dependencies = [ "cookie", "dpi", "gtk", "http", "jni", - "objc2 0.6.1", + "objc2 0.6.2", "objc2-ui-kit", + "objc2-web-kit", "raw-window-handle", "serde", "serde_json", "tauri-utils", - "thiserror 2.0.14", + "thiserror 2.0.16", "url", + "webkit2gtk", + "webview2-com", "windows", ] [[package]] name = "tauri-runtime-wry" -version = "2.7.2" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe653a2fbbef19fe898efc774bc52c8742576342a33d3d028c189b57eb1d2439" +checksum = "c1fe9d48bd122ff002064e88cfcd7027090d789c4302714e68fcccba0f4b7807" dependencies = [ "gtk", "http", "jni", "log", - "objc2 0.6.1", + "objc2 0.6.2", "objc2-app-kit 0.3.1", "objc2-foundation 0.3.1", "once_cell", @@ -4088,9 +3995,9 @@ dependencies = [ [[package]] name = "tauri-utils" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9330c15cabfe1d9f213478c9e8ec2b0c76dab26bb6f314b8ad1c8a568c1d186e" +checksum = "41a3852fdf9a4f8fbeaa63dc3e9a85284dd6ef7200751f0bd66ceee30c93f212" dependencies = [ "anyhow", "brotli", @@ -4110,14 +4017,14 @@ dependencies = [ "quote", "regex", "schemars 0.8.22", - "semver 1.0.16", + "semver", "serde", "serde-untagged", "serde_json", "serde_with", "swift-rs", - "thiserror 2.0.14", - "toml 0.8.2", + "thiserror 2.0.16", + "toml 0.9.5", "url", "urlpattern", "uuid", @@ -4136,16 +4043,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.3.0" +version = "3.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +checksum = "15b61f8f20e3a6f7e0649d825294eaf317edce30f82cf6026e7e4cb9222a7d1e" dependencies = [ - "cfg-if", - "fastrand 1.8.0", - "libc", - "redox_syscall 0.2.16", - "remove_dir_all", - "winapi", + "fastrand", + "getrandom 0.3.3", + "once_cell", + "rustix", + "windows-sys 0.60.2", ] [[package]] @@ -4170,11 +4076,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.14" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b0949c3a6c842cbde3f1686d6eea5a010516deb7085f79db747562d4102f41e" +checksum = "3467d614147380f2e4e374161426ff399c91084acd2363eaf549172b3d5e60c0" dependencies = [ - "thiserror-impl 2.0.14", + "thiserror-impl 2.0.16", ] [[package]] @@ -4185,18 +4091,18 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] name = "thiserror-impl" -version = "2.0.14" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc5b44b4ab9c2fdd0e0512e6bece8388e214c0749f5862b114cc5b7a25daf227" +checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -4254,16 +4160,16 @@ dependencies = [ "pin-project-lite", "signal-hook-registry", "slab", - "socket2 0.6.0", + "socket2", "tracing", "windows-sys 0.59.0", ] [[package]] name = "tokio-util" -version = "0.7.13" +version = "0.7.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" +checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" dependencies = [ "bytes", "futures-core", @@ -4272,15 +4178,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "toml" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] - [[package]] name = "toml" version = "0.8.2" @@ -4299,21 +4196,15 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75129e1dc5000bfbaa9fee9d1b21f974f9fbad9daec557a521ee6e080825f6e8" dependencies = [ - "indexmap 2.10.0", + "indexmap 2.11.0", "serde", "serde_spanned 1.0.0", "toml_datetime 0.7.0", "toml_parser", "toml_writer", - "winnow 0.7.12", + "winnow 0.7.13", ] -[[package]] -name = "toml_datetime" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4553f467ac8e3d374bc9a177a26801e5d0f9b211aa1673fb137a403afd1c9cf5" - [[package]] name = "toml_datetime" version = "0.6.3" @@ -4334,13 +4225,13 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.18.1" +version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c59d8dd7d0dcbc6428bf7aa2f0e823e26e43b3c9aca15bbc9475d23e5fa12b" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 1.9.2", - "nom8", - "toml_datetime 0.5.1", + "indexmap 2.11.0", + "toml_datetime 0.6.3", + "winnow 0.5.40", ] [[package]] @@ -4349,7 +4240,7 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ - "indexmap 2.10.0", + "indexmap 2.11.0", "serde", "serde_spanned 0.6.9", "toml_datetime 0.6.3", @@ -4362,7 +4253,7 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b551886f449aa90d4fe2bdaa9f4a2577ad2dde302c61ecf262d80b116db95c10" dependencies = [ - "winnow 0.7.12", + "winnow 0.7.13", ] [[package]] @@ -4373,19 +4264,37 @@ checksum = "fcc842091f2def52017664b53082ecbbeb5c7731092bad69d2c63050401dfd64" [[package]] name = "tower" -version = "0.4.13" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" dependencies = [ "futures-core", "futures-util", - "pin-project", "pin-project-lite", + "sync_wrapper", "tokio", "tower-layer", "tower-service", ] +[[package]] +name = "tower-http" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" +dependencies = [ + "bitflags 2.9.3", + "bytes", + "futures-util", + "http", + "http-body", + "iri-string", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", +] + [[package]] name = "tower-layer" version = "0.3.3" @@ -4400,11 +4309,10 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ - "cfg-if", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -4412,20 +4320,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.23" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" +checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 2.0.106", ] [[package]] name = "tracing-core" -version = "0.1.30" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" dependencies = [ "once_cell", ] @@ -4440,7 +4348,7 @@ dependencies = [ "dirs", "libappindicator", "muda", - "objc2 0.6.1", + "objc2 0.6.2", "objc2-app-kit 0.3.1", "objc2-core-foundation", "objc2-core-graphics", @@ -4448,7 +4356,7 @@ dependencies = [ "once_cell", "png", "serde", - "thiserror 2.0.14", + "thiserror 2.0.16", "windows-sys 0.59.0", ] @@ -4466,15 +4374,9 @@ checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" [[package]] name = "typenum" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" - -[[package]] -name = "ucd-trie" -version = "0.1.5" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" +checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" [[package]] name = "uds_windows" @@ -4482,7 +4384,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9" dependencies = [ - "memoffset 0.9.1", + "memoffset", "tempfile", "winapi", ] @@ -4530,9 +4432,9 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.6" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" [[package]] name = "unicode-segmentation" @@ -4542,9 +4444,9 @@ checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "url" -version = "2.5.4" +version = "2.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" dependencies = [ "form_urlencoded", "idna", @@ -4578,25 +4480,27 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] name = "uuid" -version = "1.3.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1674845326ee10d37ca60470760d4288a6f80f304007d92e5c53bab78c9cfd79" +checksum = "f33196643e165781c20a5ead5582283a7dacbb87855d867fbc2df3f81eddc1be" dependencies = [ - "getrandom 0.2.8", + "getrandom 0.3.3", + "js-sys", "serde", + "wasm-bindgen", ] [[package]] name = "version-compare" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "579a42fc0b8e0c63b76519a339be31bed574929511fa53c1a3acae26eb258f29" +checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "vswhom" @@ -4620,12 +4524,11 @@ dependencies = [ [[package]] name = "walkdir" -version = "2.3.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", - "winapi", "winapi-util", ] @@ -4646,9 +4549,9 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasi" @@ -4681,7 +4584,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", "wasm-bindgen-shared", ] @@ -4716,7 +4619,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4763,7 +4666,7 @@ version = "0.31.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c66a47e840dc20793f2264eb4b3e4ecb4b75d91c0dd4af04b456128e0bdd449d" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.3", "rustix", "wayland-backend", "wayland-scanner", @@ -4775,7 +4678,7 @@ version = "0.32.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "efa790ed75fbfd71283bd2521a1cfdc022aabcc28bdcff00851f9e4ae88d9901" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.3", "wayland-backend", "wayland-client", "wayland-scanner", @@ -4879,7 +4782,7 @@ checksum = "1d228f15bba3b9d56dde8bddbee66fa24545bd17b48d5128ccf4a8742b18e431" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -4888,7 +4791,7 @@ version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "36695906a1b53a3bf5c4289621efedac12b73eeb0b89e7e1a89b517302d5d75c" dependencies = [ - "thiserror 2.0.14", + "thiserror 2.0.16", "windows", "windows-core", ] @@ -4911,11 +4814,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "0978bf7171b3d90bac376700cb56d606feb40f251a475a5d6634613564460b22" dependencies = [ - "winapi", + "windows-sys 0.60.2", ] [[package]] @@ -4930,7 +4833,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9bec5a31f3f9362f2258fd0e9c9dd61a9ca432e7306cc78c444258f0dce9a9c" dependencies = [ - "objc2 0.6.1", + "objc2 0.6.2", "objc2-app-kit 0.3.1", "objc2-core-foundation", "objc2-foundation 0.3.1", @@ -4970,8 +4873,8 @@ dependencies = [ "windows-implement", "windows-interface", "windows-link", - "windows-result 0.3.4", - "windows-strings 0.4.2", + "windows-result", + "windows-strings", ] [[package]] @@ -4993,7 +4896,7 @@ checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -5004,7 +4907,7 @@ checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -5023,26 +4926,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-registry" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" -dependencies = [ - "windows-result 0.2.0", - "windows-strings 0.1.0", - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-result" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" -dependencies = [ - "windows-targets 0.52.6", -] - [[package]] name = "windows-result" version = "0.3.4" @@ -5052,16 +4935,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-strings" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" -dependencies = [ - "windows-result 0.2.0", - "windows-targets 0.52.6", -] - [[package]] name = "windows-strings" version = "0.4.2" @@ -5077,7 +4950,7 @@ version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows-targets 0.42.1", + "windows-targets 0.42.2", ] [[package]] @@ -5118,17 +4991,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ - "windows_aarch64_gnullvm 0.42.1", - "windows_aarch64_msvc 0.42.1", - "windows_i686_gnu 0.42.1", - "windows_i686_msvc 0.42.1", - "windows_x86_64_gnu 0.42.1", - "windows_x86_64_gnullvm 0.42.1", - "windows_x86_64_msvc 0.42.1", + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] @@ -5199,9 +5072,9 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" @@ -5223,9 +5096,9 @@ checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" [[package]] name = "windows_aarch64_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" @@ -5247,9 +5120,9 @@ checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" [[package]] name = "windows_i686_gnu" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" @@ -5283,9 +5156,9 @@ checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" [[package]] name = "windows_i686_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" @@ -5307,9 +5180,9 @@ checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" [[package]] name = "windows_x86_64_gnu" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" @@ -5331,9 +5204,9 @@ checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" @@ -5355,9 +5228,9 @@ checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" [[package]] name = "windows_x86_64_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" @@ -5388,9 +5261,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.7.12" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3edebf492c8125044983378ecb5766203ad3b4c2f7a922bd7dd207f6d443e95" +checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" [[package]] name = "winreg" @@ -5408,7 +5281,7 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.3", ] [[package]] @@ -5419,14 +5292,15 @@ checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" [[package]] name = "wry" -version = "0.52.1" +version = "0.53.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12a714d9ba7075aae04a6e50229d6109e3d584774b99a6a8c60de1698ca111b9" +checksum = "31f0e9642a0d061f6236c54ccae64c2722a7879ad4ec7dff59bd376d446d8e90" dependencies = [ "base64 0.22.1", "block2 0.6.1", "cookie", "crossbeam-channel", + "dirs", "dpi", "dunce", "gdkx11", @@ -5438,7 +5312,7 @@ dependencies = [ "kuchikiki", "libc", "ndk", - "objc2 0.6.1", + "objc2 0.6.2", "objc2-app-kit 0.3.1", "objc2-core-foundation", "objc2-foundation 0.3.1", @@ -5450,7 +5324,7 @@ dependencies = [ "sha2", "soup3", "tao-macros", - "thiserror 2.0.14", + "thiserror 2.0.16", "url", "webkit2gtk", "webkit2gtk-sys", @@ -5512,7 +5386,7 @@ checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", "synstructure", ] @@ -5556,11 +5430,11 @@ version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7a3e850ff1e7217a3b7a07eba90d37fe9bb9e89a310f718afcde5885ca9b6d7" dependencies = [ - "proc-macro-crate 1.3.0", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "regex", - "syn 1.0.107", + "syn 1.0.109", "zvariant_utils", ] @@ -5575,6 +5449,26 @@ dependencies = [ "zvariant", ] +[[package]] +name = "zerocopy" +version = "0.8.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + [[package]] name = "zerofrom" version = "0.1.6" @@ -5592,7 +5486,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", "synstructure", ] @@ -5626,7 +5520,7 @@ checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -5649,10 +5543,10 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72a5857e2856435331636a9fbb415b09243df4521a267c5bedcd5289b4d5799e" dependencies = [ - "proc-macro-crate 1.3.0", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", "zvariant_utils", ] @@ -5664,5 +5558,5 @@ checksum = "00bedb16a193cc12451873fee2a1bc6550225acece0e36f333e68326c73c8172" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] diff --git a/src/client.ts b/src/client.ts index 9f4afae..641ed3d 100644 --- a/src/client.ts +++ b/src/client.ts @@ -11,6 +11,7 @@ import { Modal } from 'lib/modal'; import { AllShortcuts } from './keyboard-shortcuts/all'; import { $ } from './dom'; import { DateTime } from 'luxon'; +import { ThemeManager } from './lib/theme-manager'; // help is a special shortcut that can't be included in the rest // even though its the same Type @@ -107,6 +108,16 @@ function todaysDate() { } async function main() { + // Initialize theme manager and load saved theme preference + const themeManager = ThemeManager.getInstance(); + try { + await themeManager.init(); + console.log('Theme system initialized successfully'); + } catch (error) { + console.error('Failed to initialize theme system:', error); + // Continue with application startup even if theme system fails + } + await api.createDirStructureIfNotExists(); const modal = loadOutlineModal(); diff --git a/src/keyboard-shortcuts/all.ts b/src/keyboard-shortcuts/all.ts index e724dd5..486f1ff 100644 --- a/src/keyboard-shortcuts/all.ts +++ b/src/keyboard-shortcuts/all.ts @@ -16,9 +16,11 @@ import {lower} from "./lower"; import {swapUp} from "./swap-up"; import {swapDown} from "./swap-down"; import {escapeEditing} from "./escape-editing"; +import {themeSelector} from "./theme-selector"; export const AllShortcuts: KeyEventDefinition[] = [ sidebarToggle, + themeSelector, j, k, l, diff --git a/src/keyboard-shortcuts/theme-selector.ts b/src/keyboard-shortcuts/theme-selector.ts new file mode 100644 index 0000000..54191ba --- /dev/null +++ b/src/keyboard-shortcuts/theme-selector.ts @@ -0,0 +1,13 @@ +import { KeyEventDefinition } from './base'; +import { openThemeSelector } from '../modals/theme-selector'; + +export const themeSelector: KeyEventDefinition = { + context: 'navigation', + keys: [ + 'ctrl + t' + ], + description: 'Open theme selector', + action: async (args) => { + openThemeSelector(); + } +} \ No newline at end of file diff --git a/src/lib/theme-manager.ts b/src/lib/theme-manager.ts new file mode 100644 index 0000000..9bcea24 --- /dev/null +++ b/src/lib/theme-manager.ts @@ -0,0 +1,285 @@ +import * as fs from '@tauri-apps/plugin-fs'; +import { resolveResource } from '@tauri-apps/api/path'; + +export interface ThemeInfo { + name: string; + author?: string; + version?: string; + description?: string; + filename: string; +} + +export class ThemeManager { + private static instance: ThemeManager | null = null; + private currentTheme: string = 'default'; + private availableThemes: ThemeInfo[] = []; + private currentThemeLink: HTMLLinkElement | null = null; + private readonly STORAGE_KEY = 'outliner-theme-preference'; + private readonly THEMES_PATH = '/assets/themes/'; + private readonly THEMES_DIR = 'assets/themes'; + public readonly THEMES = [ + 'default.css', + 'dark.css' + ] + + private constructor() {} + + public static getInstance(): ThemeManager { + if (!ThemeManager.instance) { + ThemeManager.instance = new ThemeManager(); + } + return ThemeManager.instance; + } + + public async init(): Promise { + try { + await this.discoverAvailableThemes(); + const savedTheme = this.loadThemePreference(); + await this.loadTheme(savedTheme || 'default'); + console.log(`Theme system initialized with theme: ${this.currentTheme}`); + } catch (error) { + console.error('Theme initialization failed, using fallback:', error); + // Even if discovery fails, try to load default theme + this.availableThemes = [{ + name: 'Default Theme', + filename: 'default.css', + description: 'The original color scheme' + }]; + await this.loadTheme('default'); + } + } + + public async loadTheme(themeName: string): Promise { + try { + const themeInfo = this.availableThemes.find(t => + t.filename.replace('.css', '') === themeName + ); + + if (!themeInfo) { + console.warn(`Theme "${themeName}" not found, falling back to default`); + await this.loadThemeCSS('default.css'); + this.currentTheme = 'default'; + return; + } + + await this.loadThemeCSS(themeInfo.filename); + this.currentTheme = themeName; + this.persistThemePreference(themeName); + } catch (error) { + console.error(`Failed to load theme "${themeName}":`, error); + if (themeName !== 'default') { + await this.loadTheme('default'); + } + } + } + + public async switchTheme(themeName: string): Promise { + this.removeCurrentTheme(); + await this.loadTheme(themeName); + } + + public getCurrentTheme(): string { + return this.currentTheme; + } + + public getAvailableThemes(): ThemeInfo[] { + return [...this.availableThemes]; + } + + public async refreshThemeList(): Promise { + await this.discoverAvailableThemes(); + return this.getAvailableThemes(); + } + + private async loadThemeCSS(filename: string): Promise { + return new Promise((resolve, reject) => { + // Remove any existing theme link first + this.removeCurrentTheme(); + + const link = document.createElement('link'); + link.rel = 'stylesheet'; + link.type = 'text/css'; + link.href = `${this.THEMES_PATH}${filename}`; + link.id = 'theme-stylesheet'; + + link.onload = () => { + this.currentThemeLink = link; + console.log(`Theme CSS loaded successfully: ${filename}`); + resolve(); + }; + + link.onerror = (error) => { + console.error(`Failed to load theme CSS: ${filename}`, error); + document.head.removeChild(link); + reject(new Error(`Failed to load theme CSS: ${filename}`)); + }; + + document.head.appendChild(link); + }); + } + + private removeCurrentTheme(): void { + if (this.currentThemeLink) { + this.currentThemeLink.remove(); + this.currentThemeLink = null; + } + } + + private parseThemeMetadata(cssContent: string): ThemeInfo { + const metadataRegex = /\/\*\s*([\s\S]*?)\s*\*\//; + const match = cssContent.match(metadataRegex); + + const metadata: Partial = { + filename: '' + }; + + if (match && match[1]) { + const lines = match[1].split('\n'); + + for (const line of lines) { + const [key, ...valueParts] = line.split(':'); + if (key && valueParts.length > 0) { + const trimmedKey = key.trim().toLowerCase(); + const value = valueParts.join(':').trim(); + + switch (trimmedKey) { + case 'name': + metadata.name = value; + break; + case 'author': + metadata.author = value; + break; + case 'version': + metadata.version = value; + break; + case 'description': + metadata.description = value; + break; + } + } + } + } + + if (!metadata.name) { + const filename = metadata.filename || 'unknown'; + metadata.name = filename.replace('.css', '').replace(/-/g, ' ') + .split(' ') + .map(word => word.charAt(0).toUpperCase() + word.slice(1)) + .join(' '); + } + + return metadata as ThemeInfo; + } + + private async discoverAvailableThemes(): Promise { + try { + let themeFiles: string[] = []; + + // Try to use Tauri's file system API first + try { + const themesPath = await resolveResource(this.THEMES_DIR); + const entries = await fs.readDir(themesPath); + + // Filter for CSS files + themeFiles = entries + .filter(entry => !entry.isDirectory && entry.name?.endsWith('.css')) + .map(entry => entry.name as string); + + console.log('Discovered theme files via Tauri:', themeFiles); + } catch (tauriError) { + // Fallback to fetching known themes if Tauri file system isn't available + // This handles both development mode and web-only contexts + console.log('Tauri file system not available, using fallback method'); + themeFiles = await this.discoverThemesViaFetch(); + } + + const themes: ThemeInfo[] = []; + + for (const filename of themeFiles) { + try { + let cssContent: string; + + // Try to read via Tauri first + try { + const cssPath = await resolveResource(`${this.THEMES_DIR}/${filename}`); + cssContent = await fs.readTextFile(cssPath); + } catch { + // Fallback to fetch if Tauri read fails + const response = await fetch(`${this.THEMES_PATH}${filename}`); + if (!response.ok) { + throw new Error(`Failed to fetch theme: ${filename}`); + } + cssContent = await response.text(); + } + + const themeInfo = this.parseThemeMetadata(cssContent); + themeInfo.filename = filename; + + themes.push(themeInfo); + } catch (error) { + console.warn(`Failed to parse theme ${filename}:`, error); + themes.push({ + name: filename.replace('.css', '').replace(/-/g, ' ') + .split(' ') + .map(word => word.charAt(0).toUpperCase() + word.slice(1)) + .join(' '), + filename: filename + }); + } + } + + if (themes.length === 0) { + themes.push({ + name: 'Default Theme', + filename: 'default.css', + description: 'The original color scheme' + }); + } + + this.availableThemes = themes; + return themes; + } catch (error) { + console.error('Failed to discover themes:', error); + this.availableThemes = [{ + name: 'Default Theme', + filename: 'default.css', + description: 'The original color scheme' + }]; + return this.availableThemes; + } + } + + private async discoverThemesViaFetch(): Promise { + const availableThemes: string[] = []; + + for (const theme of this.THEMES) { + try { + const response = await fetch(`${this.THEMES_PATH}${theme}`, { method: 'HEAD' }); + if (response.ok) { + availableThemes.push(theme); + } + } catch { + // Theme doesn't exist, skip it + } + } + + return availableThemes.length > 0 ? availableThemes : ['default.css']; + } + + private persistThemePreference(themeName: string): void { + try { + localStorage.setItem(this.STORAGE_KEY, themeName); + } catch (error) { + console.warn('Failed to save theme preference:', error); + } + } + + private loadThemePreference(): string | null { + try { + return localStorage.getItem(this.STORAGE_KEY); + } catch (error) { + console.warn('Failed to load theme preference:', error); + return null; + } + } +} diff --git a/src/modals/theme-selector.ts b/src/modals/theme-selector.ts new file mode 100644 index 0000000..7f3169b --- /dev/null +++ b/src/modals/theme-selector.ts @@ -0,0 +1,122 @@ +import { Modal } from '../lib/modal'; +import { ThemeManager, ThemeInfo } from '../lib/theme-manager'; + +export class ThemeSelectorModal extends Modal { + private themeManager: ThemeManager; + private themes: ThemeInfo[]; + private currentTheme: string; + + constructor() { + super({ + title: 'Select Theme', + keyboardContext: 'theme-selector', + escapeExitable: true + }); + + this.themeManager = ThemeManager.getInstance(); + this.themes = this.themeManager.getAvailableThemes(); + this.currentTheme = this.themeManager.getCurrentTheme(); + } + + renderModalContent(): string { + return ` +
    +
    + ${this.renderThemeList()} +
    +
    + + +
    +
    + `; + } + + private renderThemeList(): string { + return this.themes.map(theme => { + const isActive = theme.filename.replace('.css', '') === this.currentTheme; + return ` +
    +
    +
    ${theme.name}
    + ${theme.author ? `
    by ${theme.author}
    ` : ''} + ${theme.description ? `
    ${theme.description}
    ` : ''} + ${theme.version ? `
    v${theme.version}
    ` : ''} +
    +
    + +
    +
    + `; + }).join(''); + } + + show() { + super.show(); + this.bindEventListeners(); + } + + private bindEventListeners() { + // Handle theme item clicks + const themeItems = document.querySelectorAll('.theme-item'); + themeItems.forEach(item => { + item.addEventListener('click', (e) => { + const target = e.currentTarget as HTMLElement; + const themeName = target.dataset.theme; + + // Update radio button + const radio = target.querySelector('input[type="radio"]') as HTMLInputElement; + if (radio) { + radio.checked = true; + } + + // Update active state + document.querySelectorAll('.theme-item').forEach(el => el.classList.remove('active')); + target.classList.add('active'); + }); + }); + + // Handle Apply button + const applyBtn = document.getElementById('apply-theme'); + if (applyBtn) { + applyBtn.addEventListener('click', async () => { + const selectedRadio = document.querySelector('input[name="theme-selection"]:checked') as HTMLInputElement; + if (selectedRadio) { + const themeName = selectedRadio.value; + try { + await this.themeManager.switchTheme(themeName); + this.currentTheme = themeName; + this.emit('theme-changed', [themeName]); + this.remove(); + } catch (error) { + console.error('Failed to apply theme:', error); + // Could show an error message here + } + } + }); + } + + // Handle Cancel button + const cancelBtn = document.getElementById('cancel-theme'); + if (cancelBtn) { + cancelBtn.addEventListener('click', () => { + this.remove(); + }); + } + } + + async refreshThemeList() { + this.themes = await this.themeManager.refreshThemeList(); + this.updateRender(); + this.bindEventListeners(); + } +} + +export function openThemeSelector(): ThemeSelectorModal { + const modal = new ThemeSelectorModal(); + modal.show(); + return modal; +} \ No newline at end of file